Internet of vehicles federal learning privacy protection method based on block chain

By adopting federated learning methods of blockchain and differential privacy technology in the Internet of Vehicles, combining token reward mechanism and security algorithms, the security and privacy protection issues of data sharing in the Internet of Vehicles are solved, and efficient and secure data sharing is achieved and machine learning processes improve system robustness and model accuracy.

CN119233245APending Publication Date: 2024-12-31GUILIN UNIV OF ELECTRONIC TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411354522.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

In the Internet of Vehicles, data sharing is restricted by data security and privacy leakage, resulting in insufficient data sharing between vehicles, affecting the training accuracy and efficiency of machine learning. Traditional federated learning centralized servers are vulnerable to single point of failure attacks and are difficult to Achieve efficient and secure data sharing in untrusted environments.

Method used

Adopt blockchain-based vehicle federated learning privacy protection method to maintain the transparency, tamper-free and traceable machine learning process through blockchain and differential privacy technology, and design a token reward mechanism to encourage vehicle participation, combining verifiable random functions and the Multi-Krum algorithm perform leading node selection and gradient aggregation to ensure safe and efficient data sharing.

Benefits of technology

It realizes the efficiency and system robustness of vehicle data sharing while maintaining data privacy and security, resisting malicious attacks, improving the transparency of machine learning and global model accuracy, and incentivizing vehicles to actively participate in data sharing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119233245A_ABST
    Figure CN119233245A_ABST
Patent Text Reader

Abstract

The invention discloses an Internet of Vehicles federated learning privacy protection method based on a block chain, and belongs to the technical field of Internet of Vehicles, block chains and federated learning. Aiming at the problem that the security and privacy problems in the traditional federated learning severely hinder the data sharing of the Internet of Vehicles, the method comprises the following steps: firstly, keeping the transparency, non-tampering and traceability of a machine learning process by using a block chain and a differential privacy technology, thereby ensuring efficient and secure machine learning; secondly, designing an excitation method, encouraging local equipment to participate actively, and standardizing illegal behaviors of the local equipment at the same time; and finally, detecting invalid information of the Byzantine by adopting a certain aggregation strategy, and further improving the global model precision. According to the method, the robustness of the system is improved while the data privacy is protected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of Internet of Vehicles, blockchain and federated learning, and in particular to a privacy protection method for federated learning of Internet of Vehicles based on blockchain. Background Art

[0002] The rapid development of 5G networks and new intelligent network technologies has driven the Internet of Vehicles forward, making services such as autonomous driving and content delivery possible. In the Internet of Vehicles, vehicles generate a large amount of different types of data at all times, which contains a large amount of user privacy information, such as vehicle trajectory, speed, location, etc. Data sharing between vehicles can effectively reduce road traffic accidents and improve driving experience. However, data security and privacy leakage in the Internet of Vehicles restrict data sharing between vehicles, causing drivers to be unwilling to share their own data, resulting in low training accuracy and large losses due to insufficient data in the machine learning process.

[0003] Recently, the emerging blockchain has become an important technology in distributed solutions with its decentralization, transparency, immutability and traceability, and has attracted widespread attention in many fields such as finance, medical devices, and smart grids. The vulnerability of traditional federated learning lies in its over-reliance on centralized servers. Once it is attacked by a single point of failure, the vehicles in the Internet of Vehicles may not be able to complete the federated learning process. Some scholars have combined blockchain with machine learning to build a distributed federated learning architecture, which realizes the openness and transparency of information flow and machine learning process in a completely untrusted environment. However, there are still some problems with the alliance chain system. It is difficult to meet the requirements of low latency, high throughput and excellent security in data sharing scenarios. Designing a consensus protocol that is more suitable for Internet of Vehicles data sharing has become an inevitable trend. An efficient and robust consensus protocol can not only improve the efficiency of data sharing, but also resist malicious attacks such as poisoning attacks and 51% attacks. Therefore, how to effectively coordinate and promote data sharing between vehicles while maintaining data privacy and security is the basic guarantee for the smooth progress of data sharing. Summary of the invention

[0004] The present invention proposes a privacy protection method for federated learning in Internet of Vehicles based on blockchain, which aims to solve the problems raised in the above background technology, and use blockchain and differential privacy to keep the machine learning process transparent, tamper-proof and traceable, thereby ensuring safe and efficient machine learning. In addition, in response to the uncooperative behavior of individual vehicles, an incentive method is designed, which can encourage vehicles to actively participate and regulate potential illegal behaviors by coupling the number of tokens of local devices with the leader node selection algorithm.

[0005] The technical solution adopted by this method includes the following steps:

[0006] Step 1: Design a blockchain-based IoV federated learning model, initialize local devices such as vehicles and RSUs, initialize the blockchain, and create block B0;

[0007] Step 2: After the system is initialized, select the leader node based on the token;

[0008] Step 3: The local device uses the random descent method to train the local model, adds Gaussian noise when sharing local gradients, and performs differential privacy gradient sharing;

[0009] Step 4: After the local device receives the shared gradient, the leader node aggregates and broadcasts the gradient and generates a block based on the verification result;

[0010] Step 5: The local device downloads the new block from the blockchain network, obtains the global gradient, verifies the global gradient, updates the local model, and starts the next round of training from step 2 until the model converges or the maximum number of training rounds is reached;

[0011] Step 1 specifically includes the following:

[0012] Design a blockchain-based Internet of Vehicles federated learning model, which consists of vehicles and RSUs and other devices with communication capabilities and data collection and storage capabilities. All devices need to apply for registration of real identity information with a trusted authority before they can participate in data sharing. The local device systems participating in data sharing will issue public keys pk and private keys sk, where the public key serves as the unique identity id participating in the data sharing process. The public key and identity id can be transmitted in the network as public information, and each vehicle can obtain them during network transmission. The RSU sends the task to the authenticated and requested data set D={D1,D2,…,D N} service providing vehicle. After multiple rounds of collaborative training, the service providing vehicle will calculate the final model and send it to RSUs. When the blockchain system is running, the system will create a genesis block B0, which records the public key and identity id, version number, block height, timestamp and hash value of the participating local device. At the same time, when each local device joins the blockchain system, the system will issue the same number of tokens.

[0013] In order to improve the robustness of the blockchain, the selection of leader nodes should be disordered and unpredictable. In data sharing, the selected node plays the role of leader to coordinate the participating nodes to reach a consensus on the global model; Step 2 specifically includes the following:

[0014] Each node executes the leader node selection algorithm in the first phase of the consensus process, which is based on the Verifiable Random Function (VRF) and the Cumulative Distribution Function (CDF) of the binomial distribution, including any competing node v in the model. i Common functions: LeaderSelect(sk i ,c i ,C),Sortition(sk i ,seed,τ,C), LeaderCounter(c i ,h i ,p). Among them, c i is node v i The number of tokens owned, C is the total number of tokens owned by all nodes, seed is the random seed, h i is node v i Hash value, π i is node v i The hash value proof. VRF takes the private key and random seed as input and outputs h i and π i .

[0015] Each competitor has a certain number of tokens. During the system selection process, the tokens follow a binomial distribution. The probability of each token being selected is p = τ / C, where τ is the number of tokens the system expects to select. Then the CDF of different numbers of tokens selected for each node is calculated. CDF has boundedness, that is, for all real numbers x, 0≤F(x)≤1, where F(x) is the local device loss function. The model divides the interval [0,1] into (c+1) intervals, each of which is , if h i / lSatisfaction

[0016]

[0017] Among them, r i is the priority of the node, where r i =0, or satisfies

[0018]

[0019] Here, r i >0,r i ∈{1,...,c i}, indicating how many tokens the node has been selected, which also represents the priority of the node in participating in the leadership node. It can be seen that the election of the leadership node is related to the number of tokens, which means that the node with more tokens will have a greater probability of being elected as the leadership node. At the same time, in addition to the tokens obtained when the system is initialized, the system gives tokens as rewards based on the contribution of the node. Competitors are sorted by the Sortition (sk i ,seed,τ,C) function calculates (h i ,π i ,r i ), broadcast to the network, and also receive (h,π,r) from other competitors. Then, the competitor will execute VerifyVRF(pk,h j ,π j ,seed) function, verify the passed (h j ,π j ,r j )Add to list L i Finally, list L i The node with the highest priority becomes the leader node, responsible for guiding and organizing consensus.

[0020] The local device uses the random descent method to train the model. The local device can obtain the local gradient through the global model parameter calculation in the blockchain; step 3 specifically includes the following:

[0021] In round t, the local device passes the global model parameter w in the blockchain i (t-1), the local gradient is calculated, that is,

[0022]

[0023] In order to protect the data privacy of nodes, Gaussian noise is added to perturb the gradient before exchanging the shared gradient, that is,

[0024]

[0025] in, C = Δ2g(t), ε is the differential privacy budget, δ is the probability of allowing strict violation of differential privacy, which is generally a small constant. vi will perturb the gradient g i (t) Broadcast to the blockchain network, and neighbor nodes further verify and update the local gradient list.

[0026] Step 4 specifically includes the following:

[0027] After the local device receives the shared gradient in the blockchain network, the leader node calculates the aggregate gradient through a deterministic algorithm in the Pre-prepare phase, namely

[0028] w(t)=Γ(g1(t),g2(t),...,g N (t))

[0029] Among them, Γ is the Multi-Krum gradient aggregation rule, which takes its own true gradient and the perturbation gradient of other consensus nodes as input and outputs an aggregated gradient. In the model, there are f Byzantine nodes, whose number satisfies 2f+2<N, and the local gradient of the Byzantine node usually has a large Euclidean distance from the honest node. After calculating the Euclidean distance between each local gradient and all other gradients, the Euclidean distance between each gradient and the nearest Nf-2 gradients is added to obtain the gradient quality score, that is,

[0030]

[0031] The Multi-Krum algorithm selects the gradient with the highest quality score as output. Then, the leader node packages w(t) into B(t) and broadcasts it in the blockchain network. At the same time, each follower node calculates an aggregate gradient according to the Multi-Krum algorithm. Serves as the basis for verifying the global gradient of the leader node.

[0032] Step 5 specifically includes the following:

[0033] In distributed federated learning, each service-provided local device executes a deterministic algorithm to calculate the model parameters for the next round based on the local model sent by other local devices to update the model to the latest one, i.e.

[0034] w(t+1)=w(t)-η·Γ(g1(t),g2(t),...,g i (t),...,g N (t))

[0035] Where η is the learning rate, g i (t) is the tth round v i The local gradient of , Γ is a deterministic algorithm, which means that all service-providing vehicles use the same initial values ​​and the same parameters to execute it.

[0036] Compared with the prior art, the present invention has the following beneficial effects:

[0037] The method of the present invention utilizes blockchain and differential privacy technology to keep the machine learning process transparent, tamper-proof and traceable, thereby ensuring safe and efficient machine learning. In addition, in order to motivate local devices to honestly participate in federated learning and actively contribute computing resources and high-quality data. A token reward mechanism is designed, and tokens are used in the blockchain leader node selection phase, which not only motivates vehicles to actively participate, but also effectively regulates their potential malicious behaviors. Finally, a certain aggregation strategy is used to detect Byzantine invalid information, which further improves the global model accuracy. The present invention improves the robustness of the system while protecting data privacy. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 It is a step diagram of the present invention. Figure 2 This is a model diagram of the Internet of Vehicles federated learning model of the present invention. DETAILED DESCRIPTION

[0038] In order to clarify the technical problems, technical solutions, implementation processes and performance demonstrations, the present invention is further described in detail in combination with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Various exemplary embodiments, features and aspects of the present disclosure will be described in detail with reference to the accompanying drawings. The same figure numbers in the drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the drawings, the drawings do not have to be drawn to scale unless otherwise specified.

[0039] This embodiment proposes a privacy protection method for federated learning of Internet of Vehicles based on blockchain, including the following steps:

[0041] Step 1: Design a data sharing model for connected vehicle autonomous driving, initialize local devices such as vehicles and RSUs, initialize the blockchain, and generate a genesis block.

[0042] Step 2: The device trains a differentially private machine learning model on the local dataset.

[0043] Step 3: Perform differential privacy gradient sharing.

[0044] Step 4: Gradient verification.

[0045] Step 5: The local device downloads the new block from the blockchain network, obtains the global gradient, verifies the legitimacy of the global gradient, updates the local model, and starts the next round of training from step 2 until the model converges or the maximum number of training rounds is reached.

[0046] Step 1 specifically includes the following:

[0047] Design a blockchain-based Internet of Vehicles federated learning model, which consists of vehicles and RSUs and other devices with communication capabilities and data collection and storage capabilities. All devices need to apply for registration of real identity information with a trusted authority before they can participate in data sharing. The local device systems participating in data sharing will issue public keys pk and private keys sk, where the public key serves as the unique identity id participating in the data sharing process. The public key and identity id can be transmitted in the network as public information, and each vehicle can obtain them during network transmission. The RSU sends the task to the authenticated and requested data set D={D1,D2,…,D N} service providing vehicle. After multiple rounds of collaborative training, the service providing vehicle will calculate the final model and send it to RSUs. When the blockchain system is running, the system will create a genesis block B0, which records the public key and identity id, version number, block height, timestamp and hash value of the participating local device. At the same time, when each local device joins the blockchain system, the system will issue the same number of tokens.

[0048] In order to improve the robustness of the blockchain, the selection of leader nodes should be disordered and unpredictable. In data sharing, the selected node plays the role of leader to coordinate the participating nodes to reach a consensus on the global model; Step 2 specifically includes the following:

[0049] Each node executes the leader node selection algorithm in the first phase of the consensus process, which is based on the Verifiable Random Function (VRF) and the Cumulative Distribution Function (CDF) of the binomial distribution, including any competing node v in the model. i Common functions: LeaderSelect(sk i ,c i ,C),Sortition(sk i ,seed,τ,C), LeaderCounter(c i ,h i ,p), where c i is node v i The number of tokens owned, C is the total number of tokens owned by all nodes, seed is the random seed, h i is node v i Hash value, π i is node v i The hash value proof. VRF takes the private key sk and the random seed as input and outputs h i and π i .

[0050] Each competitor has a certain number of tokens. During the system selection process, the tokens follow a binomial distribution. The probability of each token being selected is p = τ / C, where τ is the number of tokens the system expects to select. Then the CDF of different numbers of tokens selected for each node is calculated. CDF has boundedness, that is, for all real numbers x, 0≤F(x)≤1, where F(x) is the local device loss function. The model divides the interval [0,1] into (c+1) intervals, each of which is If h i / lSatisfaction

[0051]

[0052] Among them, r i is the priority of the node, where r i =0, or satisfies

[0053]

[0054] Here, r i >0,r i ∈{1,...,c i}, indicating how many tokens the node has been selected, which also represents the priority of the node in participating in the leadership node. It can be seen that the election of the leadership node is related to the number of tokens, which means that the node with more tokens will have a greater probability of being elected as the leadership node. At the same time, in addition to the tokens obtained when the system is initialized, the system gives tokens as rewards based on the contribution of the node. Competitors are sorted by the Sortition (sk i ,seed,τ,C) function calculates (h i ,π i ,r i ), broadcast to the network, and also receive (h,π,r) from other competitors. Then, the competitor will execute VerifyVRF(pk,h j ,π j ,seed) function, verify the passed (h j ,π j ,r j )Add to list L i Finally, list L i The node with the highest priority becomes the leader node, responsible for guiding and organizing consensus.

[0055] The local device uses the random descent method to train the model. The local device can obtain the local gradient through the global model parameter calculation in the blockchain; step 3 specifically includes the following:

[0056] In round t, the local device passes the global model parameter w in the blockchain i(t-1), the local gradient is calculated, that is,

[0057]

[0058] In order to protect the data privacy of nodes, Gaussian noise is added to perturb the gradient before exchanging the shared gradient, that is,

[0059]

[0060] in, C = Δ2g(t), ε is the differential privacy budget, δ is the probability of allowing strict violation of differential privacy, which is generally a small constant. i The perturbation gradient g i (t) Broadcast to the blockchain network, and neighbor nodes further verify and update the local gradient list.

[0061] Step 4 specifically includes the following:

[0062] After the local device receives the shared gradient in the blockchain network, the leader node calculates the aggregate gradient through a deterministic algorithm in the Pre-prepare phase, namely

[0063] w(t)=Γ(g1(t),g2(t),...,g N (t))

[0064] Among them, Γ is the Multi-Krum gradient aggregation rule, which takes its own true gradient and the perturbation gradient of other consensus nodes as input and outputs an aggregated gradient. In the model, there are f Byzantine nodes, whose number satisfies 2f+2<N, and the local gradient of the Byzantine node usually has a large Euclidean distance from the honest node. After calculating the Euclidean distance between each local gradient and all other gradients, the Euclidean distance between each gradient and the nearest Nf-2 gradients is added to obtain the gradient quality score, that is,

[0065]

[0066] The Multi-Krum algorithm selects the gradient with the highest quality score as output. Then, the leader node packages w(t) into B(t) and broadcasts it in the blockchain network. At the same time, each follower node calculates an aggregate gradient according to the Multi-Krum algorithm. Serves as the basis for verifying the global gradient of the leader node.

[0067] Step 5 specifically includes the following:

[0068] In distributed federated learning, each service-provided local device executes a deterministic algorithm to calculate the model parameters for the next round based on the local model sent by other local devices to update the model to the latest one, i.e. w(t+1)=w(t)-η·Γ(g1(t),g2(t),...,g i (t),...,g N (t))

[0069] Where η is the learning rate, g i (t) is the tth round v i The local gradient of Γ is a deterministic algorithm, which means that all service-providing local devices use the same initial values ​​and the same parameters to execute it.

[0070] What is disclosed above is only a preferred embodiment of the present invention, which certainly cannot be used to limit the scope of rights of the present invention. A person skilled in the art can understand that all or part of the processes of the above embodiment and equivalent changes made according to the claims of the present invention still fall within the scope of the invention.

Claims

1. A privacy protection method for federated learning of Internet of Vehicles based on blockchain, characterized in that: The specific steps include: Step 1: Design a blockchain-based IoV federated learning model, initialize local devices such as vehicles and RSUs, initialize the blockchain, and create block B0; Step 2: After the system is initialized, the leader node is selected based on the token; Step 3: The local device uses the random descent method to train the local model, adds Gaussian noise when sharing local gradients, and performs differential privacy gradient sharing; Step 4: After the local device receives the shared gradient, the leader node aggregates and broadcasts the gradient and generates a block based on the verification result; Step 5: The local device downloads the new block from the blockchain network, obtains the global gradient, verifies the global gradient, updates the local model, and starts the next round of training from step 2 until the model converges or the maximum number of training rounds is reached.

2. A method for protecting privacy in federated learning of Internet of Vehicles based on blockchain as claimed in claim 1, characterized in that: Design a blockchain-based Internet of Vehicles federated learning model, which consists of vehicles and RSUs with communication capabilities and data collection and storage capabilities. All devices need to apply for registration of real identity information with a trusted authority before they can participate in data sharing. The local device system participating in data sharing will issue a public key pk and a private key sk, where the public key serves as the unique identity id participating in the data sharing process. The public key and identity id can be transmitted in the network as public information, and each vehicle can obtain them during network transmission. When the blockchain system is running, the system will create a genesis block B0, which records the public key and identity ID, version number, block height, timestamp and hash value of the participating local device. At the same time, when each local device joins the blockchain system, the system will issue the same number of tokens.

3. A method for protecting privacy in federated learning of Internet of Vehicles based on blockchain as claimed in claim 1, characterized in that Leader node selection is based on the Verifiable Random Function (VRF) and the Cumulative Distribution Function (CDF) of the binomial distribution. Each competitor has a certain number of tokens, and the tokens follow the binomial distribution during the system selection process. The probability of each token being selected is calculated to obtain a different number of tokens for each node. How many tokens are selected for the node also represents the priority of the node in participating in the leader node.

4. The method for protecting privacy in federated learning of Internet of Vehicles based on blockchain as claimed in claim 1, characterized in that: The local model is trained using the random descent method. The local device can calculate the local gradient through the global model parameters in the blockchain. In order to protect the data privacy of the node, Gaussian noise is added to perturb the gradient before sharing the local gradient.

5. The method for protecting privacy in federated learning of Internet of Vehicles based on blockchain as claimed in claim 1, characterized in that: The local device downloads new blocks from the blockchain network, obtains the global gradient, verifies the global gradient, updates the local model, and starts the next round of training from step 2 until the model converges or the maximum number of training rounds is reached.

Citation Information

Cited By

  • Internet of vehicles verifiable federal learning method based on block chain

    CN119783772A