An alliance-based federated learning method, system and device for internet of vehicles
By using a federated learning method for vehicle networking based on alliances, a lightweight alliance model is adaptively formed, which solves the problems of dynamic changes in vehicle data distribution and resource constraints, and achieves high-precision personalized modeling and privacy protection, making it suitable for applications such as autonomous driving.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- QUFU NORMAL UNIV
- Filing Date
- 2026-03-31
- Publication Date
- 2026-06-19
AI Technical Summary
Existing federated learning methods for vehicle-to-everything (V2X) systems struggle to accurately characterize data category distribution features when vehicle data distribution is dynamically changing and unknown, resulting in poor clustering performance. Furthermore, resource-constrained edge vehicle nodes are overburdened by complex computational processes and frequent interactions, failing to effectively support high-reliability applications such as autonomous driving.
We adopt a federated learning approach for vehicle networking based on consortiums. By initializing the global model and updating the local model parameters, we use auxiliary datasets to calculate the relationship between gradient vectors and the number of samples, and adaptively form a lightweight consortium model. This achieves privacy protection and efficient resource utilization without access to the original data.
It enables high-precision personalized modeling in heterogeneous vehicle networking scenarios, ensuring privacy and security, adapting to dynamic environmental changes, reducing resource consumption, improving model prediction accuracy and system robustness, and is suitable for resource-constrained vehicle edge devices.
Smart Images

Figure QLYQS_1 
Figure QLYQS_5 
Figure QLYQS_10
Abstract
Description
Technical Field
[0001] This invention belongs to the field of federated learning technology for connected vehicles, specifically relating to a federated learning method, system, and device for connected vehicles based on consortium. Background Technology
[0002] With the development of sixth-generation mobile communication technology, the Internet of Vehicles (IoV), as a core component of intelligent transportation systems, is accelerating the integration of distributed artificial intelligence technology to support highly reliable applications such as autonomous driving and traffic prediction. Federated learning, due to its ability to collaboratively train machine learning models without uploading raw sensitive data, has become an important paradigm for protecting user privacy and reducing communication overhead in the IoV.
[0003] However, existing methods still have significant shortcomings: most cluster-based personalized federated learning methods require pre-specifying the number of clusters or hierarchical structure, while the distribution of vehicle data in the Internet of Vehicles is dynamically changing and unknown, making it difficult to obtain such prior information, resulting in poor clustering performance;
[0004] Under strict privacy constraints, servers cannot directly access vehicle raw data, and existing solutions lack effective and lightweight mechanisms to accurately characterize the category distribution characteristics of local data for each vehicle, making it difficult to reliably measure data similarity between vehicles.
[0005] Some methods introduce complex computational processes or frequent interactions, significantly increasing the resource burden on vehicle-mounted devices and base stations, and are not suitable for resource-constrained edge vehicle nodes. Summary of the Invention
[0006] The purpose of this invention is to provide a federated learning method, system, and apparatus for vehicle networking based on consortium.
[0007] A federated learning method for vehicle networking based on consortium includes the following steps:
[0008] S1. Initialize the global model and send it to the local models. After receiving the global model, each local model updates its parameters based on the gradient of the local model parameters according to the loss function. Iterate the update process multiple times until the relative change in accuracy of the local model in multiple consecutive rounds is less than the convergence threshold. Then, send the parameters of the local model after multiple rounds of iteration to the global model.
[0009] S2. The global model distributes samples from the auxiliary dataset to the local model, calculates the gradient vector of the local model for each class on the auxiliary dataset, calculates the proportion estimate of each class in each local model based on the relationship between the expected value of the squared gradient vector and the number of samples in each class, and forms a proportion vector of the class distribution of all local models. The proportion vector of the class distribution of all local models is obtained to obtain the approximate data distribution ratio set.
[0010] S3. Mark all local models as unassigned, randomly select one unassigned local model as the current coalition leader, calculate the divergence between the current coalition leader and the approximate data distribution ratio set of all other local models, and then... All local models with a discrete threshold are assigned to the current consortium;
[0011] Select the local model with the largest divergence from the current alliance leader's proportion vector from all unassigned local models as the next alliance leader. Repeat the process of assigning local models to alliances until all local models are assigned. After assignment, all alliances form an alliance set. Build an alliance model based on the alliance set.
[0012] S4. Send the current alliance model to all local models in the alliance. Each local model in the alliance performs a local update and uploads the updated local model to the global model. The global model performs a weighted aggregation of the received local models to obtain the updated alliance model.
[0013] In S3, the divergence of the current alliance leader's data distribution ratio set with other local model approximations is calculated. The specific operation is as follows:
[0014] ,
[0015] in, For divergence, This represents the approximate data distribution ratio of the current alliance leaders. Let i be the data distribution ratio of the local model n, and i be the class. Let i be the i-th value in the vector.
[0016] In S2, the relationship between the expected value of the squared gradient vector and the number of samples in each class is used to calculate the proportion estimate of each class in each local model, specifically:
[0017] ,
[0018] in, This is the proportion estimate of the local model containing category i, where i is the i-th category. This is the gradient vector.
[0019] The relationship between the expected value of the squared gradient vector and the number of samples in each class is as follows:
[0020] The ratio of the expected value of the squared L2 norm of the gradient vectors of different classes is approximately equal to the ratio of the squared number of samples in different classes.
[0021] In S1, local model parameters are updated based on the gradient of the loss function on the local model parameters, specifically as follows:
[0022] ,
[0023] in, and Local model to the 1st Wheel and First The parameter vector of the wheel, For learning rate, For local models The local training target gradient, This is a sample of the local dataset.
[0024] The loss function in S1 is as follows:
[0025] ,
[0026] in, For loss function, Represents the model parameter vector, samples Follows probability distribution , For the indicator matrix, if the sample Category ,but ,on the contrary C represents the tag space. The number of classes above, p represents the probability distribution p that the samples follow. It is to sample Mapped to the first The probability of class label.
[0027] The specific steps for local model updates in each alliance in S4 are as follows:
[0028] ,
[0029] in, In the first The local model parameter vector of vehicles n within the Wheel Alliance m. For the alliance model of alliance m in round t-1, For learning rate, For vehicles The local training target gradient, This refers to local samples drawn uniformly from local data.
[0030] In S4, the global model performs a weighted aggregation of the received local models to obtain the updated federated model. The specific operation is as follows:
[0031] ,
[0032] in, In the first The global model parameter vector of the Wheel of Fortune alliance m, where n is the nth wheel of fortune alliance m. One vehicle, For the alliance The collection of vehicles inside, In the first The local model parameter vector of vehicles n within the Wheel Alliance m. For this is the first The weight of each vehicle, and ;
[0033] After obtaining the updated consortium model, the global model sends it to the corresponding local model consortium member, repeating S1 to S4 until the updated consortium model's prediction accuracy reaches the specified accuracy or the specified number of rounds is completed.
[0034] A federated learning system for connected vehicles based on consortium principles, used to implement the aforementioned federated learning method for connected vehicles based on consortium principles, includes:
[0035] The initialization module initializes the global model and sends it to the local models. After receiving the global model, each local model updates its parameters based on the gradient of the local model parameters according to the loss function. This process is repeated multiple times until the relative change in accuracy of the local model after multiple consecutive iterations is less than the convergence threshold. The parameters of the local model after multiple iterations are then sent to the global model.
[0036] The approximate data evaluation module distributes samples from the auxiliary dataset to the local model from the global model. It calculates the gradient vector of the local model for each class on the auxiliary dataset. Based on the relationship between the expected value of the squared gradient vector and the number of samples in each class, it calculates the proportion estimate of each class in each local model. All proportion estimates of each local model form the proportion vector of the class distribution. By obtaining the proportion vector of the class distribution of all local models, a set of approximate data distribution ratios is obtained.
[0037] The alliance building module marks all local models as unassigned, randomly selects one unassigned local model as the current alliance leader, calculates the divergence between the current alliance leader and the approximate data distribution ratio set of all other local models, and then assigns the divergence... All local models with a discrete threshold are assigned to the current consortium;
[0038] Select the local model with the largest divergence from the current alliance leader's proportion vector from all unassigned local models as the next alliance leader. Repeat the process of assigning local models to alliances until all local models are assigned. After assignment, all alliances form an alliance set. Build an alliance model based on the alliance set.
[0039] The update module sends the current consortium model to all local models in the consortium. Each local model in the consortium performs a local update and uploads the updated local model to the global model. The global model performs a weighted aggregation of the received local models to obtain the updated consortium model.
[0040] A federated learning device for connected vehicles based on consortium includes a processor and a memory, wherein the processor implements a federated learning method for connected vehicles by executing a computer program stored in the memory.
[0041] The beneficial effects of this invention are: it proposes a federated learning framework for heterogeneous vehicle-to-everything (V2X) scenarios, which achieves coordinated optimization of privacy protection, model accuracy, and system efficiency through lightweight distributed evaluation and adaptive clustering mechanisms. Compared with existing technologies, this invention has the following significant advantages:
[0042] (1) Achieve high-precision personalized modeling. By training a dedicated alliance model for vehicle clusters with similar data distribution, the client drift problem in the Non-IID environment is effectively alleviated, and the prediction accuracy and generalization ability of each vehicle-side model are significantly improved, which is especially suitable for safety-critical applications such as autonomous driving.
[0043] (2) Ensuring strict data privacy. The entire process of federation formation and model training does not require access to or transmission of any original vehicle data. It relies solely on model parameters and publicly available auxiliary datasets to infer distribution characteristics, fully meeting the privacy protection principles of federated learning.
[0044] (3) Supports adaptive clustering without prior knowledge. The number of alliances and members are automatically determined by the inherent similarity of the data, without the need to preset the number of clusters or hierarchical structure, which is suitable for heterogeneous data scenarios that are unknown, complex and dynamically changing in real IoV.
[0045] (4) It has low overhead and high feasibility. Distributed evaluation only requires one upload of the pre-trained model and lightweight gradient calculation. The alliance formation algorithm has low complexity, and the overall solution has low communication and computation burden, making it suitable for deployment on resource-constrained vehicle edge devices.
[0046] (5) Adapting to dynamic vehicle networking environments. By periodically reassessing vehicle data distribution and reorganizing the alliance, it is possible to continuously track data evolution trends, maintain long-term model performance stability, and improve system robustness.
[0047] In summary, this invention achieves significant improvements over existing federated learning methods in terms of personalized accuracy, privacy and security, adaptability, resource efficiency, and environmental adaptability, providing an efficient, reliable, and practical distributed learning solution for 6G-enabled intelligent vehicle networks. Detailed Implementation
[0048] To further understand the content of this invention, the invention will be described in detail with reference to the embodiments.
[0049] A federated learning method for vehicle networking based on consortium includes the following steps:
[0050] The application environment of this invention includes a base station and It consists of 10 intelligent connected vehicles, where the set of vehicles is denoted as 1. Vehicles will be divided into A non-overlapping cooperative alliance. Define the set of vehicles. The alliance partition structure is . Indicates alliance The collection of vehicles inside, the collection Depend on The system consists of [number] vehicles. Furthermore, it is assumed that each vehicle can only be assigned to one alliance, and all vehicles participate in alliance assignment; that is, all alliances should satisfy:
[0051] ,
[0052] and ,
[0053] This invention considers a definition in feature space and contain The label space of each class The multi-class classification problem, among which . Represents a specific labeled sample. Function Will Mapped to a probability vector ,in This invention employs the cross-entropy loss function, defined as follows:
[0054] ,
[0055] in, For the loss function, the sample Follows probability distribution W represents the model parameter vector. For the indicator matrix, if the sample Category ,but ,on the contrary . It is to sample Mapped to the first The probability of class label, where C is the label space. The number of classes, p, indicates that the samples follow a probability distribution p.
[0056] Assuming the vehicle have One training data set: .vehicle Local training objective definition as follows:
[0057] ,
[0058] This invention aims to improve the local model prediction accuracy and reduce model training loss for all vehicles by applying multiple consortium models. Specifically, the distributed optimization model for each consortium is as follows:
[0059] ,
[0060] Its satisfaction
[0061] ,
[0062] make and They represent the first time. The global model parameter vector of the wheel alliance m and the local model parameter vector of the vehicles n within alliance m. It is the first The weight of each vehicle, where and .
[0063] The main steps include global model broadcasting, local model training, data distribution evaluation, adaptive alliance formation, alliance model collaborative training, and dynamic alliance reorganization.
[0064] The entire learning process is carried out in cycles, and the specific implementation is as follows:
[0065] S1. Initialize the global model and send it to the local models. After receiving the global model, each local model updates its parameters based on the gradient of the local model parameters according to the loss function. This process is repeated multiple times until the relative change in accuracy of the local model after multiple consecutive iterations is less than the convergence threshold. The parameters of the local model after multiple iterations are then sent to the global model.
[0066] At the start of a cycle, the base station broadcasts the initialized global model parameters to the local models of all available vehicles. The initial model can be randomly generated by the base station. After receiving the global model, each vehicle initializes its local model using the initialized global model. Furthermore, each vehicle's local model updates its pre-trained parameters using stochastic gradient descent on its local private dataset, specifically as follows:
[0067] ,
[0068] in, and Local model to the 1st Wheel and First The parameter vector of the wheel, For learning rate, For local models The local training target gradient, This is a sample of the local dataset.
[0069] The vehicle's local model undergoes multiple rounds of iterative training until it converges. This invention uses the relative change in accuracy during the iteration process to determine whether the model has converged. The formula for the relative change in accuracy is as follows:
[0070] ,
[0071] in, and The test accuracy is t+1 and t respectively. To more accurately determine the model convergence, the relative change of multiple iterations can be continuously monitored. If the relative change of the accuracy of the local vehicle model on the validation set for multiple consecutive iterations is less than the set threshold, the model is considered to have converged. At this point, the converged local model parameters are uploaded to the global model of the base station.
[0072] S2. The global model distributes samples from the auxiliary dataset to the local model, calculates the gradient vector of the local model for each class on the auxiliary dataset, calculates the proportion estimate of each class in each local model based on the relationship between the expected value of the squared gradient vector and the number of samples in each class, and forms a proportion vector of the class distribution of all local models. The proportion vector of the class distribution of all local models is obtained to obtain the approximate data distribution ratio set.
[0073] This invention assumes that the base station holds a small-scale, class-balanced auxiliary dataset covering all categories involved in the task, used to support the estimation of the distribution of vehicle-local model data. Importantly, this auxiliary dataset is completely independent of the private data of the participating vehicles and does not contain user-sensitive information, thus strictly adhering to privacy protection principles. In practical vehicle-to-everything (V2X) deployments, such auxiliary datasets can be constructed using the following system-level methods:
[0074] (1) Small amounts of samples can be collected periodically from roadside units (RSUs) or fixed cameras and labeled;
[0075] (2) Use publicly available datasets or labeled samples provided by partner institutions;
[0076] (3) Lightweight pseudo-labels are generated using a vehicle-side self-monitoring method and filtered by the server.
[0077] Since the auxiliary dataset is only used to estimate the proportion of each class, its overall size can usually be controlled within a few hundred samples, which makes the annotation and maintenance costs controllable and can be completed in one go in practical engineering applications.
[0078] By inputting auxiliary data samples into the local model uploaded by the vehicle, the gradient vector of the auxiliary data relative to the corresponding category can be obtained.
[0079] The gradient vector of the local model n uploaded by the vehicle can be represented as:
[0080]
[0081] in, With category Related.
[0082] The following theorem can be used to convert the gradient vector to the class ratio.
[0083] Theorem: When training a deep neural network for a classification task, the expected value of the squared gradient vector is related to the number of samples in each class as follows:
[0084] The ratio of the expected value of the squared L2 norm of the gradient vectors of different classes is approximately equal to the ratio of the squared number of samples in different classes.
[0085] The formula is expressed as: ,
[0086] and They are categories and categories The number of samples, of which, and .
[0087] Based on this relationship, this invention calculates the proportion estimate of each class in each local model based on the relationship between the expected value of the squared gradient vector and the number of samples in each class, specifically as follows:
[0088] ,
[0089] in, This is the proportion estimate of the local model containing category i, where i is the i-th category. This is the gradient vector.
[0090] Each local model's proportion estimates form a proportion vector representing the class distribution. To fit the vehicle Furthermore, by obtaining the proportion vectors of the distribution of all local model categories, the approximate data distribution ratio set of all vehicles in the connected vehicle vehicle set N is calculated. This will serve as the basis for subsequent alliance divisions.
[0091] S3. Mark all local models as unassigned, randomly select one unassigned local model as the current coalition leader, calculate the divergence between the current coalition leader and the approximate data distribution ratio set of all other local models, and then... All local models with a discrete threshold are assigned to the current consortium;
[0092] Select the local model with the largest divergence from the current alliance leader's proportion vector from all unassigned local models as the next alliance leader. Repeat the process of assigning alliances to local models until all local models are assigned. After assignment, all alliances form an alliance set, and an alliance model is built based on the alliance set.
[0093] The local model performs adaptive coalition processing. First, a discreteness threshold θ is preset, and all local models of all vehicles are marked as unassigned. Then, an unassigned local model is randomly selected as the current coalition leader. The divergence between the current coalition leader and the approximate data distribution ratio set of all other unassigned local models is calculated.
[0094] ,
[0095] in, For divergence, This represents the approximate data distribution ratio of the current alliance leaders. Let i be the data distribution ratio of the local model n, and i be the class. Let i be the i-th value in the vector.
[0096] Will satisfy The vehicle local model n is assigned to the current alliance; then, from the unassigned vehicle local models, the vehicle with the largest divergence from the set of ratios of the current alliance leader category is selected as the next alliance leader. This process is repeated until all local models are assigned, forming the alliance partitioning structure. For each alliance The global model coordinates the local models of its member vehicles to collaboratively train a dedicated alliance model.
[0097] S4. Send the current alliance model to all local models in the alliance. Each local model in the alliance performs a local update and uploads the updated local model to the global model. The global model performs a weighted aggregation of the received local models to obtain the updated alliance model.
[0098] In each training round t, the current alliance model will be... Broadcast to All local models in the system; local models in each consortium Perform E local model updates using local private data: ,
[0099] in, In the first The local model parameter vector of vehicles n within the Wheel Alliance m. For the alliance model of alliance m in round t-1, For learning rate, For vehicles The local training target gradient, This refers to local samples drawn uniformly from local data.
[0100] Updated local model Uploaded to the base station, the base station performs model aggregation and obtains a new consortium model:
[0101] ,
[0102] in, In the first The global model parameter vector of the Wheel of Fortune alliance m, where n is the nth wheel of fortune alliance m. One vehicle, For the alliance The collection of vehicles inside, In the first The local model parameter vector of vehicles n within the Wheel Alliance m. For this is the first The weight of each vehicle, and ;
[0103] After obtaining the updated consortium model, the global model sends it to the corresponding local model consortium member, repeating S1 to S4 until the updated consortium model's prediction accuracy reaches the specified accuracy or the specified number of rounds is completed.
[0104] Considering the highly dynamic nature of the connected vehicle scenario—vehicles constantly entering and leaving network coverage areas, frequently changing geographical locations, and data distribution potentially drifting due to changes in driving habits or environment—steps 1 to 3 are re-executed every preset training period to re-divide the alliance based on the latest local data distribution of the vehicles, thus adapting to the time-varying characteristics of data distribution in the connected vehicle environment.
[0105] The above describes the specific implementation process of this invention, through which a privacy-protecting, adaptive, and high-precision personalized federated learning scheme for heterogeneous vehicle networks is realized.
[0106] A federated learning system for connected vehicles based on consortium principles, used to implement the aforementioned federated learning method for connected vehicles based on consortium principles, includes:
[0107] The initialization module initializes the global model and sends it to the local models. After receiving the global model, each local model updates its parameters based on the gradient of the local model parameters according to the loss function. This process is repeated multiple times until the relative change in accuracy of the local model after multiple consecutive iterations is less than the convergence threshold. The parameters of the local model after multiple iterations are then sent to the global model.
[0108] The approximate data evaluation module distributes samples from the auxiliary dataset to the local model from the global model. It calculates the gradient vector of the local model for each class on the auxiliary dataset. Based on the relationship between the expected value of the squared gradient vector and the number of samples in each class, it calculates the proportion estimate of each class in each local model. All proportion estimates of each local model form the proportion vector of the class distribution. By obtaining the proportion vector of the class distribution of all local models, a set of approximate data distribution ratios is obtained.
[0109] The alliance building module marks all local models as unassigned, randomly selects one unassigned local model as the current alliance leader, calculates the divergence between the current alliance leader and the approximate data distribution ratio set of all other local models, and then assigns the divergence... All local models with a discrete threshold are assigned to the current consortium;
[0110] Select the local model with the largest divergence from the current alliance leader's proportion vector from all unassigned local models as the next alliance leader. Repeat the process of assigning local models to alliances until all local models are assigned. After assignment, all alliances form an alliance set. Build an alliance model based on the alliance set.
[0111] The update module sends the current consortium model to all local models in the consortium. Each local model in the consortium performs a local update and uploads the updated local model to the global model. The global model performs a weighted aggregation of the received local models to obtain the updated consortium model.
[0112] A federated learning device for connected vehicles based on consortium includes a processor and a memory, wherein the processor implements a federated learning method for connected vehicles by executing a computer program stored in the memory.
Claims
1. A coalition-based federated learning method for vehicle-to-everything (V2X), characterized in that, Includes the following steps: S1. Initialize the global model and send it to the local models. After receiving the global model, each local model updates its parameters based on the gradient of the local model parameters according to the loss function. Iterate the update process multiple times until the relative change in accuracy of the local model in multiple consecutive rounds is less than the convergence threshold. Then, send the parameters of the local model after multiple rounds of iteration to the global model. S2. The global model distributes samples from the auxiliary dataset to the local model, calculates the gradient vector of the local model for each class on the auxiliary dataset, calculates the proportion estimate of each class in each local model based on the relationship between the expected value of the squared gradient vector and the number of samples in each class, and forms a proportion vector of the class distribution of all local models. The proportion vector of the class distribution of all local models is obtained to obtain the approximate data distribution ratio set. The auxiliary dataset is constructed by periodically collecting and labeling a small number of samples using a fixed camera. In S2, the relationship between the expected value of the squared gradient vector and the number of samples in each class is used to calculate the proportion estimate of each class in each local model, specifically: , wherein, is a proportion estimate of local models of class i, i being the i-th class, is a gradient vector; The relationship between the expected value of the squared gradient vector and the number of samples in each class is as follows: The ratio of the expected value of the squared L2 norm of the gradient vectors of different classes is approximately equal to the ratio of the squared number of samples in different classes; S3. Mark all local models as unassigned, randomly select one unassigned local model as the current coalition leader, calculate the divergence between the current coalition leader and the approximate data distribution ratio set of all other local models, and then... All local models with a discrete threshold are assigned to the current consortium; Select the local model with the largest divergence from the current alliance leader's proportion vector from all unassigned local models as the next alliance leader. Repeat the process of assigning local models to alliances until all local models are assigned. After assignment, all alliances form an alliance set. Build an alliance model based on the alliance set. In S3, the divergence of the current alliance leader's data distribution ratio set with other local model approximations is calculated. The specific operation is as follows: , in, For divergence, This represents the approximate data distribution ratio of the current alliance leaders. Let i be the data distribution ratio of the local model n, and i be the class. Let i be the i-th value in the vector; S4. Send the current alliance model to all local models in the alliance. Each local model in the alliance performs a local update and uploads the updated local model to the global model. The global model performs a weighted aggregation of the received local models to obtain the updated alliance model.
2. The federated learning method for vehicle networking based on consortium as described in claim 1, characterized in that, In S1, local model parameters are updated based on the gradient of the loss function on the local model parameters, specifically as follows: , in, and Local model to the 1st Wheel and First The parameter vector of the wheel, For learning rate, For local models The local training target gradient, This is a sample of the local dataset.
3. The alliance-based federated learning method for Internet of Vehicles according to claim 1, characterized in that, The loss function in S1 is as follows: , in, For loss function, Represents the model parameter vector, samples Follows probability distribution , For the indicator matrix, if the sample Category ,but ,on the contrary C represents the tag space. The number of classes above, p represents the probability distribution p that the samples follow. It is to sample Mapped to the first The probability of class label.
4. The alliance-based federated learning method for Internet of Vehicles according to claim 1, characterized in that, The specific steps for local model updates in each alliance in S4 are as follows: , in, In the first The local model parameter vector of vehicles n within the Wheel Alliance m. For the alliance model of alliance m in round t-1, For learning rate, For vehicles The local training target gradient, This refers to local samples drawn uniformly from local data.
5. The federated learning method for vehicle networking based on consortium as described in claim 1, characterized in that, In S4, the global model performs a weighted aggregation of the received local models to obtain the updated federation model. The specific operation is as follows: , in, In the first The global model parameter vector of the Wheel of Fortune alliance m, where n is the nth wheel of fortune alliance m. One vehicle, For the alliance The collection of vehicles inside, In the first The local model parameter vector of vehicles n within the Wheel Alliance m. For this is the first The weight of each vehicle, and ; After obtaining the updated consortium model, the global model sends it to the corresponding local model consortium member, repeating S4 until the updated consortium model's prediction accuracy reaches the specified accuracy or the specified number of rounds is completed.
6. A federated learning system for connected vehicles based on consortium, used to implement the federated learning method for connected vehicles based on consortium as described in any one of claims 1-5, characterized in that, include: The initialization module initializes the global model and sends it to the local models. After receiving the global model, each local model updates its parameters based on the gradient of the local model parameters according to the loss function. This process is repeated multiple times until the relative change in accuracy of the local model after multiple consecutive iterations is less than the convergence threshold. The parameters of the local model after multiple iterations are then sent to the global model. The approximate data evaluation module distributes samples from the auxiliary dataset to the local model from the global model. It calculates the gradient vector of the local model for each class on the auxiliary dataset. Based on the relationship between the expected value of the squared gradient vector and the number of samples in each class, it calculates the proportion estimate of each class in each local model. All proportion estimates of each local model form the proportion vector of the class distribution. By obtaining the proportion vector of the class distribution of all local models, a set of approximate data distribution ratios is obtained. The alliance building module marks all local models as unassigned, randomly selects one unassigned local model as the current alliance leader, calculates the divergence between the current alliance leader and the approximate data distribution ratio set of all other local models, and then assigns the divergence... All local models with a discrete threshold are assigned to the current consortium; Select the local model with the largest divergence from the current alliance leader's proportion vector from all unassigned local models as the next alliance leader. Repeat the process of assigning local models to alliances until all local models are assigned. After assignment, all alliances form an alliance set. Build an alliance model based on the alliance set. The update module sends the current consortium model to all local models in the consortium. Each local model in the consortium performs a local update and uploads the updated local model to the global model. The global model performs a weighted aggregation of the received local models to obtain the updated consortium model.
7. A federated learning device for vehicle networking based on consortium, characterized in that, It includes a processor and a memory, wherein the processor executes a computer program stored in the memory to implement a federated learning method for vehicle networking as described in any one of claims 1-5.