Internet of vehicles low-delay federated learning method based on semi-asynchronous communication

By building a three-layer federated learning framework and a semi-asynchronous communication mechanism, optimizing device selection and aggregation strategies, and solving the training delay problem caused by data and device heterogeneity and mobility in the Internet of Vehicles scenario, efficient federated learning is achieved in the Internet of Vehicles environment.

CN120633773APending Publication Date: 2025-09-12NANJING UNIV OF SCI & TECH
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510692335.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-27
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Existing federated learning methods fail to effectively solve the problems of data heterogeneity, device heterogeneity and complex vehicle mobility in the Internet of Vehicles scenario, especially the time inefficiency caused by cross-RSU mobility.

Method used

A low-latency federated learning method for the Internet of Vehicles based on semi-asynchronous communication is adopted to construct a three-layer federated learning framework. Combining the heterogeneity of vehicle computing power, communication capability, and data volume, the framework optimizes device selection and aggregation strategies, adopts a roulette wheel algorithm to select vehicles, uses knowledge distillation to transfer outdated model knowledge, and triggers cloud aggregation through EMD distance to optimize overall training latency and energy consumption.

Benefits of technology

It significantly reduces the training latency in the vehicle-road-cloud collaborative scenario, improves the overall training efficiency, alleviates the delay problems caused by device heterogeneity and network fluctuations, promotes data exchange between data-heterogeneous sections, and improves the practicality and efficiency of model training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120633773A_ABST
    Figure CN120633773A_ABST
Patent Text Reader

Abstract

The invention discloses an Internet of Vehicles low-delay federated learning method based on semi-asynchronous communication, and the method comprises the steps: constructing a vehicle-road cloud cooperative federated learning framework and a system performance model, building a federated learning training time delay optimization model, minimizing the overall training time delay, and meeting the vehicle energy consumption upper limit and global model precision constraint conditions; a multi-dimensional priority dynamic vehicle selection mechanism is realized, and probability sampling is carried out by using a roulette selection algorithm; a vehicle-RSU federated learning strategy based on semi-asynchronous communication and knowledge distillation optimizes the problem of lagging behind and the problem of model obsolessness; a cloud model aggregation opportunity is optimized based on a model difference metric and an adaptive cloud aggregation strategy of a dynamic threshold trigger mechanism. According to the method, collaborative optimization is carried out on multiple levels of equipment selection, intra-layer communication aggregation, old model processing, inter-layer aggregation triggering and the like, so that the overall training time delay of the Internet of Vehicles federated learning system can be effectively reduced on the premise of satisfying model precision and equipment energy consumption constraints.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of federated learning technology and vehicle networking application technology, and in particular to a low-latency federated learning method for vehicle networking based on semi-asynchronous communication. Background Art

[0002] With society's growing demand for safe and efficient transportation systems, artificial intelligence (AI) technology is playing an increasingly important role in the Internet of Vehicles (IoV) and Intelligent Transportation Systems (ITS). ITS systems are composed of vehicle nodes, sensors, roadside units (ROSs), and cloud servers. A large number of vehicles generate massive amounts of image and video data during driving, which is extremely valuable for training AI models such as intelligent driving. However, the traditional method of uploading vehicle data to the cloud for centralized training not only risks user privacy leakage but also generates significant communication overhead and latency due to the transmission of large amounts of data.

[0003] Federated Learning, an emerging distributed learning paradigm, provides an effective approach to addressing these issues. In the FL framework, data is retained locally on the vehicle node for model training. Only the trained model parameters, not the original data, are uploaded to the RSU for initial aggregation. The RSU then uploads the model to the cloud server for global model updates. This "data remains static, model moves" approach significantly reduces network transmission burden while protecting data privacy, making it ideally suited to the needs of connected vehicle scenarios.

[0004] Despite the obvious advantages of federated learning, its training efficiency still faces severe challenges when applied in actual ITS environments. These challenges mainly stem from: 1) Data heterogeneity: Different vehicles have different environments, sensor configurations, and driving conditions, resulting in significant differences in the distribution of collected data, and the mobility of vehicles makes this heterogeneity even more intense and dynamic; 2) Device heterogeneity: The hardware computing power, remaining battery power, and network connection quality of vehicle nodes vary widely, resulting in large differences in the time it takes for each node to complete local training and parameter upload; 3) Vehicle mobility: The high-speed movement of vehicles not only makes their connection with the RSU unstable and prone to interruptions or delays, but also may frequently move from one RSU coverage area to another, affecting the timely aggregation of model parameters and the update of the global model. These factors, combined with each other, seriously restrict the overall training time efficiency of federated learning in the Internet of Vehicles scenario.

[0005] In order to improve the time efficiency of federated learning in the Internet of Vehicles, existing studies have proposed optimization strategies to address the above challenges. For example, Li et al. (T.Li, AKSahu, M.Zaheer, M.Sanjabi, A.Talwalkar, and V.Smith, “Federated optimization in heterogeneous networks,” Machine Learning and Systems, vol.2, pp.429–450, 2020.) designed a layered / decentralized architecture to cope with data heterogeneity by improving the local optimization algorithm; Hao et al. (J.Hao, Y.Zhao, and J.Zhang, “Time efficient federated learning with semi-asynchronous communication,” in Proceedings of the IEEE26th International Conference on Parallel and Distributed Systems (ICPADS), 2020, pp.156–163.) adopted an asynchronous / semi-asynchronous communication mechanism through an intelligent device selection strategy to alleviate the problem of falling behind caused by device heterogeneity; Xiao et al. (H.Xiao, J.Zhao, Q.Pei, J.Feng, L.Liu, and W.Shi, “Vehicle selection and resource optimization for federated learning in vehicular edgecomputing,” IEEE Transactions on Intelligent Transportation Systems, vol. 23, no. 8, pp. 11073–11087, 2022.) optimizes the communication or selection process to adapt to mobility by modeling vehicle trajectories. However, existing methods often have limitations: some methods ignore the impact of device differences when dealing with data heterogeneity; others, while taking device heterogeneity into account, fail to fully consider the complex reality of vehicle mobility, especially the case of cross-RSU mobility; and research on mobility often simplifies the model and fails to effectively integrate the heterogeneity of data and devices.

[0006] Therefore, there is still a lack of a federated learning approach that can systematically and collaboratively address the time inefficiencies caused by data heterogeneity, device heterogeneity, and complex vehicle mobility in IoV scenarios, especially cross-RSU mobility. Therefore, designing a technical solution that can adapt to this dynamic, heterogeneous environment and significantly reduce end-to-end training latency is crucial to promoting the practical application of federated learning in the IoV sector. Summary of the Invention

[0007] The purpose of the present invention is to address the shortcomings of the above-mentioned existing technologies in dealing with the time efficiency issues of federated learning in the Internet of Vehicles, especially the limitations in collaboratively coping with data heterogeneity, device heterogeneity and complex vehicle mobility, especially cross-RSU mobility. By optimizing the communication mechanism and aggregation strategy, the training delay of federated learning in the vehicle-road-cloud collaborative scenario is effectively reduced, and the overall training efficiency is improved.

[0008] The technical solution to achieve the purpose of the present invention is: a low-latency federated learning method for Internet of Vehicles based on semi-asynchronous communication, the method comprising:

[0009] Step 1: Establish a three-layer federated learning framework model for vehicle-road-cloud collaboration, including cloud servers, multiple roadside units (RSUs), and vehicles within the RSU coverage area. Considering the heterogeneity of computing power, communication capabilities, and data volume during vehicle mobility, a system latency model is constructed that includes local training latency, uplink transmission latency, and inter-RSU communication latency.

[0010] Step 2: Establish an optimization problem with the goal of minimizing the overall training latency, with accuracy and energy consumption as constraints. Specifically, the problem is formulated as minimizing the overall training latency, including the vehicle-RSU layer and the RSU-cloud server layer, under given accuracy and energy constraints. The total latency is the sum of the latency for each RSU to complete training, the single-round latency includes the computational latency and upload latency, and the energy consumption includes the computational energy consumption and upload energy consumption.

[0011] Step 3: Build a vehicle selection mechanism based on multi-dimensional priorities. This mechanism comprehensively considers vehicle dataset size, computing power, communication capabilities, mobility characteristics, and remaining battery power. It uses an improved roulette wheel algorithm to dynamically select vehicles for training, balancing the requirements of model accuracy and training efficiency.

[0012] Step 4: Federated learning is performed using semi-asynchronous communication at the vehicle-RSU layer. A basic aggregation interval is set, while allowing additional aggregation when the number of received local models is met. For vehicle models that are not involved in the aggregation, their knowledge is transferred to the current latest RSU model through knowledge distillation.

[0013] In step 5, at the RSU-cloud server layer, the difference between the RSU model and the global model sent by the cloud server is measured based on the bulldozer distance. When the model difference exceeds the preset threshold, cloud-based aggregation is triggered to achieve a global aggregation update of multiple RSU models. By optimizing the device selection strategy, aggregation timing, and knowledge distillation parameters, the overall system latency and energy consumption are reduced while ensuring model performance.

[0014] Furthermore, step 1 specifically includes:

[0015] Step 1-1, define the network topology of the three-layer federated learning framework, and build a three-layer federated learning framework consisting of a cloud server, multiple RSUs, and vehicles within the coverage of each RSU. The bottom layer of the framework consists of moving vehicles, and the vehicle set is represented as V = {V1, V2, ..., V n ,…,V N}; Among them, the rth RSU is RSU r Covering some vehicles in its geographical area, forming a vehicle subset V r , r∈{1,2,...,R}, R is the total number of RSUs;

[0016] The framework's middle layer consists of multiple RSUs deployed on road infrastructure. Each RSU is equipped with an edge server with relatively sufficient computing resources, responsible for coordinating the local training process for vehicles within its coverage area and performing model aggregation. All RSUs are interconnected via a local area network to ensure the necessary information exchange and potential forwarding of model parameters between RSUs.

[0017] The top layer of the framework is the central cloud server, which is used to collect aggregated model RSUs from different RSUs. model , and perform higher-level global model aggregation, while periodically sending the updated global model to each RSU;

[0018] Steps 1-2: Establish a local computing latency model to quantify the time required for local vehicle training, including:

[0019] A semi-asynchronous communication mechanism is used between the vehicle and the RSU. r The calculation formula for the local computing delay corresponding to the round is:

[0020]

[0021] Where, X rem is the number of remaining local iteration rounds; D r,n RSU r The nth vehicle V r,n local datasets, For vehicle V r,n Current CPU frequency, |Dr,n | is the amount of local vehicle data, c is the number of CPU cycles required per data bit, For the first r Wheel vehicle V r,n The corresponding local computing latency;

[0022] Steps 1-3: Establish a vehicle uplink transmission delay model to enable the vehicle to upload its updated local model parameters to its current RSU after completing local training; the uplink transmission process uses orthogonal frequency division multiple access technology for channel access;

[0023] The uplink transmission rate is calculated as:

[0024]

[0025] Where, For vehicle V r,n to RSU r Uplink transmission rate, Assigned to vehicle V r,n bandwidth, For vehicle V r,n The uplink transmission power, For vehicle V r,n with RSU r The channel gain between 2 represents the Gaussian white noise power;

[0026] The calculation of uplink transmission delay is:

[0027]

[0028] Where, For vehicle V r,n The uplink transmission delay of M indicates that the size of the neural network model used for training in federated learning is M bits;

[0029] Steps 1-4: Establishing inter-RSU communication delay and total communication delay models, including:

[0030] Vehicle V r,n The delay of cross-RSU transmission for:

[0031]

[0032] Where, is the transmission rate between RSUs;

[0033] Vehicle V r,n In the l r Total communication delay of the round

[0034]

[0035] Where, is an indicator variable, when hour, otherwise For vehicle V r,n On current RSU r The remaining stay time in the area after completing the task;

[0036] Steps 1-5: Establish a system energy consumption model:

[0037] Vehicle V r,n In the first r Total energy consumption of the wheel for:

[0038]

[0039] in, The vehicle V r,n In the first r The local computing energy consumption and communication energy consumption of the round are:

[0040]

[0041] Where, For vehicle V r,n The calculation power of γ is the effective switch capacitance coefficient that depends on the chip architecture;

[0042] Steps 1-6: Establish an RSU layer semi-asynchronous aggregation delay model to implement model aggregation using semi-asynchronous communication at the vehicle-RSU layer, including:

[0043] RSU r In the first r The aggregation timing of the round is determined by two conditions: one is to reach the preset maximum waiting time, that is, the timeout time T t max , and secondly, a sufficient number of local model updates have been received before the timeout, that is, the aggregation threshold Q is reached limit ;

[0044] RSU r In the first r The total time required for the round to complete polymerization

[0045]

[0046] Where, is an indicator variable, Indicates vehicle V r,nParticipate in aggregation, Indicates vehicle V r,n No participation in aggregation; It is the first r The set of vehicles whose wheels are selected;

[0047] Steps 1-7, build a cloud aggregation model:

[0048]

[0049] Where, ω e In the first round of global aggregation, the cloud server is responsible for the regional models from different RSUs. Perform aggregation to generate a new global model; is the total amount of data used by each RSU in this round of cloud aggregation cycle, RSU r The number of local iterations completed in this round; For each RSU in the first k The total amount of data used in the round of cloud aggregation cycle, RSU r In the first k The number of local iterations completed by the round; RSU r The model submitted at the e-th cloud aggregation; e = {1, 2, ..., E}, where E is the total number of global aggregation rounds performed by the cloud server.

[0050] Furthermore, the optimization problem established in step 2 with the goal of minimizing the overall training delay and the constraints of accuracy and energy consumption is:

[0051]

[0052]

[0053] A E ≥A target

[0054] In the formula, R represents the set of all RSUs, T r,e Indicates the rth RSU, namely RSU r The total latency experienced in the e-th round of cloud aggregation; e = {1, 2, ..., E}, where E is the total number of rounds of global aggregation performed by the cloud server; L r is the total number of local training rounds; E max is the preset maximum allowable energy consumption; is a binary indicator variable, when When RSU r The first r In the round of local training, vehicle n is selected to participate in the local model update calculation; when When , it means that vehicle n did not participate in this round of training; are the computing energy consumption and communication energy consumption generated when vehicle n is selected to participate in training; is a binary indicator variable, when When RSU r The first r In the round of local training, vehicle n successfully completes the local model update and uploads its model parameters; When , it means that vehicle n fails to contribute to the aggregation of RSU in this round; A E A is the accuracy index; target The preset target accuracy.

[0055] Furthermore, step 3 specifically includes:

[0056] Step 3-1, in each RSU r Local aggregation round l r At the beginning, the initial candidate vehicle pool is determined, which contains the vehicles currently located at the RSU r The set N of all vehicles within the wireless communication coverage area r ;

[0057] Step 3-2: Conduct a preliminary mobility assessment and screening of candidate vehicles and update the candidate vehicle pool; specifically, it includes:

[0058] Calculate the initial candidate vehicle pool for each vehicle V r,n On current RSU r Theoretical maximum residence time within the coverage area;

[0059] For each vehicle V r,n , to determine whether its theoretical maximum stay time is less than the time it takes to complete a round of training. If it is less than, then keep the vehicle V r,n Otherwise, the vehicle V r,n Eliminate from the candidate vehicle pool to obtain an updated candidate vehicle pool;

[0060] Step 3-3, for each vehicle V in the updated candidate vehicle pool r,n , defined in l r The actual or estimated remaining stay time for the round is The value of vehicle V r,n The theoretical maximum residence time of the vehicle V r,n Time to complete a training round difference;

[0061] Step 3-4, calculate the normalized remaining residence time

[0062]

[0063] Where, For vehicle V r,n' In l r The actual or estimated remaining stay time for the round;

[0064] Steps 3-5, for each vehicle V r,n , calculate the comprehensive priority score

[0065]

[0066] Where, log2(E cur / E r,n ) represents the energy consumption factor, where E cur / E r,n Is the vehicle V r,n The current remaining energy and the energy required for one round of training E cur The ratio of represents the mobility factor, i.e. the normalized residual residence time calculated in steps 3-4 Resource and data value factor, a weighted sum term including the normalized local dataset size Normalized computing power And normalized communication capabilities in, The vehicle V r,n 、V r,n' The size of the local dataset, f r,n 、f r,n′ The vehicle V r,n 、V r,n' CPU calculation frequency, p r,n 、p r,n ′ are vehicle V r,n 、V r,n' The uplink transmission power of μ, ρ, and ε are weight coefficients used to adjust the relative importance of each factor. For vehicle V r,n In the l r The overall priority score of the round, The higher the value, the better the vehicle V r,n The more priority is considered in this round;

[0067] Step 3-6, based on the comprehensive priority score calculated in step 3-5 K vehicles are selected from the updated candidate vehicle pool through a roulette wheel selection mechanism to participate in training.

[0068] Furthermore, step 4 specifically includes:

[0069] Step 4-1: Define the vehicle-RSU layer federated learning communication mode as a semi-asynchronous mode. In this mode, the aggregation operation of RSU in each round is determined by a preset specific trigger condition.

[0070] The preset specific trigger conditions include:

[0071] (1) If the time difference between the adjacent aggregation operations of the RSU exceeds the preset time timeout threshold The aggregation operation of RSU is triggered, otherwise it is not triggered;

[0072] (2) If the number of models received by the RSU reaches the pre-qualified minimum model reception threshold Q limit , then the RSU aggregation operation is triggered, otherwise it is not triggered;

[0073] Step 4-2: Perform knowledge distillation to fuse the old model knowledge and transfer the fusion result to the latest RSU model; the old model refers to the model submitted by the vehicle that participated in the training but did not participate in the aggregation;

[0074] In step 4-3, semi-asynchronous federated learning aggregation at the vehicle-RSU layer is performed.

[0075] Furthermore, step 5 specifically includes:

[0076] Step 5-1, set the cloud aggregation trigger conditions;

[0077] Set a preset model difference threshold L;

[0078] For each RSU r After completing its local vehicle-RSU layer federated learning aggregation, it evaluates its newly generated local aggregation model RSU model with RSU r The difference Δd between the global models most recently received from the cloud server, i.e., the cloud, and used as the starting point for its training;

[0079] If there is at least one RSU r If the corresponding difference Δd exceeds the preset model difference threshold L, cloud aggregation is triggered and step 5-2 is executed. Otherwise, step 5-3 is executed.

[0080] Step 5-2, execute cloud synchronization and aggregation process;

[0081] Step 5-3, RSU r Does not send a signal to the cloud and uses its current RSU model As a starting point, continue to perform the next round of vehicle-RSU layer federated learning iteration until there is at least one RSU rThe corresponding difference Δd exceeds the preset model difference threshold L, and then returns to step 5-2.

[0082] Compared with the prior art, the present invention has the following significant advantages:

[0083] 1) Comprehensively consider vehicle characteristics when selecting federated learning equipment: Taking full advantage of the dynamic mobility of vehicles in connected vehicle scenarios, the vehicle's residence time in the area, its computing and communication performance, and the amount of data it collects are combined as indicators for equipment selection. This effectively alleviates the low training efficiency caused by traditional methods that directly screen out these vehicles, thereby wasting valid data.

[0084] 2) Systematically addressing the challenges of the complex IoV environment: To address the combined negative impacts of data heterogeneity, device heterogeneity, and complex vehicle mobility on federated learning training efficiency in IoV environments, this paper proposes a semi-asynchronous, two-layer federated learning architecture. This architecture collaboratively addresses these challenges, effectively mitigating the time delays associated with traditional synchronous approaches or asynchronous approaches that fail to fully account for mobility. By setting dual trigger conditions—a timeout threshold and a threshold for the number of dynamic models—it addresses the shortcomings of existing technologies in handling such complex coupling issues.

[0085] 3) Triggering effective global model aggregation based on model differences measured by EMD distance: Compared with the traditional method of uploading the vehicle-RSU FL iterations to the cloud for aggregation after each round, which leads to high computational overhead and low aggregation update efficiency due to frequent aggregation, and insensitive model updates due to cloud aggregation at fixed time intervals, the present invention proposes to use EMD distance to measure the model difference between the RSU model and the global model, and set a difference threshold to trigger the cloud-based global aggregation update, thereby reducing the aggregation overhead while improving the significance of the aggregation update.

[0086] 4) Significantly improve the time efficiency of federated learning training: By introducing a semi-asynchronous communication mechanism, the global waiting time caused by device heterogeneity and network fluctuations is reduced, and a two-layer aggregation strategy is used to optimize the transmission and update process of model parameters between vehicle nodes, RSUs, and cloud servers. Compared with traditional synchronous federated learning and existing methods that fail to fully optimize IoV mobility and heterogeneity, the method of the present invention allows vehicles to participate in model aggregation updates of different RSUs during their dynamic movement, promotes data exchange between different road sections with heterogeneous data, and adopts a semi-asynchronous communication mechanism to alleviate the problem of long waiting time for high-performance devices due to IoV performance heterogeneity, thereby significantly shortening the total time required for model training in a dynamically changing Internet of Vehicles environment, and improving the overall operating efficiency and practicality of the federated learning system.

[0087] The present invention is described in further detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0088] Figure 1 The figure is a flow chart of the low-latency federated learning method for Internet of Vehicles based on semi-asynchronous communication of the present invention. DETAILED DESCRIPTION

[0089] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0090] It should be noted that if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of such features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the fact that they can be implemented by ordinary technicians in this field. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0091] The purpose of this invention is to address the shortcomings of existing technologies in dealing with the time efficiency issues of federated learning in the Internet of Vehicles, especially the limitations in collaboratively coping with data heterogeneity, device heterogeneity and complex vehicle mobility, especially cross-RSU mobility. By optimizing the communication mechanism and aggregation strategy, the training delay of federated learning in the vehicle-road-cloud collaborative scenario is effectively reduced, and the overall training efficiency is improved.

[0092] In one embodiment, combined Figure 1 , provides a low-latency federated learning method for Internet of Vehicles based on semi-asynchronous communication, the method comprising the following steps:

[0093] Step 1: Build a three-layer federated learning framework for vehicle-road-cloud collaboration, including cloud servers, multiple roadside units (RSUs), and vehicles within RSU coverage. Considering the heterogeneity of computing power, communication capabilities, and data volume during vehicle mobility, a system latency model is constructed, encompassing local training latency, uplink transmission latency, and inter-RSU communication latency.

[0094] Step 2: Establish an optimization problem with the goal of minimizing the overall training latency, with accuracy and energy consumption as constraints. Specifically, the problem is formulated as minimizing the overall training latency, including the vehicle-RSU layer and the RSU-cloud server layer, under given accuracy and energy constraints. The total latency is the sum of the latency for each RSU to complete training, the single-round latency includes the computational latency and upload latency, and the energy consumption includes the computational energy consumption and upload energy consumption.

[0095] Step 3: Build a vehicle selection mechanism based on multi-dimensional priorities. This mechanism comprehensively considers vehicle dataset size, computing power, communication capabilities, mobility characteristics, and remaining battery power. It uses an improved roulette wheel algorithm to dynamically select vehicles for training, balancing the requirements of model accuracy and training efficiency.

[0096] Step 4: Federated learning is performed using semi-asynchronous communication at the vehicle-RSU layer. A basic aggregation interval is set, while allowing additional aggregation when the number of received local models is sufficient. For vehicle models that are not involved in aggregation, i.e., outdated models, their knowledge is transferred to the latest RSU model through knowledge distillation to mitigate the impact of outdated models on the global model.

[0097] In step 5, at the RSU-cloud server layer, the difference between the RSU model and the global model sent by the cloud server is measured based on the Earth Mover's Distance (EMD). When the model difference exceeds the preset threshold, cloud-based aggregation is triggered to achieve a global aggregate update of multiple RSU models. By optimizing the device selection strategy, aggregation timing, and knowledge distillation parameters, the overall system latency and energy consumption are reduced while ensuring model performance.

[0098] Furthermore, in one embodiment, step 1 specifically includes:

[0099] Step 1-1: Define the network topology of the three-layer federated learning framework and build a three-layer federated learning framework consisting of a cloud server, multiple RSUs, and vehicles within the coverage of each RSU. The bottom layer of the framework consists of moving vehicles, and the vehicle set is represented as V = {V1, V2, ..., V n ,...,V N}; Among them, the rth RSU is RSU r Covering some vehicles in its geographical area, forming a vehicle subset V r , r∈{1,2,...,R}, R is the total number of RSUs; assuming that the vehicle travels in a straight line on the road, its pattern of arriving at the RSU coverage area follows a Poisson process, and the vehicle speed v i is randomly generated from a predefined truncated Gaussian distribution, and the velocity satisfies the minimum velocity v min, and is less than the maximum speed v max Crucially, the model acknowledges and incorporates the inherent heterogeneity of vehicles, including their computing capabilities (e.g., CPU frequency), communication capabilities (e.g., transmit power, channel conditions), and the size and characteristics of their local datasets;

[0100] The framework's middle layer consists of multiple RSUs deployed on road infrastructure. Each RSU is equipped with an edge server with relatively sufficient computing resources, responsible for coordinating the local training process for vehicles within its coverage area and performing model aggregation. All RSUs are interconnected via a local area network to ensure the necessary information exchange and potential forwarding of model parameters between RSUs.

[0101] The top layer of the framework is the central cloud server, whose main responsibility is to collect aggregated model RSUs from different RSUs. model , and perform higher-level global model aggregation, while periodically sending the updated global model to each RSU; this global aggregation aims to integrate knowledge from different road sections and different data distributions to generate a final global model with stronger generalization ability;

[0102] Steps 1-2: Establish a local computing latency model to quantify the time required for local vehicle training, including:

[0103] RSU r The nth vehicle V r,n The first RSU under which it belongs r The local model update is performed in the round of federated learning. This process involves updating the local dataset D of the vehicle. r,n Perform a certain number of rounds (X) of iterative calculations on the local computation delay of this round. Mainly depends on the number of local iteration rounds X and the amount of local vehicle data |D r,n |, the number of CPU cycles c required to calculate a unit data bit, and the vehicle's current CPU frequency The calculation formula is as follows:

[0104]

[0105] Considering that this method adopts a semi-asynchronous communication mechanism, vehicles may r The first r Some local training iterations have been completed before the aggregation round begins. r The actual computational delay that needs to be considered in the round is the time required to complete the remaining training tasks. r The calculation formula for the local computation delay (remaining local training delay) corresponding to the round is:

[0106]

[0107] Where, X rem is the number of remaining local iteration rounds; D r,n RSU r The nth vehicle V r,n local datasets, For vehicle V r,n Current CPU frequency, |D r,n | is the amount of local vehicle data, c is the number of CPU cycles required per data bit, For the first r Wheel vehicle V r,n The corresponding local computing latency;

[0108] This model accurately reflects the differences in training time among heterogeneous vehicles due to different computing power and data volumes, and takes into account the asynchronous starting points of training tasks under the semi-asynchronous mechanism.

[0109] Steps 1-3: Establish a vehicle uplink transmission delay model to enable the vehicle to upload its updated local model parameters to its current RSU after completing local training; the uplink transmission process uses orthogonal frequency division multiple access technology for channel access;

[0110] According to Shannon's theorem, the uplink transmission rate is calculated as:

[0111]

[0112] Where, For vehicle V r,n to RSU r Uplink transmission rate, Assigned to vehicle V r,n bandwidth, For vehicle V r,n The uplink transmission power, For vehicle V r,n with RSU r The channel gain between 2 represents the Gaussian white noise power;

[0113] Here, it is assumed that RSU r Total uplink bandwidth B r are fairly distributed to all vehicles selected for training in that round, i.e.:

[0114]

[0115] Where B r RSU r The total uplink bandwidth is It is the first r The wheel is selected from the vehicle collection, For vehicle Vr,n Select the indicator variable, which is 1 if selected and 0 if unselected;

[0116] The calculation of uplink transmission delay is:

[0117]

[0118] Where, For vehicle V r,n The uplink transmission delay of M indicates that the size of the neural network model used for training in federated learning is M bits;

[0119] The model quantifies the delay in heterogeneous communications caused by different channel conditions, bandwidth allocation, and transmission power.

[0120] Steps 1-4: Establish inter-RSU communication delay and total communication delay models;

[0121] Due to the mobility characteristics of vehicles, some vehicles may leave the current RSU before completing local training or model uploading. r Coverage range, enter the adjacent RSU k In this case, it is necessary to transfer model parameters across RSUs, that is, to transfer the model from the RSU where the vehicle is currently located to the k Forwarded back to the original RSU to which it belonged when training started r ;

[0122] First define the vehicle V r,n In RSU r Estimated duration of stay in the coverage area Assume that the diameter of the RSU coverage area is D, and the distance from the entrance to the vehicle when entering the coverage area is d i , the vehicle speed is v i , the residence time is calculated as follows:

[0123]

[0124] Calculate the total time required for the vehicle to complete the remaining local training and uplink transmission:

[0125]

[0126] Compare the dwell time with the required time and define the remaining dwell time after the vehicle completes the task in the current RSU area

[0127]

[0128] like Indicates that the vehicle is leaving the RSU r Upload cannot be completed before the coverage area, and cross-RSU transmission needs to be started. Define an indicator variable when hour, otherwise Inter-RSU transmission delay Depends on the model size M and the transmission rate between RSUs

[0129]

[0130] Therefore, the vehicle V r,n In the l r Total communication delay of the round It consists of the uplink transmission delay and possible inter-RSU transmission delay:

[0131]

[0132] This model fully considers the impact of vehicle mobility on communication delay.

[0133] Steps 1-5, establish a system energy consumption model;

[0134] Considering the energy constraints of on-board devices, it is crucial to model the energy consumption of participating in the federated learning process.

[0135] Vehicle V r,n In the l r Total energy consumption of the wheel Energy consumption is calculated locally and communication energy consumption It consists of two parts. The local computing energy consumption depends on the computing power of the vehicle. and the actual execution time of the remaining computing tasks Computing power is generally proportional to the cube of the CPU frequency, that is:

[0136]

[0137] Therefore, the energy consumption is calculated as:

[0138]

[0139] After simplification, we get:

[0140]

[0141] Communication energy consumption mainly considers the energy consumption of the uplink transmission process, which is equal to the uplink transmission power Multiply by the actual uplink transmission time The transmission energy consumption between RSUs is not included in the vehicle energy consumption.

[0142]

[0143] Vehicle Vr,n In the l r The total energy consumption of the wheel is:

[0144]

[0145] This energy consumption model provides a basis for subsequent energy consumption constraint optimization.

[0146] Steps 1-6: Establish an RSU layer semi-asynchronous aggregation delay model to implement model aggregation using semi-asynchronous communication at the vehicle-RSU layer, including:

[0147] RSU r In the l r The aggregation timing of the round is determined by two conditions: one is to reach the preset maximum waiting time, that is, the timeout time T t max , and secondly, a sufficient number of local model updates have been received before the timeout, that is, the aggregation threshold Q is reached limit ;

[0148] RSU r In the l r The total time required for the round to complete polymerization It depends on the time corresponding to which of these two conditions is satisfied first. Specifically, it is equal to the number of vehicles actually participating in the aggregation (indicated by the indicator variable mark, Express participation, Indicates no participation), the time required to complete local training and total communication The maximum value, but the maximum value cannot exceed the preset timeout period T t max , the calculation formula is as follows:

[0149]

[0150] Where, It is the first r The set of vehicles whose wheels are selected;

[0151] Here preferably, in some embodiments, the aggregation threshold Q limit It is dynamically adjusted. r The total number of active vehicles currently maintained is N r , the preset maximum number of aggregations is like but If you receive the A model can trigger aggregation; if Then Q limit =N r , only when timeout or all N rThe aggregation threshold is determined as follows:

[0152]

[0153] This model characterizes the aggregation latency characteristics of a semi-asynchronous mechanism, balancing the need to wait for slow devices with the need to accelerate the iteration process. The latency of the RSU performing the aggregation calculations itself is negligible due to its strong computing power. Similarly, the downlink transmission latency of the RSU broadcasting the aggregated model to the vehicle is negligible due to its high transmit power.

[0154] Steps 1-7, building a cloud aggregation model;

[0155] At the RSU-cloud server layer, in round e, the cloud server is responsible for the regional models from different RSUs. Perform aggregation to generate a new global model ω e ,in Representative RSUs r The model submitted at the e-th cloud aggregation is the model that has been r,e The result after two rounds of local aggregation. Considering the heterogeneity of data in different RSU coverage areas, and the fact that each RSU may have experienced different times between two cloud aggregations, The local vehicle-RSU layer iteration results in different training levels of the RSU model. To maximize knowledge, cloud aggregation adopts a weighted average strategy, where the weights comprehensively consider the total amount of data used by each RSU in this round of cloud aggregation cycle. (the sum of the amount of local aggregated data in each round in which it participated) and the number of local iterations it completed RSU models with larger data volumes and more thorough training are assigned higher weights. The formula for cloud-based aggregation and updating of global model parameters is as follows:

[0156]

[0157] Where, ω e In the first round of global aggregation, the cloud server is responsible for the regional models from different RSUs. Perform aggregation to generate a new global model; is the total amount of data used by each RSU in this round of cloud aggregation cycle, RSU r The number of local iterations completed in this round; For each RSU in the first k The total amount of data used in the round of cloud aggregation cycle, RSU r In the l k The number of local iterations completed by the round; RSUr The model submitted at the e-th cloud aggregation; e = {1, 2, ..., E}, where E is the total number of global aggregation rounds performed by the cloud server.

[0158] The denominator is the sum of the weight factors of all participating RSUs, which is used for normalization. This aggregation model aims to improve the accuracy and generalization ability of the global model by intelligently weighting and fusing the knowledge of each RSU.

[0159] Furthermore, in one embodiment, the optimization problem established in step 2 with the goal of minimizing the overall training delay and with accuracy and energy consumption as constraints is specifically:

[0160] To achieve efficient federated learning in the connected vehicle environment, a clear optimization model must be established. This model aims to minimize the overall training latency, including the vehicle-RSU layer and the RSU-cloud server layer, while ensuring that the preset model accuracy requirements and vehicle energy consumption limits are met. The mathematical expression of this optimization problem is as follows:

[0161]

[0162] A E ≥A target

[0163] In the formula, R represents the set of all RSUs, T r,e Indicates the rth RSU, namely RSU r The total latency experienced in the e-th round of cloud aggregation (i.e., the total latency of all local rounds completed by the RSU during this period) r The sum of ); e={1,2,...,E}, E is the total number of rounds of global aggregation performed by the cloud server; L r is the total number of local training rounds; E max is the preset maximum allowable energy consumption; A E A is the accuracy index; target The preset target accuracy.

[0164] The optimization objective function above aims to minimize the total latency of the entire federated learning process, which is composed of the cumulative time of E rounds of global aggregation performed by the cloud server.

[0165] Here, by summing up the longest RSU delays of all E rounds of aggregation, we can obtain the key indicator for measuring the overall training efficiency of the system.

[0166] The constraint ensures that any vehicle n participating in the training, during the entire training process (across all RSU r and its local training round l r , from 1 to L r ) does not exceed a preset maximum allowable energy consumption Emax When a vehicle is selected to participate in training (by Indicator) generated by the calculation of energy consumption and communication energy consumption This constraint is crucial for energy-constrained on-board devices and ensures the sustainability of the federated learning process.

[0167] Constraints define variables is a binary indicator variable. When RSU r The first r In the round of local training, vehicle n is selected to participate in the local model update calculation; when When , it means that vehicle n did not participate in this round of training. This variable is the key decision variable for subsequent resource allocation and vehicle selection strategies.

[0168] Constraints define variables is a binary indicator variable. When RSU r The first r In a round of local training, vehicle n successfully completes the local model update and uploads its model parameters (or is ready to upload, which affects the completion time of this round); when When , it means that vehicle n failed to contribute to the RSU aggregation in this round (perhaps it was not selected, did not complete training, or did not upload). This variable affects the latency calculation of RSU layer aggregation.

[0169] The constraints ensure that the final results of the federated learning training meet the performance requirements. The specific accuracy indicator accuracy A is used. E To measure the performance of the global model after E rounds of cloud aggregation, it is required to be no less than the preset target accuracy A target This constraint ensures that the optimization process not only pursues speed but also ensures the quality of the final model.

[0170] Furthermore, in one embodiment, the probabilistic vehicle selection method based on multi-factor priority in step 3 further defines a specific method for selecting vehicles to participate in local training in the federated learning framework, particularly at the RSU level. This method is designed to cope with the heterogeneity and dynamic nature of the Internet of Vehicles environment and intelligently determines the subset of vehicles participating in each round of local training through a multi-stage evaluation and selection process. This step specifically includes:

[0171] Step 3-1, in each RSU r Local aggregation round l r At the beginning, the initial candidate vehicle pool is determined, which contains the vehicles currently located at the RSU r The set N of all vehicles within the wireless communication coverage arear ;

[0172] Step 3-2: Perform a preliminary mobility assessment and screening of candidate vehicles (recognizing that vehicle mobility may cause some vehicles to leave the current RSU coverage area before completing local training and model upload. This method does not directly exclude such vehicles. Because these vehicles may have high-value data or powerful computing resources, simply excluding them will harm model performance). The candidate vehicle pool is updated; specifically, this includes:

[0173] Calculate the V for each vehicle in the initial candidate vehicle pool r,n On current RSU r Theoretical maximum residence time within the coverage area;

[0174] For each vehicle V r,n , to determine whether its theoretical maximum stay time is less than the time it takes to complete a round of training. If it is less than, then keep the vehicle V r,n Otherwise, the vehicle V r,n Eliminate from the candidate vehicle pool to obtain an updated candidate vehicle pool;

[0175] Step 3-3, for each vehicle V in the updated candidate vehicle pool r,n , defined in l r The actual or estimated remaining stay time for the round is The value of vehicle V r,n The theoretical maximum residence time of the vehicle V r,n Time to complete a training round difference;

[0176] Step 3-4: To accurately reflect the relative impact of mobility constraints in the priority calculation, calculate the normalized remaining stay time.

[0177]

[0178] Where, For vehicle V r,n' In l r The actual or estimated remaining stay time for the round;

[0179] This normalization operation maps the remaining dwell time of each vehicle to a standardized scale (specifically, to the interval (0.5, 1]). This not only reflects the relative length of the vehicle's dwell time, but also ensures that even the vehicle with the shortest remaining time has a certain basic weight by adding 1 and dividing by 2, avoiding the zero weight problem.

[0180] Steps 3-5, for each vehicle V r,n, calculate the comprehensive priority score

[0181]

[0182] Where, log2(E cur / E r,n ) represents the energy consumption factor, where E cur / E r,n Is the vehicle V r,n The current remaining energy and the energy required for one round of training E cur The ratio of represents the mobility factor, i.e. the normalized residual residence time calculated in steps 3-4 Resource and data value factor, a weighted sum term including the normalized local dataset size Normalized computing power And normalized communication capabilities in, The vehicle V r,n 、V r,n' The size of the local dataset, f r,n 、f r,n′ The vehicle V r,n 、V r,n' CPU calculation frequency, p r,n 、p r,n ′ are vehicle V r,n 、V r,n' The uplink transmission power of μ, ρ, and ε are weight coefficients used to adjust the relative importance of each factor. For vehicle V r,n In the first r The overall priority score of the round, The higher the value, the better the vehicle V r,n The more priority is considered in this round;

[0183] This score incorporates several key factors to comprehensively assess the vehicle's suitability for participating in this round of training.

[0184] Step 3-6, based on the comprehensive priority score calculated in step 3-5 K vehicles are selected from the updated candidate vehicle pool through a roulette wheel selection mechanism to participate in training; preferably, in some embodiments, the method specifically includes:

[0185] Step 3-6-1, before executing the selection, you first need to prepare the selection environment, including obtaining all current candidate vehicles and their corresponding priority scores Calculate the sum of the priority scores of all candidate vehicles and initialize an empty list to store the identifiers of the K vehicles that are finally selected.

[0186] Step 3-6-2 starts an iterative process that will be repeated K times to select the required number of vehicles.

[0187] In step 3-6-3, within each iteration, the single vehicle selection logic is executed: First, a pseudo-random floating-point number uniformly distributed within an open interval is generated. Second, the cumulative priority variable is initialized to 0, and the list of candidate vehicles that have not yet been selected is traversed in a predetermined order. Third, for each vehicle in the list, its priority score is added to the cumulative priority variable, and the updated cumulative priority variable is then checked to see if it is greater than or equal to a random number. If this condition is met, the currently traversed vehicle is determined to be the selected vehicle for this iteration.

[0188] Step 3-6-4: When a vehicle is selected in step 3-6-3, the update operation is immediately performed: the selected vehicle ID is added to the result list; the selected vehicle is removed from the current candidate list; the priority score of the newly selected vehicle is subtracted from the total priority; the internal traversal of the current iteration ends and the next iteration selection is advanced (if the number of selected vehicles is less than K). When the number of iterations reaches K, the selection process ends.

[0189] In step 3-6-5, the list finally contains the IDs of the K vehicles determined by the above-mentioned priority-based probabilistic selection method. This set is the vehicle participants selected for this round of local training.

[0190] Furthermore, in one embodiment, step 4 specifically includes:

[0191] Step 4-1: define the vehicle-RSU layer federated learning communication mode as semi-asynchronous mode. In this mode, RSU in each round (denoted as round r, corresponding to time t or aggregation round l) r ) does not strictly wait for all selected vehicles to complete local training and upload models before aggregation, nor does it process each arriving model completely asynchronously. The aggregation operation is determined by preset specific trigger conditions;

[0192] The preset specific trigger conditions include:

[0193] (1) If the time difference between the adjacent aggregation operations of the RSU exceeds the preset time timeout threshold (The time elapsed since the start of the current round reaches the preset maximum round length ), the aggregation operation of RSU is triggered, otherwise it is not triggered;

[0194] (2) If the number of models received by the RSU reaches the pre-qualified minimum model reception threshold Q limit(The number of local model updates received by the RSU that meet specific conditions reaches the dynamically set threshold Q limit ), the aggregation operation of RSU is triggered, otherwise it is not triggered;

[0195] Here, considering the continuous mobility of vehicles in the Internet of Vehicles environment (entering or leaving the RSU coverage) and the heterogeneity of vehicle performance and data volume, the fixed Q limit Therefore, this method uses dynamic adjustment of Q limit This strategy aims to determine a suitable Q based on the characteristics of the vehicles participating in the current round and the system's trade-off requirements for latency and model accuracy. limit For example, we can sort the vehicles based on their estimated time to complete the task, and use a greedy algorithm to find the Q that balances the latency and the expected model accuracy in the current round. limit If there are many valid vehicles currently participating in the training and their performance is good, Q can be appropriately increased. limit Or allow more frequent triggering of aggregation based on quantity to improve RSU resource utilization and training efficiency. RSU estimates the completion time of Q based on the estimated completion time reported by the vehicle after receiving the task and combined with global information. limit The time required.

[0196] Preferably, Q limit It can be adjusted dynamically, and its value is set to p% of the total number of vehicles participating in the training, where p is greater than 50, and preferably 60% to 80%.

[0197] In step 4-2, due to the semi-asynchronous characteristics and vehicle heterogeneity, the local model updates received by the RSU may not all be based on the latest RSU model issued in this round (denoted as ). Some models may be based on the RSU model of the earlier rounds of the lagging vehicle (such as in Directly aggregating these outdated models may slow down the convergence speed and damage the final model performance.

[0198] Here, preferably, in some embodiments, a processing strategy based on staleness threshold and knowledge distillation is adopted:

[0199] Step 4-2-1, define the maximum staleness threshold For each local model update received by RSU, the round difference between the RSU model version on which it is based and the current latest RSU model version is calculated, that is, the number of expired rounds

[0200] Step 4-2-2: If the model submitted by a vehicle is determined to have expired, update its number of rounds Exceeds the preset maximum staleness threshold Because the knowledge contained in the model is seriously outdated and may have a negative impact on the current aggregation, the RSU will directly abandon the model update and the vehicle will need to wait to participate in the subsequent round of training.

[0201] Step 4-2-3, if the number of rounds of model update is determined to be overdue If the maximum staleness threshold is not exceeded, the model is considered stale but may still contain valuable knowledge. For such models, knowledge distillation (KD) technology is used to transfer their knowledge to the latest model architecture to mitigate the impact of staleness on aggregation.

[0202] In step 4-3, knowledge distillation is performed to fuse the old model knowledge.

[0203] Here preferably, in some embodiments, specifically include:

[0204] Step 4-3-1: Set the knowledge distillation role. For any old models that meet the requirements, set them as the teacher model. Set the latest model currently maintained by the RSU, in this round or the previous round, as the student model.

[0205] Step 4-3-2, dynamically adjust the knowledge distillation temperature parameter t. Considering the different validity of information contained in models with different degrees of obsolescence, the knowledge distillation temperature parameter t is adjusted according to the number of expired rounds. Dynamically adjust the temperature parameter t used in the knowledge distillation process. Specifically, for models with a long expiration time, a lower temperature parameter is used to make the teacher model's output probability distribution sharper, forcing the student model to learn more specific features and reduce the interference of outdated information. For models with a short expiration time, a higher temperature parameter is used to make the teacher model's output probability distribution smoother, encouraging the student model to learn the subtle differences and inter-class relationships in the teacher model's output, retaining more potentially useful information and improving generalization.

[0206] Step 4-3-3, determine the timing and strategy for knowledge distillation. To effectively manage the knowledge distillation process and coordinate its relationship with the aggregation time point, set a distillation time limit Δt. This limit is located at the estimated aggregation time point of this round. Before; in some embodiments, specifically including:

[0207] Step 4-3-3-1, for the estimated aggregation point For the outdated models submitted within the previous Δt period, the RSU determines that the remaining time may not be enough to complete sufficient knowledge distillation. To avoid wasting effective information due to insufficient knowledge transfer, these vehicles are allowed to postpone their participation and will not participate in this round of aggregation. Instead, they will wait for the latest model issued by the RSU after this round of aggregation is completed. This is used as the student model to perform knowledge distillation at the beginning of the next round.

[0208] Step 4-3-3-2: For the old model submitted before the distillation time limit Δt, RSU believes that there is enough time to complete the distillation before this round of aggregation. RSU will generate the latest model from the previous round of aggregation. The vehicle uses its local data to perform knowledge distillation and uploads the resulting model to the RSU for participation in this round of aggregation.

[0209] Step 4-3-3-3: For vehicles that have been actively postponed in step 4-3-3-1, at the beginning of the next round, RSU not only sends the latest aggregation model As a student model, a model exchange strategy may also be implemented to enhance data diversity. RSU can randomly dispatch the old models submitted by other vehicles that are also in a delayed state to one of these delayed vehicles. In this way, the vehicle can use the models from other vehicles for knowledge distillation, further enriching the learning process. After completing a full round of distillation, the obtained model will participate in round l r +1 aggregation.

[0210] Step 4-3-4, Refining Polymerization Time Point Taking into account the possible active extension of vehicles in step 4-3-3-1, the original estimate of the number of vehicles to reach Q based on all expected vehicles (including vehicles with a small number of expired rounds) is limit The timing may need to be adjusted. limit The time is later than Then the aggregation time point of this round is directly set to The distillation line Δt is drawn accordingly. Otherwise, a re-evaluation is required, searching backward near the original estimated time point (for example, by checking subsequent time points) to find a model that can still reach Q even if the number of remaining eligible models is excluded, even if the vehicles that choose to postpone because they are located after the Δt limit are excluded. limit The earliest time point is determined as the final aggregation deadline of this round

[0211] Step 4-4, define the knowledge distillation loss function. The goal of the knowledge distillation process is to minimize a combined loss function This function usually consists of two parts:

[0212] (1) Classification loss Calculate the predicted output (hard prediction q) of the student model (when the temperature parameter T = 1, that is, no temperature increase) (1) ) and the true label y. Cross entropy loss is usually used:

[0213]

[0214] Among them, y i is the true label of the i-th sample, is the student model's predicted probability that the i-th sample belongs to category i (softmax output), calculated as:

[0215]

[0216] Here, z i 、z j are the outputs of the final (logits) layer of the student model for categories i and j, respectively.

[0217] (2) Distillation loss Calculate the softened prediction output (soft prediction q) of the student model (when the temperature parameter t>1) (t) ) and the softened output (soft label p) of the teacher model (at the same temperature parameter t) (t) ). Cross-entropy loss with temperature scaling is often used:

[0218]

[0219] Among them, the soft label of the teacher model and soft predictions of the student model The calculations are as follows:

[0220]

[0221]

[0222] Here, v i 、v j are the outputs of the teacher model’s logits layer for categories i and j, respectively, and z i 、z j is the output of the logits layer of the student model for categories i and j, and t is the dynamic temperature parameter determined in step 4-3-2.

[0223] The total loss function is for:

[0224]

[0225] Where α is a hyperparameter that balances the importance of the student model learning the true labels and imitating the output of the teacher model. When performing knowledge distillation, the vehicle optimizes this total loss function to update the parameters of the student model.

[0226] Steps 4-5, perform vehicle-RSU layer semi-asynchronous federated learning aggregation.

[0227] Here preferably, in some embodiments, the above mechanism is integrated, each round l r The aggregation process is as follows:

[0228] Step 4-5-1, RSU performs vehicle selection and uses the latest global model Broadcast to the selected vehicle and store the model version in its own cache.

[0229] In step 4-5-2, the selected vehicle uses local data for model training and generates local model updates.

[0230] In step 4-5-3, after the vehicle completes training, it uploads the local model update to the RSU.

[0231] In step 4-5-4, the RSU receives the uploaded model update and checks its staleness. For stale models that have not timed out, knowledge distillation is performed based on the position of their submission time relative to the distillation line Δt. This may result in some models being distilled and used in the current round of aggregation, others being discarded, and others being deferred to the next round. Furthermore, processing models from vehicles across RSUs may also require integration into the current RSU model system through knowledge distillation.

[0232] Step 4-5-5: RSU continuously monitors the aggregation trigger conditions. Once the number of models received, processed (including distillation) and meeting the conditions reaches the dynamically determined Q limit , or the current round time reaches The RSU immediately stops receiving and starts the aggregation operation.

[0233] In steps 4-5-6, RSU performs model aggregation. The aggregated model set includes the following categories: 1) Based on the latest 1) Local model updates obtained through direct training; 2) Local model updates obtained through knowledge distillation and originally trained based on the old version of the RSU model; 3) Model updates from vehicles under the jurisdiction of other RSUs after knowledge distillation. The RSU will calculate the new RSU model based on these valid model updates. Used for the next round of learning.

[0234] Furthermore, in one of the embodiments, the adaptive cloud-based aggregation method based on model difference measurement proposed in step 5 further defines the triggering mechanism and execution method of aggregating the RSU model to the cloud server.

[0235] Here, preferably, in some embodiments, to overcome the problems of wasted computing resources and inefficient updates that may be caused by fixed-frequency uploads, this step proposes an adaptive cloud-based aggregation strategy based on model update quality. This strategy determines the timing of upward aggregation by quantifying the degree of change of the local RSU model relative to the global model most recently received from the cloud. Specifically, it includes:

[0236] Step 5-1, set the cloud aggregation trigger conditions;

[0237] Set a preset model difference threshold L;

[0238] For each RSU r After completing its local vehicle-RSU layer federated learning aggregation, it evaluates its newly generated local aggregation model (abbreviated as R) and RSU r The difference Δd between the global model (denoted as G) that was most recently received from the cloud server and used as the starting point for its training;

[0239] If there is at least one RSU r If the corresponding difference Δd exceeds the preset model difference threshold L, cloud aggregation is triggered and step 5-2 is executed. Otherwise, step 5-3 is executed.

[0240] Step 5-2, execute cloud synchronization and aggregation process;

[0241] Step 5-3, RSU r Does not send a signal to the cloud and uses its current RSU model As a starting point, continue to perform the next round of vehicle-RSU layer federated learning iteration until there is at least one RSU r The corresponding difference Δd exceeds the preset model difference threshold L, and then returns to step 5-2.

[0242] Here, preferably, in some embodiments, in step 5-1, the difference Δd between the model R and the model G is measured by calculating the model difference degree (EMD), which specifically includes:

[0243] Step 5-1-1, establish a shared validation dataset. All RSUs participating in federated learning share a unified, standardized validation dataset D valid This dataset is used to generate the model output distribution required to calculate the EMD.

[0244] Step 5-1-2, obtain the model output probability distribution. To calculate EMD, the model (RSU model R and global model G) needs to be tested on the validation dataset D. valid The output on is converted into a probability distribution form. For any sample b in the validation set, its predicted output distribution on the RSU model R is defined as Rb This distribution is usually expressed as a set of dual where c i Represents possible category labels (a total of m categories), Model R predicts that sample b belongs to category c i Therefore,

[0245]

[0246] Similarly, the predicted output distribution of sample b on the most recently issued global model G is defined as G b :

[0247]

[0248] Step 5-1-3, calculate the EMD value of a single sample. For any sample b in the validation set, the two corresponding probability distributions R b and G b The EMD value between the two is defined as the distribution R b Transport distribution G b The minimum cost (work) required. This is usually calculated by solving an optimal transport problem:

[0249]

[0250] Among them, π∈Π(R b ,G b ) is the set of all possible joint probability distributions π, and the marginal distributions of these joint distributions are R b and G b . E (x,y)~π [d(x,y)] represents the expected value of the cost d(x,y) under the joint distribution π. d(x,y) is the ground distance, which measures the cost of moving a unit from category x to category y. inf represents the infimum of the expected cost under all possible joint distributions.

[0251] Step 5-1-4, calculate the EMD value between the overall models. The overall EMD distance between the RSU model R and the global model G is defined as the distance between the entire shared validation dataset D valid The average value of the EMD values ​​of all samples above:

[0252]

[0253] where |D valid | is the validation dataset D valid The number of samples in this EMD(R b ,G b ) value is the model difference Δd described in step 5-1.

[0254] Here, preferably, in some embodiments, step 5-2 of executing the cloud synchronization and aggregation process specifically includes:

[0255] Step 5-2-1, RSU side monitoring and triggering. Each RSU r After completing local aggregation, new RSU is obtained model Then, using the shared validation set D valid Compute the EMD(R,G) between it and the most recently received global model G.

[0256] Step 5-2-2, if RSU r The calculated EMD (R, G) is greater than the preset threshold L, then the RSU r Send an upload trigger signal to the cloud server.

[0257] Step 5-2-3, cloud-side response and synchronization. Once the cloud server receives an upload trigger signal from any RSU, it broadcasts a synchronization aggregation instruction to all RSUs participating in federated learning.

[0258] Step 5-2-4, RSU side responds to the synchronization instruction. After receiving the synchronization aggregation instruction from the cloud, all RSUs first complete their current vehicle-RSU layer federated learning iteration. Then, immediately send their newly generated RSU model Upload to the cloud server.

[0259] In step 5-2-5, the cloud performs global aggregation. After collecting the latest models uploaded by all RSUs, the cloud server executes a global aggregation algorithm to generate a new generation of global models. This new model is then distributed to each RSU as the starting point for their next phase of local training.

[0260] In summary, this approach first constructs a three-layer federated learning framework for vehicle-road-cloud collaboration, encompassing cloud servers, roadside units (RSUs), and vehicles. It accurately models system latency and energy consumption. This model accounts for vehicle heterogeneity in computation, communication, data volume, and mobility, specifically quantifying the latency of local computation, uplink transmission, and inter-RSU communication, laying the foundation for subsequent optimization. Secondly, a dynamic vehicle selection mechanism is designed based on multi-dimensional priorities, including vehicle data volume, computational and communication capabilities, mobility characteristics, and remaining battery life. An improved roulette wheel algorithm is used to intelligently select participating vehicles at the RSU level, balancing model accuracy and training efficiency. At the vehicle-RSU layer, a semi-asynchronous communication approach is innovatively employed for federated learning. Aggregation is triggered by setting dual conditions, namely a base aggregation time and a threshold for the number of models. Furthermore, knowledge distillation techniques, including dynamic temperature adjustment and refined execution strategies, are employed to address model staleness. This effectively integrates outdated but valuable model knowledge, improving training efficiency and model quality at the RSU level. At the RSU-cloud server layer, an adaptive cloud-based aggregation strategy based on the Earth Mover's Distance (EMD) to measure the difference between the local RSU model and the global model is proposed. Global synchronization and aggregation are triggered only when the model difference exceeds a preset threshold, significantly reducing unnecessary communication overhead.

[0261] In one embodiment, a low-latency federated learning system for an Internet of Vehicles based on semi-asynchronous communication is provided, the system comprising:

[0262] The first module is used to establish a three-layer federated learning framework model for vehicle-road-cloud collaboration, including cloud servers, multiple roadside units (RSUs), and vehicles within the RSU coverage area. Taking into account the heterogeneity of vehicle computing power, communication capabilities, and data volume during movement, a system delay model is constructed that includes local training delay, uplink transmission delay, and cross-RSU communication delay.

[0263] This module defines a three-layer architecture of cloud-RSU-vehicle. The key lies in accurately modeling the heterogeneity (computing, communication, data) and mobility of vehicles, and based on this, establishes a quantitative model of local computing, uplink transmission, cross-RSU communication delay and energy consumption, laying the foundation for system optimization.

[0264] The second module is used to establish an optimization problem with the goal of minimizing overall training latency, subject to accuracy and energy constraints. Specifically, the problem is formulated as minimizing the overall training latency, including the vehicle-RSU layer and the RSU-cloud server layer, under given accuracy and energy constraints. The total latency is composed of the sum of the latency for each RSU to complete training, the latency of a single round includes the computation latency and upload latency, and the energy consumption includes the computation energy consumption and upload energy consumption.

[0265] This module formalizes the federated learning process as an optimization problem, with the goal of minimizing the overall training latency while satisfying the key constraints of vehicle energy consumption and global model accuracy.

[0266] The third module builds a vehicle selection mechanism based on multi-dimensional priorities, comprehensively considering the size of the vehicle dataset, computing power, communication capabilities, mobility characteristics and remaining power factors, and uses an improved roulette algorithm to dynamically select vehicles participating in training, balancing the requirements of model accuracy and training efficiency.

[0267] This module calculates a comprehensive priority score that integrates the vehicle's remaining power, mobility, data volume, computing and communication capabilities, and uses a roulette wheel selection algorithm for probabilistic sampling, thereby dynamically and intelligently selecting vehicles participating in training at the RSU level to balance efficiency and performance.

[0268] The fourth module is used to perform federated learning using semi-asynchronous communication at the vehicle-RSU layer; it sets the basic aggregation time interval while allowing additional aggregation when the number of received local models is met; for vehicle models that do not participate in aggregation, their knowledge is transferred to the current latest RSU model through the knowledge distillation method.

[0269] This module manages the training interactions between vehicles and RSUs, using semi-asynchronous aggregation triggered by time or model quantity. Its core approach is to address model obsolescence using knowledge distillation technology, effectively integrating outdated but valuable model information to improve RSU-layer training efficiency and model quality.

[0270] The fifth module is used to measure the difference between the RSU model and the global model issued by the cloud server based on the bulldozer distance at the RSU-cloud server layer. When the model difference exceeds the preset threshold, cloud aggregation is triggered to achieve global aggregation update of multiple RSU models. By optimizing the device selection strategy, aggregation timing and knowledge distillation parameters, the overall system latency and energy consumption are reduced while ensuring model performance.

[0271] This module optimizes the timing of RSU aggregation to the cloud, measuring the significance of model updates by calculating the EMD between the local model and the global model. Cloud-based synchronization is triggered only when the model difference exceeds a preset threshold, thus avoiding unnecessary communication overhead and improving cloud-based aggregation efficiency.

[0272] Regarding the specific limitations of the low-latency federated learning system for the Internet of Vehicles based on semi-asynchronous communication, please refer to the limitations of the low-latency federated learning method for the Internet of Vehicles based on semi-asynchronous communication above, which will not be repeated here. The various modules in the above-mentioned low-latency federated learning system for the Internet of Vehicles based on semi-asynchronous communication can be implemented in whole or in part through software, hardware, and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0273] In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following is achieved:

[0274] Step 1: Establish a three-layer federated learning framework model for vehicle-road-cloud collaboration, including cloud servers, multiple roadside units (RSUs), and vehicles within the RSU coverage area. Considering the heterogeneity of computing power, communication capabilities, and data volume during vehicle mobility, a system latency model is constructed that includes local training latency, uplink transmission latency, and inter-RSU communication latency.

[0275] Step 2: Establish an optimization problem with the goal of minimizing the overall training latency, with accuracy and energy consumption as constraints. Specifically, the problem is formulated as minimizing the overall training latency, including the vehicle-RSU layer and the RSU-cloud server layer, under given accuracy and energy constraints. The total latency is the sum of the latency for each RSU to complete training, the single-round latency includes the computational latency and upload latency, and the energy consumption includes the computational energy consumption and upload energy consumption.

[0276] Step 3: Build a vehicle selection mechanism based on multi-dimensional priorities. This mechanism comprehensively considers vehicle dataset size, computing power, communication capabilities, mobility characteristics, and remaining battery power. It uses an improved roulette wheel algorithm to dynamically select vehicles for training, balancing the requirements of model accuracy and training efficiency.

[0277] Step 4: Federated learning is performed using semi-asynchronous communication at the vehicle-RSU layer. A basic aggregation interval is set, while allowing additional aggregation when the number of received local models is met. For vehicle models that are not involved in the aggregation, their knowledge is transferred to the current latest RSU model through knowledge distillation.

[0278] In step 5, at the RSU-cloud server layer, the difference between the RSU model and the global model sent by the cloud server is measured based on the bulldozer distance. When the model difference exceeds the preset threshold, cloud-based aggregation is triggered to achieve a global aggregation update of multiple RSU models. By optimizing the device selection strategy, aggregation timing, and knowledge distillation parameters, the overall system latency and energy consumption are reduced while ensuring model performance.

[0279] For the specific limitations of each step, please refer to the limitations of the low-latency federated learning method for the Internet of Vehicles based on semi-asynchronous communication mentioned above, which will not be repeated here.

[0280] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the computer program implements:

[0281] Step 1: Establish a three-layer federated learning framework model for vehicle-road-cloud collaboration, including cloud servers, multiple roadside units (RSUs), and vehicles within the RSU coverage area. Considering the heterogeneity of computing power, communication capabilities, and data volume during vehicle mobility, a system latency model is constructed that includes local training latency, uplink transmission latency, and inter-RSU communication latency.

[0282] Step 2: Establish an optimization problem with the goal of minimizing the overall training latency, with accuracy and energy consumption as constraints. Specifically, the problem is formulated as minimizing the overall training latency, including the vehicle-RSU layer and the RSU-cloud server layer, under given accuracy and energy constraints. The total latency is the sum of the latency for each RSU to complete training, the single-round latency includes the computational latency and upload latency, and the energy consumption includes the computational energy consumption and upload energy consumption.

[0283] Step 3: Build a vehicle selection mechanism based on multi-dimensional priorities. This mechanism comprehensively considers vehicle dataset size, computing power, communication capabilities, mobility characteristics, and remaining battery power. It uses an improved roulette wheel algorithm to dynamically select vehicles for training, balancing the requirements of model accuracy and training efficiency.

[0284] Step 4: Federated learning is performed using semi-asynchronous communication at the vehicle-RSU layer. A basic aggregation interval is set, while allowing additional aggregation when the number of received local models is met. For vehicle models that are not involved in the aggregation, their knowledge is transferred to the current latest RSU model through knowledge distillation.

[0285] In step 5, at the RSU-cloud server layer, the difference between the RSU model and the global model sent by the cloud server is measured based on the bulldozer distance. When the model difference exceeds the preset threshold, cloud-based aggregation is triggered to achieve a global aggregation update of multiple RSU models. By optimizing the device selection strategy, aggregation timing, and knowledge distillation parameters, the overall system latency and energy consumption are reduced while ensuring model performance.

[0286] For the specific limitations of each step, please refer to the limitations of the low-latency federated learning method for the Internet of Vehicles based on semi-asynchronous communication mentioned above, which will not be repeated here.

[0287] The basic principles, main features, and advantages of the present invention are shown and described above. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are merely illustrative of the principles of the present invention. Various changes and modifications may be made to the present invention without departing from the spirit and scope of the present invention, and such changes and modifications fall within the scope of the invention as claimed.

Claims

1. A low-latency federated learning method for Internet of Vehicles based on semi-asynchronous communication, characterized in that: The method comprises: Step 1: Establish a three-layer federated learning framework model for vehicle-road-cloud collaboration, including cloud servers, multiple roadside units (RSUs), and vehicles within the RSU coverage area. Considering the heterogeneity of computing power, communication capabilities, and data volume during vehicle mobility, a system latency model is constructed that includes local training latency, uplink transmission latency, and inter-RSU communication latency. Step 2: Establish an optimization problem with the goal of minimizing the overall training latency, with accuracy and energy consumption as constraints. Specifically, the problem is formulated as minimizing the overall training latency, including the vehicle-RSU layer and the RSU-cloud server layer, under given accuracy and energy constraints. The total latency is the sum of the latency for each RSU to complete training, the single-round latency includes the computational latency and upload latency, and the energy consumption includes the computational energy consumption and upload energy consumption. Step 3: Build a vehicle selection mechanism based on multi-dimensional priorities. This mechanism comprehensively considers vehicle dataset size, computing power, communication capabilities, mobility characteristics, and remaining battery power. It uses an improved roulette wheel algorithm to dynamically select vehicles for training, balancing the requirements of model accuracy and training efficiency. Step 4: Federated learning is performed using semi-asynchronous communication at the vehicle-RSU layer. A basic aggregation interval is set, while allowing additional aggregation when the number of received local models is met. For vehicle models that are not involved in the aggregation, their knowledge is transferred to the current latest RSU model through knowledge distillation. In step 5, at the RSU-cloud server layer, the difference between the RSU model and the global model sent by the cloud server is measured based on the bulldozer distance. When the model difference exceeds the preset threshold, cloud-based aggregation is triggered to achieve a global aggregation update of multiple RSU models. By optimizing the device selection strategy, aggregation timing, and knowledge distillation parameters, the overall system latency and energy consumption are reduced while ensuring model performance.

2. The low-latency federated learning method for Internet of Vehicles based on semi-asynchronous communication according to claim 1 is characterized in that: Step 1 specifically includes: Step 1-1: Define the network topology of the three-layer federated learning framework and build a three-layer federated learning framework consisting of a cloud server, multiple RSUs, and vehicles within the coverage of each RSU. The bottom layer of the framework consists of moving vehicles, and the vehicle set is represented as V = {V1, V2, ..., V n ,...,V N }; Among them, the rth RSU is RSU r Covering some vehicles in its geographical area, forming a vehicle subset V r , r∈{1,2,...,R}, R is the total number of RSUs; The framework's middle layer consists of multiple RSUs deployed on road infrastructure. Each RSU is equipped with an edge server with relatively sufficient computing resources, responsible for coordinating the local training process for vehicles within its coverage area and performing model aggregation. All RSUs are interconnected via a local area network to ensure the necessary information exchange and potential forwarding of model parameters between RSUs. The top layer of the framework is the central cloud server, which is used to collect the aggregated model RSU from different RSUs. model , and perform higher-level global model aggregation, while periodically sending the updated global model to each RSU; Steps 1-2: Establish a local computing latency model to quantify the time required for local vehicle training, including: A semi-asynchronous communication mechanism is used between the vehicle and the RSU. r The calculation formula for the local computing delay corresponding to the round is: Where, X rem is the number of remaining local iteration rounds; D r,n RSU r The nth vehicle V r,n local datasets, For vehicle V r,n Current CPU frequency, |D r,n | is the amount of local vehicle data, c is the number of CPU cycles required per data bit, For the first r Wheel vehicle V r,n The corresponding local computing latency; Steps 1-3: Establish a vehicle uplink transmission delay model to enable the vehicle to upload its updated local model parameters to its current RSU after completing local training; the uplink transmission process uses orthogonal frequency division multiple access technology for channel access; The uplink transmission rate is calculated as: Where, For vehicle V r,n to RSU r Uplink transmission rate, Assigned to vehicle V r,n bandwidth, For vehicle V r,n The uplink transmission power, For vehicle V r,n with RSU r The channel gain between 2 represents the Gaussian white noise power; The calculation of uplink transmission delay is: Where, For vehicle V r,n The uplink transmission delay of M indicates that the size of the neural network model used for training in federated learning is M bits; Steps 1-4: Establishing inter-RSU communication delay and total communication delay models, including: Vehicle V r,n The delay of cross-RSU transmission for: Where, is the transmission rate between RSUs; Vehicle V r,n In the l r Total communication delay of the round Where, is an indicator variable, when hour, otherwise For vehicle V r,n On current RSU r The remaining stay time in the area after completing the task; Steps 1-5: Establish a system energy consumption model: Vehicle V r,n In the first r Total energy consumption of the wheel for: in, The vehicle V r,n In the l r The local computing energy consumption and communication energy consumption of the round are: Where, For vehicle V r,n The calculation power of γ is the effective switch capacitance coefficient that depends on the chip architecture; Steps 1-6: Establish an RSU layer semi-asynchronous aggregation delay model to implement model aggregation using semi-asynchronous communication at the vehicle-RSU layer, including: RSU r In the l r The timing of the round aggregation is determined by two conditions: one is to reach the preset maximum waiting time, that is, the timeout time Second, a sufficient number of local model updates have been received before the timeout, that is, the aggregation threshold Q is reached limit ; RSU r In the l r The total time required for the round to complete polymerization Where, is an indicator variable, Indicates vehicle V r,n Participate in aggregation, Indicates vehicle V r,n No participation in aggregation; It is the first r The set of vehicles whose wheels are selected; Steps 1-7, build a cloud aggregation model: Where, ω e In the first round of global aggregation, the cloud server is responsible for the regional models from different RSUs. Perform aggregation to generate a new global model; is the total amount of data used by each RSU in this round of cloud aggregation cycle, RSU r The number of local iterations completed in this round; For each RSU in the first k The total amount of data used in the round of cloud aggregation cycle, RSU r In the l k The number of local iterations completed by the round; RSU r The model submitted at the e-th cloud aggregation; e = {1, 2, ..., E}, where E is the total number of global aggregation rounds performed by the cloud server.

3. The low-latency federated learning method for Internet of Vehicles based on semi-asynchronous communication according to claim 2 is characterized in that: Assigned to vehicle V as described in steps 1-3 r,n Bandwidth for: Where B r RSU r The total uplink bandwidth is It is the first r The wheel is selected from the vehicle collection, For vehicle V r,n Select an indicator variable, where a selected variable is 1 and an unselected variable is 0.

4. The low-latency federated learning method for Internet of Vehicles based on semi-asynchronous communication according to claim 2 is characterized in that: Vehicle V in steps 1-4 r,n The remaining stay time after completing the task in the current RSU area The calculation formula is: in, Where, For vehicle V r,n In RSU r The expected stay time in the coverage area, D is RSU r Diameter of coverage, d i For vehicle V r,n Access to RSUs r Distance from the entrance when covering the area, v i is the vehicle speed; For vehicle V r,n The total time required to complete the remaining local training and uplink transmission.

5. The low-latency federated learning method for Internet of Vehicles based on semi-asynchronous communication according to claim 2 is characterized in that: The aggregation threshold Q limit It is dynamically adjusted and determined as follows: Where N r RSU r The total number of active vehicles currently maintained, The preset maximum number of aggregations.

6. The low-latency federated learning method for Internet of Vehicles based on semi-asynchronous communication according to claim 1 is characterized in that: The optimization problem established in step 2 with the goal of minimizing the overall training delay and the constraints of accuracy and energy consumption is: A E ≥A target In the formula, R represents the set of all RSUs, T r,e Indicates the rth RSU, namely RSU r The total latency experienced in the e-th round of cloud aggregation; e = {1, 2, ..., E}, where E is the total number of rounds of global aggregation performed by the cloud server; L r is the total number of local training rounds; E max is the preset maximum allowable energy consumption; is a binary indicator variable, when When RSU r The first r In the round of local training, vehicle n is selected to participate in the local model update calculation; when When , it means that vehicle n did not participate in this round of training; are the computing energy consumption and communication energy consumption generated when vehicle n is selected to participate in training; is a binary indicator variable, when When RSU r The first r In the round of local training, vehicle n successfully completes the local model update and uploads its model parameters; When , it means that vehicle n fails to contribute to the aggregation of RSU in this round; A E A is the accuracy index; target The preset target accuracy.

7. The low-latency federated learning method for Internet of Vehicles based on semi-asynchronous communication according to claim 4 is characterized in that: Step 3 specifically includes: Step 3-1, in each RSU r Local aggregation round l r At the beginning, the initial candidate vehicle pool is determined, which contains the vehicles currently located at the RSU r The set N of all vehicles within the wireless communication coverage area r ; Step 3-2: Conduct a preliminary mobility assessment and screening of candidate vehicles and update the candidate vehicle pool; specifically, it includes: Calculate the initial candidate vehicle pool for each vehicle V r,n On current RSU r Theoretical maximum residence time within the coverage area; For each vehicle V r,n , to determine whether its theoretical maximum stay time is less than the time it takes to complete a round of training. If it is less than, then keep the vehicle V r,n Otherwise, the vehicle V r,n Eliminate from the candidate vehicle pool to obtain an updated candidate vehicle pool; Step 3-3, for each vehicle V in the updated candidate vehicle pool r,n , defined in l r The actual or estimated remaining stay time for the round is The value of vehicle V r,n The theoretical maximum residence time of the vehicle V r,n Time to complete a training round difference; Step 3-4, calculate the normalized remaining residence time Where, For vehicle V r,n' In l r The actual or estimated remaining duration of stay for the round; Steps 3-5, for each vehicle V r,n , calculate the comprehensive priority score Where, log2(E cur / E r,n ) represents the energy consumption factor, where E cur / E r,n Is the vehicle V r,n The current remaining energy and the energy required for one round of training E cur The ratio of represents the mobility factor, i.e. the normalized residual residence time calculated in steps 3-4 Resource and data value factor, a weighted sum term including the normalized local dataset size Normalized computing power And normalized communication capabilities in, The vehicle V r,n 、V r,n' The size of the local dataset, f r,n 、f r,n′ The vehicle V r,n 、V r,n' CPU calculation frequency, p r,n 、p r,n ′ are vehicle V r,n 、V r,n' The uplink transmission power of μ, ρ, and ε are weight coefficients used to adjust the relative importance of each factor. For vehicle V r,n In the first r The overall priority score of the round, The higher the value, the better the vehicle V r,n The more priority is considered in this round; Step 3-6, based on the comprehensive priority score calculated in step 3-5 K vehicles are selected from the updated candidate vehicle pool through a roulette wheel selection mechanism to participate in training.

8. The low-latency federated learning method for Internet of Vehicles based on semi-asynchronous communication according to claim 1 is characterized in that: Step 4 specifically includes: Step 4-1: Define the vehicle-RSU layer federated learning communication mode as a semi-asynchronous mode. In this mode, the aggregation operation of RSU in each round is determined by a preset specific trigger condition. The preset specific trigger conditions include: (1) If the time difference between the adjacent aggregation operations of RSU exceeds the preset timeout threshold T r timeout , then the RSU aggregation operation is triggered, otherwise it is not triggered; (2) If the number of models received by the RSU reaches the pre-qualified minimum model reception threshold Q limit , then the RSU aggregation operation is triggered, otherwise it is not triggered; Step 4-2: Perform knowledge distillation to fuse the old model knowledge and transfer the fusion result to the latest RSU model; the old model refers to the model submitted by the vehicle that participated in the training but did not participate in the aggregation; In step 4-3, semi-asynchronous federated learning aggregation at the vehicle-RSU layer is performed.

9. The low-latency federated learning method for Internet of Vehicles based on semi-asynchronous communication according to claim 8 is characterized in that: The minimum model acceptance threshold Q in step 4-1 limit It can be adjusted dynamically, and its value is set to p% of the total number of vehicles participating in the training, where p is greater than 50.

10. The low-latency federated learning method for Internet of Vehicles based on semi-asynchronous communication according to claim 1, characterized in that: Step 5 specifically includes: Step 5-1, set the cloud aggregation trigger conditions; Set a preset model difference threshold L; For each RSU r After completing its local vehicle-RSU layer federated learning aggregation, it evaluates its newly generated local aggregation model RSU model with RSU r The difference Δd between the global models most recently received from the cloud server, i.e., the cloud, and used as the starting point for its training; If there is at least one RSU r If the corresponding difference Δd exceeds the preset model difference threshold L, cloud aggregation is triggered and step 5-2 is executed. Otherwise, step 5-3 is executed. Step 5-2, execute cloud synchronization and aggregation process; Step 5-3, RSU r Does not send a signal to the cloud and uses its current RSU model As a starting point, continue to perform the next round of vehicle-RSU layer federated learning iteration until there is at least one RSU r The corresponding difference Δd exceeds the preset model difference threshold L, and then returns to step 5-2.

Citation Information

Cited By

  • Traffic signal control method based on federal learning framework

    CN121483059A

  • A traffic signal control method based on a federated learning framework

    CN121483059B