Internet of vehicles federated learning method based on privacy encrypted data deduplication under zero trust

By using asymmetric homomorphic encryption algorithm of CSP and DLP in zero-trust Internet of Vehicles, deduplication of data collected by roadside devices, the data redundancy and security problems in federated learning are solved, and efficient and secure data transmission is achieved and model training.

CN119030682APending Publication Date: 2024-11-26CHONGQING JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410973379.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

In the zero-trust Internet of Vehicles scenario, there is a problem of data redundancy in federated learning that leads to model overfitting, and the security of data transmission is difficult to guarantee.

Method used

The data collected by roadside equipment is deduplicated by asymmetric homomorphic encryption algorithm based on CSP and DLP, and the data hash value encryption is ensured to ensure the security of the data during transmission. and uniqueness, thereby reducing the transmission and storage of redundant data.

Benefits of technology

It effectively reduces the burden of data transmission and storage, improves the efficiency and accuracy of model training, enhances the security of data transmission, reduces the communication bandwidth requirements, and increases the trust in data sharing in the Internet of Vehicles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119030682A_ABST
    Figure CN119030682A_ABST
Patent Text Reader

Abstract

The invention discloses an Internet of Vehicles federated learning method based on privacy encrypted data deduplication under zero trust, and the method comprises the steps: enabling each vehicle to obtain a global model parameter issued by a cloud end, and updating the parameter of a local model; each vehicle performs data deduplication on the data acquired by the roadside equipment based on an asymmetric homomorphic encryption algorithm of CSP and DLP; each vehicle receives the data uploaded by the roadside equipment and adds the data to a local data set; each vehicle trains the local model through the local data; each vehicle uploads the trained local model parameters to the cloud, so that the cloud updates global model parameters by aggregating the local model parameters of each vehicle; and iterative training is repeated until the global model converges or reaches a preset number of iterations. Under a zero-trust framework and a federated learning framework, data de-duplication is carried out through an asymmetric homomorphic encryption algorithm of CSP and DLP, the effectiveness of model training in the federated learning process is ensured, and the burden of data transmission, storage and processing is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of big data Internet and federated learning technology, and in particular to a federated learning method for Internet of Vehicles based on privacy-encrypted data deduplication under zero trust. Background Art

[0002] The emergence of the Internet of Things has increased the number of objects connected to the Internet, and cars are one of them, so a new technology called the Internet of Vehicles has been created. The Internet of Vehicles is an advanced version of the in-vehicle self-organizing network, which can provide guarantees for the distance between vehicles and reduce the probability of vehicle collision accidents; the Internet of Vehicles can help car owners navigate in real time and improve the efficiency of traffic operations by communicating with other vehicles and network systems. The zero trust framework is a network security model that assumes that neither the inside nor the outside of the network is trustworthy. Its core principles include strict verification of each access request, allocation of minimum permissions, continuous monitoring and evaluation, and network segmentation and resource isolation. By implementing technologies such as multi-factor authentication, micro-segmentation, continuous monitoring, and dynamic access control, security threats can be reduced and network protection capabilities can be improved.

[0003] The Internet of Vehicles integrates a large number of sensors and communication equipment to help vehicles and road facilities collect and transmit information. Its main communication types are vehicle-to-vehicle (V2V), vehicle-to-cloud (V2C), and vehicle-to-roadside equipment (V2R). With the support of technology, intelligent services such as autonomous driving, vehicle remote monitoring, and intelligent navigation are available. In intelligent services, it requires vehicles and roadside equipment and other facilities to provide data for it, but it is necessary to consider that in the scenario of the Internet of Vehicles, due to the characteristics of its network, the transmitted information is easily intercepted, forged, eavesdropped, tampered with, and other attacks by attackers, and consider that each access needs to be verified and dynamically controlled in the zero-trust scenario. The amount of data transmitted in the Internet of Vehicles scenario is huge and needs to be protected. Therefore, it is very important to solve the problem of model overfitting caused by data redundancy in federated learning in zero-trust Internet of Vehicles and to protect the security of data transmission in federated learning. Summary of the invention

[0004] In view of the deficiencies of the above-mentioned prior art, the technical problem to be solved by the present invention is: how to provide a method for federated learning of Internet of Vehicles based on privacy-encrypted data deduplication under zero trust, and to perform data deduplication through the asymmetric homomorphic encryption algorithm of CSP and DLP under the zero trust architecture and federated learning framework, thereby ensuring the effectiveness of model training in the federated learning process and reducing the burden of data transmission, storage and processing.

[0005] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0006] The Internet of Vehicles federated learning method based on privacy-encrypted data deduplication under zero trust includes:

[0007] S1: Each vehicle obtains the global model parameters sent by the cloud and updates the parameters of the local model;

[0008] S2: Each vehicle deduplicates the data collected by roadside equipment based on the asymmetric homomorphic encryption algorithm of CSP and DLP;

[0009] S3: Each vehicle receives the data uploaded by the roadside device and adds the data to the local dataset;

[0010] S4: Each vehicle trains the local model using local data;

[0011] S5: Each vehicle uploads the trained local model parameters to the cloud, which then updates the global model parameters by aggregating the local model parameters of each vehicle and sends the updated global model parameters to each vehicle.

[0012] S6: Repeat steps S1 to S5 until the global model converges or reaches a preset number of iterations.

[0013] Preferably, in step S2, the steps of implementing data deduplication based on the asymmetric homomorphic encryption algorithm of CSP and DLP are as follows:

[0014] S201: Vehicle P i Generate the key k through the CSP algorithm i And pass it to roadside device j; roadside device j uses key k i Combine CSP and DLP's asymmetric homomorphic encryption algorithm to generate a public-private key pair (pk j,1 ,sk j,1 );

[0015] S202: Roadside device j obtains data m and calculates hash value d of data m m ; Through the public key pk j,1 For hash value d m Encrypted Randomly generate matrices U1, U2, through sk j,1 Calculated Generate Tags And upload to vehicle P i ;

[0016] S203: Vehicle P i Receive the label L uploaded by roadside device j m ; Label L m and the existing label L of the existing data m′ m′ For comparison, if label L m With the existing label L m′ If they are the same, it means that data m is the same as data m′, that is, data m is in vehicle P iIf it already exists, data m will not be uploaded; otherwise, data m will be uploaded.

[0017] Preferably, in step S201, a public-private key pair (sk j,1 ,sk j,1 ):

[0018] S2011: Vehicle P i Set the security parameter κ and generate the matrix H, i.e. the key k i ;

[0019] in:

[0020]

[0021] k i =(H);

[0022] Where: R i Indicates from A matrix of uniform random sampling in ;

[0023] S2012: Roadside device j sets safety parameter κ and generates matrix Q; generates random e1, e2, …, e l There are l public values ​​in total, and i Code i =a 1i +a 2i +a 3i +a 4i , converted into matrix E i ; Using matrix E i Generate with matrix Q Then generate the public and private keys (pk j,0 ,sk j,0 );

[0024] in:

[0025]

[0026]

[0027] sk j,0 =(Q,Q -1 );

[0028] Where: r ti is a random value;

[0029] S2013: Vehicle P i Using the public key pk of roadside device j j,0 e1,…,e l For key k i Encode so that The key k i The ciphertext Send to roadside device j;

[0030] in:

[0031]

[0032] S2014: Roadside device j uses private key sk j,0 To decrypt the ciphertext C, obtain the vehicle P i The key k i ;

[0033] in:

[0034] M=Q -1 CQ;

[0035] k i =M 11 +M 12 +M 21 +M 22 ;

[0036] S2015: Roadside device j uses key k i As the private key sk of the new asymmetric encryption algorithm j,1 , and generate a new public key pk j,1 ;

[0037] in:

[0038]

[0039] sk j,1 =(H,H -1 ).

[0040] Preferably, in step S202, the roadside device j performs a hash operation on the data m, that is, d m ←Hash(m); use public key pk j,1 Right m Encrypted Integer field Randomly extract two elements a and b to form matrices U1 and U2, and use the private key sk j,1 Calculated Composition Tags

[0041] in:

[0042]

[0043] Where: r i Represents a random number.

[0044] Preferably, in step S203, vehicle Pi Upload the label L of the roadside device j m and the existing label L of the existing data m′ m′ Compare: Calculate and At this time, Δ is a matrix: if Δ 11 =0, then m1+m2+m3+m4=0, which means that data m is the same as data m′, that is, data m is in vehicle P i If it already exists, data m will not be uploaded; if Δ 11 ≠0, then data m is in vehicle P i If it does not exist, upload data m;

[0045] in:

[0046]

[0047] Preferably, in step S3, the roadside device j encodes the data m into a matrix M, encrypts it using the matrix H to obtain a ciphertext C, and then sends it to the vehicle P. i ;

[0048] in:

[0049] m=v1+v2+v3+v4;

[0050]

[0051] C=HMH -1 ;

[0052] Vehicle P i Use matrix H to decrypt ciphertext C and obtain data m;

[0053] in:

[0054] M=H -1 CH;

[0055] m=M 11 +M 12 +M 21 +M 22 .

[0056] Preferably, in step S4, the processing steps of training the local model are as follows:

[0057] S401: From the vehicle's local data D i Get the sample x and the corresponding label target x ;

[0058] S402: Input the sample x into the local model of the vehicle and output the prediction result out x ;

[0059] S403: The vehicle combines the loss function with the label target x And the prediction result out x Calculate the loss and use the back-propagation algorithm to optimize the parameters of the local model;

[0060] S404: Repeat steps S401 to S403 until the local model converges or reaches a preset number of iterations.

[0061] Preferably, in step S402, the local model outputs the prediction result out x The formula is expressed as:

[0062] out x =model(W,x);

[0063] Where: W represents the local model; model represents the output prediction result after training using samples and local models.

[0064] Preferably, in step S403, the formula of the loss function loss is expressed as:

[0065]

[0066] Where: μ is the parameter of the FedProx algorithm; m is the number of samples; W e represents the e-th global model.

[0067] Preferably, in step S5, the cloud obtains the local model parameters {W0, ..., W n}, sum and then average the values ​​using the following formula to update the global model parameters;

[0068] The formula is:

[0069]

[0070] Where: W e+1 represents the updated global model parameters; W i represents the local model parameters uploaded by the i-th vehicle; n represents the number of vehicles.

[0071] Compared with the prior art, the Internet of Vehicles federated learning method based on privacy-encrypted data deduplication under zero trust in the present invention has the following beneficial effects:

[0072] The present invention collects data through roadside equipment and transmits it to the vehicle, and the vehicle and the cloud perform model training through federated learning: the vehicle receives the global model parameters sent from the cloud and performs model training through local data, and uploads the local model parameters to the cloud after the training is completed; the cloud integrates the local model parameters uploaded by each vehicle and updates the global model, and sends the updated global model parameters to each vehicle for the next training. First, federated learning allows data to be retained locally and only uploads trained model parameters, which reduces the transmission of sensitive data and enhances user privacy protection. Secondly, the vehicle uploads only model parameters instead of raw data, which reduces the volume of data transmission and reduces the requirements for communication bandwidth; at the same time, the local model of the vehicle can run in real time on the vehicle without waiting for the cloud to respond, achieving low-latency decision-making capabilities, which is crucial for autonomous driving and traffic safety. Finally, by aggregating the local model updates of multiple vehicles, the cloud can build a more general and powerful global model that can better adapt to different driving environments and behavior patterns.

[0073] Based on federated learning, the present invention further uses an asymmetric homomorphic encryption algorithm to deduplicate the data collected by roadside devices in order to address the overfitting problem caused by data heterogeneity in federated learning. First, data deduplication ensures that there are no duplicate items in the training data set, which helps to improve the efficiency and accuracy of model training and avoid the overfitting problem caused by redundant data; at the same time, by removing duplicate data, storage requirements are reduced, the computational burden of local devices and the cloud in data processing and model training is reduced, network congestion is alleviated, and communication volume is reduced. Secondly, in response to the instability and vulnerability of zero-trust vehicle networks, the present invention ensures the security of data during transmission and processing through asymmetric homomorphic encryption. Even if the data is intercepted during transmission, attackers cannot decrypt and use the data. Furthermore, encrypted data deduplication allows multiple roadside devices or vehicles to collaboratively process data without worrying about the risk of data leakage, thereby enhancing the trust of data sharing in the vehicle network. Finally, based on the CSP algorithm encoding matrix, the present invention uses the principle of the DLP algorithm to modify the symmetric CSP encryption scheme into an asymmetric homomorphic encryption scheme based on CSP and DLP. This new asymmetric homomorphic encryption scheme can realize asymmetric encryption of both encryption parties and can effectively realize data deduplication. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] In order to make the purpose, technical solution and advantages of the invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings, in which:

[0075] Figure 1 This is the overall framework diagram of the Internet of Vehicles federated learning method based on privacy-encrypted data deduplication under zero trust;

[0076] Figure 2 Schematic diagram of the communication between vehicles, cloud and roadside devices. DETAILED DESCRIPTION

[0077] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, 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 described embodiments are part of the embodiments of the present invention, not all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but only represents selected embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the scope of protection of the present invention.

[0078] The following is a further detailed description through specific implementation methods:

[0079] Example:

[0080] This embodiment discloses a federated learning method for Internet of Vehicles based on privacy-encrypted data deduplication under zero trust.

[0081] In the Internet of Vehicles scenario, vehicle identification plays a very important role. The correctness of vehicle identification greatly affects the performance of subsequent applications. Its data source is mainly the vehicle images or videos taken when the vehicle is driving on the actual road or the vehicle images taken by roadside equipment. However, directly uploading the data taken by the vehicle or roadside equipment to the cloud will result in a large amount of data, high communication performance requirements and the risk of data leakage. The structure of the Internet of Vehicles allows the capabilities of federated learning to be demonstrated to the greatest extent. Vehicles can be used as facilities for powerful model training, while roadside equipment can be used as facilities for data collection due to their poor computing power, so that each node can be well utilized. A zero-trust framework is used to control each access. Federated learning is different from traditional distributed machine learning. Federated learning only needs to transmit model parameters or gradients, which greatly reduces the amount of data transmitted. Considering the network model in the Internet of Vehicles scenario, federated learning can be well applied to the Internet of Vehicles scenario. The cloud will not collect the terminal data set, but only collect the model parameters trained on facilities such as vehicles. The cloud will aggregate the model parameters to update the global model and return it to the facility. The facility uses the newly collected data and the global model for training, and then uploads the model parameters to the cloud, repeating the above process.

[0082] The most common aggregation method in federated learning is the FedAvg algorithm, which works well in most cases, but it cannot solve the problem of non-IID data and heterogeneous devices. The optimized federated learning aggregation method alleviates the problems of data heterogeneity and device heterogeneity in federated learning. For data heterogeneity, it adds proximal terms to the objective function so that the model will not overfit at the aggregation level. For device heterogeneity, it allows terminals with poor computing power to return results after a relatively small number of rounds, so that they can also participate in federated learning. In order to solve threats such as data leakage, reconstruction attacks, and poisoning attacks, a symmetric encryption scheme based on homomorphic encryption is used to encrypt the data transmitted in the roadside unit (RSU) to protect the training data transmitted to the vehicle. In order to solve the problem of multiple roadside units (RSU) transmitting the same training data to the vehicle, an asymmetric encryption scheme based on homomorphic encryption is used to deduplicate redundant data to prevent the model from overfitting at the data level.

[0083] like Figure 1 and Figure 2 As shown in the figure, the Internet of Vehicles federated learning method based on privacy-encrypted data deduplication under zero trust includes:

[0084] Vehicle P i When the network is in good condition, requests are sent to multiple roadside devices and the cloud. After zero-trust identity authentication is completed, the following steps are performed:

[0085] S1: Each vehicle obtains the global model parameters sent by the cloud and updates the parameters of the local model;

[0086] In this embodiment, after receiving requests from n vehicles, the cloud generates an initialized global model and sends the initial model to the n vehicles. The vehicles need to complete identity authentication for the transmitted model.

[0087] S2: Each vehicle deduplicates the data collected by the roadside unit (RSU) using an asymmetric homomorphic encryption algorithm based on CSP (Conjugacy Search Problem) and DLP (Discrete Logarithm Problem);

[0088] The conjugate search problem and the discrete logarithm problem are two important mathematical problems in cryptography. They are widely used to build secure cryptographic protocols and encryption algorithms. The following introduces these two problems respectively:

[0089] 1) The conjugate search problem originates from group theory, especially algebraic structures. In a group G, given two elements a and b, CSP requires finding a group element g (if it exists) such that gag -1 =b. Here gag-1 It is called the conjugation of a and g, that is, b is the result of the conjugation of a through g.

[0090] 2) The discrete logarithm problem is mainly considered in finite fields or finite cyclic groups. Given a group G, a generator g, and a group element h, the goal of DLP is to find an integer x (if it exists) such that g x = h. In other words, x is the discrete logarithm of g, with base h.

[0091] In this embodiment, after receiving the request, multiple roadside devices generate their own public and private keys (pk j,0 ,sk j,0 ), vehicle P i After completing the identity authentication of the device, accept the public key pk sent by it j,0 Vehicle P i Run the symmetric CSP algorithm to generate the key k i And use the public keys pk of multiple roadside devices j,0 For key k i The encrypted data is returned to multiple roadside devices. Multiple roadside devices use the private key sk j,0 Decrypt to get the key k i , and then use the key k i Construct a new public-private key (pk j,1 ,sk j,1 ) is used for data deduplication.

[0092] S3: Each vehicle receives the data uploaded by the roadside device and adds the data to the local dataset;

[0093] S4: Each vehicle trains the local model using local data;

[0094] S5: Each vehicle uploads the trained local model parameters to the cloud, which then updates the global model parameters by aggregating the local model parameters of each vehicle and sends the updated global model parameters to each vehicle.

[0095] S6: Repeat steps S1 to S5 until the global model converges or reaches a preset number of iterations.

[0096] In this embodiment, roadside equipment continuously collects and uploads data, multiple vehicles continuously perform model training and upload model parameters, and the cloud continuously aggregates and returns the global model. During this process, each access needs to complete zero-trust identity authentication to improve network security until the vehicle P i The local model converges. In the present invention, each communication between the vehicle and the roadside equipment and between the vehicle and the cloud requires identity authentication of the communication subject.

[0097] The present invention collects data through roadside equipment and transmits it to the vehicle, and the vehicle and the cloud perform model training through federated learning: the vehicle receives the global model parameters sent from the cloud and performs model training through local data, and uploads the local model parameters to the cloud after the training is completed; the cloud integrates the local model parameters uploaded by each vehicle and updates the global model, and sends the updated global model parameters to each vehicle for the next training. First, federated learning allows data to be retained locally and only uploads trained model parameters, which reduces the transmission of sensitive data and enhances user privacy protection. Secondly, the vehicle uploads only model parameters instead of raw data, which reduces the volume of data transmission and reduces the requirements for communication bandwidth; at the same time, the local model of the vehicle can run in real time on the vehicle without waiting for the cloud to respond, achieving low-latency decision-making capabilities, which is crucial for autonomous driving and traffic safety. Finally, by aggregating the local model updates of multiple vehicles, the cloud can build a more general and powerful global model that can better adapt to different driving environments and behavior patterns.

[0098] Based on federated learning, the present invention further uses an asymmetric homomorphic encryption algorithm to deduplicate the data collected by roadside devices in order to address the overfitting problem caused by data heterogeneity in federated learning. First, data deduplication ensures that there are no duplicate items in the training data set, which helps to improve the efficiency and accuracy of model training and avoid the overfitting problem caused by redundant data; at the same time, by removing duplicate data, storage requirements are reduced, the computational burden of local devices and the cloud in data processing and model training is reduced, network congestion is alleviated, and communication volume is reduced. Secondly, in response to the instability and vulnerability of zero-trust vehicle networks, the present invention ensures the security of data during transmission and processing through asymmetric homomorphic encryption. Even if the data is intercepted during transmission, attackers cannot decrypt and use the data. Furthermore, encrypted data deduplication allows multiple roadside devices or vehicles to collaboratively process data without worrying about the risk of data leakage, thereby enhancing the trust of data sharing in the vehicle network. Finally, based on the CSP algorithm encoding matrix, the present invention uses the principle of the DLP algorithm to modify the symmetric CSP encryption scheme into an asymmetric homomorphic encryption scheme based on CSP and DLP. This new asymmetric homomorphic encryption scheme can realize asymmetric encryption of both encryption parties and can effectively realize data deduplication.

[0099] In the specific implementation process, in step S2, the steps for implementing data deduplication based on the asymmetric homomorphic encryption algorithm of CSP and DLP are as follows:

[0100] S201: Vehicle P i Generate the key k through the CSP algorithm i And pass it to roadside device j; roadside device j uses key k iCombine CSP and DLP's asymmetric homomorphic encryption algorithm to generate a public-private key pair (pk j,1 ,sk j,1 );

[0101] S202: Roadside device j obtains data m and calculates hash value d of data m m ; Through the public key pk j,1 For hash value d m Encrypted Randomly generate matrices U1, U2, through sk j,1 Calculated Generate Tags And upload to vehicle P i ;

[0102] S203: Vehicle P i Receive the label L uploaded by roadside device j m ; Label L m and the existing label L of the existing data m′ m′ For comparison, if label L m With the existing label L m, If they are the same, it means that data m is the same as data m′, that is, data m is in vehicle P i If it already exists, data m will not be uploaded; otherwise, data m will be uploaded.

[0103] In the specific implementation process, in step S201, a public-private key pair (pk j,1 ,sk j,1 ):

[0104] S2011: Vehicle P i Set the security parameter κ and generate the matrix H, i.e. the key k i ;

[0105] in:

[0106]

[0107] k i =(H); key k i It is the result of encoding the matrix H.

[0108] Where: R i Indicates from A matrix of uniform random sampling in ;

[0109] S2012: Roadside device j sets safety parameter κ and generates matrix Q; generates random e1, e2, …, e l There are l public values ​​in total, and i Code i =a 1i +a2i +a 3i +a 4i , converted into matrix E i ; Using matrix E i Generate with matrix Q Then generate the public and private keys (pk j,0 ,sk j,0 );

[0110] in:

[0111]

[0112] sk j,0 =(Q,Q -1 );

[0113] Where: r ti is a random value;

[0114] S2013: Vehicle P i Using the public key pk of roadside device j j,0 e1,…,e l For key k i Encode so that The key k i The ciphertext Sent to roadside device j; where r1, r l ,q1,q l Are all random numbers, used to ensure k i The encryption results are random.

[0115] in:

[0116]

[0117] S2014: Roadside device j uses private key sk j,0 To decrypt the ciphertext C, obtain the vehicle P i The key k i ;

[0118] in:

[0119] M=Q -1 CQ;

[0120] k i =M 11 +M 12 +M 21 +M 22 ;

[0121] Where: M represents the key k i The corresponding plaintext matrix, M 11 、M 12、M 21 、M 22 Represents the four elements of the first row and first column, the first row and second column, and the second row and first column. The sum of these four elements is the key k. i .

[0122] S2015: Roadside device j uses key k i As the private key sk of the new asymmetric encryption algorithm j,1 , and generate a new public key pk j,1 ;

[0123] in:

[0124]

[0125] sk j,1 =(H,H -1 ).

[0126] In the specific implementation process, in step S202, the roadside device j performs a hash operation on the data m, that is, d m ←Hash(m); use public key pk j,1 Right m Encrypted Integer field Randomly extract two elements a and b to form matrices U1 and U2, and use the private key sk j,1 Calculated Composition Tags

[0127] in:

[0128]

[0129] Where: r i Represents a random number.

[0130] In the specific implementation process, in step S203, vehicle P i Upload the label L of the roadside device j m and the existing label L of the existing data m′ m′ Compare: Calculate and Respectively The first part of U1H -1 and the second part HU2); at this time Δ is a matrix: if Δ 11 =0, then m1+m2+m3+m4=0 (m1+m2+m3+m4 is the difference between data m and data m′), which means that data m is the same as data m′, that is, data m is in vehicle P. i If it already exists, data m will not be uploaded; if Δ 11≠0, then data m is in vehicle P i If it does not exist, upload data m;

[0131] in:

[0132]

[0133] In the specific implementation process, in step S3, the roadside device j encodes the data m into a matrix M, encrypts it using the matrix H to obtain the ciphertext C, and sends it to the vehicle P. i ;

[0134] in:

[0135] m=v1+v2+v3+v4;

[0136]

[0137] C=HMH -1 ;

[0138] Vehicle P i Use matrix H to decrypt ciphertext C and obtain data m;

[0139] in:

[0140] M=H -1 CH;

[0141] m=M 11 +M 12 +M 21 +M 22 .

[0142] In the specific implementation process, in step S4, the processing steps for training the local model are as follows:

[0143] S401: From the vehicle's local data D i Get the sample x and the corresponding label target x ;

[0144] S402: Input the sample x into the local model of the vehicle and output the prediction result out x ;

[0145] S403: The vehicle is based on the loss function loss combined with the label traget x And the prediction result out x Calculate the loss and use the back-propagation algorithm to optimize the parameters of the local model;

[0146] S404: Repeat steps S401 to S403 until the local model converges or reaches a preset number of iterations.

[0147] Specifically, in step S402, the local model outputs the prediction result out x The formula is expressed as:

[0148] out x =model(W,x);

[0149] Where: W represents the local model; model represents the output prediction result after training using samples and local models.

[0150] Specifically, in step S403, the formula of the loss function loss is expressed as:

[0151]

[0152] Where: μ is the parameter of the FedProx algorithm; m is the number of samples; W e represents the e-th global model.

[0153] In the specific implementation process, in step S5, the cloud obtains the local model parameters {W0,…,W n}, sum and then average the values ​​using the following formula to update the global model parameters;

[0154] The formula is:

[0155]

[0156] Where: W e+1 represents the updated global model parameters; W i represents the local model parameters uploaded by the i-th vehicle; n represents the number of vehicles.

[0157] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit the technical solution. Those skilled in the art should understand that those modifications or equivalent substitutions of the technical solution of the present invention that do not depart from the purpose and scope of the technical solution should be included in the scope of the claims of the present invention.

Claims

1. A federated learning method for Internet of Vehicles based on privacy-encrypted data deduplication under zero trust, characterized in that: include: S1: Each vehicle obtains the global model parameters sent by the cloud and updates the parameters of the local model; S2: Each vehicle deduplicates the data collected by roadside equipment based on the asymmetric homomorphic encryption algorithm of CSP and DLP; S3: Each vehicle receives the data uploaded by the roadside device and adds the data to the local dataset; S4: Each vehicle trains the local model using local data; S5: Each vehicle uploads the trained local model parameters to the cloud, which then updates the global model parameters by aggregating the local model parameters of each vehicle and sends the updated global model parameters to each vehicle. S6: Repeat steps S1 to S5 until the global model converges or reaches a preset number of iterations.

2. The method for Internet of Vehicles federated learning based on privacy-encrypted data deduplication under zero trust as claimed in claim 1, characterized in that: In step S2, the steps of implementing data deduplication based on the asymmetric homomorphic encryption algorithm of CSP and DLP are as follows: S201: Vehicle P i Generate the key k through the CSP algorithm i And pass it to roadside device j; roadside device j uses key k i Combine CSP and DLP's asymmetric homomorphic encryption algorithm to generate a public-private key pair (pk j,1 ,sk j,1 ); S202: Roadside device j obtains data m and calculates hash value d of data m m ; Through the public key pk j,1 For hash value d m Encrypted Randomly generate matrices U1, U2, through sk j,1 Calculated Generate Tags And upload to vehicle P i ; S203: Vehicle P i Receive the label L uploaded by roadside device j m ; Label L m and the existing label L of the existing data m′ m′ For comparison, if label L m With the existing label L m′ If they are the same, it means that data m is the same as data m′, that is, data m is in vehicle P i If it already exists, data m will not be uploaded; otherwise, data m will be uploaded.

3. The method for Internet of Vehicles federated learning based on privacy-encrypted data deduplication under zero trust as claimed in claim 2, characterized in that: In step S201, a public-private key pair (pk j,1 ,sk j,1 ): S2011: Vehicle P i Set the security parameter κ and generate the matrix H, i.e. the key k i ; in: k i =(H); Where: R i Indicates from A matrix of uniform random sampling in ; S2012: Roadside device j sets safety parameter k and generates matrix Q; generates random e1, e2, …, e l There are l public values ​​in total, and i Code i =a 1i +a 2i +a 3i +a 4i , converted into matrix E i ; Using matrix E i Generate with matrix Q Then generate the public and private keys (pk j,0 ,sk j,0 ); in: pk j,0 =(e1,…,e l ,ζ1,…,ζ l ); sk j,0 =(Q,Q -1 ); Where: r ti is a random value; S2013: Vehicle P i Using the public key pk of roadside device j j,0 e1,…,e l For key k i Encode so that The key k i The ciphertext Send to roadside device j; in: S2014: Roadside device j uses private key sk j,0 To decrypt the ciphertext C, obtain the vehicle P i The key k i ; in: M=Q -1 CQ; k i =k 11 +v 12 +k 21 +M 22 ; S2015: Roadside device j uses key k i As the private key sk of the new asymmetric encryption algorithm j,1 , and generate a new public key pk j,1 ; in: en j,1 =(H,H -1 )。 4. The method for Internet of Vehicles federated learning based on privacy-encrypted data deduplication under zero trust as claimed in claim 2, characterized in that: In step S202, the roadside device j performs a hash operation on the data m, that is, d m ←Hash(m); use public key pk j,1 Right m Encrypted Integer field Randomly extract two elements a and b to form matrices U1 and U2, and use the private key sk j,1 Calculated Composition Tags in: Where: r i Represents a random number.

5. The method for Internet of Vehicles federated learning based on privacy-encrypted data deduplication under zero trust as claimed in claim 2, characterized in that: In step S203, vehicle P i Upload the label L of the roadside device j m and the existing label L of the existing data m′ m′ Compare: Calculate and At this time, Δ is a matrix: if Δ 11 =0, then m1+m2+m3+m4=0, which means that data m is the same as data m′, that is, data m is in vehicle P i If it already exists, data m will not be uploaded; if Δ 11 ≠0, then data m is in vehicle P i If it does not exist, upload data m; in:

6. The method for Internet of Vehicles federated learning based on privacy-encrypted data deduplication under zero trust as claimed in claim 2, characterized in that: In step S3, the roadside device j encodes the data m into a matrix M, encrypts it using the matrix H to obtain the ciphertext C, and then sends it to the vehicle P. i ; in: m=v1+v2+v3+v4; C=HMH -1 ; Vehicle P i Use matrix H to decrypt ciphertext C and obtain data m; in: M=H -1 CH; m=M 11 +M 12 +M 21 +M 22 。 7. The method for Internet of Vehicles federated learning based on privacy-encrypted data deduplication under zero trust as claimed in claim 1, characterized in that: In step S4, the processing steps for training the local model are as follows: S401: From the vehicle's local data D i Get the sample x and the corresponding label target x ; S402: Input the sample x into the local model of the vehicle and output the prediction result out x ; S403: The vehicle combines the loss function with the label target x And the prediction result out x Calculate the loss and use the back-propagation algorithm to optimize the parameters of the local model; S404: Repeat steps S401 to S403 until the local model converges or reaches a preset number of iterations.

8. The method for Internet of Vehicles federated learning based on privacy-encrypted data deduplication under zero trust as claimed in claim 7, characterized in that: In step S402, the local model outputs the prediction result out x The formula is: out x =model(W,x); Where: W represents the local model; model represents the output prediction result after training using samples and local models.

9. The method for Internet of Vehicles federated learning based on privacy-encrypted data deduplication under zero trust as claimed in claim 7, characterized in that: In step S403, the formula of the loss function loss is expressed as: Where: μ is the parameter of the FedProx algorithm; m is the number of samples; W e represents the e-th global model.

10. The method for Internet of Vehicles federated learning based on privacy-encrypted data deduplication under zero trust as claimed in claim 1, characterized in that: In step S5, the cloud obtains the local model parameters {W0,…,W n }, sum and then average the values ​​using the following formula to update the global model parameters; The formula is: Where: W e+1 represents the updated global model parameters; W i represents the local model parameters uploaded by the i-th vehicle; n represents the number of vehicles.