A method for intelligent and secure sharing of vehicle-road collaborative data

By using information entropy to filter key data, detect malicious models, and perform dynamic mutual distillation and weighted aggregation, the problems of low model accuracy and high communication overhead caused by heterogeneous data in the Internet of Vehicles are solved, and efficient and safe vehicle collaborative training is achieved.

CN118509825BActive Publication Date: 2025-10-03CHONGQING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410646235.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-23
Publication Date
2025-10-03
Estimated Expiration
2044-05-23

AI Technical Summary

Technical Problem

In the Internet of Vehicles scenario, heterogeneous data between vehicles leads to low model accuracy, high model sharing communication overhead, and the problem of label flipping attacks in federated learning.

Method used

Through local data selection based on information entropy, malicious model detection based on model scoring and gradient, local mutual distillation of dynamic knowledge and weighted knowledge aggregation of federated distillation, data cleaning, malicious vehicle detection and collaborative training between vehicles are achieved.

Benefits of technology

It improves the generalization ability of the model, reduces communication resource overhead, prevents malicious attacks, and improves the accuracy and security of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118509825B_ABST
    Figure CN118509825B_ABST
Patent Text Reader

Abstract

The present invention relates to a method for intelligent and secure sharing of vehicle-road collaborative data, and belongs to the field of mobile communication technology. First, local redundant data and noise data are screened to avoid overfitting. Secondly, a malicious model detection scheme is designed to provide a defense method against label flipping attacks; then, a pre-learning scheme based on dynamic mutual distillation technology is established to improve the generalization ability of the model and reduce the communication load; finally, a personalized aggregation strategy based on CAV is proposed. After the last CAV mutual distillation is completed, the final mutual distillation model is broadcast to all remaining CAVs, and the CAVs evaluate the accuracy of the mutual distillation model and the local training model based on their respective local data sets. It is used to solve the problems of low model accuracy caused by heterogeneous data in the Internet of Vehicles scenario, high model sharing communication overhead, and label flipping attacks on federated learning. This solution improves the generalization ability of the model and maximizes sharing efficiency under the premise of ensuring safe and low-load CAV collaborative training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of mobile communication technology and relates to a method for intelligent and secure sharing of vehicle-road collaborative data. Background Art

[0002] The connected vehicle (IoV) system leverages wireless communication technology to enable onboard devices in connected and automated vehicles (CAVs) to effectively utilize all CAV dynamic information on the information network platform. Vehicle service providers and intelligent transportation solution providers rely on roadside units (RSUs) or base stations (BSs) to collect large-scale, bottom-up perception data. They then use machine learning algorithms to provide a variety of functional services during CAV operation, such as autonomous driving and personalized training tasks like traffic sign recognition. According to statistics, CAVs in IoV scenarios can collect up to 10TB of data per day. This image data is often sequential, with the order of images dependent on the vehicle's travel trajectory and time of day. There is a significant overlap within the time period, resulting in large data volumes and high overlap. Furthermore, centralized machine learning requires a large amount of transmitted data, resulting in significant communication overhead and difficulties in ensuring privacy and data security.

[0003] In federated learning (FL), a model service provider sends trained models to devices for local training. Devices do not need to send private local training data. Instead, they upload updated model parameters to the service provider for integration to produce a better prediction model. This ensures data privacy and increases the willingness of untrusted parties to participate in federated learning. However, due to the dynamic nature of the Internet of Vehicles (IoV), different CAVs operate in different environments and have different data collection preferences. This statistically demonstrates that data is non-independent and identically distributed (Non-IID). In the FL process, this characteristic causes local models with the same initial parameters to converge to different models, slowing convergence during federated aggregation and reducing global model accuracy. Furthermore, the federated learning mechanism also opens the door to attackers. Malicious actors can contaminate the entire federated learning system by sending malicious model updates. These malicious models may introduce errors into the global model or degrade model performance, thereby affecting the accuracy and reliability of the system.

[0004] Knowledge Distillation (KD) optimizes models by allowing student models to learn the knowledge shared by teacher models, reducing resource requirements for model computation, transmission, and storage. In the KD-based Mutual Knowledge Distillation (MKD) method, the student model and teacher model learn from each other to more fully acquire knowledge. Because knowledge, rather than local training data, is transferred between the student and teacher models, this concept aligns closely with the premise of privacy protection in federated learning. Based on this, Federated Distillation (FD) has been proposed as a new, communication-efficient federated learning method. Because the parameters occupied by model outputs are far fewer than those occupied by model weights, the network resources consumed when sharing model output knowledge are far less than those consumed when sharing model weights, reducing the number of parameters shared per round and lowering the communication load. However, due to the non-independent and identically distributed data between devices, federated learning performance will decline and generalization capabilities will be insufficient. Summary of the Invention

[0005] In view of this, the purpose of the present invention is to provide a method for intelligent and secure sharing of vehicle-road collaborative data, which is used to solve the problems of low model accuracy caused by heterogeneous data in the Internet of Vehicles scenario, high model sharing communication overhead, and label flipping attacks on federated learning.

[0006] In order to achieve the above object, the present invention provides the following technical solutions:

[0007] In a first aspect, embodiments of the present invention implement vehicle data cleaning and malicious vehicle detection based on network scenario characteristics, and simultaneously implement collaborative training and data sharing for Internet of Vehicles based on federated two-layer knowledge distillation. The method includes the following steps:

[0008] S1: Local data selection process based on information entropy;

[0009] S2: Malicious model detection scheme based on model scoring and model gradient;

[0010] S3: Local mutual distillation scheme based on dynamic knowledge;

[0011] S4: Weighted knowledge aggregation scheme based on federated distillation.

[0012] On the second aspect, an embodiment of the present invention proposes a local data selection process based on information entropy in S1. The local data of the CAV is collected by a built-in camera. In a short period of time, the environment in which the CAV is located does not change drastically, and its data deviation mainly comes from time, resulting in a large amount of data and high overlap. Repeated data can easily cause overfitting when training the model, and the generalization ability is insufficient. At the same time, different CAVs are located in different road environments, which makes their perception data heterogeneous, and thus makes it impossible to achieve the expected learning effect. In the present invention, valuable data often has sufficient information, that is, high information entropy, but needs to be further distinguished from noise data. Since noise data accounts for a small proportion of the overall data, normal samples above the information entropy threshold are considered to be valuable data, and other low-value data are filtered out.

[0013] On the third aspect, an embodiment of the present invention proposes a malicious model detection scheme based on model scoring and model gradient in S2. In the vehicle-road cooperative data sharing architecture established by the present invention, there are multiple CAVs in the coverage area of ​​an RSU, among which there are some malicious CAVs, and their attack method is label flip (LF) attack. The malicious CAV flips the labels of certain data from the original class to the target class, and at the same time trains a local model in the abnormal data set and uploads it, resulting in a decrease in the accuracy of the aggregated global model. In the present invention, malicious CAVs are detected by calculating the gradient of the output layer of the model. This is because each malicious CAV flips the same original class label, resulting in similar model gradients, while the heterogeneous data of normal CAVs results in different gradients. Specifically, after the RSU calculates the CAV gradient, it obtains two class sets through the K-means clustering algorithm, and then filters out malicious CAVs based on the inverse density value, the number of elements in the cluster and the model score.

[0014] Fourthly, in S3, an embodiment of the present invention proposes a local mutual distillation scheme based on dynamic knowledge. Without data sharing, the local heterogeneous data between CAVs leads to different gradient directions for each model. Aggregating models with different divergent directions may offset each other's model gradients, thereby reducing overall model accuracy. In this invention, the RSU uses a hierarchical clustering algorithm to cluster models with large gradient differences and notifies the CAV to perform local mutual distillation. The CAV transfers the model based on the scoring order, and adjacent trained models perform mutual distillation. During this process, the mutual distillation mode changes dynamically as privacy is improved.

[0015] Fifthly, in S4, an embodiment of the present invention proposes a weighted knowledge aggregation scheme based on federated distillation. In the IoV scenario of the present invention, CAVs have varying locations and computing power, and malicious clients exist, resulting in varying model contributions. In this embodiment, the RSU uses the distance between CAVs and RSUs and CAV model score data as aggregation weights, taking into account the CAV's location information, honesty value, and contribution, ensuring a high-quality, secure, and efficient aggregation process.

[0016] The beneficial effects of the present invention are as follows: First, the present invention filters key information and removes non-critical data based on the information entropy of the CAV local data to avoid overfitting of the training model. Secondly, a malicious model detection solution based on model scoring and model gradient is provided on the RSU side to reduce the impact of malicious models on the aggregation effect. After that, a mutual distillation strategy between CAVs is designed to promote the mutual fusion of CAV models, so that the model learns different features from different CAVs, preventing the reduction of model accuracy caused by data heterogeneity. Finally, a personalized FD method is used to reduce communication resource overhead and training time, thereby improving model accuracy.

[0017] Other advantages, objects, and features of the present invention will be described in part in the following description and, in part, will be apparent to those skilled in the art upon examination of the following description or may be learned from practice of the present invention. The objects and other advantages of the present invention may be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below with reference to the accompanying drawings, in which:

[0019] Figure 1 This is a diagram of the vehicle-road collaborative data sharing architecture;

[0020] Figure 2 This is a timing diagram of collaborative training based on mutual distillation;

[0021] Figure 3 Execute the flowchart for the privacy protection and attack defense algorithm of vehicle-road collaboration. DETAILED DESCRIPTION

[0022] The following describes the embodiments of the present invention by means of specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and the following embodiments and features in the embodiments can be combined with each other without conflict.

[0023] Among them, the accompanying drawings are only for illustrative purposes and represent only schematic diagrams rather than actual pictures, and should not be understood as limiting the present invention. In order to better illustrate the embodiments of the present invention, some parts of the accompanying drawings may be omitted, enlarged or reduced, and do not represent the dimensions of actual products. For those skilled in the art, it is understandable that some well-known structures and their descriptions may be omitted in the accompanying drawings.

[0024] The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar parts; in the description of the present invention, it should be understood that if there are terms such as "upper", "lower", "left", "right", "front", "back", etc. indicating directions or positional relationships, they are based on the directions or positional relationships shown in the drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operate in a specific direction. Therefore, the terms describing the positional relationship in the drawings are only used for illustrative purposes and cannot be understood as limiting the present invention. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.

[0025] Figure 1 FIG. 1 shows a possible structural diagram of a communication system involved in an embodiment of the present invention. Figure 1 As shown in Figure 1, the network considers a two-layer structure, consisting of a RSU layer and a CAV layer. The RSU layer is responsible for collecting and aggregating model parameters from the CAV layer, screening for malicious vehicles, and calculating personalized weights for CAVs at different locations and scores. The CAV layer consists of CAVs equipped with multiple sensors, possessing advanced perception capabilities and computing resources. CAVs communicate with each other and with RSUs via wireless links. In this scenario, the number of malicious CAVs is less than one-third of the total number of CAVs. Malicious CAVs will upload incorrect model parameters, resulting in reduced model accuracy. Malicious CAVs are screened and eliminated through malicious CAV detection and inter-CAV model distillation.

[0026] 1. Local data screening process based on information entropy

[0027] First, the information entropy of the image is calculated to determine whether the image has important information. After CAV grayscales the local image, its two-dimensional entropy is calculated, which is expressed as

[0028]

[0029] Where i is the pixel value of the image, j is the mean of the K-neighborhood pixels corresponding to point i, (i, j) is the tuple of the pixel value and the mean of its neighboring pixels, and Q(i, j) is the probability of occurrence of this tuple. The images in the local dataset are sorted in descending order based on their two-dimensional entropy values. Image samples are taken one by one in sequence, and the structural similarity (SSIM) between the current sample and its adjacent samples in the queue is calculated. If the SSIM is greater than a threshold, the sample, while having high two-dimensional entropy, has low similarity to normal samples and is therefore a high-complexity outlier, and is therefore excluded. If the SSIM is less than the threshold, the image is considered a normal sample and is added to the training dataset.

[0030] 2. Malicious Vehicle Detection Scheme Based on Model Scoring and Model Gradient

[0031] In this scenario, one RSU interacts with m CAVs, where the CAV set is represented as V = {v1, v2, ..., v m}, whose score is G={g1,g2,...,g m}. RSU initializes the global model w 0 The RSU uses a clustering algorithm to distinguish malicious CAVs from normal CAVs. The malicious vehicle detection process based on scoring and model gradient is mainly divided into the following steps:

[0032] (1) Local model training: In the tth round of update, CAV v k ∈V receives global knowledge w t Then, based on the local dataset D k Train and get the local model

[0033] (2) Local knowledge upload: v k Upload the parameters of the last two layers of the model, where the output layer is the local knowledge.

[0034] (3) Malicious model detection: After the RSU collects all CAV model parameters, it calculates the gradient of the output layer L, which is expressed as:

[0035]

[0036] Where η is the learning rate. Next, the K-means algorithm is used to group the knowledge into two clusters cl1 and cl2. In order to distinguish between malicious model clusters and normal model clusters, two factors are considered: cluster size and density. Smaller and / or denser clusters are marked as potential malicious model sets because when the number of malicious models is less than the number of normal models, when two clusters have similar densities, the smaller cluster is more likely to be a malicious model. On the other hand, if the sizes of the two clusters are close, the denser and more uniform cluster is likely to be malicious. This is because in order to increase the probability of attack success, all malicious models participating in the training have the same LF attack category, and the similarity between their gradients is always greater than the similarity between normal models, making the malicious model clusters denser.

[0037] The inverse density value of the cluster is defined as the density of the cluster. The smaller the value, the denser the cluster, which is expressed as:

[0038]

[0039] where θ α,β Let be the angle between elements α and β in the cluster, α The maximum angle θ max,α =max β (θ α,β ), reweight the inverse density value and the cluster size in proportion, and sum them with the score to get cl1, cl2, and then calculate the score S1, S2:

[0040]

[0041]

[0042] RSU defines the cluster with smaller scores in S1 and S2 as the malicious model set, and the cluster with larger scores as the normal model set.

[0043] 3. Local Mutual Distillation Scheme Based on Dynamic Knowledge

[0044] Due to data privacy issues, CAVs do not share local datasets. However, different CAVs have heterogeneous training data. Directly averaging model parameters to fuse different CAV models will be affected by client drift, resulting in slow convergence and degraded learning performance. Although local models are initialized the same, they are trained on heterogeneous datasets and therefore have different characteristics. By transferring knowledge between models, a model with better generalization ability can be obtained. In order to improve the model's generalization ability for heterogeneous data while protecting privacy, Figure 2 The CAV shown in the figure performs mutual distillation based on the results of RSU selection to improve the robustness of the model to different heterogeneous data. The specific steps are as follows:

[0045] (1) Selecting mutually distilled CAVs: CAVs have the same initialization global model. After training on a local dataset, the knowledge gap of the local model reflects the degree of difference in the local data of the CAV. In order to improve the generalization ability of the local model, RSU calculates and selects CAVs with large knowledge gaps to perform mutual distillation. The embodiment of the present invention introduces a hierarchical clustering algorithm to select mutually distilled CAVs based on the knowledge gap information. The steps are as follows: 1. Each piece of knowledge is independently divided into a cluster; 2. Two clusters with the largest diagonal angle are calculated and divided into the same category; 3. The maximum diagonal angle between the newly generated cluster and the old cluster is recalculated; 4. Steps 2 and 3 are repeated until all knowledge is classified into one category.

[0046] In each round of federated learning, the maximum paired angle is calculated once, and the threshold th is set in step 2. d , when the distance between the two farthest clusters is less than the threshold, the iteration terminates. As the number of iterations increases, the score g m Less than the threshold th grd CAVs will be prohibited from participating in mutual distillation to prevent negative impacts.

[0047] (2) Collaborative mutual distillation: RSU sends the global model and clustering result set V t ,V t ∈V, V t Arrange in ascending order by rating, V t CAV In local dataset The personalized model is trained on SGD with a batch size of B c , the learning rate is η c Update its local model As shown below:

[0048]

[0049] after, The updated Send to next client when Received from After the model is transmitted, the model With local model Specifically, Learning by minimizing the loss function The output is expressed as:

[0050]

[0051] Where, The true label set of the data samples in , P1, P2 are the soft labels of different models on the same dataset:

[0052]

[0053] in, and For two lengths B c+1 A vector representing the two networks on the dataset The soft prediction of the z-th data sample in is the label knowledge. L in formula (7) CE (·) represents the cross entropy error between the true label and the soft prediction:

[0054]

[0055] Where h is a one-hot vector. The second element D in formula (7) KL (P1||P2) is the KL divergence of the two network soft prediction matches, expressed as:

[0056]

[0057] When the set C t All CAV scores in the gu , indicating that all CAVs in the set are honest. Compared to label knowledge, intermediate-layer knowledge contains richer information, but it is more likely to cause privacy leakage. Since the CAVs involved in training are honest, the mutual distillation method is changed, and part of the label knowledge distillation is replaced by intermediate-layer knowledge distillation. The loss function is defined as:

[0058]

[0059] Among them, f1(x) and f2(x) are the intermediate layer feature maps of the received model and the local model respectively, and L F The (·) function is used to match the similarity of two models participating in mutual distillation.

[0060] Finally, v c+1 With learning rate η c+1 Minimize the loss function to update

[0061]

[0062] CAV passes model parameters in sequence according to the above steps. The closer to the end, the more data information the knowledge is aggregated, and the stronger the model generalization ability. A high-scoring CAV means stronger computing power and a more reliable model, ensuring the robustness of mutual distillation.

[0063] (3) Model scoring and uploading: When the set Ct After the last CAV in the cluster completes model training, it sends the model parameters to all CAVs for verification. All CAVs use their local datasets to verify their models. If the model with the higher accuracy is the one that was chosen, the inter-distillation is effective. The scores of the other CAVs in the cluster are increased by 1, and the model knowledge after the inter-distillation is uploaded to the RSU. Conversely, if the local model that did not participate in the inter-distillation is more accurate, the inter-distillation is ineffective for that model. The scores of the other CAVs that did not participate in the inter-distillation are decreased by 1, and the model knowledge that did not participate in the inter-distillation is uploaded to the RSU.

[0064] 4. Weighted Knowledge Aggregation Scheme Based on Federated Distillation

[0065] To improve the efficiency and accuracy of global federated learning, both vehicle ratings and contextual information are considered during the aggregation process. The weighted knowledge aggregation scheme based on federated distillation uses different weights to balance the contributions of each participant, making the overall model better adapted to the data distribution and characteristics of different participants. The weighted knowledge aggregation formula of RSU is as follows:

[0066]

[0067] Among them, δ k CAVv k The weighting coefficient is used to measure the impact of the vehicle score and the vehicle location on the aggregation result.

[0068] The position of the vehicle is defined as vehicle v k Distance to RSUr:

[0069]

[0070] Where lat(·) and lot(·) represent the latitude and longitude of the target, respectively.

[0071] In summary, the weighting coefficient δ k Expressed as:

[0072] δ k =dis(v k ,r)+g k (15)

[0073] 5. System Process

[0074] Figure 3 The following is a flowchart of the privacy protection and attack defense algorithm based on federated two-layer knowledge distillation. The specific steps are as follows:

[0075] Steps 501-506: algorithm initialization;

[0076] Step 501: CAV cleans local redundant data and abnormal data;

[0077] Step 502: RSU initializes the training model and model score, and broadcasts them to all CAVs;

[0078] Steps 503-504: CAV uses the cleaned local dataset to train the model and uploads the last two layers of the model parameters to the RSU;

[0079] Step 505: The RSU collects all CAV model parameters and calculates the gradients of each CAV model based on the last two layers of parameters;

[0080] Steps 507-512: model detection phase;

[0081] Steps 506-507: The RSU preliminarily screens malicious vehicles based on the CAV score. If the score is below the threshold, the process jumps to step 511. Otherwise, the CAV set above the threshold is divided into two categories using the K-means clustering algorithm.

[0082] Step 508: The RSU calculates the inverse density values ​​of the two clusters;

[0083] Step 509: RSU calculates the comprehensive score of the cluster by using the inverse density value and the number of elements contained in the cluster;

[0084] Steps 510-512: The RSU determines the malicious gradient set and the normal gradient set based on the cluster comprehensive score. If the score is low, it is defined as a malicious gradient set and excluded. If the score is high, a hierarchical clustering algorithm is used to obtain the CAVs participating in the collaborative mutual distillation and a notification is issued.

[0085] Steps 513-526: two-layer knowledge distillation stage;

[0086] Step 513: The CAVs participating in the collaborative mutual distillation obtain information about their peers;

[0087] Step 514: The CAV trains based on the local dataset and transfers the model to the next peer. After receiving the model, the peer CAV performs mutual distillation with the local model until the last CAV participates in the mutual distillation.

[0088] Steps 515-517: When the CAV scores of all participating in the mutual distillation are higher than the threshold, the mutual distillation mode is dynamically adjusted to convert the label knowledge distillation into a mixed distillation of label knowledge and intermediate layer knowledge;

[0089] Step 518: The CAV uses the student model to imitate the teacher model and updates the local model;

[0090] Step 519: After all mutually distilled CAVs are trained, the last CAV broadcasts the final distilled model to all CAVs;

[0091] Step 520: CAV tests the final model based on the local dataset;

[0092] Steps 521-525: The residual CAV evaluates the accuracy of the local model and the mutual distillation model. If the mutual distillation model performs better on the local test set, the parameters of the last two layers of the mutual distillation model are uploaded, and the CAV score of the model participating in the mutual distillation is increased by 1. Otherwise, the local model parameters are uploaded, and the CAV score of the model participating in the mutual distillation is decreased by 1.

[0093] Step 526: The RSU weights the aggregation parameters based on the CAV score and the location information.

[0094] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solutions, which should all be included in the scope of the claims of the present invention.

Claims

1. A method for intelligent and secure sharing of vehicle-road collaborative data, characterized by: The method comprises the following steps: S1: Local data selection based on information entropy; S2: Malicious model detection based on model scoring and model gradient; In this scenario, one RSU interacts with m CAVs, where the CAV set is represented as V = {v1, v2, ..., v m }, whose score is G={g1,g2,...,g m }; RSU initializes the global model w 0 The system is then distributed to all CAVs. RSUs use clustering algorithms to distinguish malicious CAVs from normal CAVs. The malicious vehicle detection process based on scoring and model gradients is divided into the following steps: Local model training: In the tth round of update, CAV v k ∈V receives global knowledge w t Then, based on the local dataset D k Train and get the local model Local knowledge upload: v k Upload the parameters of the last two layers of the model, where the output layer is the local knowledge; Malicious model detection: After the RSU collects all CAV model parameters, it calculates the gradient of the output layer L, which is expressed as: Where η is the learning rate; then, the K-means algorithm is used to group the knowledge into two clusters cl1 and cl2; The inverse density value of the cluster is defined as the density of the cluster. The smaller the value, the denser the cluster, which is expressed as: Where θ(α,β) is the angle between elements α and β in the cluster, It means that for a fixed α, find the maximum angle between it and all β; reweight the inverse density value and the cluster size in proportion, and sum it with the score to get cl1, cl2, and calculate the score S1, S2: RSU defines the cluster with smaller scores in S1 and S2 as the malicious model set, and the cluster with larger scores as the normal model set; S3: Local mutual distillation based on dynamic knowledge; Selecting mutually distilled CAVs: CAVs have the same initial global model. After training on a local dataset, the knowledge gap between the local models reflects the degree of difference between the CAVs and the local data. RSU calculates and selects CAVs with large knowledge gaps to perform mutual distillation. A hierarchical clustering algorithm is introduced to select mutually distilled CAVs based on the knowledge gap information. The steps are as follows: (1) Each piece of knowledge is independently divided into a cluster; (2) Calculate the two clusters with the largest diagonal angle and classify them into the same cluster; (3) Recalculate the maximum diagonal angle between the newly generated cluster and the old cluster; (4) Repeat steps (2) and (3) until all knowledge is classified into one category; In each round of federated learning, the maximum diagonal angle is calculated once, and the threshold th is set in step (2). d , when the distance between the two farthest clusters is less than the threshold, the iteration terminates; as the number of iterations increases, the score g m Less than the threshold th grd CAVs will be prohibited from participating in mutual distillation to prevent negative impacts; Collaborative mutual distillation: RSU sends the global model and clustering result set V t ,V t ∈V, V t Arrange in ascending order by rating, V t CAV In local dataset The personalized model is trained on SGD with a batch size of B c , the learning rate is η c Update its local model As shown below: after, The updated Send to next client when Received from After the model is transmitted, the model With local model knowledge distillation; specifically, Learning by minimizing the loss function The output is expressed as: Where, for The true label set of the data samples in , P1, P2 are the soft labels of different models on the same dataset: in, and For two lengths B c+1 A vector representing the two networks on the dataset The soft prediction of the z-th data sample in L, i.e., label knowledge; CE (·) represents the cross entropy error between the true label and the soft prediction: Among them, h is a one-hot vector; D KL (P1||P2) is the KL divergence of the two network soft prediction matches, expressed as: When the set C t All CAV scores in the gu , indicating that all CAVs in the set are honest; part of the label knowledge distillation is changed to intermediate layer knowledge distillation, and the loss function is defined as: Among them, f1(x) and f2(x) are the intermediate layer feature maps of the received model and the local model respectively, and L F The (·) function is used to match the similarity of the two models involved in mutual distillation; Finally, v c+1 With learning rate η c+1 Minimize the loss function to update CAV transfers model parameters; Model scoring and uploading: When the collection C t After the last CAV in the cluster completes model training, the model parameters are sent to all CAVs for verification. All CAVs use local datasets to verify the model. If the model accuracy is higher, it means that the mutual distillation is effective. The scores of other CAVs in the cluster are increased by 1, and the model knowledge after mutual distillation is uploaded to the RSU. On the contrary, if the local model that does not participate in the collaborative mutual distillation has a higher accuracy, it means that the mutual distillation is invalid for the model. The scores of other CAVs are reduced by 1, and the model knowledge that does not participate in the collaborative mutual distillation is uploaded to the RSU. S4: Weighted knowledge aggregation based on federated distillation; The weighted knowledge aggregation formula of RSU is as follows: Among them, δ k CAVv k The weighting coefficient is used to measure the impact of the vehicle's score and location on the aggregation result; The position of the vehicle is defined as vehicle v k Distance to RSUr: Where lat(·) and lot(·) represent the latitude and longitude of the target, respectively; Weighting coefficient δ k Expressed as: d k =dis(v k ,r)+g k 。 2. The method for intelligent and secure sharing of vehicle-road cooperative data according to claim 1, characterized in that: In S1, repeated redundant data is cleaned locally in the CAV; first, the information entropy of all local data is calculated, and the data is arranged in ascending order according to the information entropy; then, key data with high information entropy and high similarity are screened out based on the similarity with neighboring data, and redundant data with low information entropy and noise data with low similarity will be discarded.

Citation Information

Patent Citations

  • Pollen image classification method based on cross attention distillation Transformer

    CN113887610A

  • Federal learning method for eliminating malicious clients

    CN115861705A