Federal learning optimization system and method for intelligent network connection automobile scene
By adopting the asynchronous federated learning framework and the cloud-edge-end three-layer architecture in the intelligent connected vehicle scenario, vehicles with heterogeneous computing capabilities are clustered and pseudo-asynchronous and fully asynchronous aggregation are performed, the problems of inefficient training efficiency and inconsistent model quality are solved, and an efficient, safe and robust federated learning system is achieved.
Patent Information
- Application Number
- CN202411714042.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-04-15
AI Technical Summary
In the intelligent connected vehicle scenario, vehicles with heterogeneous computing power lead to inefficient training efficiency and inconsistent model quality in federated learning, and traditional synchronous federated learning has problems such as inconsistent aggregation time and insufficient fault tolerance.
Using the asynchronous federated learning framework, vehicles are clustered and pseudo-asynchronous and fully asynchronous aggregation is performed in the three-layer architecture of cloud-edge-end, and the aggregation and update of model parameters are optimized through trust score design and adaptive dynamic time window.
It improves the efficiency and model quality of federated learning, reduces the inconsistency of heterogeneous devices aggregation time, and enhances the system's fault tolerance for node failures, ensuring data security and user privacy protection.
Smart Images

Figure CN119830120A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of vehicle networking, and more specifically, relates to a federated learning optimization system and method for intelligent connected vehicle scenarios. Background Art
[0002] Connected-Automated Vehicles (CAVs) use technologies such as on-board sensors, Internet of Vehicles, and cloud computing to achieve real-time data interaction between vehicles and the external environment (such as infrastructure, other vehicles, and cloud servers), thereby supporting functions such as intelligent perception, path planning, and driving decisions. With the rapid increase in data volume, CAVs need to use machine learning to perform complex data processing and analysis. However, traditional machine learning usually relies on centralized data collection and analysis, which may face challenges such as data privacy, security, and heterogeneity.
[0003] Federated Learning (FL) is a distributed machine learning method that allows models to be trained on multiple edge devices or local vehicle terminals without uploading data to a cloud center server. This method not only protects data privacy, but also reduces the cost and risk of data transmission. Existing research work has applied federated learning to the Internet of Vehicles.
[0004] In the scenario of intelligent connected vehicles, the computing power of different vehicles varies significantly. Some high-performance vehicles are equipped with powerful processors that can quickly complete local training, while some low-performance vehicles have limited computing power and slow training speed. Direct global model training in distributed learning will lead to problems such as low training efficiency. In addition, vehicles with low computing power may not be able to provide model parameters with the same accuracy as vehicles with high computing power, affecting the quality of the global model. To this end, vehicle clustering based on computing power can group vehicles with similar computing power into the same group, ensure synchronous training, optimize the aggregation efficiency of model parameters, optimize resource allocation, and improve overall system performance.
[0005] Traditional synchronous federated learning requires the aggregation of all local models at the same time. However, due to the difference in computing power between different connected vehicles, there are significant differences in the time to complete local training. Therefore, in the cloud-edge-end three-layer federated learning, the aggregation time will be inconsistent. Nodes with stronger computing power may need to wait for nodes with weaker computing power to complete training before they can perform unified model aggregation. This will increase latency, waste resources, and affect the overall efficiency of the system. In addition, if a node fails or has problems during the synchronization process, the entire training cycle may be delayed or interrupted, reducing the system's fault tolerance to node failures.
[0006] In the federated learning optimization method for intelligent connected vehicle scenarios, it is necessary to fully consider these factors to ensure the accuracy and robustness of the model. This requires the comprehensive use of advanced technologies such as vehicle heterogeneous clustering, asynchronous federated learning, and edge computing to effectively utilize the resources of the vehicle edge network and improve the system training efficiency and performance. Summary of the invention
[0007] In order to solve the above technical problems, the present invention provides a federated learning optimization method and system for intelligent networked vehicle scenarios. The method and system improve the asynchronous federated learning framework, divide multiple vehicles into different clusters due to the heterogeneity of computing power, adopt a three-layer federated learning architecture of cloud-edge-end, deploy edge servers on roadside units (RSU), and pseudo-asynchronously aggregate the received model parameters in an adaptive dynamic time window, and aggregate the received model parameters in real time on the cloud, thereby improving the efficiency and quality of system model training, while ensuring data security and protecting user privacy. The heterogeneous clustering design is embodied in: a percentage trust score is designed for each vehicle node according to different computing power, and the vehicle nodes under each RSU are divided into ten levels of vehicle clusters according to the trust score threshold, and the vehicle clusters with a trust score lower than the threshold of 10 periodically participate in global model training, and the remaining vehicle clusters participate in global model training in each round; the design of asynchronous federated learning is embodied in: RSU aggregates the vehicle cluster model parameters received in the adaptive dynamic adjustment time window, that is, the pseudo-asynchronous aggregation of RSU, and sends the aggregated parameters to the cloud, and the cloud receives the parameters for real-time update of the fully asynchronous aggregation. The design of asynchronous federated learning and vehicle clustering ensures the efficiency of the federated learning optimization system and the quality of the global model in the intelligent connected vehicle scenario.
[0008] In order to achieve the above object, the present invention is achieved through the following technical solutions:
[0009] The present invention provides a federated learning optimization method and system for intelligent connected vehicle scenarios.
[0010] The present invention provides a federated learning optimization system for intelligent connected vehicle scenarios, including:
[0011] The data collection and preprocessing module is configured to collect and preprocess various types of data during the operation of the intelligent connected vehicle using the vehicle gateway, and the vehicle gateway includes a computing unit, a storage unit, and a transmission unit;
[0012] The local training module is configured as follows: after each vehicle node receives the global model, the local model is initialized in the vehicle gateway, and the local model parameters are obtained by training with the collected local data set;
[0013] The trust score design and vehicle clustering module is configured as follows: each vehicle node uploads the local model parameters to the cloud server, and the cloud server assigns a trust score to each vehicle node based on the model parameters, and divides the vehicle nodes under each roadside unit RSU into different vehicle clusters based on the trust score. This module is implemented by a high-performance computing server deployed in the cloud;
[0014] The cluster aggregation module is configured as follows: each cluster of vehicles aggregates the local model within the cluster; the topology of each cluster of vehicles is a complete binary tree arrangement, which is arranged from high to low according to the cosine similarity between the local model and the global model. The model distribution and aggregation methods within the cluster are from item to item and from bottom to top. The aggregation of the model and the sending and receiving of the model parameters are realized through the vehicle gateway, and the aggregated model parameters are uploaded to the RSU;
[0015] The model parameter transmission module is configured to: send the cluster aggregated model parameters of each vehicle cluster in the vehicle layer to the corresponding RSU, and send the local model parameters obtained by pseudo-asynchronous aggregation in each RSU in the roadside unit layer to the cloud. The functions of this module are realized through wireless transmission from vehicle nodes to RSU (realized by the wireless transmission function of the vehicle-mounted gateway at the vehicle layer), and wired transmission from roadside units to the cloud (such as transmission through optical fiber, Ethernet, etc.);
[0016] The pseudo-asynchronous aggregation module is configured as follows: the RSU receives the intra-cluster aggregation model uploaded by the vehicle layer, and performs pseudo-asynchronous aggregation of parameters within the adaptive dynamic adjustment time window, which is realized by the edge server deployed on the RSU;
[0017] Global model update and distribution module: RSU sends the aggregated local model parameters to the cloud for fully asynchronous aggregation. Once the cloud receives the local model, it aggregates it to generate a global model. The aggregation of the global model is also achieved through high-performance cloud servers. The vehicle node monitors its own computing load, network status, power and other factors through the on-board gateway to determine whether it is idle. If so, the vehicle node first sends a request to the RSU via wireless, and the RSU then sends a request to the cloud via wired to download the latest global model, and downloads the global model for the next round of local model training;
[0018] The system monitoring and evaluation module is configured to monitor the system performance and each module, and regularly evaluate the accuracy of the global model and the overall operating status of the system. This function is implemented through high-performance servers in the cloud.
[0019] The present invention also provides a federated learning optimization method for intelligent connected vehicle scenarios. For t rounds, the method includes the following steps:
[0020] Step 1: Send the initial global model M from the cloud t, each vehicle node initializes the local model when receiving the global model And use local data for training; then upload the local model parameters to the cloud;
[0021] Step 2: The cloud assigns a trust score to each node based on the local model parameters uploaded by the vehicle node, and divides the vehicle nodes into different vehicle clusters based on the trust score;
[0022] Step 3: Aggregate the local models of the vehicle nodes in the cluster and send the model parameters to the RSU; the RSU determines the vehicle clusters participating in the federated learning based on the threshold, adopts a pseudo-asynchronous aggregation method, and allocates the aggregation weight of the local aggregation model parameters of each vehicle cluster according to the average trust score of each vehicle cluster to obtain the aggregated local model parameters;
[0023] Step 4: Different RSUs send the aggregated local model parameters to the cloud for fully asynchronous aggregation to obtain a global model; the cloud determines whether the global model has converged. If the global model has not converged, the idle vehicle cluster sends a request to download the global model to the cloud, and the cloud calculates and updates the average trust score of the vehicle cluster. Otherwise, the model training is terminated to obtain the global model.
[0024] Since the computing power of the vehicle nodes in each cluster is similar, the time to complete local training is similar, and the cluster needs to obtain the aggregate model parameters before sending the parameters to the RSU for the next step of pseudo-asynchronous federated learning; therefore, after each round of global model update, the idle vehicle nodes must send download requests to the cloud in clusters, and the rewards and penalties of the trust scores of nodes in the same cluster must be the same; therefore, the trust score used for the next round of global model training in the present invention can only update the average trust score of each cluster instead of updating the trust score of each vehicle node, which saves computing resources and improves the speed of model training;
[0025] Step 5: The idle vehicle cluster downloads the global model for local model training, and returns to step 3.3 to perform pseudo-asynchronous aggregation on the RSU; and the vehicle cluster whose trust score is lower than the aggregation threshold after the cloud update does not participate in the next round of aggregation, and only trains the local model within the cluster, without model aggregation of the vehicle nodes in the cluster and uploading parameters to the RSU;
[0026] Step 6: When the training round reaches a cycle 10, the vehicle clusters whose average trust scores are lower than the aggregation threshold are forced to participate in federated learning and restore their initial average trust scores;
[0027] If the trust scores of some vehicle clusters remain at a low level for a long time, they may continue to be unable to participate in the global model update, resulting in insufficient generalization ability of the global model and significant deviations between the local model and the global model, affecting system convergence and wasting node resources. In addition, vehicle clusters whose initial trust scores are higher than the threshold but fail to complete the task due to accidental factors will be over-punished, forming a vicious cycle. Therefore, a cycle is set so that vehicle clusters with lower trust scores can also be forced to participate in the global model update in a specific round and restore their initial trust scores.
[0028] Step 7: The global model converges, ending the model training and obtaining the final global model.
[0029] Further, step 2.1: The cloud trains the local model uploaded by each vehicle node for time t q and precision A q , design a percentile trust score C q And assigned to each vehicle node:
[0030]
[0031] Among them, t q is the time for the qth vehicle node to initially train the local model, A q is the accuracy of the training model for the qth vehicle node, t min is the minimum time required for local model training of q vehicle nodes, A max is the maximum accuracy of the local model trained by q vehicle nodes, and β is the weight factor used to balance the contribution of computing power and model accuracy to the trust score;
[0032] Step 2.2: Set the threshold in the cloud to divide the vehicle nodes under each RSU into V 1 (90~100), V 2 (80~90)……V 10 (0~10) There are ten types of vehicle clusters, which are lower than the aggregation threshold of 10 and belong to V 10 The vehicle clusters of the category are trained locally without uploading model parameters. For the remaining vehicle clusters above the threshold of 10, the model parameters after aggregation within the cluster are sent to the RSU to participate in pseudo-asynchronous aggregation.
[0033] Further, step 3.1: each cluster of vehicles under a single RSU aggregates the local model within the cluster, and the topological structure within each cluster of vehicles is a complete binary tree arrangement, which is arranged from high to low according to the cosine similarity between the local model and the global model. The model of each cluster of vehicles is sent down and aggregated from the bottom up, and the aggregated model parameters are uploaded to the RSU;
[0034] In the binary tree structure, each node only needs to communicate with its child node or parent node, so that multiple aggregation tasks can be processed in parallel, improving the overall aggregation efficiency. And the hierarchical structure of the complete binary tree allows the aggregation process to be carried out in layers, and the aggregation results of each layer can be used as the input of the previous layer, which helps to gradually improve the accuracy and robustness of the model;
[0035] Step 3.2: Each RSU uses the local model parameters obtained according to the threshold to filter out the vehicle clusters participating in the aggregation and calculate their average trust score r is the number of vehicle clusters in a single RSU;
[0036]
[0037] Among them, N r is the number of vehicle nodes in the rth vehicle cluster, C r,s is the trust score of the sth node in the rth vehicle cluster;
[0038] Step 3.3: During the time period of RSU adaptive dynamic adjustment, aggregate all received vehicle cluster aggregation models, that is, perform pseudo-asynchronous aggregation to obtain a local model.
[0039] Further, step 3.3.1: designing an adaptive dynamic adjustment time window for pseudo-asynchronous aggregation is as follows:
[0040]
[0041] Among them, T i is the time interval of the i-th aggregation in the adjusted RSU, T i-1 is the time interval of the RSU i-1 aggregation, ε is the adjustment parameter, and its value ranges from 0 to 1. is the number of model parameters received during aggregation in the i-th time period, N 阈值 is the minimum number of model parameters expected to be received in the current time period, which is set to 3 here. If the number of models actually received in the current time window is higher than the threshold, the formula will reduce the length of the next time period. If the number of models actually received is lower than the threshold, the formula will extend the length of the next time period.
[0042] Step 3.3.2: RSU based on average trust score Assign model parameter weights to each vehicle cluster:
[0043]
[0044] Among them, ω r is the model parameter weight of each vehicle cluster, is the average trust score of the rth vehicle cluster, g is the number of model parameters that need to be aggregated received in the current adaptive time window, is the trust score of the vehicle cluster that needs to be aggregated received within the current adaptive time window;
[0045] Step 3.3.3: RSU aggregates the model parameters of each vehicle cluster according to the model parameter weights to generate a local model M' t :
[0046]
[0047] Among them, M' t is the local model of RSU aggregation in the tth round of training, ω r is the model parameter weight of each vehicle cluster, are the vehicle cluster model parameters that need to be aggregated received within the adaptive time window, and g is the number of model parameters that need to be aggregated received within the current adaptive time window.
[0048] Further, step 4.1: the RSU adaptively and dynamically adjusts the local model parameters aggregated in the time window and sends them to the cloud for fully asynchronous aggregation;
[0049] Step 4.2: Once the cloud receives the new model parameters, it immediately updates the global model:
[0050]
[0051] in, is the local model obtained by aggregating the kth RSU, η∈(0,1), is the learning rate, is the global model of round t, is the global model of the t+1th round;
[0052] Step 4.3: The cloud determines whether the aggregated global model has converged. If the global model has not converged, continue with step 4.4; otherwise, proceed to step 7;
[0053] Step 4.4: The idle vehicle cluster requests the cloud to download the latest global model for the next round of local model training; Step 4.5: The cloud calculates and updates the trust score of the vehicle cluster:
[0054]
[0055] in, is the average trust score of the r-th vehicle cluster in the t+1th round, is the average trust score of the r-th vehicle cluster in the t-th round, ΔT reward is the reward for each round, ΔT penalty For each round of punishment;
[0056] ΔT reward According to the size of the level, the reward ΔT per round for the higher level vehicle cluster reward The smaller the ΔT penalty Adjust according to the number of penalties. The more penalties, the greater the ΔT. penalty The larger the value, the smaller the penalty is as the node participates in the training rounds. This is to protect the impact of task failures caused by accidental factors on the generalization ability of the model.
[0057] The beneficial effects of the present invention are:
[0058] (1) The present invention establishes the architecture of a federated learning optimization system for intelligent connected vehicle scenarios. The system considers the overall learning efficiency, reduces the latency of heterogeneous device training, and improves model accuracy and convergence speed;
[0059] (2) Considering the inconsistent training time caused by the different computing power between different vehicles of heterogeneous equipment, the aggregation time is too different, resulting in increased latency and reduced efficiency. A trust score design method is proposed, which comprehensively considers the time and accuracy of the first round of model training, and divides the vehicle nodes into different vehicle clusters according to the size of the trust score. The topological structure within the cluster is arranged in a complete binary tree. The vehicle nodes in the cluster send down the model and aggregate the model in a bottom-up and bottom-up manner respectively. The hierarchical structure of the binary tree makes the data transmission path shorter, and the RSU only transmits with the cluster head, which also saves transmission resources. This clustering and complete binary tree structure design can reduce the aggregation delay within the cluster, optimize resource allocation, and improve model performance;
[0060] (3) Improve the asynchronous federated learning framework, cluster heterogeneous devices at the device layer, design an adaptive dynamic adjustment time window at the edge layer and pseudo-asynchronously aggregate the models received within the window, and fully asynchronously aggregate the received models in the cloud to improve the speed and accuracy of model training, solve the problem of inconsistent aggregation time caused by heterogeneous devices in the federated learning training process, save resources, and ensure data security and protect user privacy. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 It is a general architecture diagram of a federated learning optimization system for intelligent connected vehicle scenarios in an embodiment of the present invention.
[0062] Figure 2 It is a specific architecture diagram of the federated learning optimization system for intelligent connected vehicle scenarios in an embodiment of the present invention.
[0063] Figure 3 Schematic diagram of an asynchronous federated learning framework in an embodiment of the present invention.
[0064] Figure 4 This is a flowchart of asynchronous federated learning in an embodiment of the present invention. DETAILED DESCRIPTION
[0065] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings.
[0066] like Figure 1 and Figure 2 As shown, this embodiment is a federated learning optimization method and system for intelligent connected vehicle scenarios. First, a percentage trust score is designed according to the heterogeneity of the vehicle to divide the vehicle nodes into vehicle clusters of different levels. The local training model will be aggregated within the cluster to obtain an aggregated model. Then, based on the three-layer asynchronous FL framework of the cloud edge, the RSU pseudo-asynchronously aggregates the received model parameters within the cluster in the adaptive dynamic adjustment time window, and sends the local model parameters to the cloud after obtaining them. The cloud completely asynchronously aggregates the received model parameters and obtains the global model. Any vehicle node can download the latest global model in its spare time for the next round of local model training. The improved asynchronous FL improves the training speed and accuracy of the model while protecting the information of vehicle users, and optimizes the application of federated learning in the intelligent connected vehicle scenario. The system includes:
[0067] The data collection and preprocessing module is configured to collect and preprocess various types of data during the operation of the intelligent connected vehicle using the vehicle gateway, and the vehicle gateway includes a computing unit, a storage unit, and a transmission unit;
[0068] The local training module is configured as follows: after each vehicle node receives the global model, the local model is initialized in the vehicle gateway, and the local model parameters are obtained by training with the collected local data set;
[0069] The trust score design and vehicle clustering module is configured as follows: each vehicle node uploads the local model parameters to the cloud server, and the cloud server assigns a trust score to each vehicle node based on the model parameters, and divides the vehicle nodes under each roadside unit RSU into different vehicle clusters based on the trust score. This module is implemented by a high-performance computing server deployed in the cloud;
[0070] The cluster aggregation module is configured as follows: each cluster of vehicles aggregates the local model within the cluster; the topology of each cluster of vehicles is a complete binary tree arrangement, which is arranged from high to low according to the cosine similarity between the local model and the global model. The model distribution and aggregation methods within the cluster are from item to item and from bottom to top. The aggregation of the model and the sending and receiving of the model parameters are realized through the vehicle gateway, and the aggregated model parameters are uploaded to the RSU;
[0071] The model parameter transmission module is configured to: send the cluster aggregated model parameters of each vehicle cluster in the vehicle layer to the corresponding RSU, and send the local model parameters obtained by pseudo-asynchronous aggregation in each RSU in the roadside unit layer to the cloud. The functions of this module are realized through wireless transmission from vehicle nodes to RSU (realized by the wireless transmission function of the vehicle-mounted gateway at the vehicle layer), and wired transmission from roadside units to the cloud (such as transmission through optical fiber, Ethernet, etc.);
[0072] The pseudo-asynchronous aggregation module is configured as follows: the RSU receives the intra-cluster aggregation model uploaded by the vehicle layer, and performs pseudo-asynchronous aggregation of parameters within the adaptive dynamic adjustment time window, which is realized by the edge server deployed on the RSU;
[0073] Global model update and distribution module: RSU sends the aggregated local model parameters to the cloud for fully asynchronous aggregation. Once the cloud receives the local model, it aggregates it to generate a global model. The aggregation of the global model is also achieved through high-performance cloud servers. The vehicle node monitors its own computing load, network status, power and other factors through the on-board gateway to determine whether it is idle. If so, the vehicle node first sends a request to the RSU via wireless, and the RSU then sends a request to the cloud via wired to download the latest global model, and downloads the global model for the next round of local model training;
[0074] The system monitoring and evaluation module is configured to monitor the system performance and each module, and regularly evaluate the accuracy of the global model and the overall operating status of the system. This function is implemented through high-performance servers in the cloud.
[0075] like Figure 3 and Figure 4 As shown, the asynchronous federated learning framework of the present invention improves the mechanism of traditional synchronous federated learning. The traditional method requires the RSU to wait for all vehicles to upload the model, and then send it to the cloud for global aggregation after aggregation, and then send the updated model to the vehicle. In contrast, asynchronous federated learning allows vehicles to download the global model from the cloud at any time to update the local model. After receiving it, the RSU will pseudo-asynchronously aggregate the local model between clusters within the adaptive dynamic adjustment time window and upload it to the cloud. The cloud asynchronously aggregates the received local models to generate a global model. For t rounds, the federated learning optimization method designed by the present invention for intelligent connected vehicle scenarios includes the following steps:
[0076] S1: The cloud distributes the initial global model, and the vehicle nodes are trained with local datasets:
[0077] The cloud sends the initial global model M t , each vehicle node initializes the local model when receiving the global model And use local data for training. Then upload the local model parameters to the cloud.
[0078] S11: Let the total round of the global model be T, the current round be t, and initialize t=0.
[0079] S12: The cloud server sends the initial global model M t Sent to all vehicles, any qth vehicle V q Using M t Initialize your own model
[0080] S13: x local data q,r After input initialization Processed in, output predicted label y' q,r .
[0081] S14: Build The loss function L q , and Perform gradient descent back propagation training to obtain the model after the tth round of training
[0082]
[0083] Among them, N q is the sample size of the qth vehicle, y q,r is the rth true label of the qth vehicle, y' q,r is the r-th output prediction label of the q-th vehicle, α is the learning rate, is the gradient, L q Obtained from the mean square error loss.
[0084] S2: The vehicle node generates a local model update and uploads it to the cloud, which calculates the trust score and clusters the vehicles.
[0085] The cloud assigns a trust score to each vehicle node based on the local model parameters uploaded by the node, and divides the vehicle nodes into V 1 To V 10 Ten different levels of vehicle clusters.
[0086] S21: The cloud side trains the local model based on the time t uploaded by each vehicle node q and precision A q , design a percentile trust score C q And assigned to each vehicle node:
[0087]
[0088] Among them, t q is the time for the qth vehicle node to initially train the local model, A qis the accuracy of the training model for the qth vehicle node, t min is the minimum time required for local model training of q vehicle nodes, A max is the maximum accuracy of the local model trained by q vehicle nodes, and β is the weight factor used to balance the contribution of computing power and model accuracy to the trust score.
[0089] S22: The cloud sets a threshold to divide the vehicle nodes under each RSU into V 1 (90~100), V 2 (80~90)……V 10 (0~10) There are ten types of vehicle clusters, which are lower than the aggregation threshold of 10 and belong to V 10 The vehicle clusters of the category are trained locally without uploading model parameters. For the remaining vehicle clusters above the threshold of 10, the model parameters after aggregation within the cluster are sent to the RSU to participate in pseudo-asynchronous aggregation.
[0090] S3: Vehicle nodes are clustered and upload the model parameters aggregated within the cluster, and RSUs are pseudo-asynchronously aggregated to obtain local model updates.
[0091] The local models of the vehicle nodes are aggregated within the cluster, and the model parameters are sent to the RSU. The RSU determines the vehicle clusters participating in the federated learning based on the threshold, adopts a pseudo-asynchronous aggregation method, and allocates the aggregation weight of the local aggregation model parameters of each vehicle cluster based on the average trust score of each vehicle cluster to obtain the aggregated local model parameters.
[0092] S31: Each cluster of vehicles under a single RSU aggregates local models within the cluster. The topology structure within each cluster of vehicles is a complete binary tree arrangement, which is arranged from high to low according to the cosine similarity between the local model and the global model. The model of each cluster of vehicles is sent down and aggregated from item to item and from bottom to top, respectively, and the aggregated model parameters are uploaded to the RSU.
[0093] In the binary tree structure, each node only needs to communicate with its child node or parent node, so that multiple aggregation tasks can be processed in parallel, improving the overall aggregation efficiency. And the hierarchical structure of the complete binary tree allows the aggregation process to be carried out in layers, and the aggregation results of each layer can be used as the input of the previous layer, which helps to gradually improve the accuracy and robustness of the model.
[0094] S32: Each RSU uses the local model parameters obtained to filter out the vehicle clusters participating in the aggregation according to the threshold and calculates their average trust score r is the number of vehicle clusters in a single RSU.
[0095]
[0096] Among them, N r is the number of vehicle nodes in the rth vehicle cluster, Cr,s is the trust score of the sth node in the rth vehicle cluster.
[0097] S33: within the time period of the RSU adaptive dynamic adjustment, aggregate all received vehicle cluster aggregation models, that is, perform pseudo-asynchronous aggregation to obtain a local model.
[0098] S331: The adaptive dynamic adjustment time window designed for pseudo-asynchronous aggregation is as follows:
[0099]
[0100] Among them, T i is the time interval of the i-th aggregation in the adjusted RSU, T i-1 is the time interval of the RSU i-1 aggregation, ε is the adjustment parameter, and its value ranges from 0 to 1. is the number of model parameters received during aggregation in the i-th time period, N 阈值 is the minimum number of model parameters expected to be received in the current time period, which is set to 3 here. If the number of models actually received in the current time window is higher than the threshold, the formula will reduce the length of the next time period. If the number of models actually received is lower than the threshold, the formula will extend the length of the next time period.
[0101] S332: RSU based on average trust score Assign model parameter weights to each vehicle cluster:
[0102]
[0103] Among them, ω r is the model parameter weight of each vehicle cluster, is the average trust score of the rth vehicle cluster, g is the number of model parameters that need to be aggregated received in the current adaptive time window, It is the trust score of the vehicle cluster that needs to be aggregated received within the current adaptive time window.
[0104] S333: RSU aggregates the model parameters of each vehicle cluster according to the model parameter weights to generate a local model M' t :
[0105]
[0106] Among them, M' t is the local model of RSU aggregation in the tth round of training, ω r is the model parameter weight of each vehicle cluster, are the vehicle cluster model parameters that need to be aggregated received within the adaptive time window, and g is the number of model parameters that need to be aggregated received within the current adaptive dynamic adjustment time window.
[0107] S4: The cloud performs fully asynchronous aggregation to obtain the global model and calculate and update the trust score of the vehicle cluster. If the global model converges, execute S7. Otherwise, continue.
[0108] Different RSUs send the aggregated local model parameters to the cloud for fully asynchronous aggregation to obtain a global model. The cloud determines whether the global model has converged. If the global model has not converged, the idle vehicle cluster sends a request to download the global model to the cloud, and the cloud calculates and updates the average trust score of the vehicle cluster. Otherwise, execute S7 to end the model training and obtain the global model.
[0109] Since the computing power of the vehicle nodes in each cluster is similar, the time to complete local training is similar, and the cluster needs to derive the aggregate model parameters before sending the parameters to the RSU for the next step of pseudo-asynchronous federated learning. Therefore, after each round of global model update, the idle vehicle nodes must send download requests to the cloud in clusters, and the rewards and penalties for the trust scores of nodes in the same cluster must be the same. Therefore, the trust score used in the next round of global model training by the present invention can only update the average trust score of each cluster, rather than updating the trust score of each vehicle node, which saves computing resources and increases the speed of model training.
[0110] S41: RSU sends the local model parameters aggregated within the adaptive and dynamic adjustment time window to the cloud for fully asynchronous aggregation.
[0111] S42: Once the cloud receives the new model parameters, it immediately updates the global model:
[0112]
[0113] in, is the local model obtained by aggregating the kth RSU, η∈(0,1), is the learning rate, is the global model of round t, is the global model of the t+1th round.
[0114] S43: The cloud determines whether the global model obtained by aggregation is converged. If the global model is not converged, continue to S44. Otherwise, execute S7.
[0115] S44: The idle vehicle cluster requests the cloud to download the latest global model for the next round of local model training.
[0116] S45: The cloud calculates and updates the trust score of the vehicle cluster:
[0117]
[0118] in, is the average trust score of the r-th vehicle cluster in the t+1th round, is the average trust score of the r-th vehicle cluster in the t-th round, ΔT reward is the reward for each round, ΔT penalty For each round of punishment.
[0119] ΔT reward According to the size of the level, the reward ΔT per round for the higher level vehicle cluster reward The smaller the ΔT penalty Adjust according to the number of penalties. The more penalties, the greater the ΔT. penalty The larger the value, the smaller the penalty is as the node participates in the training rounds. This is to protect the impact of task failures caused by accidental factors on the generalization ability of the model.
[0120] S5: The idle vehicle cluster downloads the global model for local training, and the vehicle cluster with a trust score too low after the update does not perform the next round of aggregation. If the training round has not reached the set period, return to S3. Otherwise, continue.
[0121] The idle vehicle cluster downloads the global model for local model training and returns to S33 for pseudo-asynchronous aggregation on the RSU. The vehicle cluster whose trust score is lower than the aggregation threshold after the cloud update does not participate in the next round of aggregation, and only trains the local model within the cluster, without model aggregation of the vehicle nodes within the cluster and uploading parameters to the RSU.
[0122] S6: Return to S3 and force the vehicle clusters with too low trust scores to participate in global model training.
[0123] When the training round reaches a cycle of 10, that is, rounds T = 10, 20, 30, ..., the vehicle clusters with average trust scores lower than the aggregation threshold are forced to participate in federated learning and restore their initial average trust scores until the global model converges. If the trust scores of some vehicle clusters remain at a low level for a long time, they may continue to be unable to participate in the global model update, resulting in insufficient generalization ability of the global model, and significant deviations between the local model and the global model, affecting system convergence and wasting node resources. And considering that the vehicle clusters whose initial trust scores are higher than the threshold but fail to complete the task due to accidental factors will be over-punished, forming a vicious circle. Therefore, a cycle is set so that vehicle clusters with lower trust scores can also be forced to participate in the global model update and restore their initial trust scores in a specific round.
[0124] S7: The global model converges, ending the model training and obtaining the final global model.
[0125] The present invention proposes a federated learning optimization method and system for intelligent connected vehicle scenarios. The method and system clusters heterogeneous devices for training based on an asynchronous federated learning framework, which can improve prediction accuracy and solve the problem of inconsistent aggregation time of heterogeneous devices. At the same time, it effectively protects user privacy, reduces communication costs, and speeds up training.
[0126] The above description is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiment. Any equivalent modifications or changes made by ordinary technicians in this field based on the contents disclosed by the present invention should be included in the protection scope recorded in the claims.
Claims
1. A federated learning optimization system for intelligent connected vehicle scenarios, characterized by: The system comprises the following parts: The data collection and preprocessing module is configured to collect and preprocess various types of data during the operation of the intelligent connected vehicle using the vehicle gateway, and the vehicle gateway includes a computing unit, a storage unit, and a transmission unit; The local training module is configured as follows: after each vehicle node receives the global model, the local model is initialized in the vehicle gateway, and the local model parameters are obtained by training with the collected local data set; The trust score design and vehicle clustering module is configured as follows: each vehicle node uploads the local model parameters to the cloud server, and the cloud server assigns a trust score to each vehicle node based on the model parameters, and divides the vehicle nodes under each roadside unit RSU into different vehicle clusters based on the trust score; this module is implemented by a high-performance computing server deployed in the cloud; The vehicle cluster aggregation module is configured as follows: each cluster of vehicles aggregates the local model within the cluster; the topological structure within each cluster of vehicles is a complete binary tree arrangement, which is arranged in descending order according to the cosine similarity between the local model and the global model. The model distribution and aggregation methods within the cluster are from top to bottom and from bottom to top respectively; the aggregation of the model and the sending and receiving of the model parameters are realized through the vehicle gateway, and the aggregated model parameters are uploaded to the RSU; The model parameter transmission module is configured to: send the cluster-aggregated model parameters of each vehicle cluster in the vehicle layer to the corresponding RSU, and send the local model parameters obtained by pseudo-asynchronous aggregation in each RSU in the roadside unit layer to the cloud; the functions of this module are realized through wireless transmission from vehicle nodes to RSUs and wired transmission from roadside units to the cloud; The pseudo-asynchronous aggregation module is configured as follows: the RSU receives the intra-cluster aggregation model uploaded by the vehicle layer, and performs pseudo-asynchronous aggregation of parameters within the adaptive dynamic adjustment time window, which is realized by the edge server deployed on the RSU; Global model update and distribution module: RSU sends the aggregated local model parameters to the cloud for fully asynchronous aggregation. Once the cloud receives the local model, it aggregates it to generate a global model. The aggregation of the global model is also achieved through the cloud's high-performance server. The vehicle node monitors its own computing load, network status, and power factors through the on-board gateway to determine whether it is in an idle state. If so, the vehicle node first sends a request to the RSU via wireless, and the RSU then sends a request to the cloud via wired to download the latest global model, and downloads the global model for the next round of local model training. The system monitoring and evaluation module is configured to monitor the system performance and each module, and regularly evaluate the accuracy of the global model and the overall operating status of the system. This function is implemented through high-performance servers in the cloud.
2. A federated learning optimization method for intelligent connected vehicle scenarios, characterized by: The method comprises the following steps: Step 1: Send the initial global model M from the cloud t , each vehicle node initializes the local model when receiving the global model And use local data for training; then upload the local model parameters to the cloud; Step 2: The cloud assigns a trust score to each node based on the local model parameters uploaded by the vehicle node, and divides the vehicle nodes into different vehicle clusters based on the trust score; Step 3: Aggregate the local models of the vehicle nodes in the cluster and send the model parameters to the RSU; the RSU determines the vehicle clusters participating in the federated learning based on the threshold, adopts a pseudo-asynchronous aggregation method, and allocates the aggregation weight of the local aggregation model parameters of each vehicle cluster according to the average trust score of each vehicle cluster to obtain the aggregated local model parameters; Step 4: Different RSUs send the aggregated local model parameters to the cloud for fully asynchronous aggregation to obtain a global model; the cloud determines whether the global model has converged. If the global model has not converged, the idle vehicle cluster sends a request to download the global model to the cloud, and the cloud calculates and updates the average trust score of the vehicle cluster. Otherwise, the model training ends and goes to step 7. Step 5: The idle vehicle cluster downloads the global model for local model training and returns to step 3 for pseudo-asynchronous aggregation on the RSU. The vehicle cluster whose trust score is lower than the aggregation threshold after the cloud update does not participate in the next round of aggregation. It only trains the local model within the cluster and does not aggregate the models of the vehicle nodes within the cluster or upload parameters to the RSU. Step 6: When the training round reaches a cycle, the vehicle clusters whose average trust scores are lower than the aggregation threshold are forced to participate in federated learning and restore their initial average trust scores; Step 7: The global model converges, ending the model training and obtaining the final global model.
3. The federated learning optimization method for intelligent connected vehicle scenarios according to claim 2 is characterized in that: The step 1 includes the following steps: Step 1.1: Let the total number of rounds of the global model be T, the current round be t, and initialize t = 0; Step 1.2: The cloud server sends the initial global model M t Sent to all vehicles, any qth vehicle V q Using M t Initialize your own model Step 1.3: Convert local data to x q,r After input initialization Processed in, output predicted label y' q,r ; Step 1.4: Build The loss function L q , and Perform gradient descent back propagation training to obtain the model after the tth round of training Among them, N q is the sample size of the qth vehicle, y q,r is the rth true label of the qth vehicle, y' q,r is the r-th output prediction label of the q-th vehicle, α is the learning rate, is the gradient, L q Obtained from the mean square error loss.
4. The federated learning optimization method for intelligent connected vehicle scenarios according to claim 2 is characterized in that: The step 2 includes the following steps: Step 2.1: The cloud trains the local model uploaded by each vehicle node for time t q and precision A q , design a percentile trust score C q And assigned to each vehicle node: Among them, t q is the time for the qth vehicle node to initially train the local model, A q is the accuracy of the training model for the qth vehicle node, t min is the minimum time required for local model training of q vehicle nodes, A max is the maximum accuracy of the local model trained by q vehicle nodes, and β is the weight factor used to balance the contribution of computing power and model accuracy to the trust score; Step 2.2: Set the threshold in the cloud to divide the vehicle nodes under each RSU into V1 (90-100), V2 (80-90)... V 10 (0~10) There are ten types of vehicle clusters, which are lower than the aggregation threshold of 10 and belong to V 10 The vehicle clusters of the category are trained locally without uploading model parameters. For the remaining vehicle clusters above the threshold of 10, the model parameters after aggregation within the cluster are sent to the RSU to participate in pseudo-asynchronous aggregation.
5. The federated learning optimization method for intelligent connected vehicle scenarios according to claim 2 is characterized in that: The step 3 includes the following steps: Step 3.1: Each cluster of vehicles under a single RSU aggregates the local model within the cluster. The topology structure within each cluster of vehicles is a complete binary tree arrangement, which is arranged from high to low according to the cosine similarity between the local model and the global model; the model of each cluster of vehicles is sent down and aggregated from top to bottom, and the aggregated model parameters are uploaded to the RSU; In the binary tree structure, each node only needs to communicate with its child node or parent node, so that multiple aggregation tasks can be processed in parallel; and the hierarchical structure of the complete binary tree allows the aggregation process to be carried out in layers, and the aggregation results of each layer serve as the input of the previous layer; Step 3.2: Each RSU uses the local model parameters obtained according to the threshold to filter out the vehicle clusters participating in the aggregation and calculate their average trust score r is the number of vehicle clusters in a single RSU; Among them, N r is the number of vehicle nodes in the rth vehicle cluster, C r,s is the trust score of the sth node in the rth vehicle cluster; Step 3.3: During the time period of RSU adaptive dynamic adjustment, aggregate all received vehicle cluster aggregation models, that is, perform pseudo-asynchronous aggregation to obtain a local model.
6. The federated learning optimization method for intelligent connected vehicle scenarios according to claim 5 is characterized in that: The step 3.3 includes the following steps: Step 3.3.1: Design an adaptive dynamically adjusted time window for pseudo-asynchronous aggregation as follows: Among them, T i is the time interval of the i-th aggregation in the adjusted RSU, T i-1 is the time interval of the RSU i-1 aggregation, ε is the adjustment parameter, and its value ranges from 0 to 1. is the number of model parameters received during aggregation in the i-th time period, N 阈值 is the minimum number of model parameters expected to be received in the current time period, which is set to 3 here; if the number of models actually received in the current time window is higher than the threshold, the formula will reduce the length of the next time period; if the number of models actually received is lower than the threshold, the formula will extend the length of the next time period; Step 3.3.2: RSU based on average trust score Assign model parameter weights to each vehicle cluster: Among them, ω r is the model parameter weight of each vehicle cluster, is the average trust score of the rth vehicle cluster, g is the number of model parameters that need to be aggregated received in the current adaptive time window, is the trust score of the vehicle cluster that needs to be aggregated received within the current adaptive time window; Step 3.3.3: RSU aggregates the model parameters of each vehicle cluster according to the model parameter weights to generate a local model M' t : Among them, M' t is the local model of RSU aggregation in the tth round of training, ω r is the model parameter weight of each vehicle cluster, are the vehicle cluster model parameters that need to be aggregated received within the adaptive time window, and g is the number of model parameters that need to be aggregated received within the current adaptive time window.
7. The federated learning optimization method for intelligent connected vehicle scenarios according to claim 2 is characterized in that: In step 4, after each round of global model update, idle vehicle nodes must send download requests to the cloud in clusters, and the rewards and penalties for the trust scores of nodes in the same cluster must be the same. Therefore, the trust score used for the next round of global model training only updates the average trust score of each cluster, rather than updating the trust score of each vehicle node.
8. The federated learning optimization method for intelligent connected vehicle scenarios according to claim 7 is characterized in that: The step 4 includes the following steps: Step 4.1: RSU adaptively and dynamically adjusts the local model parameters aggregated within the time window and sends them to the cloud for fully asynchronous aggregation; Step 4.2: Once the cloud receives the new model parameters, it immediately updates the global model: in, is the local model obtained by aggregating the kth RSU, η∈(0,1), is the learning rate, is the global model of round t, is the global model of the t+1th round; Step 4.3: The cloud determines whether the aggregated global model has converged; if the global model has not converged, proceed to step 4.4; otherwise, proceed to step 7; Step 4.4: The idle vehicle cluster requests the cloud to download the latest global model for the next round of local model training; Step 4.5: The cloud calculates and updates the trust score of the vehicle cluster: in, is the average trust score of the r-th vehicle cluster in the t+1th round, is the average trust score of the r-th vehicle cluster in the t-th round, ΔT reward is the reward for each round, ΔT penalty For each round of punishment; ΔT reward According to the size of the level, the reward ΔT per round for the higher level vehicle cluster reward The smaller the ΔT penalty Adjust according to the number of penalties. The more penalties, the greater the ΔT. penalty The larger the value, the smaller the penalty is as the node participates in the training rounds. This is to protect the impact of task failures caused by accidental factors on the generalization ability of the model.
Citation Information
Cited By
Layered federal learning optimization method in dynamic edge computing environment
CN120017513A
Multi-level federal cooperative training and reasoning method for heterogeneous vehicles of Internet of Vehicles
CN120494051A
Traffic flow multistage federation prediction method based on vehicle and road cloud integrated network
CN120808616A
Multi-level federated prediction method for traffic flow based on vehicle-road-cloud integrated network
CN120808616B
Vehicle dynamic cooperative control method and system based on opportunity federation learning
CN120935231A