A traffic flow federated secure prediction method based on distributed homomorphic encryption
By coordinating distributed key generation and homomorphic encryption computation in the vehicle-road-cloud integrated network, the problem of key generation relying on a trusted third party in existing technologies is solved, thereby achieving data privacy protection and security improvement in the traffic flow prediction system, and ensuring the confidentiality of the model training process and prediction efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING UNIV OF POSTS & TELECOMM
- Filing Date
- 2025-08-12
- Publication Date
- 2026-04-24
AI Technical Summary
Existing homomorphic encryption methods based on model parameters rely on trusted third parties for key generation and encryption/decryption calculations in federated learning, which increases the complexity of the system architecture, introduces security risks, and poses a risk of data privacy leakage.
By coordinating distributed key generation and homomorphic encryption computation in a vehicle-road-cloud integrated network, a federated security prediction method for traffic flow based on distributed homomorphic encryption is constructed. The distributed key is generated using Pedersen and Feldman secret sharing verification, and an LSTM model is used for traffic flow prediction to ensure the confidentiality and security of the model training process.
This approach ensures the confidentiality of model parameters in federated learning, avoids inference attacks based on model parameter analysis, safeguards the data privacy of the traffic flow prediction system, and improves the security and efficiency of prediction.
Smart Images

Figure CN120750974B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data privacy protection technology for intelligent transportation systems, specifically relating to a federal security prediction method for traffic flow based on distributed homomorphic encryption. Background Technology
[0002] With the acceleration of urbanization and the increasing traffic volume, traffic flow forecasting has become one of the key tasks in Intelligent Transportation Systems (ITS). Accurate traffic flow forecasting can effectively improve the management efficiency of transportation resources, alleviate traffic congestion, and optimize travel routes. Traditional traffic flow forecasting methods mostly rely on centralized data processing, which suffers from problems such as data privacy leaks, single points of failure, and high computational costs.
[0003] Vehicle-Road-Cloud Collaboration (VRCC), as an emerging intelligent transportation technology architecture, aims to improve traffic data collection and processing capabilities through the collaborative efforts of vehicles, roadside units (RSUs), and the cloud. In this architecture, vehicle nodes are responsible for real-time data collection, roadside units handle initial edge computing and data transmission, and cloud nodes are responsible for training and optimizing traffic flow prediction models. While the VRCC framework significantly improves the real-time performance and accuracy of traffic flow prediction, it still faces challenges such as insufficient data privacy protection. Because data needs to be uploaded to the cloud, sensitive information may be leaked, especially without encryption protection.
[0004] Federated learning (FL) is a novel distributed machine learning method. In a federated learning framework, participating nodes only upload updates to model parameters, not the original data. This significantly reduces the amount of information exchanged between network nodes and achieves the goal of secure intelligent data analysis where "original data does not leave the domain and data is usable but not visible." However, even though clients and servers share only model parameters for training in federated learning, they still face the problem of inference attacks based on model parameter (or gradient) analysis. Attackers can obtain private information about the original data from participating clients through the analysis of model parameters (or gradients). To defend against data reconstruction attacks based on model inference analysis, scholars both domestically and internationally have proposed using security protection techniques during model training. Among these, homomorphic encryption of model parameters (or gradients) to achieve secure model aggregation is a mainstream approach. A typical method includes: In 2020, Dong Ye et al. designed an efficient and secure federated learning protocol in "Efficient and Secure Federated Learning Based on Secret Sharing and Gradient Selection," combining secret sharing and Top-K gradient selection to reduce communication overhead and improve model training efficiency. In 2023, Yu Shengxing and Chen Zhong proposed a novel homomorphic encryption framework in their paper "An Efficient and Secure Federated Learning Aggregation Framework Based on Homomorphic Encryption." Building upon Top-K gradient selection, they proposed a candidate quantization protocol suitable for multiple edge nodes and a secure candidate index merging algorithm, further reducing communication overhead and accelerating homomorphic encryption computation. In April of the same year, Lin Li et al. proposed the FastProtector method in their paper "FastProtector: An Efficient Federated Learning Method Supporting Gradient Privacy Protection." By introducing the idea of Signed Stochastic Gradient Descent (SignSGD), they reduced the overhead of gradient encryption while protecting the privacy of the participants. In 2024, Yan Guangfeng et al. proposed a privacy-preserving distributed learning framework in their paper "Federated Learning Based on Homomorphic Encryption for Quantum Security: Gradient-Based Learning." This framework is implemented through private-key homomorphic encryption and utilizes the randomness of gradient quantization to avoid the error propagation problem in traditional learning-based homomorphic encryption.
[0005] Research has found that existing homomorphic encryption techniques based on model parameters all suffer from the drawback of relying on trusted third parties for key generation and encryption / decryption calculations. This not only increases the complexity of the federated learning model training system architecture but also introduces additional system security risks. Summary of the Invention
[0006] To address the aforementioned technical issues, this invention provides a traffic flow federated security prediction method based on distributed homomorphic encryption. This method ensures the security and efficiency of the traffic flow prediction model by using a vehicle-road-cloud integrated network to collaboratively generate distributed keys and perform encryption / decryption calculations.
[0007] The traffic flow federated security prediction method based on distributed homomorphic encryption described in this invention includes the following steps:
[0008] Step 1: Construct an integrated vehicle-road-cloud network architecture, which includes vehicle nodes, road infrastructure nodes, and cloud platform nodes; and establish a federated model that includes a local model and a global model based on the integrated vehicle-road-cloud network architecture.
[0009] Step 2: Generate a distributed key based on the collaboration between road infrastructure nodes and cloud platform nodes, and perform homomorphic encryption on the federated model;
[0010] Step 3: Train the homomorphic encrypted federated model based on the collaboration between road infrastructure nodes and cloud platform nodes, using distributed keys;
[0011] Step 4: Predict traffic flow based on the trained federated model.
[0012] Furthermore, step 2 specifically involves:
[0013] Step 2-1: Set system parameters;
[0014] The cloud platform node generates four public key parameters. and ,in It is a large prime number. It is a small prime number and belongs to the cyclic group. prime order, and Satisfying the relation: , It is a positive integer; and It is a cyclic group Two different random elements in the data. It is a group generator. It is an auxiliary generator. and Satisfying the relation:
[0015] ,
[0016] in, It is a random number;
[0017] The cloud platform broadcasts the public key parameters globally. and Distributed to the vehicle-road-cloud integrated network architecture One road infrastructure node;
[0018] Step 2-2: For all road infrastructure nodes i that have received the public key parameters, generate two random polynomials. Road infrastructure node i performs Pedersen secret sharing verification based on the two polynomials, and performs Feldman secret sharing verification on qualified users who pass the Pedersen secret sharing verification.
[0019] Steps 2-3: For the infrastructure node i that has finally passed the Feldman secret sharing verification, obtain its corresponding public key fragment and generate a global public key;
[0020] Steps 2-4: For any road infrastructure node i verified by Feldman secret share, based on the shared data sent by other infrastructure nodes j verified by Feldman secret share to road infrastructure node i, a private key fragment is generated, where, .
[0021] Furthermore, step 3 specifically involves:
[0022] Step 3-1: The cloud platform distributes model parameters globally. Feldman Validated set of qualified users All road infrastructure nodes and cloud platform nodes in the system train the traffic flow federated model through the collaborative interaction of LSTM model parameters, completing the global model gradient parameter... Iterative updates;
[0023] Step 3-2: Train the local model for road infrastructure nodes using stochastic gradient descent; and update the model parameters after local training. After homomorphic encryption, the data is returned to the cloud platform for aggregation. The cloud platform then distributes the aggregated ciphertext to T randomly selected road infrastructure nodes.
[0024] Among them, the model parameters updated after local training After homomorphic encryption, the data is returned to the cloud platform for aggregation operations, including:
[0025] Step 3-2-1: Local update of model parameters for road infrastructure nodes using fixed-point coding;
[0026] Step 3-2-2: Perform Cramer transformation on the fixed-point coding parameters of road infrastructure nodes;
[0027] Step 3-2-3: Homomorphic encryption of Cramer transformation parameters for road infrastructure nodes;
[0028] Step 3-2-4: The cloud platform performs homomorphic encrypted aggregation of local model parameters;
[0029] Step 3-3: The road infrastructure nodes perform distributed decryption of the homomorphic encrypted aggregation result, including:
[0030] T road infrastructure nodes selected by the cloud platform Receive the aggregated ciphertext and, based on its locally stored private key fragments... Partial decryption; road infrastructure nodes Return some of the decryption results to the cloud platform;
[0031] Steps 3-4: The cloud platform collects all selected [items / items]. The partial decryption results of each road infrastructure node are then merged.
[0032] Steps 3-5: The cloud platform performs logarithmic recovery of the merged results;
[0033] Steps 3-6: The cloud platform decodes the logarithmic recovery results;
[0034] Steps 3-7: The cloud platform performs a global model update.
[0035] The beneficial effects of this invention are as follows: The method described in this invention provides stronger confidentiality for the model training process. Through distributed key generation and homomorphic encryption computing technology, the confidentiality of shared model parameters can be guaranteed, avoiding the threat of inference attacks based on model parameter analysis. This invention can solve the shortcomings of existing traffic flow prediction systems in terms of data privacy, providing effective supporting technology for intelligent traffic management. Attached Figure Description
[0036] Figure 1 This is an overall flowchart of a traffic flow federated security prediction method based on distributed homomorphic encryption;
[0037] Figure 2 This is a diagram of the integrated vehicle-road-cloud network architecture of the present invention;
[0038] Figure 3 This is a flowchart of the distributed key generation based on the collaboration between road infrastructure nodes and a cloud platform, as described in this invention.
[0039] Figure 4 This invention is based on the training graph of a homomorphic encrypted federated model that coordinates road infrastructure nodes and a cloud platform.
[0040] Figure 5 This is a diagram of the common LSTM model for collaborative training of road infrastructure nodes and cloud platform in this invention;
[0041] Figure 6 This is a diagram showing the impact of the number of participating nodes on the model's protection effectiveness. Detailed Implementation
[0042] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings.
[0043] like Figure 1 As shown, a traffic flow federated security prediction method based on distributed homomorphic encryption includes the following steps:
[0044] Step 1: Construct an integrated vehicle-road-cloud network architecture, which includes vehicle nodes, road infrastructure nodes, and cloud platform nodes; and establish a federated model that includes a local model and a global model based on the integrated vehicle-road-cloud network architecture.
[0045] Step 2: Generate a distributed key based on the collaboration between road infrastructure nodes and cloud platform nodes, and perform homomorphic encryption on the federated model;
[0046] Step 3: Train the homomorphic encrypted federated model based on the collaboration between road infrastructure nodes and cloud platform nodes, using distributed keys;
[0047] Step 4: Predict traffic flow based on the trained federated model.
[0048] In step 1, an integrated vehicle-road-cloud network is constructed. Leveraging next-generation information and communication technologies such as 5G, artificial intelligence, and cloud computing, vehicles, road infrastructure nodes, and the cloud platform are closely connected to form a deeply integrated network. The basic architecture is as follows: Figure 2 As shown in the diagram, the node types in the architecture include vehicle nodes, road infrastructure nodes, and cloud platform nodes. Road infrastructure nodes, including cameras, signal sensors, and roadside units (RSUs), are responsible for collecting vehicle flow information on roads and at intersections, training local traffic flow prediction models, exchanging model parameters with cloud platform nodes, and predicting traffic flow based on the local model. Cloud platform nodes are responsible for exchanging model parameters with RSU nodes, training global traffic flow prediction models, and predicting traffic flow based on the global model. Vehicle-to-Vehicle (V2V) communication uses 5G or Dedicated Short Range Communication (DSRC) technology. Vehicle-to-Infrastructure (V2I) communication uses DSRC technology or cellular network-based technology. Communication between digital road infrastructure nodes and cloud platform nodes uses wired or 5G wireless communication technology. Communication between vehicle nodes and cloud platform nodes (V2N) uses 4G or 5G wireless communication technology.
[0049] In step 2, distributed key generation using distributed keys is performed based on the collaboration between road infrastructure nodes and cloud platform nodes, such as... Figure 3 As shown.
[0050] Step 2-1: Set system parameters;
[0051] The cloud platform node generates four public key parameters. and ,in It is a large prime number. It is a small prime number and is a cyclic group. prime order, and Satisfying the relation: , It is a positive integer; and It is a cyclic group Two different random elements in the data. It is a group generator. It is an auxiliary generator. and Satisfying the relation:
[0052] (1),
[0053] in, It is a random number;
[0054] The cloud platform broadcasts the public key parameters globally. and Distributed to the vehicle-road-cloud integrated network architecture One road infrastructure node;
[0055] Step 2-2: Secret sharing verification;
[0056] (1) Polynomial generation of road infrastructure nodes;
[0057] To ensure the correctness of key generation, for all road infrastructure nodes that receive the public key parameters... Both generate two random polynomials. , Its calculation formula is:
[0058] (2),
[0059] in, , , , is a set of elements within the range of values q. These are the independent variables of two random polynomials; yes When assigned a value of 0 The function value, that is ; It is a secret fragment of road infrastructure node i. It is random auxiliary sharding. and All are randomly generated polynomial coefficients. This is the minimum threshold for the number of nodes that meet the verification conditions and participate in key generation and model training. ;
[0060] (2) Perform Pedersen secret sharing verification (VSS) on the road infrastructure nodes that received the parameters, including;
[0061] 1) Road infrastructure node i according to polynomial , Medium coefficient , ,use Generate public commitment value , that is ,in, , It is a polynomial , The index of the coefficient, , They are , of , The result of the power operation; further, the road infrastructure node i will... Broadcast to other Each road infrastructure node and cloud platform node;
[0062] 2) Road infrastructure node i according to polynomial , Using road infrastructure node j as input parameter, we obtain the following results: , and will , Assigned value , As a form of sharing, that is: in, Furthermore, road infrastructure node i will , Send to road infrastructure node j;
[0063] 3) Road infrastructure node j receives broadcast parameters from road infrastructure node i. and sharing , And the verification was performed; the formula is as follows:
[0064] (3),
[0065] in, , They are , of , The result of the power operation; This is the result of raising j to the power of k; if the verification formula is not true, then road infrastructure node j will send a Pedersen verification complaint against road infrastructure node i to the cloud platform node. ;
[0066] 4) If the cloud platform node receives more than T complaints against road infrastructure node i, then road infrastructure node i will be directly classified as an ineligible user who cannot pass Pedersen verification, denoted as: ;
[0067] Otherwise, to prevent malicious complaints, the cloud platform requires road infrastructure node i to upload shared data sent by all road infrastructure nodes j that initiated the complaint. The cloud platform nodes are based on the publicly committed value received from the broadcast. Further verification is performed according to formula (3);
[0068] If any verification fails, the road infrastructure node i is determined to be an ineligible user who cannot pass Pedersen verification. Otherwise, road infrastructure node i is determined to be a qualified user who can pass Pedersen verification. And add it to the set of qualified users verified by Pedersen. ;
[0069] If the cloud platform node does not receive any Pedersen verification complaints against road infrastructure node i, then road infrastructure node i will be directly determined as a qualified user who can pass Pedersen verification. and add it to ;
[0070] (3) Perform Feldman secret share verification on road infrastructure node i that has been verified through Pedersen secret share verification, including:
[0071] 1) Road infrastructure nodes Based on polynomials Medium coefficient use Generate audit parameters , that is ,in, , Furthermore, road infrastructure nodes Will Broadcast to other Each road infrastructure node and cloud platform node;
[0072] 2) Road infrastructure nodes Receive broadcast parameters from road infrastructure node i and sharing And the verification was performed; the formula is:
[0073] (4),
[0074] If the verification formula (4) does not hold, then the road infrastructure node The cloud platform node will send a message targeting the road infrastructure node. Feldman verification complaint ;
[0075] 3) Regarding the road facility nodes that have been complained about Cloud platform node requirements All qualified road infrastructure nodes All uploaded the road infrastructure node i to its shared data. And based on the received broadcast parameters Further verification is performed according to formula (4);
[0076] If the cumulative number of qualified road infrastructure nodes that pass the formula verification is... Then, road facility node i will be determined as a qualified user who can pass Feldman verification. And add it to the set of qualified users verified by Feldman. ;
[0077] If the cloud platform node does not receive any Feldman verification complaints against road infrastructure node i, then road infrastructure node i will be directly determined as a qualified user who can pass Feldman verification. and add it to .
[0078] Steps 2-3: Generate the global public key;
[0079] 1) For road infrastructure node i that has received a Feldman complaint and has been verified through the cloud platform, the cloud platform requires... In A set of road infrastructure nodes Each road infrastructure node in the network uploads the shared data sent by road infrastructure node i. The Lagrange interpolation function is used to obtain the stochastic polynomial of road infrastructure node i. The formula is:
[0080] (5),
[0081] ,
[0082] in, It was obtained through Lagrange interpolation. The coefficients of the polynomial; further, based on the random polynomial of road facility node i obtained by interpolation. The formula to obtain the corresponding public key fragment is:
[0083] (6),
[0084] in, yes of The result of the power operation;
[0085] 2) For road infrastructure node i that has not received any Feldman complaints, the cloud platform directly requests public key fragments from it. ;
[0086] 3) If Number of all road infrastructure nodes Not less than the set threshold ,Right now At that time, the cloud platform node is based on Generate a global public key from public key fragments of all road infrastructure nodes. The formula is:
[0087] (7),
[0088] 4) The cloud platform node will generate a global public key. Distribute to All road infrastructure nodes are stored, and the road infrastructure nodes use public keys for subsequent encryption processing.
[0089] Steps 2-4: Private key fragment generation;
[0090] for Road infrastructure nodes in ,based on Other road infrastructure nodes Shared to it Generate private key fragment The formula is:
[0091] (8).
[0092] Step 3: Train the homomorphic encrypted federated model using distributed keys, which is based on the collaboration between road infrastructure nodes and cloud platform nodes; the basic process is as follows. Figure 4 As shown.
[0093] Step 3-1: Definition of a common model for collaborative training of road infrastructure nodes and the cloud platform;
[0094] Traffic flow is time-series data. Long Short-Term Memory (LSTM) networks in Temporal Recurrent Neural Networks possess flexible information processing capabilities, allowing for better control of information flow when processing sequential data, and exhibiting superior network learning and reasoning abilities. Therefore, this invention employs LSTM as a common structural model for both the local model of Roadside Unit (RSU) nodes and the global model of cloud platform nodes in a vehicle-road-cloud integrated network collaborative training system. Its core structure includes a forget gate, an input gate, and an output gate, as shown below. Figure 5 As shown.
[0095] Specifically,
[0096] (1) Gate of Oblivion The formula used to control the degree of forgetting or retention of traffic flow information is:
[0097] (9),
[0098] in, This represents the sigmoid activation function. The weight matrix represents the forget gate. The bias matrix represents the forget gate. This indicates the traffic flow information entered at the current moment, while This indicates the traffic flow information output at the previous moment;
[0099] (2) Input gate and candidate cell state The formula used to control the state level of the incoming traffic flow information is:
[0100] (10),
[0101] in, It is the weight matrix of the input gate. It is the bias matrix of the input gate. These are the weights of the candidate input gates. It is the deviation of the candidate input gate;
[0102] (3) Unit state The formula used to store historical traffic flow information is:
[0103] (11),
[0104] in, The range of values is (0,1);
[0105] (4) Output gate Historical information and current time information The formula for integration is:
[0106] (12),
[0107] in, It is the weight matrix of the output gate. It is the bias matrix of the input gate. It is a unit state, with a range of values. ;
[0108] Step 3-2: The cloud platform distributes model parameters globally;
[0109] All road infrastructure nodes and cloud platform nodes train the traffic flow federated model through the collaborative interaction of LSTM model parameters.
[0110] (1) During the initial training phase of the model, the cloud platform node will transfer the LSTM parameters in the global model gradient. Randomly initialized to and will Distributed to All road infrastructure nodes in the middle; among them, Forgotten Gate Input gate Output gate Unit status The weight matrix, Forgotten Gate Input gate Output gate Unit status The bias term;
[0111] (2) During the model training phase, the training process is based on the rounds of collaborative interaction between cloud platform nodes and road infrastructure nodes. Perform global model gradient parameters Iterative updates.
[0112] Step 3-3: Local model training is performed on road infrastructure nodes using the stochastic gradient descent method;
[0113] The Roadside Unit (RSU) node trains the traffic flow federated model by denoising, normalizing, and processing missing values of traffic flow data (vehicle speed, traffic volume, vehicle density, etc.) collected by sensors (e.g., cameras, GPS, radar, etc.) and dividing the data into training, validation, and test sets.
[0114] For roadside unit (RSU) road infrastructure nodes By setting an upper limit on the number of iteration rounds and the total number of data batches For each batch in each round The data in the dataset were used to perform model parameter optimization using stochastic gradient descent. The training update formula is:
[0115] (13),
[0116] in, These are global model parameters issued by the cloud platform. It is a road infrastructure node learning rate, This indicates the calculation of the gradient. For road infrastructure nodes loss function, These are the parameters of the local model from the previous round of joint training. These are the updated values for the model parameters during this training round.
[0117] Model parameters updated after local training The aggregation operation needs to be performed back on the server. To ensure the security of the aggregation process, each road infrastructure node needs to be encrypted using a homomorphic encryption algorithm. Encryption processing is performed.
[0118] After updating the model parameters Before encryption, road infrastructure nodes To encode it as an integer to meet the requirements of homomorphic encryption computation, the formula is:
[0119] (14),
[0120] in, It is the bit length of the encoding, used to adjust parameters. The accuracy; It is a circular group distributed by the cloud platform node. The prime order is used to ensure that the encoded value is compatible with group operations; Model parameters Encoded integer; It is the largest positive code number, and its value is much larger than... , that is This allows for reserving enough space for summing the encoded values;
[0121] if If it is negative, then ; To ensure Suitable for homomorphic encryption computation.
[0122] This invention employs the ElGamal algorithm for homomorphic encrypted computation of updated model parameters. Since ElGamal only supports multiplicative homomorphic operations, the encoded model parameters need to be... Perform the Cramer transformation, the formula is:
[0123] (15),
[0124] Among them, for road infrastructure nodes , Its corresponding Cramer conversion value is , Then the following equation holds:
[0125] (16),
[0126] Road infrastructure nodes Model parameters after Cramer transformation The ElGamal algorithm is used to perform homomorphic encryption based on the stored global public key pk, generating two ciphertexts. and The formula is:
[0127] (17),
[0128] in, It is a road infrastructure node Random numbers are generated to enhance the randomness of the encryption result.
[0129] Furthermore, road infrastructure nodes The encrypted model parameters , Upload to the cloud platform node.
[0130] Cloud platform node reception The encrypted model parameters of all road infrastructure nodes are aggregated locally based on multiplicative homomorphic encryption calculation, using the following formula:
[0131] (18),
[0132] Cloud platform nodes from Random selection Each element, and the aggregated ciphertext and Distribute to the corresponding One road infrastructure node;
[0133] Steps 3-4: The road infrastructure nodes perform distributed decryption of the homomorphic encrypted aggregation result;
[0134] T road infrastructure nodes selected by the cloud platform nodes Receive the aggregated ciphertext and And based on its locally stored private key fragments Partial decryption is performed using the following formula:
[0135] (19),
[0136] Road infrastructure nodes Partial decryption results Return to the cloud platform node;
[0137] Steps 3-5: Cloud platform nodes collect all selected... The partial decryption results of each road infrastructure node are then combined using the following formula:
[0138] (20),
[0139] in, yes The combined value of the decryption results of each road infrastructure node;
[0140] Steps 3-6: The cloud platform nodes perform logarithmic recovery of the merged results;
[0141] Cloud platform nodes merge decryption results Perform the inverse Cramer transform, the formula is:
[0142] (twenty one),
[0143] Steps 3-7: The cloud platform nodes decode the logarithmic recovery results;
[0144] Cloud platform node-to-logarithmic recovery results Decode the value to obtain the corresponding floating-point parameter value. The formula is as follows:
[0145] (twenty two),
[0146] in, yes The number of all road infrastructure nodes in the system.
[0147] Steps 3-8: The cloud platform nodes perform a global model update;
[0148] The cloud platform nodes update the global model using the decoded floating-point parameter values, using the following formula:
[0149] (twenty three),
[0150] in, These are the global model parameters for the next round of joint training. These are the global model parameters for this round of joint training. The learning rate for the cloud platform nodes to learn the global model;
[0151] The cloud platform nodes will store global model parameters. Distribute to For all road infrastructure nodes, repeat steps 3-3 to 3-8 until the local model training for all road infrastructure nodes converges to the specified accuracy or reaches the set number of training rounds.
[0152] Step 4: Predict safe traffic flow based on the federated model;
[0153] After the federal collaborative training is completed, the road infrastructure nodes Obtain the local prediction model The cloud platform nodes obtain the global prediction model. Traffic flow can be predicted based on two types of models.
[0154] Step 4-1: Traffic flow prediction for road infrastructure nodes based on local models;
[0155] Road infrastructure nodes Storage-based local prediction model It provides road-level real-time and weak real-time traffic flow prediction for vehicle nodes;
[0156] Step 4-2: Traffic flow prediction based on a global model at cloud platform nodes;
[0157] Cloud platform node storage-based global prediction model It provides traffic flow forecasts for urban transportation decision-making departments to use for macro-level traffic data analysis.
[0158] To further verify the privacy protection capabilities and security of this invention in a federal traffic flow prediction system, this invention introduces two typical attack scenarios: white-box attacks and black-box attacks, and conducts comparative experiments based on different differential privacy mechanisms. In the white-box attack scenario, it is assumed that the attacker has full access to core information such as the model structure, parameter details, and privacy budget, and attempts to reconstruct the original input or interfere with the predicted output through model inference. In the black-box attack scenario, the attacker cannot directly access the model parameters, but can only analyze the model response results through interface interaction, thereby carrying out a reconstruction attack. These two attack strategies simulate typical privacy threats that may be encountered in real-world systems, helping to systematically evaluate the anti-attack capabilities and stability of the proposed method under different security assumptions.
[0159] To better meet the actual needs of traffic flow prediction, this invention uses the root mean square error (RMSE) as the core evaluation metric to measure the impact of various privacy mechanisms on prediction performance under attack conditions. Experimental results, as shown in Table 1, demonstrate that the proposed "distributed key generation + homomorphic encryption" method effectively improves system security while maintaining the lowest RMSE value, reflecting a dual guarantee of good privacy protection and prediction accuracy.
[0160] Table 1. Prediction errors (RMSE, unit: vehicles) of various privacy mechanisms in white / black box attack scenarios.
[0161]
[0162] To verify the security performance and prediction effect of the proposed traffic flow federated security prediction method based on distributed homomorphic encryption under the vehicle-road-cloud integrated architecture, this invention also designed an experiment with the "number of participating road infrastructure nodes" as a variable, aiming to systematically analyze the impact of the number of nodes on model performance and attack resistance. During the training process, this method employs a distributed key collaborative generation mechanism and homomorphic encryption computation to ensure privacy and security during model parameter transmission and aggregation.
[0163] The experiment quantitatively evaluated the model from two dimensions: prediction accuracy and attack success rate. The former reflects the model's operational performance, while the latter simulates the likelihood of the model being vulnerable to inference threats under white-box or black-box attack conditions. The experimental results are as follows: Figure 6 As shown, the prediction accuracy steadily increases with the number of participating nodes, while the attack success rate decreases significantly. Furthermore, the higher the degree of node collaboration, the more effectively the proposed method can improve the model's learning ability and anti-attack capability while ensuring data privacy, demonstrating its good scalability and robustness in intelligent transportation systems.
[0164] The above description is merely a preferred embodiment of the present invention and is not intended to further limit the present invention. All equivalent changes made based on the description and drawings of the present invention are within the protection scope of the present invention.
Claims
1. A traffic flow federated security prediction method based on distributed homomorphic encryption, characterized in that, Includes the following steps: Step 1: Construct an integrated vehicle-road-cloud network architecture, which includes vehicle nodes, road infrastructure nodes, and cloud platform nodes; A federated model, including a local model and a global model, is established based on the aforementioned vehicle-road-cloud integrated network architecture. Step 2: Generate a distributed key based on the collaboration between road infrastructure nodes and cloud platform nodes, and perform homomorphic encryption on the federated model; Step 3: Train the homomorphic encrypted federated model based on the collaboration between road infrastructure nodes and cloud platform nodes, using distributed keys; Step 4: Predict traffic flow based on the trained federated model; Step 2 specifically involves: Step 2-1: Set system parameters; The cloud platform node generates four public key parameters. and ,in It is a large prime number. It is a small prime number and belongs to the cyclic group. prime order, and Satisfying the relation: , It is a positive integer; and It is a cyclic group Two different random elements in the data. It is a group generator. It is an auxiliary generator. and Satisfying the relation: (1), in, It is a random number; The cloud platform nodes broadcast the public key parameters globally. and Distributed to the vehicle-road-cloud integrated network architecture One road infrastructure node; Step 2-2: For all road infrastructure nodes i that have received the public key parameters, generate two random polynomials. Road infrastructure node i performs Pedersen secret sharing verification based on the two polynomials, and performs Feldman secret sharing verification on qualified users who pass the Pedersen secret sharing verification. Steps 2-3: For the infrastructure node i that has finally passed the Feldman secret sharing verification, obtain its corresponding public key fragment and generate a global public key; Steps 2-4: For any road infrastructure node i verified by Feldman secret share, based on the shared data sent by other infrastructure nodes j verified by Feldman secret share to road infrastructure node i, a private key fragment is generated, where, .
2. The traffic flow federated security prediction method based on distributed homomorphic encryption according to claim 1, characterized in that, Step 2-2 specifically involves: Step 2-2-1: For all road infrastructure nodes that have received the public key parameters Both generate two random polynomials. , The formula is: (2), in, , , , is a set of elements within the range of values q. These are the independent variables of two random polynomials; for When assigned a value of 0 The function value is the secret fragment of road infrastructure node i; It is random auxiliary sharding. and All are randomly generated polynomial coefficients. This is the minimum threshold for the number of nodes that meet the verification conditions and participate in key generation and model training. ; Step 2-2-2: Perform Pedersen secret sharing verification on the road infrastructure nodes that received the parameters, including; 1) Road infrastructure node i according to polynomial , Medium coefficient , Generate public commitment values ,Right now ,in, , It is a polynomial , The index of the coefficient, , They are , of , The result of the power operation; further, the road infrastructure node i will... Broadcast to other Each road infrastructure node and cloud platform; 2) Road infrastructure node i according to polynomial , Using road infrastructure node j as input parameter, we obtain the following results: , and will , Assigned value , As a form of sharing, that is: in, Furthermore, road infrastructure node i will , Send to road infrastructure node j; 3) Road infrastructure node j receives broadcast parameters from road infrastructure node i. and sharing , And the verification was performed; the formula is as follows: (3), in, , They are , of , The result of the power operation; This is the result of raising j to the power of k; if the verification formula is not true, then road infrastructure node j will send a Pedersen verification complaint against road infrastructure node i to the cloud platform. ; 4) If the cloud platform node receives more than T complaints against road infrastructure node i, then road infrastructure node i will be directly classified as an ineligible user who cannot pass Pedersen verification. Otherwise, to prevent malicious complaints, the cloud platform nodes require road infrastructure node i to upload shared data sent by all road infrastructure nodes j that initiated the complaint. The cloud platform nodes are based on the publicly committed value received from the broadcast. Further verification is performed according to formula (3); If any verification fails, the road infrastructure node i is determined to be an ineligible user who cannot pass Pedersen verification. Otherwise, road infrastructure node i is determined to be a qualified user who can pass Pedersen verification. And add it to the set of qualified users verified by Pedersen. ; If the cloud platform node does not receive any Pedersen verification complaints against road infrastructure node i, then road infrastructure node i will be directly determined as a qualified user who can pass Pedersen verification. and add it to ; Step 2-2-3: Perform Feldman secret share verification on road infrastructure node i that has been verified through Pedersen secret share verification, including: 1) Road infrastructure nodes Based on polynomials Medium coefficient Generate audit parameters ,Right now ,in, , Road infrastructure nodes Will Broadcast to other Each road infrastructure node and cloud platform node; 2) Road infrastructure node j receives broadcast parameters from road infrastructure node i. and sharing And the verification was performed; the formula is as follows: (4), If the verification formula (4) is not true, then road infrastructure node j will send a Feldman verification complaint against road infrastructure node i to the cloud platform node. ; 3) For the road facility node i that has been complained about, the cloud platform node requires... All qualified nodes of road infrastructure in China All uploaded the road infrastructure node i to its shared data. And based on the received broadcast parameters Further verification is performed according to formula (4); If the cumulative number of qualified road infrastructure nodes that pass the formula verification is... Then, road facility node i will be determined as a qualified user who can pass Feldman verification. And add it to the set of qualified users verified by Feldman. ; If the cloud platform node does not receive any Feldman verification complaints against road infrastructure node i, then road infrastructure node i will be directly determined as a qualified user who can pass Feldman verification. and add it to .
3. The traffic flow federated security prediction method based on distributed homomorphic encryption according to claim 2, characterized in that, Steps 2-3 are as follows: 1) For road infrastructure node i that has received a Feldman complaint and has been verified through the cloud platform, the cloud platform node requirements are as follows: The set of T road infrastructure nodes Each road infrastructure node in the network uploads the shared data sent by road infrastructure node i. The Lagrange interpolation function is used to update the stochastic polynomial of road infrastructure node i. The formula is: (5), , in, It was obtained through Lagrange interpolation. The coefficients of the polynomial; further, based on the random polynomial of road facility node i obtained by interpolation. The formula to obtain the corresponding public key fragment is: (6), in, yes of The result of the power operation; 2) For road infrastructure node i that has not received any Feldman complaints, the cloud platform node directly requests the public key fragment from it. ; 3) If Number of all road infrastructure nodes Not less than the set threshold ,Right now At that time, the cloud platform node is based on Generate a global public key from public key fragments of all road infrastructure nodes. The formula is: (7), 4) The cloud platform will generate a global public key. Distribute to All road infrastructure nodes are saved.
4. The traffic flow federated security prediction method based on distributed homomorphic encryption according to claim 3, characterized in that, Steps 2-4 are as follows: for Road infrastructure nodes in ,based on Other road infrastructure nodes Shared to it Generate private key fragment The formula is: (8)。 5. The traffic flow federated security prediction method based on distributed homomorphic encryption according to claim 2, characterized in that, Step 3 specifically involves: Step 3-1: The cloud platform nodes distribute global model parameters. All road infrastructure nodes and cloud platform nodes in the system train the traffic flow federated model through the collaborative interaction of LSTM model parameters, completing the global model gradient parameter... Iterative updates; Step 3-2: Train the local model for road infrastructure nodes using stochastic gradient descent; and update the model parameters after local training. After homomorphic encryption, the data is returned to the cloud platform node for aggregation. The cloud platform nodes distribute the aggregated ciphertext to T randomly selected road infrastructure nodes; Step 3-3: The road infrastructure nodes perform distributed decryption of the homomorphic encrypted aggregation result, including: T road infrastructure nodes selected by the cloud platform nodes Receive the aggregated ciphertext and, based on its locally stored private key fragments... Partial decryption; road infrastructure nodes Return some of the decryption results to the cloud platform; Steps 3-4: Cloud platform nodes collect all selected... The partial decryption results of each road infrastructure node are then merged. Steps 3-5: The cloud platform nodes perform logarithmic recovery of the merged results; Steps 3-6: The cloud platform nodes decode the logarithmic recovery results; Steps 3-7: The cloud platform nodes perform a global model update.
6. The traffic flow federated security prediction method based on distributed homomorphic encryption according to claim 5, characterized in that, In step 3-2, the model parameters are updated after local training. After homomorphic encryption, the data is returned to the cloud platform node for aggregation, specifically as follows: Step 3-2-1: Perform fixed-point encoding of local model parameters for road infrastructure nodes; Step 3-2-2: Perform Cramer transformation on the fixed-point coding parameters of road infrastructure nodes; Step 3-2-3: Homomorphic encryption of Cramer transformation parameters for road infrastructure nodes; Step 3-2-4: The cloud platform node performs homomorphic encrypted aggregation of local model parameters.
Citation Information
Patent Citations
Multi-party joint privacy data processing method and device
CN112989368A
Traffic flow prediction method based on federated learning
CN114881371A
Fully homomorphic encryption method for federated learning of Internet of Vehicles
CN115935383A
Threshold homomorphic password federated gradient secure aggregation method
CN119382859A