Vehicle-mounted federated learning optimization method and system based on mobile perception
By combining a dynamic mask sparsity training mechanism with a mobile perception-based collaborative optimization framework, the problem of in-vehicle federated learning, characterized by frequent vehicle movement and unstable network conditions, is solved. This approach achieves joint optimization of vehicle selection, sparsity rate, and bandwidth allocation, thereby improving training stability and resource utilization, and enhancing the efficiency of in-vehicle federated learning.
Patent Information
- Application Number
- CN202511664911.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-13
- Publication Date
- 2026-02-10
AI Technical Summary
In environments with frequent vehicle movement and unstable network conditions, the efficiency and robustness of onboard federated learning are affected, leading to unstable model aggregation and low resource utilization.
By combining a dynamic mask sparsity training mechanism with a motion-aware collaborative optimization framework, joint optimization of vehicle selection, sparsity, and bandwidth allocation is achieved. By utilizing edge servers to obtain vehicle motion and network status information, target vehicles are dynamically selected, model sparsity and communication bandwidth are allocated, and weighted aggregation is performed to generate an updated global model.
It improves the training stability and efficiency of onboard federated learning in highly mobile environments, reduces latency, and enhances resource utilization.
Smart Images

Figure CN121503588A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of vehicle federated learning, and in particular to an optimization method and system for vehicle-mounted federated learning based on motion perception. Background Technology
[0002] Intelligent driving has become a key support for modern intelligent transportation systems, relying on data-driven artificial intelligence tasks such as trajectory prediction and object detection. These tasks typically rely on model training based on large amounts of data collected from onboard sensors. With the continuous improvement of onboard computing unit performance, onboard federated learning, as a distributed learning paradigm, is gradually becoming an important solution for autonomous driving tasks. In this model, vehicles train models locally, and roadside edge servers aggregate the models, mitigating the privacy risks associated with centralized training and alleviating the uplink communication burden. However, the high mobility of vehicles presents significant challenges to federated learning systems. On the one hand, the dynamic changes in distance between vehicles and edge servers lead to unpredictable communication delays; on the other hand, vehicles entering and leaving network coverage areas cause frequent changes in participating training nodes, affecting the stability and consistency of model aggregation. This instability not only interrupts the model aggregation cycle but also leads to inconsistent model updates due to some vehicles failing to complete training in a timely manner, thus slowing down the synchronization and convergence speed of the global model.
[0003] Therefore, how to improve the efficiency and robustness of in-vehicle federated learning in environments with frequent vehicle movement and unstable network conditions is a problem that urgently needs to be solved. Summary of the Invention
[0004] The main purpose of this application is to provide a mobile-aware-based optimization method and system for in-vehicle federated learning, aiming to solve the technical problem of how to improve the efficiency and robustness of in-vehicle federated learning in environments with frequent vehicle movement and unstable network conditions.
[0005] To achieve the above objectives, this application proposes a mobile-aware vehicular federated learning optimization method, which is applied to an edge server. The method includes: Acquire vehicle motion status information and network status information; Based on the motion state information and the network state information, the target vehicle, model sparsity, and communication bandwidth participating in federated learning are obtained; The preset global model and the model sparsity are sent to the target vehicle according to the communication bandwidth, so that the target vehicle can perform sparsification processing and update training on the global model according to the model sparsity and feed back the updated model parameters of the target local model. The updated global model is obtained by weighted aggregation based on the motion state information, the network state information, and the model parameters.
[0006] In one embodiment, the step of obtaining the target vehicle participating in federated learning, the model sparsity, and the communication bandwidth based on the motion state information and the network state information includes: The optimization problem is derived based on the motion state information and the network state information; The long-term problem in the optimization problem is transformed into a short-term problem according to the preset task queue optimization method, where long-term refers to multiple rounds of training and short-term refers to a single round of training. According to the preset decomposition method, the short-term problem is decomposed into an integer programming problem for selecting the target vehicle and a continuous variable problem involving model sparsity and communication bandwidth. The integer programming problem and the continuous variable problem are solved iteratively to obtain the target vehicles, model sparsity, and communication bandwidth participating in federated learning.
[0007] In one embodiment, the step of transforming the long-term problem in the optimization problem into a short-term problem according to a preset task queue optimization method includes: A virtual convergence loss queue is constructed based on a preset task queue optimization method. The virtual convergence loss queue is used to record the convergence loss changes in each round of training. Based on the virtual convergence loss queue and the preset long-term convergence loss target, the utility loss function is calculated, which represents the difference between the long-term convergence loss and the preset target. Based on the utility loss function and the preset control factor, the long-term problem in the optimization problem is transformed into a short-term problem. The long-term problem is a multi-round training convergence loss constraint problem, and the short-term problem is a single-round training latency minimization problem.
[0008] In one embodiment, the step of iteratively solving the integer programming problem and the continuous variable problem to obtain the target vehicle, model sparsity, and communication bandwidth participating in federated learning includes: Solve the integer programming problem to obtain the target vehicle in the current iteration round; Solve the continuous variable problem based on the target vehicle to obtain the model sparsity and communication bandwidth for the current iteration round; Based on the target vehicle, the model sparsity, and the communication bandwidth, calculate the system latency and convergence loss for the current iteration. When the system latency and the convergence loss match the preset convergence conditions, the target vehicle, model sparsity, and communication bandwidth of the current iteration are used as the target vehicle, model sparsity, and communication bandwidth for participating in federated learning.
[0009] In one embodiment, the motion state information includes geographical location, the network state information includes network connection quality, and the step of performing weighted aggregation based on the motion state information, the network state information, and the model parameters to obtain the updated global model includes: The priority of the target vehicle is determined based on the geographical location and the network connection quality; The target vehicle is assigned a corresponding weight percentage based on the priority. The updated global model is obtained by weighted aggregation based on the weight ratio and the model parameters.
[0010] Furthermore, to achieve the above objectives, this application also proposes a vehicle-based federated learning optimization method based on motion perception. This method is applied to vehicles and includes: Receive the global model and model sparsity sent by the edge server; The global model is sparsified according to the sparsity of the model to obtain a sparsified local model. The sparse local model is trained locally to obtain the updated target local model. The model parameters of the target local model are uploaded to the edge server, so that the edge server performs weighted aggregation based on the motion state information and the model parameters to obtain an updated global model.
[0011] In one embodiment, the step of sparsifying the global model according to the model sparsity rate to obtain a sparsified local model includes: A mask vector is generated based on the sparsity of the model, and the mask vector is used to indicate the retention and discarding of parameters in the global model; The global model is sparsified based on the mask vector to obtain a sparsified local model.
[0012] In one embodiment, the step of performing local training on the sparse local model to obtain the updated target local model includes: Obtain the gradient of the sparse local model on the local dataset; The sparse local model is updated based on the gradient to obtain the updated target local model.
[0013] In one embodiment, the step of uploading the model parameters of the target local model to the edge server includes: Obtain the upload time when the model parameters of the target local model are uploaded to the edge server; When the upload time is less than or equal to a preset waiting time, the model parameters of the target local model are uploaded to the edge server; If the upload time exceeds a preset waiting time, the upload of the model parameters of the target local model to the edge server is stopped.
[0014] Furthermore, to achieve the above objectives, this application also proposes a mobile-aware vehicular federated learning optimization system, which includes an edge server and a vehicle. The mobile-aware vehicular federated learning optimization method applied to the edge server as described above is executed on the edge server, and the mobile-aware vehicular federated learning optimization method applied to the vehicle as described above is executed on the vehicle.
[0015] This application provides a mobile-aware-based optimization method for vehicular federated learning. The method includes: acquiring vehicle motion state information and network state information; obtaining the target vehicle, model sparsity, and communication bandwidth for federated learning based on the motion state information and network state information; distributing a preset global model and the model sparsity to the target vehicle based on the communication bandwidth, so that the target vehicle sparsifies and updates the global model according to the model sparsity and feeds back the updated target local model parameters; and performing weighted aggregation based on the motion state information, network state information, and model parameters to obtain the updated global model. In summary, this application, through a dynamic mask sparsity training mechanism and a mobile-aware collaborative optimization framework, achieves joint optimization of vehicle selection, sparsity, and bandwidth allocation, solving the problems of unstable training, high latency, and low resource utilization in vehicular federated learning under high vehicle mobility environments, thus improving the efficiency and robustness of vehicular federated learning. Attached Figure Description
[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart illustrating the first embodiment of the vehicle-mounted federated learning optimization method based on mobility perception in this application. Figure 2This is the execution flowchart of the vehicle-mounted federated learning optimization system based on mobile perception in this application. Figure 3 A flowchart illustrating the second embodiment of the vehicle-mounted federated learning optimization method based on mobility perception in this application; Figure 4 This is a schematic diagram illustrating the application scenario of the vehicle-mounted federated learning optimization system based on mobile perception in this application. Figure 5 This is a schematic diagram of the joint optimization solution framework of the vehicle-mounted federated learning optimization system based on mobile perception in this application. Figure 6 This is a flowchart illustrating the third embodiment of the vehicle-mounted federated learning optimization method based on mobility perception in this application.
[0019] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0020] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0021] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0022] Intelligent driving has become a key support for modern intelligent transportation systems, relying on data-driven artificial intelligence tasks such as trajectory prediction and object detection. These tasks typically rely on model training based on large amounts of data collected from onboard sensors. With the continuous improvement of onboard computing unit performance, onboard federated learning, as a distributed learning paradigm, is gradually becoming an important solution for autonomous driving tasks. In this model, vehicles train models locally, and roadside edge servers aggregate the models, mitigating the privacy risks associated with centralized training and alleviating the uplink communication burden. However, the high mobility of vehicles presents significant challenges to federated learning systems. On the one hand, the dynamic changes in distance between vehicles and edge servers lead to unpredictable communication delays; on the other hand, vehicles entering and leaving network coverage areas cause frequent changes in participating training nodes, affecting the stability and consistency of model aggregation. This instability not only interrupts the model aggregation cycle but also leads to inconsistent model updates due to some vehicles failing to complete training in a timely manner, thus delaying the synchronization and convergence speed of the global model. Therefore, how to improve the efficiency and robustness of onboard federated learning in environments with frequent vehicle movement and unstable network conditions is a pressing issue that needs to be addressed.
[0023] This application achieves joint optimization of vehicle selection, sparsity rate, and bandwidth allocation through a dynamic mask sparsity training mechanism and a collaborative optimization framework for mobile perception. It solves the problems of unstable training, high latency, and low resource utilization in vehicle federated learning under high vehicle mobility environments, thereby improving the efficiency and robustness of vehicle federated learning.
[0024] It should be noted that the execution entity of this embodiment can be a mobile-aware in-vehicle federated learning optimization system, a computing service device with data processing, network communication, and program execution functions, or an electronic device capable of implementing the aforementioned mobile-aware in-vehicle federated learning optimization function, etc. This embodiment does not specifically limit it in this way. The following uses a mobile-aware in-vehicle federated learning optimization system as an example to describe this embodiment and the following embodiments.
[0025] Based on this, embodiments of this application provide a vehicle-mounted federated learning optimization method based on motion perception, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the mobile-aware vehicular federated learning optimization method applied to edge servers in this application.
[0026] In this embodiment, the mobile-aware vehicular federated learning optimization method is applied to an edge server, and the mobile-aware vehicular federated learning optimization method includes steps S10~S40: Step S10: Obtain vehicle motion status information and network status information.
[0027] It should be noted that in this step, the edge server acquires real-time motion and network status information of all vehicles within its coverage area via the vehicle-to-everything (V2X) communication interface. Motion status information includes the vehicle's geographical location and speed; network status information includes channel quality, signal strength, and available bandwidth between the vehicle and the base station. Additionally, the motion status information may also include resource status such as remaining battery power and computing power.
[0028] Step S20: Obtain the target vehicle, model sparsity, and communication bandwidth participating in federated learning based on the motion state information and the network state information.
[0029] It should be noted that, as Figure 2As shown, in this step, the edge server executes a joint optimization algorithm based on the acquired real-time information to determine the vehicles (i.e., target vehicles) to participate in this round of federated learning, the model sparsity of each vehicle, and the communication bandwidth allocation scheme. This step constructs an optimization problem with the goal of minimizing system latency, uses a preset optimization method (such as Lyapunov) to handle long-term convergence loss constraints, and then decouples vehicle selection (integer variables) and sparsity / bandwidth (continuous variables) through a preset decomposition strategy (such as Benders), finally outputting the optimal vehicle selection result (i.e., target vehicles), sparsity, and bandwidth allocation scheme (i.e., communication bandwidth).
[0030] Step S30: The preset global model and the model sparsity are sent to the target vehicle according to the communication bandwidth, so that the target vehicle can perform sparsification processing and update training on the global model according to the model sparsity and feed back the updated target local model parameters.
[0031] It's important to note that in this step, the edge server utilizes the allocated communication bandwidth to send the global model for the current round and the sparsity ratios corresponding to each vehicle to the selected target vehicle via the downlink. Upon receiving the data, the vehicle generates a local mask based on the sparsity ratios and sparsifies the global model to obtain a sparsified local model. It then performs gradient descent training with mask constraints on the local dataset, updating the model parameters. After training is complete, the vehicle uploads the updated model parameters to the edge server within a specified waiting time.
[0032] Step S40: Perform weighted aggregation based on the motion state information, network state information, and model parameters to obtain the updated global model.
[0033] It should be noted that in this step, after receiving model parameters uploaded by a preset number of target vehicles, the edge server will combine the vehicle's motion state information and network state information (such as location and network connection quality) to perform weighted aggregation of the model parameters, generating an updated global model. Understandably, the weight allocation will prioritize vehicles with stable locations and good network conditions to improve the accuracy and robustness of the aggregated model.
[0034] In one feasible implementation, step S40 specifically includes: Step S401: Determine the priority of the target vehicle based on the geographical location and the network connection quality.
[0035] It's important to note that in this step, the edge server calculates a priority score for each vehicle based on its current geographical location (e.g., whether it's within base station coverage area) and network connection quality (e.g., signal-to-noise ratio, bandwidth stability). Vehicles with more stable locations and higher network quality receive higher priority scores. Furthermore, it's worth noting that priority scoring can be implemented using weighted scoring, where geographical location and network quality are scoring factors, and their weights can be adaptively adjusted according to different real-world scenarios.
[0036] Step S402: Assign a corresponding weight percentage to the target vehicle according to the priority.
[0037] It should be noted that in this step, the edge server normalizes the priority score into a weight percentage, ensuring that the sum of the weights of all participating vehicles is 1. The higher the priority of a vehicle, the greater its weight percentage in the model aggregation.
[0038] Step S403: Perform weighted aggregation based on the weight ratio and the model parameters to obtain the updated global model.
[0039] It should be noted that in this step, the edge server performs a weighted summation of the model parameters uploaded by each vehicle according to their respective weight proportions, resulting in an updated global model. This global model will serve as the initial model for the next round of federated learning and will continue to be distributed to vehicles for training. This process is repeated until training converges. In essence, through these steps, this system achieves an efficient federated learning process in the highly mobile environment of connected vehicles.
[0040] This embodiment provides a mobile-aware-based optimization method for vehicular federated learning. The method includes: acquiring vehicle motion state information and network state information; obtaining the target vehicle, model sparsity, and communication bandwidth for federated learning based on the motion state information and network state information; distributing a preset global model and the model sparsity to the target vehicle based on the communication bandwidth, so that the target vehicle sparsifies and updates the global model according to the model sparsity and feeds back the updated target local model parameters; and performing weighted aggregation based on the motion state information, network state information, and model parameters to obtain the updated global model. In summary, this embodiment, through a dynamic mask sparsity training mechanism and a mobile-aware collaborative optimization framework, achieves joint optimization of vehicle selection, sparsity, and bandwidth allocation, solving the problems of unstable training, high latency, and low resource utilization in vehicular federated learning under high vehicle mobility environments, thus improving the efficiency and robustness of vehicular federated learning.
[0041] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 , Figure 3 This is a flowchart illustrating the second embodiment of the vehicle-mounted federated learning optimization method based on mobility perception in this application. Step S20 specifically includes: Step S201: Obtain the optimization problem based on the motion state information and the network state information.
[0042] It should be noted that, as Figure 4 As shown, in this step, the edge server constructs an optimization problem with the goal of minimizing system latency based on the acquired vehicle motion state information (such as position and speed) and network state information (such as network quality). The objective function of this optimization problem is to minimize the latency (including computation latency and communication latency) of all participating vehicles within a given round. The constraints include long-term convergence loss limits, vehicle selection, sparsity range, and bandwidth allocation range.
[0043] Additionally, it should be noted that the vehicle selection variable is a binary integer variable of 0 and 1. A value of 1 indicates that the vehicle is selected in the current round, while a value of 1 indicates that the vehicle is not selected in the current round. Secondly, there is a constraint on the sparsity rate. To ensure the accuracy of model training, the sparsity rate needs to be limited to a reasonable range to prevent excessive performance loss due to excessive sparsity. Furthermore, bandwidth allocation also needs to be limited to a reasonable range; too small a bandwidth allocation will lead to excessively high power allocation. Finally, the number of vehicles selected is also limited to a certain range to ensure that vehicles can complete training in a timely manner.
[0044] Understandably, the purpose of this step is to formalize the dynamic resource allocation problem in connected vehicle federated learning into a solvable mathematical optimization model.
[0045] Step S202: Transform the long-term problem in the optimization problem into a short-term problem according to the preset task queue optimization method, where long-term refers to multiple rounds of training and short-term refers to a single round of training.
[0046] It should be noted that in this step, the original optimization problem is difficult to solve directly because it contains long-term (i.e., multi-round) convergence loss constraints. Therefore, the system uses a pre-defined task queue optimization method (such as Lyapunov optimization) to transform the long-term constraint problem into a short-term problem that can be solved independently in each round. For example, the system preprocesses the original problem using a mini-maximum normalization method. Considering the constraint of long-term convergence loss, the system uses Lyapunov transformation to handle the long-term convergence loss constraint, transforming it into a short-term delay minimization problem.
[0047] In one feasible implementation, step S202 specifically includes: Step A10: Construct a virtual convergence loss queue according to the preset task queue optimization method. The virtual convergence loss queue is used to record the convergence loss changes in each round of training.
[0048] It's important to note that in this step, the edge server maintains a virtual convergence loss queue for each vehicle. This queue records the convergence loss values from historical training rounds. Queues are updated based on the difference between the vehicle's actual convergence loss in each training round and the preset convergence loss target. Through the accumulation of data in the queue, the system can dynamically reflect the long-term trend of convergence loss changes, providing a data foundation for subsequent optimization.
[0049] Additionally, it should be noted that the virtual convergence loss queue is a mathematical tool used to quantify the degree to which long-term constraints are satisfied. A larger queue length indicates a greater cumulative bias in the convergence loss, requiring the system to prioritize adjusting training parameters to reduce this loss.
[0050] Step A20: Calculate the utility loss function based on the virtual convergence loss queue and the preset long-term convergence loss target. The utility loss function represents the difference between the long-term convergence loss and the preset target.
[0051] It should be noted that the utility loss function is calculated based on the current state of the virtual convergence loss queue and the preset long-term convergence loss target. Specifically, the utility loss function is defined as the weighted difference between the queue's accumulated value and the long-term target, reflecting the system's performance deviation under long-term constraints. By minimizing the utility loss function, the system can indirectly control the long-term convergence loss.
[0052] Understandably, the purpose of the utility loss function is to transform long-term constraints into optimizable metrics in each training round, thereby avoiding the direct handling of complex multi-round constraint problems.
[0053] Step A30: Based on the utility loss function and the preset control factor, the long-term problem in the optimization problem is transformed into a short-term problem. The long-term problem is a multi-round training convergence loss constraint problem, and the short-term problem is a single-round training delay minimization problem.
[0054] It's important to note that in this step, the system introduces a pre-defined control factor to balance long-term convergence loss and short-term latency minimization. By incorporating the utility loss function into the optimization objective, the original long-term problem is transformed into a latency minimization problem within a single training round, where the objective function includes a weighted sum of system latency and utility loss terms. This transformation allows the problem to be solved independently in each training round without considering multi-round dependencies. Furthermore, the control factor adjusts the system's emphasis on convergence loss and latency. For example, a larger factor value indicates a greater focus on convergence loss, while a smaller factor value indicates a greater focus on latency optimization.
[0055] Step S203: Decompose the short-term problem into an integer programming problem for target vehicle selection and a continuous variable problem of model sparsity and communication bandwidth according to a preset decomposition method.
[0056] It should be noted that, as Figure 5 As shown, in this step, the short-run problem includes integer variables (vehicle selection) and continuous variables (model sparsity, communication bandwidth), making direct solution difficult. Therefore, the system uses the Benders decomposition method to break the problem down into two sub-problems: the first is an integer programming problem for target vehicle selection, and the second is a continuous variable problem involving model sparsity and communication bandwidth allocation. Understandably, this decomposition effectively decouples the strong coupling between variables, reducing the solution complexity.
[0057] Step S204: Iteratively solve the integer programming problem and the continuous variable problem to obtain the target vehicle, model sparsity, and communication bandwidth participating in federated learning.
[0058] It's important to note that in this step, the system iteratively solves two sub-problems decomposed by the Benders decomposition method: an integer programming problem (involving vehicle selection) and a continuous variable problem (involving model sparsity and communication bandwidth allocation). This iterative process aims to dynamically adjust vehicle selection, sparsity, and bandwidth allocation to minimize system latency while satisfying long-term convergence loss constraints. Specifically, the edge server initializes the optimization problem parameters based on the vehicle's real-time motion state (e.g., position, speed) and network state (e.g., signal quality), and gradually approaches the optimal solution through multiple iterations. Each iteration includes solving the integer programming problem to determine the target vehicle, followed by solving the continuous variable problem to determine the sparsity and bandwidth, and finally calculating the system latency and convergence loss for the current round to assess whether the convergence condition is met. The purpose of this step is to decompose the complex multivariate optimization problem into manageable sub-problems, achieving efficient allocation of system resources through iterative optimization, thereby improving the efficiency and stability of federated learning in dynamic vehicular network environments.
[0059] Additionally, it should be noted that integer programming problems refer to mathematical programming problems where the optimization variables are integers (binary variables in this scheme, representing whether a vehicle is selected); continuous variable problems refer to mathematical problems where the optimization variables are continuous values (such as sparsity and bandwidth). Benders decomposition is a mathematical optimization technique that reduces the solution complexity by decomposing the original problem into a main problem (integer programming) and subproblems (continuous optimization).
[0060] In one feasible implementation, step S204 specifically includes: Step B10: Solve the integer programming problem to obtain the target vehicle for the current iteration round.
[0061] It's important to note that in this step, the system selects a set of target vehicles from all available vehicles to participate in the current round of federated learning training by solving an integer programming problem. The goal of the integer programming problem is to select the combination of vehicles that minimizes system latency while satisfying constraints on the number of vehicles and resource limitations. Specifically, the edge server uses optimization algorithms such as branch and bound to solve for the vehicle selection variable (with values of 0 or 1), where 1 indicates that a vehicle is selected and 0 indicates that it is not selected. During the solution process, the server considers the vehicle's motion state (such as whether the vehicle is in a stable communication area or whether its speed is too high) and network state (such as connection quality) to prioritize vehicles with stable locations and good network conditions. The purpose of this step is to determine the target vehicles through integer programming, providing a basis for subsequent sparsity and bandwidth allocation, thereby reducing the risk of training interruptions caused by vehicle movement.
[0062] Additionally, it should be noted that branch and bound is an algorithm for solving integer programming problems. It reduces computational complexity by systematically enumerating feasible solutions and pruning branches that are not optimal. The vehicle selection variable is a binary variable, and its value directly determines whether a vehicle participates in training.
[0063] Step B20: Solve the continuous variable problem based on the target vehicle to obtain the model sparsity and communication bandwidth for the current iteration round.
[0064] It's important to note that in this step, the system solves a continuous variable problem based on a fixed selection of vehicles to determine the model sparsity and communication bandwidth allocation for each selected vehicle. Model sparsity represents the proportion of model parameters retained, and communication bandwidth represents the uplink resources allocated to the vehicle. The goal of the continuous variable problem is to optimize the sparsity and bandwidth to minimize system latency while satisfying convergence loss and resource constraints. Specifically, the edge server uses convex optimization algorithms (such as gradient descent or interior-point methods) to solve this problem, where the sparsity is limited to a reasonable range (e.g., a minimum sparsity between 1 and 1) to avoid excessive sparsity leading to performance degradation. Communication bandwidth allocation is based on the vehicle's network status and regional communication conditions, estimating the communication rate using Shannon's formula, and ensuring that the bandwidth allocation does not exceed the total available bandwidth. This step aims to adaptively adjust model complexity and communication resources to balance computational overhead, communication overhead, and model accuracy.
[0065] Step B30: Calculate the system latency and convergence loss for the current iteration based on the target vehicle, the model sparsity, and the communication bandwidth.
[0066] It should be noted that in this step, the system calculates the system latency and convergence loss for the current iteration. System latency includes computation latency and communication latency: computation latency is estimated based on the model sparsity rate; the higher the sparsity rate (the more parameters are retained), the greater the computation latency. Communication latency is estimated based on bandwidth allocation and vehicle area communication conditions, using Shannon's formula to calculate the communication rate for different areas and taking the average. The convergence loss is calculated using a pre-derived mathematical expression that considers vehicle speed and the probability of selected vehicles moving out of the communication range; the faster the speed or the more vehicles move out, the greater the convergence loss.
[0067] Additionally, it should be noted that system latency refers to the total training time for a single round of federated learning, determined by the maximum value of the computation and communication latency of all selected vehicles. Convergence loss refers to the accuracy loss during model training due to sparsity and vehicle movement.
[0068] Step B40: When the system latency and the convergence loss match the preset convergence conditions, the target vehicle, model sparsity, and communication bandwidth of the current iteration are used as the target vehicle, model sparsity, and communication bandwidth for participating in federated learning.
[0069] It's important to note that in this step, the system compares the system latency and convergence loss of the current round with preset convergence conditions to determine whether to terminate the iteration. Preset convergence conditions include system latency less than a preset threshold, convergence loss less than a preset upper limit, or the number of iterations reaching a preset target value. If the conditions are met, the target vehicle, model sparsity, and communication bandwidth of the current round are ultimately determined as the parameters for federated learning and distributed to the vehicle for training; otherwise, the iteration process continues, returning to step B10 for the next round of optimization. This step aims to ensure that the optimization results are within acceptable latency and accuracy ranges, enabling efficient federated learning deployment in dynamic environments.
[0070] In this embodiment, the long-term convergence loss constraint is transformed into a short-term latency minimization problem through Lyapunov optimization, and the coupling relationship between vehicle selection (integer variable) and sparsity / bandwidth (continuous variable) is decoupled by Benders decomposition. This achieves joint optimization of dynamic vehicle selection, adaptive sparsity, and bandwidth allocation, solving the problems of high training latency and convergence instability caused by vehicle mobility, and improving the training efficiency and resource utilization of on-vehicle federated learning.
[0071] Based on the first and second embodiments of this application, in the third embodiment of this application, the contents that are the same as or similar to those in the first and second embodiments described above can be referred to the above description and will not be repeated hereafter.
[0072] Based on this, this application provides a mobile-aware-based in-vehicle federated learning optimization method. This mobile-aware-based in-vehicle federated learning optimization method is applied to vehicles. Please refer to [link / reference]. Figure 6 , Figure 6 This is a flowchart illustrating the third embodiment of the vehicle-mounted federated learning optimization method based on motion perception applied to vehicles in this application.
[0073] In this embodiment, the vehicle-mounted federated learning optimization method based on motion perception includes steps S10'~S40': Step S10': Receive the global model and model sparsity sent by the edge server.
[0074] It should be noted that in this step, the vehicle receives the global model and model sparsity from the edge server via the wireless communication module. Specifically, the model sparsity is shown in Formula 1: (Formula 1) in, The sparsity of the model for the k-th car in the r-th training round is a value between the minimum sparsity and the maximum sparsity. The number between 1 and 0 represents the proportion of model parameters retained during local training. It's understandable that the global model distribution ensures all participating vehicles start from the same initial state, and the sparsity of the model controls the number of parameters in each vehicle's local model, thus balancing computation and communication loads and ensuring vehicles can complete subsequent training and uploading processes.
[0075] Step S20': Perform sparsification processing on the global model according to the model sparsity rate to obtain a sparsified local model.
[0076] It's important to note that in this step, the vehicle performs structured sparsity processing on the global model based on the received model sparsity rate, generating a sparsified local model. Specifically, this is achieved by generating a mask vector and applying it to the global model parameters, retaining some parameters while setting others to zero, thereby reducing model complexity and subsequent computational overhead. In essence, this step aims to achieve lightweight local model deployment, reducing the computational burden and communication data volume during training.
[0077] Additionally, it should be noted that a sparse local model refers to a model that has been masked, in which some parameters are retained and some parameters are set to zero, with only a portion retained for subsequent training and transmission.
[0078] In one feasible implementation, step S20' specifically includes: Step S201': Generate a mask vector based on the sparsity of the model. The mask vector is used to indicate the retention and discarding of parameters in the global model.
[0079] It should be noted that in this step, the vehicle will be determined based on the model sparsity. Generate a mask vector, as shown in Formula 2: (Formula 2) in, This represents the mask vector of the k-th vehicle in the r-th round of training. This refers to the total number of parameters in the model. Using this mask, the vehicle can flexibly adjust the model structure to achieve parameter-level sparsity.
[0080] Step S202': Perform sparsification processing on the global model according to the mask vector to obtain a sparsified local model.
[0081] It should be noted that in this step, the vehicle performs element-wise multiplication of the mask vector with the global model parameters to obtain a sparsified local model. Parameters not covered by the mask in this model are set to zero, and only a subset of parameters are retained for subsequent training. Specifically, as shown in Equation 3:
[0082] (Formula 3)
[0083] Understandably, sparsification not only reduces the computational burden of model training, but also reduces the amount of data uploaded to the model, thereby significantly mitigating the risk of transmission failure caused by bandwidth fluctuations or connection interruptions during vehicle movement.
[0084] Step S30': Perform local training on the sparse local model to obtain the updated target local model.
[0085] It should be noted that in this step, the vehicle uses local datasets (such as trajectory and image data collected by onboard sensors) to train the sparse local model, updates the model parameters through gradient descent algorithm, and obtains the optimized target local model.
[0086] In one feasible implementation, step S30' specifically includes: Step S301': Obtain the gradient of the sparse local model on the local dataset.
[0087] It should be noted that in this step, the vehicle first calculates the loss function of the sparse model on the local data during forward propagation, and then calculates the gradient through backpropagation. It is important to note that gradient calculation is only performed on the parameters preserved by the mask; parameters set to zero by the mask do not participate in gradient updates, thus ensuring that the model structure is consistent with the mask.
[0088] Step S302': Update the sparse local model according to the gradient to obtain the updated target local model.
[0089] It's important to note that in this step, the vehicle updates the retained parameters of the sparse local model using an optimization algorithm (such as stochastic gradient descent) based on the calculated gradient. During the update process, the model structure remains constrained by the mask to ensure that sparsity is not compromised. Understandably, the purpose of this step is to actually optimize the model parameters, improve the model's performance on local data, and maintain a lightweight structure.
[0090] Step S40': Upload the model parameters of the target local model to the edge server, so that the edge server can perform weighted aggregation based on the motion state information and the model parameters to obtain the updated global model.
[0091] It should be noted that after the vehicle completes local training, it uploads the parameters of the trained target local model to the edge server. The server then aggregates the received model parameters by assigning different weights based on the vehicle's motion state information (such as position stability and speed) and network status, generating a new global model.
[0092] In one feasible implementation, step S40' specifically includes: Step S401': Obtain the upload time when the model parameters of the target local model are uploaded to the edge server.
[0093] It should be noted that in this step, the vehicle records the time required to completely upload the model parameters. Understandably, the purpose of this step is to assess whether the upload process can be completed within the window of the vehicle maintaining a communication connection, providing a basis for subsequent upload decisions. Additionally, it should be noted that the upload time refers to the time required from the start of transmission to the complete delivery of the model parameters, and is affected by data volume, bandwidth, and signal quality.
[0094] Step S402': When the upload time is less than or equal to the preset waiting time, upload the model parameters of the target local model to the edge server.
[0095] It should be noted that if the upload time does not exceed the server's pre-set waiting time, the vehicle will immediately initiate the model parameter upload process. This step ensures that the model update transmission is completed before the vehicle moves out of communication range, preventing the loss of training results. Additionally, it should be noted that the waiting time is the maximum upload time limit set by the server for each training round, dynamically adjusted based on the vehicle's average dwell time and communication conditions.
[0096] Step S403': When the upload time is greater than the preset waiting time, stop uploading the model parameters of the target local model to the edge server.
[0097] It should be noted that if the upload time exceeds the server's preset waiting time, the vehicle will abandon the upload of model parameters, or the server will ignore the uploaded model parameters to avoid consuming communication resources and failing to complete the transmission. Understandably, this step aims to prevent resource waste caused by transmission interruptions due to vehicle movement, thereby improving overall system efficiency.
[0098] In this embodiment, by dynamically receiving the global model and sparsity rate for local model sparsification, gradient training under mask constraints, and uploading controllable parameters based on upload time, lightweight model training and reliable model updates on the vehicle side are achieved. This solves the problems of communication interruption, model loss, and training instability caused by vehicle mobility in the Internet of Vehicles, and improves the convergence efficiency, resource utilization, and system robustness of federated learning.
[0099] In addition, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the mobile-aware-based vehicular federated learning optimization method described above.
[0100] The computer program product provided in this application can solve the technical problem of improving the efficiency and robustness of in-vehicle federated learning in environments with frequent vehicle movement and unstable network conditions. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the in-vehicle federated learning optimization method based on motion perception provided in the above embodiments, and will not be repeated here.
[0101] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0102] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0103] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0104] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0105] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A vehicle-mounted federated learning optimization method based on motion perception, characterized in that, The mobility-aware-based vehicular federated learning optimization method is applied to an edge server, and the method includes: Acquire vehicle motion status information and network status information; Based on the motion state information and the network state information, the target vehicle, model sparsity, and communication bandwidth participating in federated learning are obtained; The preset global model and the model sparsity are sent to the target vehicle according to the communication bandwidth, so that the target vehicle can perform sparsification processing and update training on the global model according to the model sparsity and feed back the updated model parameters of the target local model. The updated global model is obtained by weighted aggregation based on the motion state information, the network state information, and the model parameters.
2. The method as described in claim 1, characterized in that, The steps of obtaining the target vehicle, model sparsity, and communication bandwidth for federated learning based on the motion state information and the network state information include: The optimization problem is derived based on the motion state information and the network state information; The long-term problem in the optimization problem is transformed into a short-term problem according to the preset task queue optimization method, where long-term refers to multiple rounds of training and short-term refers to a single round of training. According to the preset decomposition method, the short-term problem is decomposed into an integer programming problem for selecting the target vehicle and a continuous variable problem involving model sparsity and communication bandwidth. The integer programming problem and the continuous variable problem are solved iteratively to obtain the target vehicles, model sparsity, and communication bandwidth participating in federated learning.
3. The method as described in claim 2, characterized in that, The step of transforming the long-term problem in the optimization problem into a short-term problem according to the preset task queue optimization method includes: A virtual convergence loss queue is constructed based on a preset task queue optimization method. The virtual convergence loss queue is used to record the convergence loss changes in each round of training. Based on the virtual convergence loss queue and the preset long-term convergence loss target, the utility loss function is calculated, which represents the difference between the long-term convergence loss and the preset target. Based on the utility loss function and the preset control factor, the long-term problem in the optimization problem is transformed into a short-term problem. The long-term problem is a multi-round training convergence loss constraint problem, and the short-term problem is a single-round training latency minimization problem.
4. The method as described in claim 2, characterized in that, The steps of iteratively solving the integer programming problem and the continuous variable problem to obtain the target vehicle, model sparsity, and communication bandwidth for federated learning include: Solve the integer programming problem to obtain the target vehicle in the current iteration round; Solve the continuous variable problem based on the target vehicle to obtain the model sparsity and communication bandwidth for the current iteration round; Based on the target vehicle, the model sparsity, and the communication bandwidth, calculate the system latency and convergence loss for the current iteration. When the system latency and the convergence loss match the preset convergence conditions, the target vehicle, model sparsity, and communication bandwidth of the current iteration are used as the target vehicle, model sparsity, and communication bandwidth for participating in federated learning.
5. The method as described in claim 1, characterized in that, The motion state information includes geographical location, the network state information includes network connection quality, and the step of weighted aggregation based on the motion state information, network state information, and model parameters to obtain the updated global model includes: The priority of the target vehicle is determined based on the geographical location and the network connection quality; The target vehicle is assigned a corresponding weight percentage based on the priority. The updated global model is obtained by weighted aggregation based on the weight ratio and the model parameters.
6. A vehicle-mounted federated learning optimization method based on motion perception, characterized in that, The mobility-aware-based in-vehicle federated learning optimization method is applied to vehicles, and the method includes: Receive the global model and model sparsity sent by the edge server; The global model is sparsified according to the sparsity of the model to obtain a sparsified local model. The sparse local model is trained locally to obtain the updated target local model. The model parameters of the target local model are uploaded to the edge server, so that the edge server performs weighted aggregation based on the motion state information and the model parameters to obtain an updated global model.
7. The method as described in claim 6, characterized in that, The step of sparsifying the global model according to the model sparsity rate to obtain a sparsified local model includes: A mask vector is generated based on the sparsity of the model, and the mask vector is used to indicate the retention and discarding of parameters in the global model; The global model is sparsified based on the mask vector to obtain a sparsified local model.
8. The method as described in claim 6, characterized in that, The step of training the sparse local model locally to obtain the updated target local model includes: Obtain the gradient of the sparse local model on the local dataset; The sparse local model is updated based on the gradient to obtain the updated target local model.
9. The method as described in claim 6, characterized in that, The step of uploading the model parameters of the target local model to the edge server includes: Obtain the upload time when the model parameters of the target local model are uploaded to the edge server; When the upload time is less than or equal to a preset waiting time, the model parameters of the target local model are uploaded to the edge server; If the upload time exceeds a preset waiting time, the upload of the model parameters of the target local model to the edge server is stopped.
10. A vehicle-mounted federated learning optimization system based on motion perception, characterized in that, The mobile-aware-based vehicular federated learning optimization system includes: an edge server and a vehicle, wherein the mobile-aware-based vehicular federated learning optimization method as described in any one of claims 1 to 5 is executed on the edge server, and the mobile-aware-based vehicular federated learning optimization method as described in any one of claims 6 to 9 is executed on the vehicle.