Longitudinal federal learning method for zero-trust Internet of Vehicles data privacy protection

By adopting a homomorphic conversion scheme and activation function based on partial homomorphic encryption in the Internet of Vehicles environment, the problem of low data privacy protection and model training efficiency of vehicle terminals under the zero-trust architecture is solved, and efficient data alignment and model training are achieved. Ensures data privacy and improves communication efficiency and model accuracy.

CN119150318AActive Publication Date: 2024-12-17CHONGQING JIAOTONG UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411176172.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-12-17
Estimated Expiration
2044-08-26

AI Technical Summary

Technical Problem

In the Internet of Vehicles environment, under the zero-trust architecture, there are challenges in the privacy protection of vehicle terminal data and model training efficiency, especially due to data isolation problems caused by different data feature fields and regulatory restrictions. Traditional data alignment methods are inefficient and homogeneous. The computing power and system requirements of encryption technology are difficult to balance, resulting in privacy data leakage and low communication efficiency.

Method used

Longitudinal federated learning is performed using a homomorphic conversion scheme based on partial homomorphic encryption. Local data sets are constructed by obtaining user ID intersections, active vehicles and passive vehicles are trained in collaboratively, and the model accuracy is improved by using activation functions and scaling factors, and in roadside units Complete partial decryption to construct activation functions, reduce the number of communication rounds, and improve communication security and efficiency.

Benefits of technology

It realizes efficient data alignment and model training in a zero-trust Internet of Vehicles environment, ensures data privacy and security, improves communication security and execution efficiency of vertical federated learning, and improves the accuracy of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119150318A_ABST
    Figure CN119150318A_ABST
Patent Text Reader

Abstract

The invention discloses a longitudinal federal learning method for zero-trust Internet of Vehicles data privacy protection. The method comprises the following steps: respectively obtaining user ID sets of active vehicles as active parties and passive vehicles as passive parties; the active vehicle performs data alignment with each passive vehicle based on a homomorphic conversion scheme of partial homomorphic encryption to obtain a plurality of user ID intersections; selecting corresponding user data according to the user ID intersection to construct a corresponding local data set, wherein one user ID intersection corresponds to one local data set; and the active vehicle sequentially trains the local model of the active vehicle and the local model of the corresponding passive vehicle through each local data set. According to the method, data alignment is realized through a homomorphic conversion scheme based on partial homomorphic encryption, so that the communication security and execution efficiency of data alignment are improved; and meanwhile, an activation function is constructed to avoid Taylor expansion of the activation function caused by Paillier encryption, so that the accuracy of the model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet of Vehicles and networked learning technology, and in particular to a vertical federated learning method for zero-trust Internet of Vehicles data privacy protection. Background Art

[0002] In the Internet of Vehicles environment, a large number of observation and monitoring devices are connected to the Internet of Vehicles, such as vehicle-mounted and road sensors, roadside units, and cameras. These devices are used to observe road conditions to promote safety and resource management. A large amount of vertically divided data is constantly generated in the Internet of Vehicles environment. For example, the data of the same vehicle, road section, and intersection are collected by different departments, and their feature fields will be different. The traditional method is to centralize the data set for model training. However, due to the restrictions of relevant regulations, the data of vehicle terminals are often isolated from each other. The federated learning framework is adopted, so that the vehicle terminal data does not need to be local, and the model intermediate values ​​only need to be transmitted in the Internet of Vehicles environment to complete the collaborative training of the model.

[0003] Under the zero-trust architecture, in the random access scenarios of vehicle nodes and roadside units, the credibility of the identity of the interactive nodes changes dynamically, and identity authentication does not have long-term validity. Once the cloud identifies a malicious vehicle and completes the revocation of the access identity, there is a risk of data exposure of the original interactive information of the malicious vehicle. Therefore, the transmission of data between authenticated vehicles must ensure that the data is available and that the original authenticated vehicle cannot infer the original data after the authentication is revoked. At the same time, considering that each access needs to be verified and dynamically controlled in a zero-trust scenario, a homomorphic transformation scheme is designed and applied to vertical federated learning to reduce the number of communication rounds of communication participants and improve communication efficiency.

[0004] When the vehicle terminals participating in the training of the federated learning model transmit the intermediate values ​​of the model in the Internet of Vehicles environment, they are vulnerable to network attacks, resulting in the leakage of private data. Homomorphic encryption technology is used to protect the propagation of model intermediate values ​​in the Internet of Vehicles environment, but different homomorphic encryption technologies have different limitations between computing power and system requirements. Partial homomorphic encryption has low system requirements, but its computing power is not strong. Fully homomorphic encryption can meet the requirements of complex calculations, but has high requirements for the system. Therefore, designing a homomorphic transformation algorithm that balances computing power and system requirements is conducive to improving the efficiency and security of model training.

[0005] With the development of vehicle-mounted and road sensors, mobile vehicles and roadside units continue to generate a large amount of longitudinally divided data. For example, the data of the same vehicle, road section, and intersection are collected by different departments, and their feature fields will be different. And due to the restrictions of relevant regulations, the data of vehicle terminals are often isolated from each other, so a longitudinal federated learning framework is needed to adapt to this situation. Before model training in longitudinal federated learning, data alignment is inevitably required to solve the data intersection without exposing the real data of the data holder. However, in the traditional scheme, the two parties involved in data alignment need to conduct multiple rounds of communication to achieve data alignment, which leads to the low efficiency of longitudinal federated learning. Therefore, how to design a longitudinal federated learning method with more efficient data alignment is a technical problem that needs to be solved urgently. Summary of the invention

[0006] In view of the above-mentioned deficiencies of the prior art, the technical problem to be solved by the present invention is: how to provide a vertical federated learning method for zero-trust Internet of Vehicles data privacy protection, realize data alignment through a homomorphic transformation scheme based on partial homomorphic encryption, thereby improving the communication security and execution efficiency of data alignment; at the same time, construct an activation function to avoid the Taylor expansion of the activation function caused by Paillier encryption, thereby improving the accuracy of the model.

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

[0008] A vertical federated learning method for zero-trust Internet of Vehicles data privacy protection, including:

[0009] S1: Obtain the user ID sets of the active vehicle as the active party and the passive vehicle as the passive party respectively;

[0010] S2: The active vehicle aligns data with each passive vehicle based on the homomorphic conversion scheme of partial homomorphic encryption to obtain several user ID intersections;

[0011] S3: Select corresponding user data according to the intersection of user IDs to construct the corresponding local data set, that is, one user ID intersection corresponds to one local data set;

[0012] S4: The active vehicle trains its own and the corresponding passive vehicle's local models through each local data set in turn;

[0013] Step S4 specifically includes the following steps:

[0014] S401: The active vehicle obtains a set of training data from a local data set to perform collaborative training with the corresponding passive vehicle; the training data includes training sample features and corresponding label data;

[0015] S402: The active vehicle and the passive vehicle use the training sample features as inputs of their local models to obtain corresponding prediction results;

[0016] S403: The active vehicle and the passive vehicle encrypt their own prediction results and transmit them to the roadside unit; the roadside unit partially decrypts the prediction results of the active vehicle and the passive vehicle and constructs an activation function;

[0017] S404: The active vehicle calculates the model intermediate value through the activation function and the corresponding label data, and then calculates the gradient and updates the local model in combination with the local training sample features;

[0018] S405: The active vehicle sends the model intermediate value to the corresponding passive vehicle; the passive vehicle calculates the gradient based on the model intermediate value combined with the local training sample features and updates the local model;

[0019] S406: Repeat steps S401 to S405 until the local models of the active vehicle and the passive vehicle converge or reach a preset number of iterations.

[0020] Preferably, in step S2, the homomorphic conversion scheme based on partially homomorphic encryption includes an A2M module and an M2A module, which are respectively used to perform homomorphic addition to homomorphic multiplication and homomorphic multiplication to homomorphic addition; wherein Paillier ciphertext and Elgamal ciphertext are respectively used as ciphertexts for homomorphic addition and homomorphic multiplication;

[0021] The public key of the Paillier ciphertext is (n, g), and the private key is (λ, μ); the Paillier ciphertext is expressed as:

[0022] E(x) Paillier =g x r n mod n 2 ;

[0023] In the formula: r represents the random number randomly selected for each encryption;

[0024] The public key of the Elgamal ciphertext is (α d·r ,p), the private key is d; the Elgamal ciphertext is expressed as:

[0025] E(x) Elgamal =(α r mod p,x·α d·r mod p).

[0026] Preferably, in step S2, the processing steps of the A2M module are:

[0027] S201: Get Paillier ciphertext E(x) Paillier ;

[0028] S202: Through E(x) Paillier Multiply the public key of the Elgamal ciphertext (α d·r ,p) and private key d, we get

[0029] The formula is:

[0030]

[0031] S203: Decryption using the private key (λ,μ) of the Paillier ciphertext Get C2 in the binary of the Elgamal ciphertext, and then construct the corresponding Elgamal ciphertext E(x) Elgamal ;

[0032] The formula is:

[0033]

[0034] E(x) Elgamal =(C1,C2)=(α r mod p,x·α d·r mod p);

[0035] Where: D represents the decryption operation.

[0036] Preferably, in step S2, the processing steps of the M2A module are:

[0037] S211: Get Elgamal ciphertext E(x) Elgamal ;

[0038] S212: E(x) is obtained by using the public key (n,g) of the Paillier ciphertext Elgamal Encrypt C2 in the binary tuple to get (C1, E(C2) Paillier );

[0039] The formula is:

[0040]

[0041] S213: Construct α using the private key d and C1 of the Elgamal ciphertext d·rmodp , then for E(C2) Paillier Take the square root to get the corresponding Paillier ciphertext E(x) Paillier ;

[0042] The formula is:

[0043]

[0044] Preferably, in step S2, the processing steps of data alignment are as follows:

[0045] S221: Active vehicle i generates the public key (n, g) and private key (λ, μ) of the Paillier ciphertext; passive vehicle j generates the public key (α d·r ,p) and private key d;

[0046] S222: Active vehicle i encrypts all user ID data ID in its own user ID set using public key (n, g) i , get the user ID ciphertext E(ID i ) Paillier ; The public key (n, g) and all E (ID i ) Paillier Sent together to passive vehicle j;

[0047] S223: For each user ID data ID in the user ID set of passive vehicle j itself j , perform the following steps in sequence:

[0048] S2231: Passive vehicle j encrypts the current user ID data ID through the public key (n, g) j , get the user ID ciphertext E(ID j ) Paillier ;

[0049] S2232: Passive vehicle j will E(ID j ) Paillier All E(ID i ) Paillier Perform homomorphic subtraction operations one by one to obtain the corresponding user ID intersection ciphertext set;

[0050] The formula is:

[0051]

[0052] S2233: Passive vehicle j uses A2M module to j ) Paillier Perform the homomorphic conversion in step S202 to obtain Will The intersection ciphertext set of the corresponding user ID is sent to the active vehicle i as a tuple;

[0053] S2234: Active vehicle i decrypts the user ID intersection ciphertext set set using the private key (λ,μ) to obtain ID j With each ID i The homomorphic difference plaintext I; judge ID through I j With the corresponding IDi Is it the intersection ID of both parties? j With the corresponding ID i When the IDs are the intersection of both parties, execute S2235;

[0054] The formula is:

[0055] I=r(ID j -ID i );

[0056] If I = 0, then ID i and ID j It is the intersection ID of both parties;

[0057] If I≠0, then ID i and ID j Non-bilateral intersection ID;

[0058] S2235: Active vehicle i uses the A2M module to Perform the remaining steps of the homomorphic transformation in step S203 to obtain the Elgamal ciphertext E(ID j ) Elgamal ; E(ID j ) Elgamal Sent to passive vehicle j;

[0059] S2236: Passive vehicle j decrypts E(ID) using the private key d of the Elgamal ciphertext j ) Elgamal , get the intersection ID of both parties intersect ;

[0060] The formula is:

[0061] ID intersect =D(E(ID j ) Elgamal );

[0062] S2237: The intersection ID of both parties intersect Add the user IDs of active vehicle i and passive vehicle j to the intersection.

[0063] Preferably, in step S403, the activation function is generated by the following steps:

[0064] S4031: Active vehicle i and passive vehicle j encrypt their own prediction results using the public key (n, g) of the Paillier ciphertext respectively and Get the predicted value ciphertext and Will and sent to roadside units;

[0065] S4032: Roadside unit prediction value ciphertext and After performing the homomorphic addition operation, partial decryption is performed to obtain the comprehensive prediction value Where V represents the set of vehicles participating in vertical federated learning;

[0066] S4033: Comprehensive prediction value Row scaling to get the scaled prediction value I θ ; By scaling the predicted value I θ Construct activation function h θ (x);

[0067] The formula is:

[0068]

[0069]

[0070] Where: Δ represents the scaling factor.

[0071] Preferably, in step S4033, the scaling factor is calculated by the following formula:

[0072]

[0073] Where: (x0, y0) represents a point in the activation function before transformation that is not equal to (0, 1).

[0074] Preferably, in step S404, the active vehicle i calculates the gradient by the following formula:

[0075]

[0076] Where: h θ (x)-y i Indicates the middle value of the model; h θ (x) represents the activation function; x i Represents the training sample characteristics; y i Represents the label data corresponding to the training sample features; θ i represents the local model parameters of active vehicle i;

[0077] Active vehicle i updates the local model by the following formula:

[0078]

[0079] Where: m i (t) represents the local model of active vehicle i.

[0080] Preferably, in step S405, the passive vehicle j calculates the gradient by the following formula:

[0081]

[0082] Where: h θ (x)-y i Indicates the middle value of the model; h θ (x) represents the activation function; x i Represents the training sample characteristics; y i Indicates the label data corresponding to the training sample features;

[0083] Passive vehicle j updates the local model by the following formula:

[0084]

[0085] Where: m j (t) represents the local model of active vehicle j.

[0086] Compared with the prior art, the vertical federated learning method for zero-trust Internet of Vehicles data privacy protection in the present invention has the following beneficial effects:

[0087] The present invention aims to solve the problem that data of the same vehicle, road section and intersection are collected by different departments, the feature fields will be different, and due to the restrictions of relevant laws and regulations, the data of vehicle terminals are often isolated from each other. The framework of vertical federated learning is adopted to adapt to this situation, thereby ensuring the effectiveness of federated learning.

[0088] The present invention adopts a framework of vertical federated learning, under which data alignment is required before model training, and data intersection is solved without exposing the real data of the data holder. In the traditional scheme, the two parties of data alignment need to perform multiple rounds of communication in this process. To this end, the present invention constructs a homomorphic transformation scheme based on partial homomorphic encryption to achieve data alignment between vehicle terminals. The homomorphic transformation scheme allows homomorphic transformation of partially homomorphic encrypted ciphertexts when another ciphertext of homomorphic nature is required, and solves the intersection based on the privacy set of the public key system. Combined with the zero-trust Internet of Vehicles architecture, it can not only ensure the privacy security of the interactive data, but also reduce the number of communication rounds between the two interacting parties, thereby improving the communication security and execution efficiency of data alignment in the process of vertical federated learning.

[0089] On the basis of data alignment, the present invention constructs an activation function through the prediction results of active vehicles and passive vehicles, and then calculates the intermediate value of the model and exchanges it between vehicle terminals. Finally, each vehicle terminal calculates an accurate gradient and applies it to the local model update. On the one hand, the activation function is constructed through the prediction results of the vehicle to avoid the Taylor expansion of the activation function caused by Paillier encryption. At the same time, a scaling factor is introduced to fit the activation function images before and after the transformation, thereby improving the accuracy of the model. On the other hand, the present invention completes the construction of the activation function in the roadside unit, which can not only effectively protect the local model data of each vehicle terminal, but also make full use of the computing and storage capabilities of the roadside unit, thereby improving the security and efficiency of vertical federated learning. BRIEF DESCRIPTION OF THE DRAWINGS

[0090] 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:

[0091] Figure 1 This is the overall architecture diagram of the vertical federated learning method for zero-trust Internet of Vehicles data privacy protection;

[0092] Figure 2 A schematic diagram of an actual case. DETAILED DESCRIPTION

[0093] 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.

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

[0095] Example:

[0096] This embodiment discloses a vertical federated learning method for zero-trust Internet of Vehicles data privacy protection.

[0097] like Figure 1 As shown in the figure, the vertical federated learning method for zero-trust Internet of Vehicles data privacy protection includes:

[0098] S1: Obtain the user ID sets of the active vehicle as the active party and the passive vehicle as the passive party respectively;

[0099] S2: The active vehicle aligns data with each passive vehicle based on the homomorphic conversion scheme of partial homomorphic encryption to obtain several user ID intersections;

[0100] S3: Select corresponding data according to the intersection of user IDs to construct the corresponding local data set, that is, one user ID intersection corresponds to one local data set;

[0101] S4: The active vehicle trains its own and the corresponding passive vehicle's local models through each local data set in turn;

[0102] Step S4 specifically includes the following steps:

[0103] S401: The active vehicle obtains a set of training data from a local data set to perform collaborative training with the corresponding passive vehicle; the training data includes training sample features and corresponding label data;

[0104] S402: The active vehicle and the passive vehicle use the training sample features as inputs of their local models to obtain corresponding prediction results;

[0105] S403: The active vehicle and the passive vehicle encrypt their own prediction results and transmit them to the roadside unit; the roadside unit partially decrypts the prediction results of the active vehicle and the passive vehicle and constructs an activation function;

[0106] S404: The active vehicle calculates the model intermediate value through the activation function and the corresponding label data, and then calculates the gradient and updates the local model in combination with the local training sample features;

[0107] S405: The active vehicle sends the model intermediate value to the corresponding passive vehicle; the passive vehicle calculates the gradient based on the model intermediate value combined with the local training sample features and updates the local model;

[0108] S406: Repeat steps S401 to S405 until the local models of the active vehicle and the passive vehicle converge or reach a preset number of iterations.

[0109] The present invention aims to solve the problem that data of the same vehicle, road section and intersection are collected by different departments, the feature fields will be different, and due to the restrictions of relevant laws and regulations, the data of vehicle terminals are often isolated from each other. The framework of vertical federated learning is adopted to adapt to this situation, thereby ensuring the effectiveness of federated learning.

[0110] The present invention adopts a framework of vertical federated learning, under which data alignment is required before model training, and data intersection is solved without exposing the real data of the data holder. In the traditional scheme, the two parties of data alignment need to perform multiple rounds of communication in this process. To this end, the present invention constructs a homomorphic transformation scheme based on partial homomorphic encryption to achieve data alignment between vehicle terminals. The homomorphic transformation scheme allows homomorphic transformation of partially homomorphic encrypted ciphertexts when another ciphertext of homomorphic nature is required, and solves the intersection based on the privacy set of the public key system. Combined with the zero-trust Internet of Vehicles architecture, it can not only ensure the privacy security of the interactive data, but also reduce the number of communication rounds between the two interacting parties, thereby improving the communication security and execution efficiency of data alignment in the process of vertical federated learning.

[0111] On the basis of data alignment, the present invention constructs an activation function through the prediction results of active vehicles and passive vehicles, and then calculates the intermediate value of the model and exchanges it between vehicle terminals. Finally, each vehicle terminal calculates an accurate gradient and applies it to the local model update. On the one hand, the activation function is constructed through the prediction results of the vehicle to avoid the Taylor expansion of the activation function caused by Paillier encryption. At the same time, a scaling factor is introduced to fit the activation function images before and after the transformation, thereby improving the accuracy of the model. On the other hand, the present invention completes the construction of the activation function in the roadside unit, which can not only effectively protect the local model data of each vehicle terminal, but also make full use of the computing and storage capabilities of the roadside unit, thereby improving the security and efficiency of vertical federated learning.

[0112] In order to better introduce the technical solution of the present invention, this embodiment is introduced through the following parts.

[0113] 1. Homomorphic transformation

[0114] The homomorphic conversion scheme based on partially homomorphic encryption includes an A2M module and an M2A module, which are respectively used to execute homomorphic addition to homomorphic multiplication and homomorphic multiplication to homomorphic addition; Paillier ciphertext and Elgamal ciphertext are respectively used as ciphertexts for homomorphic addition and homomorphic multiplication; in actual application, one of the A2M module and the M2A module can be freely selected for execution.

[0115] The public key of the Paillier ciphertext is (n, g), and the private key is (λ, μ); the Paillier ciphertext is expressed as:

[0116] E(x) Paillier =g x r n mod n 2 ;

[0117] In the formula: r represents the random number randomly selected for each encryption;

[0118] The public key of the Elgamal ciphertext is (α d·r ,p), the private key is d; the Elgamal ciphertext is expressed as:

[0119] E(x) Elgamal =(α r mod p,x·α d·r mod p).

[0120] 1. The processing steps of the A2M (add-transfer) module are:

[0121] S201: Get Paillier ciphertext E(x) Paillier ;

[0122] In this embodiment, the target x is encrypted by the public key (n, g) of the Paillier ciphertext to obtain the Paillier ciphertext E(x): Paillier .

[0123] S202: Through E(x) Paillier Multiply the public key of the Elgamal ciphertext (α d·r ,p) and private key d, we get

[0124] The formula is:

[0125]

[0126] S203: Decryption using the private key (λ,μ) of the Paillier ciphertext Get C2 in the binary of the Elgamal ciphertext, and then construct the corresponding Elgamal ciphertext E(x) Elgamal ;

[0127] The formula is:

[0128]

[0129] E(x) Elgamal =(C1,C2)=(α r mod p,x·α d·r mod p);

[0130] Where: D represents the decryption operation.

[0131] In this embodiment, if we know α d·r mod p, then C1 = α r mod p can be constructed very simply. C1 is to construct α d·r The product of the mod p process.

[0132] 2. The processing steps of the M2A (multiplication-to-addition) module are:

[0133] S211: Get Elgamal ciphertext E(x) Elgamal ;

[0134] In this embodiment, the public key (α d·r ,p) Encrypt the target x to get the Elgamal ciphertext E(x) Elgamal .

[0135] S212: E(x) is obtained by using the public key (n,g) of the Paillier ciphertext Elgamal Encrypt C2 in the binary tuple to get (C1, E(C2) Paillier );

[0136] The formula is:

[0137]

[0138] S213: Construct α using the private key d and C1 of the Elgamal ciphertext d·rmodp , then for E(C2) Paillier Take the square root to get the corresponding Paillier ciphertext E(x) Paillier ;

[0139] The formula is:

[0140]

[0141] 2. Data Alignment

[0142] In this embodiment, the processing steps of data alignment are as follows:

[0143] S221: Active vehicle i generates the public key (n, g) and private key (λ, μ) of the Paillier ciphertext; passive vehicle j generates the public key (α d·r ,p) and private key d;

[0144] S222: Active vehicle i encrypts all user ID data ID in its own user ID set using public key (n, g) i (ID i It does not refer to a single user ID data, but all user ID data of vehicle i. i =(ID0, ID1, ...), i = 0, 1, ...), get the user ID ciphertext E (ID i ) Paillier ; The public key (n, g) and all user ID ciphertext E (ID i ) Paillier Sent together to passive vehicle j;

[0145] The formula is:

[0146]

[0147] S223: For each user ID data ID in the user ID set of passive vehicle j itself j (ID j It does not refer to a single user ID data, but all user ID data of vehicle j. j =(ID0,ID1,...), j=0,1,...), execute the following steps in sequence:

[0148] S2231: Passive vehicle j encrypts the current user ID data ID through the public key (n, g) j , get the user ID ciphertext E(ID j ) Paillier ;

[0149] The formula is:

[0150]

[0151] S2232: Passive vehicle j will E(ID j ) Paillier and all user ID ciphertexts E(ID i ) Paillier Perform homomorphic subtraction operations one by one to obtain the corresponding user ID intersection ciphertext set;

[0152] In this embodiment, set is a set containing several elements, each of which represents the current E(ID j ) Paillier Corresponding to E(ID i ) Paillier The result of homomorphic subtraction; for example:

[0153] When j = 0, E(ID0) Paillier Respectively with E(ID i ) Paillier ,i=0,1,2,...Do homomorphic subtraction operation to get a set set;

[0154] When j=1, E(ID1) Paillier Respectively with E(ID i ) Paillier ,i=0,1,2,...Do homomorphic subtraction operation to get a set set;

[0155] When j = 2, E(ID2) Paillier Respectively with E(ID i ) Paillier,i=0,1,2,...Do homomorphic subtraction operation to get a set set;

[0156] …

[0157] The formula is:

[0158]

[0159] S2233: Passive vehicle j uses A2M module to j ) Paillier Perform the homomorphic conversion in step S202 to obtain Will The intersection ciphertext set with the corresponding user ID is sent as a tuple to active vehicle i;

[0160] S2234: Active vehicle i decrypts the user ID intersection ciphertext set set using the private key (λ,μ) to obtain ID j With each ID i The homomorphic difference plaintext I; judge ID through I j With the corresponding ID i Is it the intersection ID of both parties? j With the corresponding ID i When the IDs are the intersection of both parties, execute S2235;

[0161] The formula is:

[0162] I=r(ID j -ID i );

[0163] If I = 0, then ID i and ID j It is the intersection ID of both parties;

[0164] If I≠0, then ID i and ID j Non-intersection ID; Since the active vehicle i does not know the random number r randomly generated by the passive vehicle j, even if the active vehicle i knows the ID i It is also impossible to infer the ID j .

[0165] In this embodiment, the user ID intersection ciphertext set set and ID j It is a one-to-one correspondence. Decrypt the set to get the plaintext of each element. If one of the elements is 0, it means the ID corresponding to the set j The intersection ID of both parties.

[0166] S2235: Active vehicle i uses A2M module to Perform the remaining steps of the homomorphic transformation in step S203 to obtain the Elgamal ciphertext E(ID j ) Elgamal ; E(ID j ) Elgamal Sent to passive vehicle j;

[0167] The formula is:

[0168]

[0169] E(ID j ) Elgamal =(C1,C2)=(α r mod p,ID j α d·r mod p);

[0170] S2236: Passive vehicle j decrypts E(ID) using the private key d of the Elgamal ciphertext j ) Elgamal , get the intersection IDID of both parties intersect ;

[0171] The formula is:

[0172] ID intersect =D(E(ID j ) Elgamal );

[0173] S2237: Intersect both parties IDID intersect Add the user IDs of active vehicle i and passive vehicle j to the intersection.

[0174] 3. Activation Function

[0175] In this embodiment, the activation function is generated by the following steps:

[0176] S4031: Active vehicle i and passive vehicle j encrypt their own prediction results using the public key (n, g) of the Paillier ciphertext respectively and Get the predicted value ciphertext and Will and sent to roadside units;

[0177] The formula is:

[0178]

[0179] S4032: Roadside unit prediction value ciphertext and After performing the homomorphic addition operation, partial decryption is performed to obtain the comprehensive prediction value Where V represents the set of vehicles participating in vertical federated learning;

[0180] In this embodiment, in order to facilitate the construction of the activation function, only one step in the decryption process of the Paillier encryption algorithm is used, so it is called partial decryption.

[0181] S4033: Comprehensive prediction value Row scaling to get the scaled prediction value I θ ; By scaling the predicted value I θ Construct activation function h θ (x);

[0182] The formula is:

[0183]

[0184]

[0185] Where: Δ represents the scaling factor.

[0186] Specifically, the scaling factor is calculated by the following formula:

[0187]

[0188] Where: (x0, y0) represents a point not equal to (0, 1) before the activation function transformation;

[0189] Activation function before transformation

[0190] 4. Local Model Update

[0191] 1. Active vehicle i calculates the gradient using the following formula

[0192]

[0193] Where: h θ (x)-y i Indicates the middle value of the model; h θ (x) represents the activation function; x i Represents the training sample characteristics; y i Represents the label data corresponding to the training sample features; θ i represents the local model parameters of active vehicle i;

[0194] Active vehicle i updates the local model by the following formula:

[0195]

[0196] Where: m i (t) represents the local model of active vehicle i.

[0197] 2. Passive vehicle j calculates the gradient by the following formula

[0198]

[0199] Where: h θ (x)-y i Indicates the middle value of the model; h θ (x) represents the activation function; x i Represents the training sample characteristics; y i Indicates the label data corresponding to the training sample features;

[0200] Passive vehicle j updates the local model by the following formula:

[0201]

[0202] Where: m j (t) represents the local model of active vehicle j.

[0203] 5. Actual Cases

[0204] In actual cases, vehicles, roadside units and other parts constitute the Internet of Vehicles. All participants in the figure are semi-honest nodes, such as Figure 2 The processing steps of this actual case are as follows:

[0205] 1) Vehicles i and j are in good network status and send requests to the roadside unit. After zero-trust identity authentication is completed, vertical federated learning with data privacy protection is performed.

[0206] 2) Vehicle i generates a public-private key pair and sends the ciphertext set of the public key and ID to vehicle j.

[0207] 3) Vehicle j uses the public key to encrypt the ID to obtain the ID ciphertext set, and performs homomorphic subtraction operations with the received ciphertext elements one by one to obtain the set set. The ID ciphertext set of vehicle j performs the first step of the homomorphic transformation A2M module to obtain and the set set is sent to vehicle i as a tuple.

[0208] 4) Vehicle i decrypts the result set of vehicle j’s homomorphic subtraction and determines whether it is the intersection of the two sets. Complete the remaining A2M operations and get E(ID j ) Elgamal , and sends the conversion result back to vehicle j.

[0209] 5) Vehicle j to E(ID j ) Elgamal Decryption is performed to obtain the intersection of user samples of both parties, and both parties will use these user samples for subsequent model training.

[0210] 6) During the model training phase, the roadside unit first generates a public-private key pair (p k ,s k ), and share the public key with vehicle i and vehicle j.

[0211] 7) Vehicles i and j encrypt the model prediction values ​​and send them to the roadside unit, which calculates the activation function h based on the data. θ (x) and returns it to the vehicle.

[0212] 8) Vehicle i calculates the model intermediate value h through the label θ (x)-y i , and sent to vehicle j.

[0213] 9) Vehicle i and vehicle j calculate local gradients respectively and And used for local model update.

[0214] 10) Repeat steps 6) to 8) until the local models of vehicle i and vehicle j converge. During the whole process, each vehicle access needs to complete zero-trust identity authentication to improve network security.

[0215] 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 vertical federated learning method for zero-trust Internet of Vehicles data privacy protection, characterized in that: include: S1: Obtain the user ID sets of the active vehicle as the active party and the passive vehicle as the passive party respectively; S2: The active vehicle aligns data with each passive vehicle based on the homomorphic conversion scheme of partial homomorphic encryption to obtain several user ID intersections; S3: Select corresponding user data according to the intersection of user IDs to construct the corresponding local data set, that is, one user ID intersection corresponds to one local data set; S4: The active vehicle trains its own and the corresponding passive vehicle's local models through each local data set in turn; Step S4 specifically includes the following steps: S401: The active vehicle obtains a set of training data from a local data set to perform collaborative training with the corresponding passive vehicle; the training data includes training sample features and corresponding label data; S402: The active vehicle and the passive vehicle use the training sample features as inputs of their local models to obtain corresponding prediction results; S403: The active vehicle and the passive vehicle encrypt their own prediction results and transmit them to the roadside unit; the roadside unit partially decrypts the prediction results of the active vehicle and the passive vehicle and constructs an activation function; S404: The active vehicle calculates the model intermediate value through the activation function and the corresponding label data, and then calculates the gradient and updates the local model in combination with the local training sample features; S405: The active vehicle sends the model intermediate value to the corresponding passive vehicle; the passive vehicle calculates the gradient based on the model intermediate value combined with the local training sample features and updates the local model; S406: Repeat steps S401 to S405 until the local models of the active vehicle and the passive vehicle converge or reach a preset number of iterations.

2. The vertical federated learning method for zero-trust Internet of Vehicles data privacy protection as claimed in claim 1, characterized in that: In step S2, the homomorphic conversion scheme based on partially homomorphic encryption includes an A2M module and an M2A module, which are respectively used to perform homomorphic addition to homomorphic multiplication and homomorphic multiplication to homomorphic addition; wherein Paillier ciphertext and Elgamal ciphertext are respectively used as ciphertexts of homomorphic addition and homomorphic multiplication; The public key of the Paillier ciphertext is (n, g), and the private key is (λ, μ); the Paillier ciphertext is expressed as: E(x) Paillier =g x r n mod n 2 ; In the formula: r represents the random number randomly selected for each encryption; The public key of the Elgamal ciphertext is (α d·r ,p), the private key is d; the Elgamal ciphertext is expressed as: E(x) Elgamal =(a r mod p,x·a d·r mod p).

3. The vertical federated learning method for zero-trust Internet of Vehicles data privacy protection as claimed in claim 2 is characterized by: In step S2, the processing steps of the A2M module are: S201: Get Paillier ciphertext E(x) Paillier ; S202: Through E(x) Paillier Multiply the public key of the Elgamal ciphertext (α d·r ,p) and private key d, we get The formula is: S203: Decryption using the private key (λ,μ) of the Paillier ciphertext Get C2 in the binary of the Elgamal ciphertext, and then construct the corresponding Elgamal ciphertext E(x) Elgamal ; The formula is: E(x) Elgamal =(C1,C2)=(a r mod p,x·a d·r mod p); Where: D represents the decryption operation.

4. The method for vertical federated learning for zero-trust Internet of Vehicles data privacy protection as claimed in claim 2, characterized in that: In step S2, the processing steps of the M2A module are: S211: Get Elgamal ciphertext E(x) Elgamal ; S212: E(x) is obtained by using the public key (n,g) of the Paillier ciphertext Elgamal Encrypt C2 in the binary tuple to get (C1, E(C2) Paillier ); The formula is: S213: Construct α using the private key d and C1 of the Elgamal ciphertext d·rmod p , then for E(C2) Paillier Take the square root to get the corresponding Paillier ciphertext E(x) Paillier ; The formula is:

5. The method for vertical federated learning for zero-trust Internet of Vehicles data privacy protection as claimed in claim 3, characterized in that: In step S2, the processing steps of data alignment are as follows: S221: Active vehicle i generates the public key (n, g) and private key (λ, μ) of the Paillier ciphertext; passive vehicle j generates the public key (α d·r ,p) and private key d; S222: Active vehicle i encrypts all user ID data ID in its own user ID set using public key (n, g) i , get the user ID ciphertext E(ID i ) Paillier ; The public key (n,g) and all E (ID i ) Paillier Sent together to passive vehicle j; S223: For each user ID data ID in the user ID set of passive vehicle j itself j , perform the following steps in sequence: S2231: Passive vehicle j encrypts the current user ID data ID through the public key (n, g) j , get the user ID ciphertext E(ID j ) Paillier ; S2232: Passive vehicle j will E(ID j ) Paillier All E(ID i ) Paillier Perform homomorphic subtraction operations one by one to obtain the corresponding user ID intersection ciphertext set; The formula is: S2233: Passive vehicle j uses A2M module to j ) Paillier Perform the homomorphic conversion in step S202 to obtain Will The intersection ciphertext set of the corresponding user ID is sent to the active vehicle i as a tuple; S2234: Active vehicle i decrypts the user ID intersection ciphertext set set using the private key (λ,μ) to obtain ID j With each ID i The homomorphic difference plaintext I; judge ID through I j With the corresponding ID i Is it the intersection ID of both parties? j With the corresponding ID i When the IDs are the intersection of both parties, execute S2235; The formula is: I=r(ID j -ID i ); If I = 0, then ID i and ID j It is the intersection ID of both parties; If I≠0, then ID i and ID j Non-bilateral intersection ID; S2235: Active vehicle i uses A2M module to Perform the remaining steps of the homomorphic transformation in step S203 to obtain the Elgamal ciphertext E(ID j ) Elgamal ; E(ID j ) Elgamal Sent to passive vehicle j; S2236: Passive vehicle j decrypts E(ID) using the private key d of the Elgamal ciphertext j ) Elgamal , get the intersection ID of both parties intersect ; The formula is: ID intersect =D(E(ID j ) Elgamal ); S2237: The intersection ID of both parties intersect Add the user IDs of active vehicle i and passive vehicle j to the intersection.

6. The method for vertical federated learning for zero-trust Internet of Vehicles data privacy protection as claimed in claim 1, characterized in that: In step S403, an activation function is generated by the following steps: S4031: Active vehicle i and passive vehicle j encrypt their own prediction results using the public key (n, g) of the Paillier ciphertext respectively and Get the predicted value ciphertext and Will and sent to roadside units; S4032: Roadside unit prediction value ciphertext and After performing the homomorphic addition operation, partial decryption is performed to obtain the comprehensive prediction value Where V represents the set of vehicles participating in vertical federated learning; S4033: Comprehensive prediction value Row scaling to get the scaled prediction value I θ ; By scaling the predicted value I θ Construct activation function h θ (x); The formula is: Where: Δ represents the scaling factor.

7. The vertical federated learning method for zero-trust Internet of Vehicles data privacy protection as claimed in claim 6, characterized in that: In step S4033, the scaling factor is calculated by the following formula: Where: (x0, y0) represents a point in the activation function before transformation that is not equal to (0, 1).

8. The vertical federated learning method for zero-trust Internet of Vehicles data privacy protection as claimed in claim 1, characterized in that: In step S404, the active vehicle i calculates the gradient using the following formula: Where: h θ (x)-y i Indicates the middle value of the model; h θ (x) represents the activation function; x i Represents the training sample characteristics; y i Represents the label data corresponding to the training sample features; θ i represents the local model parameters of active vehicle i; Active vehicle i updates the local model by the following formula: Where: m i (t) represents the local model of active vehicle i.

9. The vertical federated learning method for zero-trust Internet of Vehicles data privacy protection as claimed in claim 1, characterized in that: In step S405, the passive vehicle j calculates the gradient by the following formula: Where: h θ (x)-y i Indicates the middle value of the model; h θ (x) represents the activation function; x i Represents the training sample characteristics; y i Indicates the label data corresponding to the training sample features; Passive vehicle j updates the local model by the following formula: Where: m j (t) represents the local model of active vehicle j.

Citation Information

Patent Citations

  • Federated learning privacy protection method based on homomorphic encryption in Internet of Vehicles

    CN112583575A

  • Model protection method based on trilateral homomorphic encryption longitudinal federated learning

    CN114936372A

  • Longitudinal federated learning method under different sample identifiers, equipment and medium

    CN115630713A

  • Federal learning method for privacy security of Internet of Vehicles

    CN116489642A

  • Longitudinal federal learning user credit scoring method based on differential privacy

    CN117273901A