Self-adaptive clustering federal learning method and system based on knowledge distillation

By introducing dual spatiotemporal constraints of macroscopic traffic flow and microscopic vehicle topology into the Internet of Vehicles, and combining graph neural network analysis of microscopic mobility for adaptive clustering, the knowledge distillation loss weights are dynamically adjusted. This solves the problems of insufficient model robustness and personalized accuracy in traditional federated learning, and achieves efficient knowledge transfer and model optimization.

CN121998131APending Publication Date: 2026-05-08HUNAN UNIV OF SCI & TECH
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUNAN UNIV OF SCI & TECH
Filing Date
2026-04-08
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Traditional federated learning in the Internet of Vehicles faces challenges such as ignoring physical mobility leading to unstable clustering structures, neglecting the influence of the macro environment, lacking the introduction of external auxiliary information, privacy and communication bottlenecks, and information silos, resulting in insufficient model robustness and personalized accuracy.

Method used

By introducing dual spatiotemporal constraints of macroscopic traffic flow and microscopic vehicle topology, microscopic mobility is analyzed through graph neural networks, and adaptive clustering is performed by combining low-dimensional feature vectors to dynamically adjust the knowledge distillation loss weights and optimize the knowledge distillation process.

Benefits of technology

It improves the robustness and personalization accuracy of models in highly dynamic scenarios, reduces communication overhead, avoids model oscillations caused by drastic changes in network topology, maximizes knowledge transmission efficiency, and achieves adaptive personalization and consensus.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121998131A_ABST
    Figure CN121998131A_ABST
Patent Text Reader

Abstract

The invention discloses an adaptive clustering federal learning method and system based on knowledge distillation, and the method specifically comprises the steps: enabling each client to use a local data training model, extracting a model low-dimensional feature vector, collecting the position information and speed information at the current moment, and uploading the information to a cloud server; enabling the cloud server to predict the macroscopic traffic flow density, analyzing the microscopic mobility of the client, constructing a space-time-feature joint similarity matrix in combination with the low-dimensional feature vector, and carrying out dynamic clustering division on the client; and on the basis of an edge server corresponding to each cluster obtained after dynamic clustering division, calculating an aggregation weight according to the microscopic mobility of the client, weighting to generate a cluster teacher model, and guiding the clients in the cluster to carry out local training in a manner of dynamically adjusting a knowledge distillation loss weight. According to the method, the distillation process is optimized through space-time prediction, the communication overhead is reduced, and meanwhile, the model robustness and individuation precision in a high-dynamic scene are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle-to-everything (V2X) communication technology, and in particular to an adaptive clustering federated learning method and system based on knowledge distillation. Background Technology

[0002] With the rapid development of intelligent transportation systems, the amount of data generated by the Internet of Vehicles (IoV) is exploding. To utilize this data scattered across vehicle terminals for model training while protecting user privacy, Federated Learning (FL) has become a mainstream solution. Traditional federated learning algorithms (such as FedAvg) attempt to train a single global model to serve all clients. However, directly applying traditional federated learning in real-world IoV scenarios faces significant challenges: 1. Lack of awareness of physical mobility: Existing technologies (including methods based on bidirectional feedback knowledge distillation) mostly cluster based solely on the similarity of model parameters or gradients. In vehicle-to-everything (V2X) systems, two vehicles may have similar data distributions (both recognize traffic signs) but are physically traveling in opposite directions at high speeds. Ignoring this micro-mobility leads to highly unstable cluster structures and frequent breaks in intra-cluster communication links.

[0003] 2. Ignoring the influence of the macro environment: Existing methods do not consider the macro traffic flow environment in which vehicles are located. For example, the vehicle topology in congested road sections is stable, making them suitable for high-intensity knowledge distillation; while in sparse, fast road sections, vehicle interaction times are short. Applying a uniform distillation strategy without differentiation will not achieve optimal convergence.

[0004] 3. Existing solutions that lack creativity often simply adjust the aggregation formula without a mechanism to introduce external auxiliary information (such as traffic prediction) to guide the internal learning process.

[0005] 4. Privacy and Communication Bottlenecks: Existing clustering methods typically rely on exchanging high-dimensional model parameters or gradients to calculate the similarity between clients. This not only consumes valuable vehicle network bandwidth resources, but also poses a serious risk of privacy leakage (such as inferring user data through inference attacks).

[0006] 5. The problem of "information silos": Traditional clustering methods tend to lead to different clusters operating independently, lacking cross-cluster knowledge sharing mechanisms, which makes it impossible for general traffic rules and other global knowledge to be effectively disseminated across the entire network.

[0007] Therefore, there is an urgent need for a new federated learning method that can combine macroscopic traffic flow prediction data with microscopic vehicle movement observation data to optimize the knowledge distillation process. Summary of the Invention

[0008] The purpose of this invention is to provide an adaptive clustering federated learning method and system based on knowledge distillation. By introducing dual spatiotemporal constraints of macroscopic traffic flow and microscopic vehicle topology, it effectively solves the model failure problem caused by traditional methods relying solely on static feature clustering. By using spatiotemporal prediction to optimize the distillation process, it significantly improves the robustness and personalized accuracy of the model in highly dynamic scenarios while reducing communication overhead, thereby solving at least one of the aforementioned problems in the prior art.

[0009] In a first aspect, the present invention provides an adaptive clustering federated learning method based on knowledge distillation, the method specifically comprising: The cloud server initializes the global model and randomly selects clients from the vehicle client pool to participate in this round of training, and then distributes the global model. Based on the global model, each client can train the model using local data, extract low-dimensional feature vectors from the model, and collect the current location and velocity information and upload it to the cloud server. The cloud server uses historical traffic data to predict macroscopic traffic flow density, while using graph neural networks to analyze the microscopic mobility of clients. It combines low-dimensional feature vectors to construct a spatiotemporal-feature joint similarity matrix and uses an adaptive clustering algorithm to dynamically cluster clients. Based on the edge servers corresponding to each cluster obtained after dynamic clustering, the aggregation weight is calculated according to the client's micro-mobility, and a cluster teacher model is generated by weighting. The client within the cluster is guided to perform local training by dynamically adjusting the knowledge distillation loss weight. The cloud server aggregates the cluster teacher models of each edge server, updates the global model with a benchmark reference aggregation mechanism, and distributes the updated global model to the client as a regularization constraint. Iterate through the training process until the global model converges or the preset number of training rounds is reached.

[0010] Secondly, the present invention provides an adaptive clustering federated learning system based on knowledge distillation, the system specifically comprising: The initialization module is used to enable the cloud server to initialize the global model and randomly select clients from the vehicle client pool to participate in this round of training, and then distribute the global model. The local training module is used to enable each client to train the model using local data based on the global model, extract low-dimensional feature vectors of the model, and collect the current position and velocity information and upload it to the cloud server. The spatiotemporal prediction module enables the cloud server to predict macroscopic traffic flow density using historical traffic data, while using graph neural networks to analyze the microscopic mobility of clients, constructing a spatiotemporal-feature joint similarity matrix by combining low-dimensional feature vectors, and using an adaptive clustering algorithm to dynamically cluster and divide clients. The joint clustering module is used to calculate the aggregation weight based on the micro-mobility of the client and generate the cluster teacher model by weighting the edge server corresponding to each cluster obtained after dynamic clustering. It guides the clients within the cluster to perform local training by dynamically adjusting the knowledge distillation loss weight. The model update module is used to enable the cloud server to aggregate the cluster teacher models of each edge server, update the global model with the benchmark reference aggregation mechanism, and distribute the updated global model to the client as a regularization constraint. The iterative training module is used for iterative training until the global model converges or reaches the preset number of training rounds.

[0011] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, and a computer program stored in the memory, wherein when the computer program is executed on the processor, it implements the adaptive clustering federated learning method based on knowledge distillation as described in any of the above methods.

[0012] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the adaptive clustering federated learning method based on knowledge distillation as described in any of the above methods.

[0013] Compared with the prior art, the present invention has at least one of the following technical effects: 1. This invention effectively solves the model failure problem caused by traditional methods relying solely on static feature clustering by introducing dual spatiotemporal constraints of macroscopic traffic flow and microscopic vehicle topology. It optimizes the distillation process using spatiotemporal prediction, significantly improving the robustness and personalized accuracy of the model in high-dynamic scenarios while reducing communication overhead. 2. This invention uses GNN to analyze micro-mobility, enabling the system to predict when a vehicle is about to leave the cluster and reduce its weight in advance during the clustering and aggregation stages, thus avoiding "catastrophic forgetting" or model oscillation caused by drastic changes in network topology. 3. This invention utilizes macroscopic traffic flow prediction, enabling the system to identify high-density stable areas (such as congested intersections) and enhance the intensity of knowledge distillation in these areas, thereby maximizing knowledge transmission efficiency within a limited communication window; 4. Unlike traditional fixed-weight distillation, this invention dynamically adjusts the distillation weight according to the vehicle's movement status, achieving an adaptive balance of "individuality for moving vehicles and consensus for stationary vehicles". 5. This invention introduces external prior knowledge (historical traffic) and real-time graph structure analysis (GNN), adding spatiotemporal constraints of physical space on the basis of traditional feature space clustering. Attached Figure Description

[0014] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0015] Figure 1 This is a flowchart illustrating an adaptive clustering federated learning method based on knowledge distillation, provided in an embodiment of the present invention. Figure 2 This is a flowchart illustrating an adaptive clustering federated learning method based on knowledge distillation, provided in another embodiment of the present invention. Figure 3 This is a schematic diagram of a cloud-edge-device three-layer collaborative architecture provided in an embodiment of the present invention; Figure 4 This is a schematic diagram illustrating the composition of a composite loss function during local training on a client side, according to an embodiment of the present invention. Figure 5 This is a schematic diagram of the structure of an adaptive clustering federated learning system based on knowledge distillation provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0016] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0017] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0018] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0019] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0020] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0021] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0022] In this application embodiment, the entity executing the process includes a terminal device. This terminal device includes, but is not limited to, devices capable of executing the methods disclosed in this application, such as servers, computers, smartphones, and tablets. Figure 1 A flowchart illustrating an embodiment of the adaptive clustering federated learning method based on knowledge distillation disclosed in this invention is shown below in detail: S101 initializes the global model on the cloud server and randomly selects clients from the vehicle client pool to participate in this round of training, and then distributes the global model.

[0023] In this embodiment, during the initialization phase, the cloud server initializes the global model and randomly selects clients from the vehicle client pool to participate in this round of training, and then distributes the global model.

[0024] S102, based on a global model, enables each client to train the model using local data, extract low-dimensional feature vectors from the model, and collect the current location and velocity information, which is then uploaded to the cloud server.

[0025] In this embodiment, during the local feature extraction stage, each client uses local data to train the model, extracts the model's low-dimensional feature vector and the current position and velocity information, and uploads it to the cloud server.

[0026] The specific method for extracting the low-dimensional feature vector of the model is as follows: The client flattens the weight parameters of the last fully connected layer of the local model to form a low-dimensional feature vector; The low-dimensional feature vector is used to characterize the distribution characteristics of the client's local data, and its dimension is much smaller than the dimension of the complete model parameters, so as to reduce communication overhead while protecting data privacy.

[0027] S103 enables the cloud server to predict macroscopic traffic flow density using historical traffic data, while using graph neural networks to analyze the microscopic mobility of clients, combining low-dimensional feature vectors to construct a spatiotemporal-feature joint similarity matrix, and using an adaptive clustering algorithm to dynamically cluster and divide clients.

[0028] In this embodiment, during the macro-micro spatiotemporal prediction and dynamic clustering stages, the cloud server uses historical traffic data to predict macro-level traffic flow density, while simultaneously using graph neural networks (GNNs) to analyze the micro-level mobility of clients. It then constructs a spatiotemporal-feature joint similarity matrix by combining feature vectors and dynamically divides client clusters using an adaptive clustering algorithm.

[0029] The specific steps of the macro- and micro-level spatiotemporal prediction and dynamic clustering include: S1031: Macro forecasting: The cloud server uses a Long Short-Term Memory (LSTM) network to process historical road traffic flow data and predict the macro traffic flow density of the area where each client is currently located within a future time window; S1032: Microscopic Analysis: The cloud server constructs a dynamic vehicle topology map based on the location and speed information uploaded by the client, inputs a graph neural network (GNN) to predict the relative position change of each client in the next moment and the link connection duration, and calculates the microscopic mobility score; S1033: Constructing the joint matrix: Calculate the Mahalanobis distance between any two client feature vectors, and combine the macroscopic traffic flow density and microscopic mobility score to calculate the spatiotemporal correction coefficient. Use the spatiotemporal correction coefficient to weight the Mahalanobis distance and construct the spatiotemporal-feature joint similarity matrix. S1034: Clustering Partition: The affinity propagation (AP) algorithm is used to process the joint similarity matrix to automatically determine the optimal clustering structure that balances data distribution similarity and physical space stability.

[0030] S104, based on the edge servers corresponding to each cluster obtained after dynamic clustering, calculates the aggregation weight according to the client's micro-mobility, generates a cluster teacher model by weighting, and guides the clients within the cluster to perform local training by dynamically adjusting the knowledge distillation loss weight.

[0031] In this embodiment, during the spatiotemporally aware intra-cluster knowledge distillation stage, the edge server calculates the aggregation weights based on the spatiotemporal stability of the client to generate a cluster teacher model; and guides the intra-cluster client to conduct the next round of local training by introducing a knowledge distillation mechanism based on mobility factors, so as to optimize the balance between the global model and the local model.

[0032] The specific method for generating the cluster teacher model is as follows: a weighted median aggregation strategy based on spatiotemporal stability is adopted; specifically, the edge server assigns higher aggregation weights to clients with low mobility and located in macro high traffic areas based on the micro mobility score obtained in step S1032, calculates the weighted median of the model parameters within the cluster, and generates the cluster teacher model to ensure that the teacher model is dominated by the most stable core node within the cluster.

[0033] The knowledge distillation mechanism introduced by the mobility factor specifically refers to dynamically adjusting the temperature coefficient and balance weight in the knowledge distillation loss function during the client-side local optimization process: For clients with high micro-mobility scores who are about to leave the current cluster, the weight of the knowledge distillation loss is reduced to decrease the constraints of the cluster teacher model and allow them to retain more local personalized features; For clients with low micro-mobility scores who are at the center of the cluster, the weight of the knowledge distillation loss is increased and the temperature coefficient is lowered to make them more accurately mimic the behavior of the cluster teacher model.

[0034] S105 enables the cloud server to aggregate the cluster teacher models of each edge server, update the global model with a benchmark reference aggregation mechanism, and distribute the updated global model to the client as a regularization constraint.

[0035] In this embodiment, during the inter-cluster personalized fusion stage, the cloud server collects the cluster models of each edge server, updates the global model using a benchmark reference aggregation mechanism, and distributes the updated global model as a regularization constraint to each client.

[0036] The specific steps of the benchmark reference aggregation mechanism include: the cloud server uses the global model before the update as a benchmark; calculates the knowledge increment of each cluster model relative to the benchmark; allocates aggregation weights according to the performance of each cluster model on the global benchmark, and performs a weighted average of the cluster models to obtain the updated global model.

[0037] S106, iterative training, until the global model converges or the preset number of training rounds is reached.

[0038] In this embodiment, steps S102 to S105 are repeated until the global model converges or the preset number of training rounds is reached.

[0039] As a summary description of the embodiments of steps S101 to S106 above, refer to Figure 2In another possible implementation, the following steps are included: Step 1: Initialization. The cloud server initializes the global model parameters and randomly selects a portion of vehicle clients to participate in this round of training; Step 2: Local Feature and State Extraction. The client extracts low-dimensional feature vectors from the model and simultaneously collects the vehicle's current GPS location, speed, and acceleration information, which is then uploaded to the cloud server. Step 3: Macro- and Micro-Spatiotemporal Prediction and Clustering. The cloud server first uses historical traffic flow data to predict the macro-congestion index of each region through a time series model (such as LSTM); secondly, it constructs a dynamic vehicle map and uses a graph neural network (GNN) to predict the link stability and future trajectory of each vehicle node; finally, it combines feature similarity and spatiotemporal stability to construct a joint affinity matrix and uses the AP algorithm for dynamic clustering. Step 4: Spatiotemporally Aware Knowledge Distillation. When the edge server generates the cluster teacher model, the weight of high-mobility vehicles is reduced; when guiding client training, the weight of the knowledge distillation loss term (regularization coefficient) is dynamically adjusted according to the micro-mobility score, strengthening distillation for stable vehicles and weakening distillation for high-dynamic vehicles to protect their individuality; Step 5: Inter-cluster fusion and update. The cloud server collects updates to the global model from each cluster model based on the benchmark reference aggregation mechanism, and distributes these updates back to the client as regularization constraints; Step 6: Iteration. Repeat the above steps until the model converges.

[0040] In step 2, clustering is performed by replacing the complete model parameters with low-dimensional feature vectors. This significantly reduces communication overhead and effectively reduces the risk of privacy leakage because the feature vectors do not contain information from the model's preceding feature extraction layer.

[0041] In step 3, the AP algorithm can dynamically determine the optimal clustering center and the number of clusters based on the real-time features uploaded in each round, thereby adaptively matching the network topology that is constantly changing due to vehicle movement in the Internet of Vehicles.

[0042] In step 4, the client's local training objective function consists of three parts: cross-entropy loss for fitting local data, knowledge distillation loss (KL divergence) for mimicking the behavior of cluster teacher models, and regularization term for maintaining consistency with the global model.

[0043] In some embodiments, step S101 above, which involves initializing the global model on the cloud server and randomly selecting clients from the vehicle client pool to participate in this round of training, and then distributing the global model, specifically includes: The training cycle is determined by setting the maximum number of training rounds and the convergence threshold of the global model based on the cloud server. The network structure and parameters of the global model are initialized based on task requirements using a cloud server. From the vehicle client pool, clients are randomly selected to participate in this round of training based on their communication and activity status; The network structure and parameters of the initialized global model are encapsulated and sent to the selected client.

[0044] In this embodiment, the cloud server initializes a global deep neural network model. Set the maximum number of training rounds. At the start of each round, the cloud server randomly samples a subset of clients from the currently active set of vehicle clients and applies the current global model. It was distributed to these clients.

[0045] In some embodiments, in step S102 above, the step of enabling each client to train the model using local data based on the global model, extracting low-dimensional feature vectors from the model, and collecting the current location and velocity information and uploading it to the cloud server specifically includes: This allows each client to use its local private dataset to perform multiple rounds of stochastic gradient descent training on the received global model and update the parameters of the local model. The weight parameters of the last fully connected layer are extracted from the trained local model and flattened to form a low-dimensional feature vector representing the local data distribution. At the same time, vehicle state information including latitude and longitude coordinates, instantaneous speed and acceleration are collected in real time through vehicle sensors. The low-dimensional feature vector and vehicle status information are encrypted and encapsulated, and then uploaded to the cloud server.

[0046] In this embodiment, the selected client After receiving the global model, we first use the local dataset to perform several rounds of stochastic gradient descent (SGD) training.

[0047] To support spatiotemporal-aware clustering in the cloud, the client performs the following two operations: 1. Extract the weight vector of the last layer of the model (usually a fully connected layer / classifier head) and flatten it into a one-dimensional vector. ; 2. Collect current vehicle motion status data ,in Latitude and longitude coordinates Instantaneous velocity It is acceleration.

[0048] The client will use the feature vector With motion state data The data is encrypted and uploaded to the cloud server.

[0049] In some embodiments, step S103 above, which involves enabling the cloud server to predict macroscopic traffic flow density using historical traffic data, simultaneously analyzing the microscopic mobility of clients using graph neural networks, constructing a spatiotemporal-feature joint similarity matrix by combining low-dimensional feature vectors, and dynamically clustering clients using an adaptive clustering algorithm, specifically includes: The cloud server inputs historical traffic flow data into the Long Short-Term Memory network model to predict the macroscopic congestion density coefficient of each client's location within a future time window. The cloud server constructs a dynamic vehicle topology map based on the vehicle status information uploaded by the client. The dynamic vehicle topology map is then input into a graph neural network model for analysis to predict the link connection stability of each client and calculate the micro mobility score of each client. Calculate the Mahalanobis distance between any two clients based on low-dimensional feature vectors; Based on Mahalanobis distance, macro-congestion density coefficient and micro-mobility score, a spatiotemporal correction coefficient is calculated, and the Mahalanobis distance is weighted using the spatiotemporal correction coefficient to construct a spatiotemporal-feature joint similarity matrix. Based on the cloud server, the affinity propagation algorithm is used to process the spatiotemporal-feature joint similarity matrix, automatically determine the cluster centers and the number of clusters, and complete the dynamic clustering of the client.

[0050] Furthermore, the process of inputting historical traffic flow data into a long short-term memory network model via the cloud server to predict the macroscopic congestion density coefficient of each client's location within a future time window specifically includes: The cloud server retrieves historical traffic flow time-series data for the target area within a preset time period from the traffic flow database. The historical traffic flow time series data is normalized and aligned to generate preprocessed time series data; The preprocessed time series data is input into the long short-term memory network model, forward inference is performed, and the macroscopic congestion density coefficient of each client's region within a specified future time window is output. The macro-congestion density coefficient is used to characterize the stability of traffic flow in the corresponding area. The higher the macro-congestion density coefficient, the more congested the traffic and the longer the vehicles remain relatively stationary.

[0051] Furthermore, the process involves the cloud server constructing a dynamic vehicle topology map based on vehicle status information uploaded by the client, inputting the dynamic vehicle topology map into a graph neural network model for analysis, predicting the link connection stability of each client, and calculating the micro-mobility score of each client. Specifically, this includes: The cloud server constructs a dynamic vehicle topology graph based on the vehicle status information uploaded by each client, with vehicles as nodes and the relative positional relationships between vehicles as edges. The dynamic vehicle topology map is input into the graph neural network model, and the duration of the link connection between each client node and its neighbor nodes is predicted through graph convolution and aggregation operations. Based on the predicted link connection duration and combined with the client's instantaneous speed, a micro mobility score is calculated. The micro-mobility score is used to characterize the stability of the client's motion state. A higher micro-mobility score indicates stronger client mobility and less stable connection in the dynamic vehicle topology map.

[0052] In this embodiment, after the cloud server collects data from all participating clients, it performs prediction-based dynamic clustering: Sub-step 1: Macro-level traffic flow prediction The cloud server invokes the deployed Long Short-Term Memory (LSTM) network model, inputting the past data of the target region. Historical traffic flow data for each hour; ; Output , representing the macroscopic congestion density coefficient of the road segment where each client is located. The higher the value, the more stable the macroscopic traffic flow and the longer the relative stationary time between vehicles. This represents the traffic flow data from time step t-1 to time step tH.

[0053] Sub-step 2: Micro-level GNN Analysis; Cloud server based on client upload Constructing a dynamic vehicle topology graph V is the set of vertices representing vehicles, and E is the set of edges representing relationships between vehicles, such as their relative positions. The graph structure is then input into a graph neural network (GNN) for link prediction. ; Output micro mobility score The higher the value, the better the vehicle. The more intense the movement or the more likely the vehicle is to break away from the current group (such as overtaking at high speed or leaving an intersection); the lower the value, the more likely the vehicle is following another vehicle or is stationary, making it suitable as a stable source of knowledge. This represents information about the neighboring vehicles of vehicle k.

[0054] Sub-step 3: Construct the spatiotemporal-feature joint similarity matrix; Calculate any two clients similarity between This embodiment introduces a "spatiotemporal correction factor" to weight the traditional feature Mahalanobis distance: ; This represents the weighting coefficient, used to adjust the similarity calculation between the Mahalanobis distance component based on vehicle features and the spatial location and micro-mobility component. The proportion of time, This represents the Mahalanobis distance between vehicle i and vehicle j. This represents the spatial distance between vehicle i and vehicle j. This represents the adjustment coefficient, used to adjust the degree of influence of the micro-mobility score in the calculation. This represents the micromobility score of vehicle i. This represents the micromobility score of vehicle j; Introduced in the formula This means that if either of the two clients is in a highly mobile (unstable) state, their similarity score will be penalized, regardless of how similar their features are, thus avoiding selecting unstable nodes as cluster centers.

[0055] Sub-step 4: Perform clustering Based on the joint similarity matrix mentioned above, the affinity propagation (AP) algorithm is used to generate clustering results, and each cluster is mapped to a logical edge server.

[0056] In some embodiments, in step S104 above, the edge server corresponding to each cluster obtained after dynamic clustering calculates aggregation weights based on the client's micro-mobility, generates a cluster teacher model by weighting the weights, and guides the clients within the cluster to perform local training by dynamically adjusting the knowledge distillation loss weights. Specifically, this includes: The edge server receives the dynamic clustering results and corresponding micro-mobility scores from the cloud server. For each client within the cluster of each edge server, the aggregation weight is calculated based on the micro-mobility score; Using aggregation weights, the local model parameters of each client within the cluster are aggregated using weighted median values ​​to generate a cluster teacher model; Based on the macro-level congestion density coefficient and the micro-level mobility score of each client, a knowledge distillation weight coefficient is calculated for each client. Each edge server distributes the cluster teacher model and the corresponding knowledge distillation weight coefficients to each client within its assigned cluster. Each client, during its local training, uses the cluster teacher model as the supervision target and employs a composite loss function that includes a knowledge distillation loss term weighted by knowledge distillation weight coefficients to update the model.

[0057] Furthermore, the calculation of the aggregation weight based on the micro-mobility score for each client within the cluster of each edge server specifically includes: For each client, the edge server calculates the base weight value based on the inverse of its micromobility score, and sums the base weight values ​​of all clients within the cluster to obtain the normalization factor. Divide the base weight value corresponding to each client by the normalization factor to obtain the aggregate weight of that client; Among them, the aggregation weight is negatively correlated with the micro mobility score; the lower the mobility score of a client, the higher its aggregation weight.

[0058] In this embodiment, in each cluster Internally, the edge server performs the following operations: A. Stability-based weighted aggregation (generative teacher model) Instead of using a simple average or median, edge servers weight the client model based on micro-mobility scores: ; Parameter description: and Both indicate that by traversing the vehicle set We use k and j to calculate the weights, where k and j are the vehicle indices in the vehicle set. For smoothing items. Mobility score. The lower the vehicle's weight (the more stable it is), the greater its weight. This ensures that the cluster teacher model is dominated by the most stable core vehicles within the cluster, filtering out noise from high-speed moving vehicles.

[0059] B. Knowledge distillation of dynamic weights (guided local training); When training locally on the client side, the following composite loss function is minimized: ; in, Represents the composite loss function. Represents cross-entropy loss, Represents the local model Teacher Model Distillation losses between Indicates adjacent loss, The weighting coefficients representing the nearest neighbor loss and the balance coefficients of knowledge distillation. Dynamically adjusted based on macro and micro forecast results: ; Indicates the base weight value. This represents the macroscopic congestion density coefficient.

[0060] Mechanism Explanation: 1. When High (congestion) and At low (vehicle stability) levels, The system significantly increases the difficulty by forcing vehicles to learn from the teacher model in order to quickly reach a consensus. 2. When When the vehicle is moving at high speed or about to leave, By reducing the size of the model, the system allows vehicles to retain more personalized features, avoiding performance degradation caused by forcibly imitating mismatched teacher models.

[0061] In some embodiments, step S105 above, which involves enabling the cloud server to aggregate the cluster teacher models of each edge server, updating the global model using a benchmark reference aggregation mechanism, and distributing the updated global model to the client as a regularization constraint, specifically includes: Based on a cluster teacher model generated by all edge servers collected from cloud servers; The global model trained in the previous round on the cloud server is used as the benchmark model for this round of aggregation. The knowledge increment of each cluster teacher model relative to the benchmark model is calculated, and aggregation weights are assigned to each cluster teacher model according to the size of the knowledge increment. The model with the greater contribution of knowledge increment is assigned a higher weight. The cloud server uses the allocated aggregation weights to perform a weighted average of all cluster teacher models to generate an updated global model. The updated global model is then distributed to each client as a regularization constraint target for each client in subsequent local training.

[0062] In this embodiment, the cloud server collects the cluster models from each edge server, uses the previous global model as a benchmark, calculates the knowledge increment of each cluster, and updates the global model with weighted averages. This serves as the regularization constraint for the next round.

[0063] Reference Figure 3 and Figure 4 The method of the present invention adopts a layered architecture design, including: a vehicle client device, an edge server device, and a cloud server device.

[0064] Specifically, the structural and functional modules of each device are modified as follows: 1. Vehicle Client Apparatus. Deployed on the on-board unit (OBU) of intelligent connected vehicles, the device specifically includes: Data acquisition module: Used to acquire raw driving data and build a local private dataset; State Perception Module: Configured to communicate with the vehicle's GPS and IMU (Inertial Measurement Unit) interfaces, it collects the vehicle's latitude, longitude, instantaneous velocity, and acceleration data in real time and packages them into a state vector. Uploaded to the cloud server; Feature extraction module: Used to extract low-dimensional feature vectors from the model; Dynamic Distillation Training Module: This module is the core of local training. In addition to performing regular gradient descent, it includes a "weight dynamic adjustment unit." This unit receives macroscopic density data from the cloud or edge. And local mobility score Real-time calculation of distillation equilibrium coefficient This allows for dynamic adjustment of the dependence on the cluster teacher model in each round of training.

[0065] 2. Edge Server Apparatus; Deployed in a roadside unit (RSU) or as a cloud logical node, the device specifically includes: Cluster Member Management Module: Maintains the list of clients within the cluster.

[0066] Stability-Aware Aggregation Module: Unlike traditional median aggregation, this module is equipped with a "weight calculation subunit" to receive the mobility scores of each vehicle within the cluster. This module assigns aggregation weights based on the inverse of the mobility score, performs weighted aggregation on the uploaded model parameters, and generates a cluster teacher model dominated by highly stable vehicles.

[0067] Distillation guidance module: Used to distribute the generated cluster teacher model and related control parameters to clients within the cluster.

[0068] 3. Cloud Server Apparatus As the system's global control center, this device specifically includes: Spatiotemporal Prediction Engine: This is the core innovative device of the method of this invention, which includes two parallel processing units: (1) Macro forecasting unit: runs an LSTM network, connects to a traffic flow database, and outputs a regional macro congestion index; (2) Micro-analysis unit: running a graph neural network (GNN), taking a real-time vehicle topology map as input, and outputting individual-level mobility scores.

[0069] Spatiotemporal Joint Clustering Module: Configured to compute the "spatiotemporal-feature joint similarity matrix". This module takes not only feature vectors as input, but also the output of the prediction engine mentioned above. By penalizing the similarity between highly mobile nodes, the AP algorithm is used to achieve dynamic clustering based on physical perception.

[0070] Global Benchmark Aggregation Module: Used to perform global model updates based on benchmark references.

[0071] 4. Collaborative Workflow In the method of the present invention: The state perception module of the vehicle client device digitizes and uploads the motion information of the physical world. The spatiotemporal prediction engine of the cloud server device processes this information to quantify the vehicle's "stability" and "congestion level". The spatiotemporal joint clustering module of the cloud server device uses these quantitative indicators to cluster vehicles that are physically close and have similar states. The edge server device uses stability metrics to generate a noise-resistant teacher model. The dynamic distillation training module of the vehicle client device ultimately determines how much cluster of knowledge to learn adaptively based on its own state, thereby realizing a macroscopically controllable and microscopically adaptive federated learning process.

[0072] In some embodiments, the specific application of the method of the present invention in the traffic sign recognition (TSR) task of the Internet of Vehicles is as follows: In real-world urban traffic environments, the distribution of traffic signs exhibits significant heterogeneity across different areas. For example, city centers primarily feature speed limit and no-stopping signs, while highway areas are dominated by directional and distance warning signs. Furthermore, the movement of vehicles (e.g., slow-moving traffic in congestion vs. high-speed passage) directly impacts the quality of data collection and the stability of model training.

[0073] 1. Model Construction: Lightweight convolutional neural networks (such as MobileNet or ShuffleNet) are selected as the base model to adapt to the computing resource constraints of the vehicle OBU.

[0074] 2. Spatiotemporal perception-based clustering: The vehicle client extracts the output of the pooling layer before the fully connected layer as a feature vector and uploads the speed and location information; Cloud servers combine macro-level forecasting with micro-level analysis to perform clustering.

[0075] Example of results: Cluster A (High-Speed ​​Stable Cluster): Contains vehicles in a convoy that maintains a constant speed while driving on a highway. The GNN determines its topological structure to be stable and assigns it high aggregation weights. Cluster B (Urban Congestion Cluster): Contains low-speed vehicles in the old city area during the morning rush hour (LSTM predicts high density). The system automatically determines that this area is suitable for high-intensity knowledge distillation; Outlier handling: For an ambulance frequently changing lanes and overtaking in urban areas, although its image features belong to the "urban area" category, GNN determines its mobility score. Extremely high (unstable). The system identifies it as a "highly dynamic node" during clustering and does not forcibly include it in the core computation of ClusterB to avoid its unstable parameters from disrupting the cluster teacher model.

[0076] 3. Prediction-driven targeted optimization: ClusterA (High-Speed ​​Stable Cluster): The teacher model generated by the edge server focuses on mastering the "high-speed guide sign" feature. Because the GNN prediction link is stable, the system increases the weight of knowledge distillation. This allows vehicles within the cluster to quickly synchronize their models. ClusterB (Urban Congestion Cluster): LSTM predicts that congestion in this area will last for 1 hour. The system uses this "quiet period" to issue more complex distillation tasks, deeply enhancing its knowledge of "pedestrian avoidance" and "complex intersection instructions".

[0077] 4. Results: Compared with traditional methods, this embodiment improves the recognition rate of high-speed vehicles by about 15% by eliminating noise interference from highly mobile vehicles and using congestion time windows for enhanced training, and improves the model convergence speed by 40% under complex congested road conditions.

[0078] In some embodiments, the focus is on illustrating how the invention handles the dynamic handover of vehicles between different clusters, demonstrating the algorithm's foresight and adaptability.

[0079] Assuming the vehicle Originally located in the "commercial zone" (Cluster 1), it then drove to the "industrial logistics zone" (Cluster 2).

[0080] 1. Before the status change (T wheel): Vehicle Stable training in Cluster1, mobility score Lower, knowledge distillation weight Relatively high.

[0081] 2. Prediction and Intervention (T+k rounds, eve of switchover): GNN Micro-analysis: Cloud servers predict data using GNN. The probability of connection with other neighboring nodes in Cluster1 is rapidly decreasing (it is about to leave), resulting in soft detachment: Before actually leaving, the system reduces the weight of the knowledge distillation terms in its local training. ; Purpose: To prevent When entering a new environment, the system overfits the characteristics of the old environment (Cluster1) to reduce the impact of "negative migration".

[0082] 3. Spatiotemporal reclustering (T+m rounds, switching in progress): Cloud server combination Based on the new location and macro-flow forecast, the affinity matrix is ​​recalculated; System discovery It has entered the coverage area of ​​Cluster 2, and LSTM predicts that Cluster 2 is currently in a period of stable traffic; The system will Mapped to Edge Server 2.

[0083] 4. Adaptive integration (T+n rounds, after switching): In the early stages of entering Cluster2, due to The mobility score is not yet fully stable, so the system assigns it a lower aggregation weight to prevent the old knowledge it carries from polluting the teacher model of Cluster2. along with Stable driving within the industrial zone, As the concentration gradually decreases, the system automatically increases the polymerization weight and distillation intensity to achieve a smooth transition. Summary of results: This invention utilizes the link prediction capability of GNN to achieve a leap from "reactive switching" to "predictive switching", effectively avoiding model accuracy oscillations when vehicles cross domains.

[0084] Reference Figure 5 An embodiment of the present invention provides an adaptive clustering federated learning system 5 based on knowledge distillation, wherein the adaptive clustering federated learning system 5 based on knowledge distillation specifically includes: Initialization module 501 is used to enable the cloud server to initialize the global model and randomly select clients from the vehicle client pool to participate in this round of training, and distribute the global model. The local training module 502 is used to enable each client to train the model using local data based on the global model, extract low-dimensional feature vectors of the model, and collect the current position and velocity information and upload it to the cloud server. The spatiotemporal prediction module 503 is used to enable the cloud server to predict macroscopic traffic flow density using historical traffic data, while using graph neural networks to analyze the microscopic mobility of clients, constructing a spatiotemporal-feature joint similarity matrix by combining low-dimensional feature vectors, and using an adaptive clustering algorithm to dynamically cluster and divide clients. The joint clustering module 504 is used to calculate the aggregation weight based on the micro-mobility of the client for each edge server corresponding to each cluster obtained after dynamic clustering, generate the cluster teacher model by weighting, and guide the clients within the cluster to perform local training by dynamically adjusting the knowledge distillation loss weight. The model update module 505 is used to enable the cloud server to aggregate the cluster teacher models of each edge server, update the global model with the benchmark reference aggregation mechanism, and send the updated global model to the client as a regularization constraint. The iterative training module 506 is used for iterative training until the global model converges or reaches the preset number of training rounds.

[0085] It is understandable that, such as Figure 1 The content of the knowledge distillation-based adaptive clustering federated learning method embodiments shown herein is applicable to this knowledge distillation-based adaptive clustering federated learning system embodiment. The specific functions implemented by this knowledge distillation-based adaptive clustering federated learning system embodiment are as follows: Figure 1 The embodiment of the adaptive clustering federated learning method based on knowledge distillation shown is the same, and the beneficial effects achieved are the same as those described above. Figure 1 The beneficial effects achieved by the knowledge distillation-based adaptive clustering federated learning method embodiment shown are also the same.

[0086] It should be noted that the information interaction and execution process between the above systems are based on the same concept as the method embodiments of the present invention. For details on their specific functions and technical effects, please refer to the method embodiments section, which will not be repeated here.

[0087] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0088] Reference Figure 6 The present invention also provides a computer device 6, including: a memory 602 and a processor 601, and a computer program 603 stored in the memory 602. When the computer program 603 is executed on the processor 601, it implements the adaptive clustering federated learning method based on knowledge distillation as described in any of the above methods.

[0089] The computer device 6 may be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device 6 may include, but is not limited to, a processor 601 and a memory 602. Those skilled in the art will understand that... Figure 6 The computer device 6 is merely an example and does not constitute a limitation on the computer device 6. It may include more or fewer components than shown, or combine certain components, or different components, such as input / output devices, network access devices, etc.

[0090] The processor 601 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0091] In some embodiments, the memory 602 may be an internal storage unit of the computer device 6, such as a hard disk or memory of the computer device 6. In other embodiments, the memory 602 may be an external storage device of the computer device 6, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 6. Further, the memory 602 may include both internal and external storage units of the computer device 6. The memory 602 is used to store the operating system, applications, boot loader, data, and other programs, such as the program code of the computer program. The memory 602 can also be used to temporarily store data that has been output or will be output.

[0092] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the adaptive clustering federated learning method based on knowledge distillation as described in any of the above methods.

[0093] In this embodiment, if the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a photographing device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0094] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0095] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0096] In the embodiments disclosed in this application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0097] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

Claims

1. An adaptive clustering federated learning method based on knowledge distillation, characterized in that, The method specifically includes: The cloud server initializes the global model and randomly selects clients from the vehicle client pool to participate in this round of training, and then distributes the global model. Based on the global model, each client can train the model using local data, extract low-dimensional feature vectors from the model, and collect the current location and velocity information and upload it to the cloud server. The cloud server uses historical traffic data to predict macroscopic traffic flow density, while using graph neural networks to analyze the microscopic mobility of clients. It combines low-dimensional feature vectors to construct a spatiotemporal-feature joint similarity matrix and uses an adaptive clustering algorithm to dynamically cluster clients. Based on the edge servers corresponding to each cluster obtained after dynamic clustering, the aggregation weight is calculated according to the client's micro-mobility, and a cluster teacher model is generated by weighting. The client within the cluster is guided to perform local training by dynamically adjusting the knowledge distillation loss weight. The cloud server aggregates the cluster teacher models of each edge server, updates the global model with a benchmark reference aggregation mechanism, and distributes the updated global model to the client as a regularization constraint. Iterate through the training process until the global model converges or the preset number of training rounds is reached.

2. The method according to claim 1, characterized in that, The process of initializing the global model on the cloud server and randomly selecting clients from the vehicle client pool to participate in this round of training, and then distributing the global model, specifically includes: The training cycle is determined by setting the maximum number of training rounds and the convergence threshold of the global model based on the cloud server. The network structure and parameters of the global model are initialized based on task requirements using a cloud server. From the vehicle client pool, clients are randomly selected to participate in this round of training based on their communication and activity status; The network structure and parameters of the initialized global model are encapsulated and sent to the selected client.

3. The method according to claim 1, characterized in that, The global model-based approach enables each client to train the model using local data, extract low-dimensional feature vectors from the model, and collect current location and velocity information, which is then uploaded to the cloud server. Specifically, this includes: This allows each client to use its local private dataset to perform multiple rounds of stochastic gradient descent training on the received global model and update the parameters of the local model. The weight parameters of the last fully connected layer are extracted from the trained local model and flattened to form a low-dimensional feature vector representing the local data distribution. At the same time, vehicle state information including latitude and longitude coordinates, instantaneous speed and acceleration are collected in real time through vehicle sensors. The low-dimensional feature vector and vehicle status information are encrypted and encapsulated, and then uploaded to the cloud server.

4. The method according to claim 2, characterized in that, The process involves enabling the cloud server to predict macroscopic vehicle flow density using historical traffic data, simultaneously analyzing the microscopic mobility of clients using graph neural networks, constructing a spatiotemporal-feature joint similarity matrix by combining low-dimensional feature vectors, and employing an adaptive clustering algorithm to dynamically cluster and partition clients. Specifically, this includes: The cloud server inputs historical traffic flow data into the Long Short-Term Memory network model to predict the macroscopic congestion density coefficient of each client's location within a future time window. The cloud server constructs a dynamic vehicle topology map based on the vehicle status information uploaded by the client. The dynamic vehicle topology map is then input into a graph neural network model for analysis to predict the link connection stability of each client and calculate the micro mobility score of each client. Calculate the Mahalanobis distance between any two clients based on low-dimensional feature vectors; Based on Mahalanobis distance, macro-congestion density coefficient and micro-mobility score, a spatiotemporal correction coefficient is calculated, and the Mahalanobis distance is weighted using the spatiotemporal correction coefficient to construct a spatiotemporal-feature joint similarity matrix. Based on the cloud server, the affinity propagation algorithm is used to process the spatiotemporal-feature joint similarity matrix, automatically determine the cluster centers and the number of clusters, and complete the dynamic clustering of the client.

5. The method according to claim 4, characterized in that, The process of inputting historical traffic flow data into a long short-term memory network model via a cloud server to predict the macroscopic congestion density coefficient of each client's location within a future time window specifically includes: The cloud server retrieves historical traffic flow time-series data for the target area within a preset time period from the traffic flow database. The historical traffic flow time series data is normalized and aligned to generate preprocessed time series data; The preprocessed time series data is input into the long short-term memory network model, forward inference is performed, and the macroscopic congestion density coefficient of each client's region within a specified future time window is output. The macro-congestion density coefficient is used to characterize the stability of traffic flow in the corresponding area. The higher the macro-congestion density coefficient, the more congested the traffic and the longer the vehicles remain relatively stationary.

6. The method according to claim 4, characterized in that, The process involves the cloud server constructing a dynamic vehicle topology map based on vehicle status information uploaded by the client, inputting the dynamic vehicle topology map into a graph neural network model for analysis, predicting the link connection stability of each client, and calculating the micro-mobility score of each client. Specifically, this includes: The cloud server constructs a dynamic vehicle topology graph based on the vehicle status information uploaded by each client, with vehicles as nodes and the relative positional relationships between vehicles as edges. The dynamic vehicle topology map is input into the graph neural network model, and the duration of the link connection between each client node and its neighbor nodes is predicted through graph convolution and aggregation operations. Based on the predicted link connection duration and combined with the client's instantaneous speed, a micro mobility score is calculated. The micro-mobility score is used to characterize the stability of the client's motion state. A higher micro-mobility score indicates stronger client mobility and less stable connection in the dynamic vehicle topology map.

7. The method according to claim 4, characterized in that, The edge server corresponding to each cluster obtained after dynamic clustering partitioning calculates aggregation weights based on the client's micro-mobility, generates a cluster teacher model using weighted averages, and guides the clients within the cluster to perform local training by dynamically adjusting the knowledge distillation loss weights. Specifically, this includes: The edge server receives the dynamic clustering results and corresponding micro-mobility scores from the cloud server. For each client within the cluster of each edge server, the aggregation weight is calculated based on the micro-mobility score; Using aggregation weights, the local model parameters of each client within the cluster are aggregated using weighted median values ​​to generate a cluster teacher model; Based on the macro-level congestion density coefficient and the micro-level mobility score of each client, a knowledge distillation weight coefficient is calculated for each client. Each edge server distributes the cluster teacher model and the corresponding knowledge distillation weight coefficients to each client within its assigned cluster. Each client, during its local training, uses the cluster teacher model as the supervision target and employs a composite loss function that includes a knowledge distillation loss term weighted by knowledge distillation weight coefficients to update the model.

8. The method according to claim 7, characterized in that, The calculation of aggregation weights for each client within the cluster of each edge server, based on micro-mobility scores, specifically includes: For each client, the edge server calculates the base weight value based on the inverse of its micromobility score, and sums the base weight values ​​of all clients within the cluster to obtain the normalization factor. Divide the base weight value corresponding to each client by the normalization factor to obtain the aggregate weight of that client; Among them, the aggregation weight is negatively correlated with the micro mobility score; the lower the mobility score of a client, the higher its aggregation weight.

9. The method according to claim 8, characterized in that, The process of aggregating the cluster teacher model of each edge server on the cloud server, updating the global model using a benchmark reference aggregation mechanism, and distributing the updated global model to the client as a regularization constraint specifically includes: Based on a cluster teacher model generated by all edge servers collected from cloud servers; The global model trained in the previous round on the cloud server is used as the benchmark model for this round of aggregation. The knowledge increment of each cluster teacher model relative to the benchmark model is calculated, and aggregation weights are assigned to each cluster teacher model according to the size of the knowledge increment. The model with the greater contribution of knowledge increment is assigned a higher weight. The cloud server uses the allocated aggregation weights to perform a weighted average of all cluster teacher models to generate an updated global model. The updated global model is then distributed to each client as a regularization constraint target for each client in subsequent local training.

10. An adaptive clustering federated learning system based on knowledge distillation, characterized in that, The system specifically includes: The initialization module is used to enable the cloud server to initialize the global model and randomly select clients from the vehicle client pool to participate in this round of training, and then distribute the global model. The local training module is used to enable each client to train the model using local data based on the global model, extract low-dimensional feature vectors of the model, and collect the current position and velocity information and upload it to the cloud server. The spatiotemporal prediction module enables the cloud server to predict macroscopic traffic flow density using historical traffic data, while using graph neural networks to analyze the microscopic mobility of clients, constructing a spatiotemporal-feature joint similarity matrix by combining low-dimensional feature vectors, and using an adaptive clustering algorithm to dynamically cluster and divide clients. The joint clustering module is used to calculate the aggregation weight based on the micro-mobility of the client and generate the cluster teacher model by weighting the edge server corresponding to each cluster obtained after dynamic clustering. It guides the clients within the cluster to perform local training by dynamically adjusting the knowledge distillation loss weight. The model update module is used to enable the cloud server to aggregate the cluster teacher models of each edge server, update the global model with the benchmark reference aggregation mechanism, and distribute the updated global model to the client as a regularization constraint. The iterative training module is used for iterative training until the global model converges or reaches the preset number of training rounds.

Citation Information

Patent Citations

  • Multi-layer federated learning scheme based on sampling aggregation optimization

    CN116702881A

  • Personalized federal learning implementation method based on client self-knowledge distillation

    CN119578512A

  • Efficient heterogeneous federated learning method and system based on hybrid distillation, device, and medium

    US20260057246A1