A low-latency data sharing method for intelligent connected vehicles based on distributed learning
By adopting the low-latency data sharing method of distributed learning in intelligent connected vehicles, combining incremental learning and adaptive learning rate, the low efficiency and accuracy reduction of model training caused by non-independent homogeneous distributed data are solved, and high efficiency is achieved model convergence and low latency communication.
Patent Information
- Application Number
- CN202311088483.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-28
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2043-08-28
AI Technical Summary
In intelligent connected vehicles, non-independent and homogeneous data leads to inefficient and reduced accuracy of model training, and asynchronous federated learning leads to divergent model and high communication resource consumption.
Using a low-latency data sharing method based on distributed learning, by acquiring global models and local training student models, uploading some vehicle data to correct model deviations, combining incremental learning and adaptive learning rate, optimize model convergence speed and accuracy, and Balance the old and new data to participate in training by minimizing the change rate of important parameters.
The accuracy and generalization capabilities of the model in the Non-IID data scenario are improved, the overhead and training time of communication resources are reduced, and the global model convergence with low latency is achieved.
Smart Images

Figure CN117135597B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of mobile communications and relates to a low-latency data sharing method for intelligent networked vehicles based on distributed learning. Background Art
[0002] Intelligent Connected Vehicle (ICV) is a vehicle that uses various technical means to achieve high connectivity and information exchange between vehicles, between vehicles and infrastructure, and between vehicles and the Internet. Vehicles and road side units (RSU) are interconnected to achieve information exchange between vehicles, vehicle-road collaboration, and intelligent traffic management. Federated Learning (FL) has important application potential in the field of ICV. ICV data involves privacy content, such as location and driving trajectory. FL aggregates local knowledge into a global model through a shared model to ensure the privacy of the original data. At the same time, due to the influence of driving habits, environment, etc., the data collected by ICV during driving will show the characteristics of non-independent and identically distributed (Non-IID), so there are differences in the local training process, resulting in slower model convergence and reduced accuracy.
[0003] Knowledge Distillation (KD) is a widely used model compression method. It transfers large and complex model knowledge into small and simplified models, thereby reducing the resource requirements for model calculation, transmission and storage. The KD-based mutual knowledge distillation (MKD) method contains a complex teacher model and a simplified student model, which enable more comprehensive knowledge sharing between models through two-way learning. In the FL process, the student model is usually uploaded to the RSU to aggregate the global model and learn knowledge from multiple ICVs. At the same time, the teacher model is stored locally for further KD and student model training.
[0004] Common FLs are divided into synchronous FL and asynchronous FL. Due to the constraints of ICV computing power and communication resources, the use of synchronous FL will lead to low training efficiency and uneven resource utilization. In the Non-IID data scenario, the use of asynchronous FL will cause the model to diverge during training and fail to converge. In addition, asynchronous FL requires frequent parameter transmission and synchronization between devices or nodes, which will generate large communication energy consumption and bandwidth overhead.
[0005] Due to the influence of driving habits, environment, etc., the data collected by ICV during driving will show Non-IID characteristics, which will lead to large differences in models trained by different ICVs and reduced accuracy. Summary of the invention
[0006] Based on the above problems, the present invention designs a low-latency data sharing method for intelligent connected vehicles based on distributed learning to improve model accuracy and reduce communication resource overhead and training time.
[0007] An embodiment of the present invention provides a low-latency data sharing method for intelligent connected vehicles based on distributed learning, which is used to solve the problems of high communication overhead of federated learning and low accuracy of Non-IID data training models in the Internet of Vehicles.
[0008] In order to solve the above technical problems, the implementation process of the present invention is as follows:
[0009] In a first aspect of the present invention, the present invention proposes a low-latency data sharing method for intelligent connected vehicles based on distributed learning, which is applied to one or more intelligent connected vehicles, wherein the intelligent connected vehicles are communicative devices in the Internet of Vehicles and can communicate with roadside units in the Internet of Vehicles. The method comprises:
[0010] Obtaining a global model sent from a roadside unit; the global model is obtained by aggregating a student model and a global aggregation weight;
[0011] Collect vehicle data and locally train a student model and a teacher model corresponding to the global model;
[0012] Upload the locally trained student model to the roadside unit, along with the global aggregation weights determined based on the teacher model;
[0013] If the degree of deviation between the global model and the locally trained student model exceeds a preset threshold, uploading part of the vehicle data to the data buffer of the roadside unit;
[0014] Acquire the shared data sent from the roadside unit, and locally correct the student model and teacher model corresponding to the global model; the shared data is determined by the new and old ratios of the uploaded partial vehicle data and the change rate of important model parameters.
[0015] In a second aspect of the present invention, the present invention further proposes a low-latency data sharing method for intelligent connected vehicles based on distributed learning, which is applied to one or more roadside units, wherein the roadside units are communicative devices in the Internet of Vehicles and can communicate with intelligent connected vehicles in the Internet of Vehicles. The method comprises:
[0016] Obtain student models uploaded from multiple intelligent connected vehicles and global aggregation weights determined based on teacher models;
[0017] Select the M uploaded student models with the closest arrival time and the corresponding global aggregation weights, and aggregate the M student models into a global model according to the global aggregation weights;
[0018] Distribute global models to multiple intelligent connected vehicles;
[0019] If the degree of deviation between the global model and the locally trained student model exceeds a preset threshold, receiving part of the vehicle data uploaded from the intelligent networked vehicle;
[0020] Integrate the uploaded vehicle data based on the new and old ratios and the change rates of important model parameters to generate shared data;
[0021] Send shared data to multiple intelligent connected vehicles.
[0022] In the technical solution provided in the embodiments of the present application, the optimal number of learning models is calculated by minimizing the delay and arrival time of the student model within the expected number of iterations, thereby eliminating the student model whose communication energy consumption exceeds the constraint, so that the convergence delay of the global model is minimized, and the purpose of low latency is achieved; the vehicle activity is determined by the number of recent training times of intelligent connected vehicles participating in global aggregation, and the adaptive learning rate of the student model is determined by the vehicle activity to adapt to the influence of Non-IID data on the convergence speed, thereby improving the accuracy of the global model in the Non-IID data scenario; incremental learning is used to fuse new and old data of different ICVs, and the change rate of important parameters is minimized to ensure that the change range of important parameters is small, so as to balance the proportion of new and old data participating in training, so that the student model can continue to learn and reduce the degree of data forgetting. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings;
[0024] Figure 1 A diagram of a data sharing architecture for intelligent connected vehicles based on distributed learning according to an exemplary embodiment of the present invention;
[0025] Figure 2 A flow chart of a low-latency data sharing method for intelligent connected vehicles based on distributed learning according to an exemplary embodiment of the present invention;
[0026] Figure 3 A flow chart of a low-latency data sharing method for intelligent connected vehicles based on distributed learning is another exemplary embodiment of the present invention;
[0027] Figure 4 This is a schematic diagram of vehicle selection based on semi-asynchronous federated learning according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0029] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the previous and next associated objects are in an "or" relationship; in a formula, the character " / " indicates that the previous and next associated objects are in a "division" relationship. If not specified, "multiple" in this article refers to two or more.
[0030] In order to clearly describe the technical solutions of the embodiments of the present invention, in the embodiments of the present invention, words such as "first" and "second" are used to distinguish between identical or similar items with basically the same functions or effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order.
[0031] In the embodiments of the present invention, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way. In the embodiments of the present invention, unless otherwise specified, the meaning of "multiple" refers to two or more.
[0032] The solution provided in the embodiment of the present application involves the Internet of Vehicles federated learning technology in mobile communication technology. The existing Internet of Vehicles federated learning technology can realize the combination of federated learning and Internet of Vehicles technology. However, due to the influence of driving habits, environment, etc., the data collected by ICV during driving will show Non-IID characteristics, resulting in large differences in models trained by different ICVs and reduced accuracy. In order to reduce the impact of Non-IID data on model accuracy, some data is shared between ICVs through incremental learning to prevent the model from forgetting previously learned knowledge and improve the generalization ability and adaptability of the model.
[0033] Based on this, the embodiment of the present application proposes a low-latency data sharing method for intelligent connected vehicles based on distributed learning, which can be applied to the communication scenario of the intelligent connected vehicle data sharing architecture diagram based on distributed learning, such as Figure 1 As shown in the figure, in this communication scenario, the network considers a vehicle networking scenario in which N ICVs and 1 RSU interact. This scenario includes dynamic MKD and incremental learning. The student model is distilled by MKD, so that the student model can obtain richer knowledge and reduce computing resource consumption. Since ICV collects Non-IID data, it will affect the accuracy of the student model. When the student model of ICV has a large deviation, incremental learning is used to share some data between ICVs to improve the accuracy and generalization ability of the model. The following will be described in detail in conjunction with this communication scenario.
[0034] In an embodiment of the present invention, the adaptive mutual distillation can be replaced by other algorithms, such as KD algorithm, offline distillation, online distillation, etc., as long as the training based on the "teacher-student-network" can be realized. For the convenience of description, this embodiment takes adaptive mutual distillation as an example for introduction.
[0035] Figure 2 FIG. 1 is a flow chart of a method for coordinating safety data of an intelligent connected vehicle according to an exemplary embodiment of the present invention. Figure 2 As shown, the method is applied to one or more intelligent networked vehicles, wherein the intelligent networked vehicles are communicative devices in the Internet of Vehicles and can communicate with roadside units in the Internet of Vehicles. The method includes:
[0036] 101. Obtain a global model sent from a roadside unit; the global model is obtained by aggregating a student model and a global aggregation weight;
[0037] In an embodiment of the present invention, the intelligent connected vehicle can obtain a corresponding global model from a roadside unit communicating with it. The global model can be an initialized model or a model obtained by aggregating a student model and a global aggregation weight during a training process.
[0038] 102. Collect vehicle data and locally train a student model and a teacher model corresponding to the global model;
[0039] In the embodiment of the present invention, in the local training stage, the mutual distillation technology is used, and the strength of each distillation is dynamically adjusted to enhance the knowledge absorption and generalization ability of the student model; by initializing the student model and the teacher model, the different network layers of the student model are distilled. The CE (Cross-Entropy) loss and KL (Kullback-Leibler) divergence of the two are calculated, the strength of the distillation is adjusted through the dynamic distillation loss, and the teacher model and the student model are updated respectively based on the distillation loss.
[0040] In the embodiment of the present invention, the MKD method learns from each other through the student model and the teacher model, and dynamically adjusts the strength of each distillation to enhance the knowledge absorption and generalization ability of the student model, wherein the ICV only uploads the student model to the RSU, realizes model sharing and collaborative training between ICVs, and reduces communication overhead and model convergence time. At the same time, the teacher model is stored locally for further KD student model training. The MKD-based federated learning method mainly has the following steps:
[0041] (1) Distillation Student Model
[0042] Use CNN to initialize the teacher model and student model. The teacher model uses a more complex network structure than the student model. The student model includes input layer, convolution layer, fully connected layer and output layer. Different student model structures are selected to compress different network layers, thereby reducing the size and computational overhead of the student model. i The sample soft labels of the student model and the teacher model are represented as y t,i and s,i .
[0043] (2) Loss calculation
[0044] When the model accuracy is low, the distillation loss value will be large. In order to balance the knowledge transfer between the teacher model and the student model and improve the performance of the student model, the distillation strength can be adjusted according to the quality of the soft label through dynamic distillation loss. t,i and s,i Calculate the CE loss and KL divergence of the student model and the teacher model respectively, where the CE loss of the student model and the teacher model is defined as:
[0045]
[0046]
[0047] The KL divergence between the student model and the teacher model is defined as:
[0048]
[0049]
[0050] The dynamic distillation loss is defined as:
[0051]
[0052]
[0053] (3) Update the student model
[0054] The gradients of the student model and the teacher model are respectively obtained by and Calculate and perform local updates as follows:
[0055]
[0056] Among them, meta-learning is used to update the student model, which can extract common features from multiple training data and enhance the generalization ability of the student model. First, the gradient is calculated according to the dynamic distillation loss and back-propagated, and then SGD is performed twice to update the student model to obtain two student models, which are further expressed as:
[0057]
[0058]
[0059] and From v i The two student models are averaged, that is, the student model is subjected to two stochastic gradient descents (SGD) to improve the generalization ability of the global model and obtain a reliable student model, that is:
[0060]
[0061] In the process of updating the student model, in the preferred embodiment of the present invention, the influence of Non-IID data on the convergence speed can be reduced by adaptively adjusting the learning rate. The learning rate is affected by the ICV activity A i Impact, v i The learning rate can be expressed as:
[0062]
[0063] Among them, η i Represents the student model v i The adaptive learning rate of the global model; η represents the learning rate of the global model; A i Represents the local training student model v i The vehicle activity of the intelligent connected car; γ is the adjustment coefficient.
[0064] In a preferred embodiment of the present invention, the ICV activity is calculated based on the number of times the aggregation is participated in. The local training student model v iThe method for calculating the vehicle activity of the intelligent connected vehicle includes determining the vehicle activity of the intelligent connected vehicle based on the number of recent training times in which the intelligent connected vehicle participates in global aggregation; if the number of recent training times in which the intelligent connected vehicle participates in global aggregation is lower than a preset threshold, the intelligent connected vehicle is forced to obtain the global model sent from the roadside unit, and upload the locally trained student model and the global aggregation weight determined based on the teacher model to the roadside unit within a specified time; and the vehicle activity of the intelligent connected vehicle is reset.
[0065] For example, if an ICV participates in the current round of aggregation, the activity of the ICV increases by 1, that is, A i =A i +1. An ICV whose activity does not change for three consecutive rounds is marked as an inactive ICV. In the next round, the ICV will receive the latest global model from the RSU for local model training, and the inactive ICV needs to upload its local model within a given time.
[0066] In the embodiment of the present invention, the learning rate is adaptively adjusted when updating the teacher model and the student model according to the activity of each ICV, which can adapt to the influence of Non-IID data on the convergence speed.
[0067] 103. Upload the locally trained student model and the global aggregation weight determined based on the teacher model to the roadside unit;
[0068] In the embodiment of the present invention, a teacher model evaluation method is also proposed, which evaluates the quality of the teacher model by calculating the CE loss value of the teacher model, that is, Then, the model v is expressed as the weight in the global model aggregation through exponential transformation. i The global aggregation weight is expressed as:
[0069]
[0070] In an embodiment of the present invention, the CE loss value of the teacher model is calculated and used to evaluate the quality of the teacher model. That is, the smaller the loss value, the more important the knowledge imparted by the teacher model, and the higher the weight is assigned to it. Based on this, the weight of the student model in the global aggregation is calculated.
[0071] 104. If the degree of deviation between the global model and the locally trained student model exceeds a preset threshold, uploading part of the vehicle data to the data buffer of the roadside unit;
[0072] In the Internet of Vehicles scenario, due to the influence of driving habits, environment, etc., the data collected by ICV during driving will show Non-IID characteristics, resulting in significant deviations in the student model. In order to improve the accuracy of the model, the deviation between the student model and the global model of each ICV is first measured by cosine similarity, and the ICV is judged whether to trigger data sharing based on the deviation. When the data sharing mechanism is triggered, each ICV needs to upload part of the original data to the RSU data buffer, and then minimize the change rate of important parameters based on the Fisher information matrix to obtain the training ratio of new and old data of the ICV, and correct the student model according to this ratio. When the data buffer is saturated, the old data will be discarded.
[0073] In an embodiment of the present invention, in order to reduce the impact of Non-IID data on the accuracy of the global model, a model correction method based on incremental learning is proposed. In the Non-IID data scenario, the student model will have significant deviations, resulting in a decrease in model accuracy. Therefore, each ICV will share part of the local data to reduce the model deviation caused by Non-IID data. In addition, since the old knowledge learned before will gradually be lost during the training process, incremental learning is used to fuse the new and old data of different ICVs, so that the model can continue to learn and reduce the degree of data forgetting.
[0074] Among them, as for the degree of deviation, since Non-IID data will cause significant deviations in the student models of different ICVs, affecting the accuracy of the model, cosine similarity is used to measure the deviation between models, and cosine similarity is calculated as follows:
[0075]
[0076] Among them, CS k+1 is the global model of round k and v i Local model uploaded in round k+1 Based on this, the degree of deviation between the local model and the global model can be quantified. When the deviation of the ICV student model exceeds the set threshold, the ICV will trigger the data sharing mechanism. Otherwise, global aggregation will be performed directly.
[0077] If the data sharing mechanism is triggered, the M ICVs participating in the model aggregation will upload some local data To protect user data privacy, Laplace noise is added before uploading local data to meet the differential privacy requirements, and the shared data set D is synthesized in the data buffer. s .
[0078] 105. Obtain shared data sent from the roadside unit, and locally correct the student model and the teacher model corresponding to the global model; the shared data is determined by the new and old ratios of the uploaded partial vehicle data and the change rate of important model parameters.
[0079] In this embodiment of the present invention, the ICV that triggers the sharing mechanism will be s Randomly extract some data D s ′, and ICV original local data D M The fusion modifies the student model until the student model deviation of all ICVs is below the threshold before global aggregation. When the RSU data buffer reaches saturation, the old data will be discarded. After the data sharing mechanism is triggered, the newly uploaded data will be retained in the RSU data buffer. However, as the data in the data buffer increases, the early data will be forgotten. In the kth round of training, the degree of data forgetting is defined according to the importance of the model parameters:
[0080]
[0081] Where L(w) represents the total rate of change of model parameters, H is the number of current training rounds, n is the number of model parameters, and f h is the proportion of old data for the hth round of training, f H is the proportion of new data in the current H-th round of training, F h,j is the Fisher information matrix of the j-th model parameter in the h-th round of training, represents the jth parameter of the local model trained for the k-1th time in the Hth round of training, w h,j represents the jth parameter of the global model in the hth round of training.
[0082] Based on the above analysis, the proportions of shared data in the previous H-1 times in the old data are f 1 ,f 2 ,…,f H-1 , and f in the Hth newly uploaded data H Partial joint training, correction v i student model.
[0083] Therefore, this embodiment obtains the vehicle data corresponding to the important model parameters and the corresponding proportion as shared data by minimizing the new and old ratio of part of the uploaded vehicle data and the change rate of important model parameters. These shared data can be used to train the learning model. At the same time, these shared data are stored in the data buffer of the roadside unit, so the vehicle data in the data buffer can also be updated.
[0084] In the embodiment of the present invention, one training session represents traversing a batch of data and performing one training session; one round of training represents traversing all batches of data and performing multiple training sessions.
[0085] Figure 3 FIG. 1 is a flow chart of a method for coordinating safety data of an intelligent connected vehicle according to an exemplary embodiment of the present invention. Figure 3 As shown, the method is applied to one or more roadside units, where the roadside units are communicative devices in the Internet of Vehicles and can communicate with intelligent connected vehicles in the Internet of Vehicles. The method includes:
[0086] 201. Obtain student models uploaded from multiple intelligent connected vehicles and a global aggregation weight determined based on a teacher model;
[0087] In an embodiment of the present invention, the roadside unit receives student models and corresponding global aggregation weights uploaded from multiple intelligent connected vehicles, so that some of the learning models can be globally aggregated in the subsequent process.
[0088] 202. Select M uploaded student models with the closest arrival time and the corresponding global aggregation weights, and aggregate the M student models into a global model according to the global aggregation weights;
[0089] In the embodiment of the present invention, a vehicle selection scheme based on semi-asynchronous federated learning is adopted. Based on the computing and communication capabilities of ICV, the model training time and model upload time are calculated to obtain the model preparation time. The order of ICV arrival at RSU is sorted according to the model preparation time of ICV, so as to select M student models with the earliest arrival time for aggregation.
[0090] like Figure 4 As shown in the figure, the vehicle selection process based on semi-asynchronous federated learning is mainly divided into the following steps:
[0091] (1) Model preparation process
[0092] In this embodiment, the Internet of Vehicles system is composed of multiple ICVs and RSUs, and there are N ICVs within the coverage of one RSU, V = {v 1 ,v 2 ,…,v N}, each vehicle v i Train a student model v i For the convenience of description, the vehicle v i With model v i Equivalently, v iModel preparation time is defined as the sum of model training time, model upload time and model aggregation time. Among them, model upload time and model training time depend on the computing power and communication resources of ICV. Model delivery time and model aggregation time are negligible compared with model upload and model training time. Based on this, model training time and model upload time are defined as:
[0093]
[0094]
[0095] Among them, θ is the iteration factor; is the number of iterations required to achieve the desired model accuracy, ε represents the expected accuracy; C i is the v of the training model i The number of CPU cycles required; D i Yes i The number of training data samples; f i is the v of the training model i The CPU frequency; B is the transmission bandwidth allocated to each ICV; P i Yes i The transmission power of g i Yes i Channel gain to RSU; N 0 is the noise power.
[0096] Based on the above analysis, i Model preparation time q i ∈Q, including model training time and model upload time, expressed as:
[0097]
[0098] (2) Select Aggregate ICV
[0099] Assume r i Indicates the current round v i The time for the model to reach RSU is based on the ICV model preparation time Q = {q 1 ,q 2 ,…,q M The model arrival time of M ICVs can be predicted to be R = {r 1 ,r 2 ,…,r M}. Arrange R in ascending order, and we get R (M) = {r (1) ,r (2) ,…,r (M)}, R (M) is the arrival order of the ICV model. Let the semi-asynchronous FL aggregation time during the kth training be tk =r (M) For all ICVs, model arrival times less than or equal to t k V i Select as the kth aggregate ICV and set the model arrival time r i Reset to q i , the arrival time of the remaining unselected ICVs is set to r i -t k At the beginning of each round of training, the ICV model arrival times are first sorted in ascending order, and the aggregated ICV model is selected according to the method described above until the number of training reaches the given number of iterations K.
[0100] like Figure 4 As shown, there are 5 ICVs in the system, namely v 1 , v 2 , v 3 , v 4 , v 5 , and its corresponding model preparation time satisfies q 1 ,q 2 ,q 3 ,q 4 ,q 5 At the beginning of each round of training, the model arrival time is initialized to the model preparation time, that is, r 1 =q 1 , r 2 =q 2 , r 3 =q 3 , r 4 =q 4 , r 5 =q 5 , then for r 1 , r 2 , r 3 , r 4 , r 5 Arrange in ascending order and get R (5) = {r (1) , r (2) , r (3) , r (4) , r (5)}, r (1) <r (2) <r (3) <r (4) <r (5) Assume that M = 2, that is, select the two uploaded models with the closest arrival time. (1) and r (2) are the smallest of the two, so v 1 and v 2Participated in the global aggregation of the first training, and the completion time of the first training was t 1 =r (2) .
[0101] Similarly, at the beginning of the fourth training, v 2 and v 4 The model arrival time is reinitialized to r 2 and r 4 , and the arrival times of the other ICV models are r 1 =q 1 -t 3 , r 3 =q 3 -t 3 , r 5 =q 5 , because v5 is an inactive ICV, it will receive the latest global model from RSU in the next round for local model training, and the inactive ICV needs to upload its model within a given time. Then, 1 , r 2 , r 3 , r 4 , r 5 Arranged in ascending order, it is obvious that r 1 <r 5 <r 3 <r 2 <r 4 , so v 1 and v 5 Participate in the global aggregation of the fourth training. Through the arrival model adopted by the present invention, the delay and arrival time of the student model within the expected number of iterations are minimized, and the optimal number of learning models is calculated, thereby eliminating the student model whose communication energy consumption exceeds the constraint, so that the convergence delay of the global model is minimized, achieving the purpose of low delay.
[0102] (3) Select the optimal number of aggregated ICVs
[0103] When the number of training times reaches K, calculate the communication energy consumption of each ICV and remove the M values whose communication energy consumption exceeds the constraint. Calculate the total training delay T corresponding to the remaining M, and select the M that minimizes the total training delay T as the optimal number of aggregated ICVs.
[0104] The method for determining the value of M includes calculating the expected number of iterations required for model accuracy according to the iteration number factor; determining the value of M according to the minimum delay sum of the arrival time of the student model within the expected number of iterations, wherein the minimum delay sum model of the arrival time of the student model within the expected number of iterations is expressed as:
[0105]
[0106] Where T represents the delay sum of the arrival time of the student model within the expected number of iterations; K represents the expected number of iterations, θ represents the iteration factor, and ε represents the expected accuracy; Represents the student model v in the kth iteration i Arrival time, Represents the student model v in the kth iteration i Preparation time; Represents the student model v i Model training time, Represents the student model v i Model upload time; Indicates the maximum model training time; Indicates the maximum model upload time.
[0107] In the embodiment of the present invention, the optimal number of learning models M is calculated by minimizing the delay and arrival time of the student model within the expected number of iterations, thereby eliminating the student model whose communication energy consumption exceeds the constraint, minimizing the convergence delay of the global model and achieving the purpose of low latency.
[0108] 203. Send the global model to multiple intelligent connected vehicles;
[0109] In this embodiment, the aggregated global model is further sent to multiple intelligent connected vehicles for local training.
[0110] 204. If the degree of deviation between the global model and the locally trained student model exceeds a preset threshold, receiving part of the vehicle data uploaded from the intelligent networked vehicle;
[0111] In this embodiment, if the intelligent connected vehicle compares the issued global model with the locally trained student model and finds that the degree of deviation exceeds the preset threshold, it will actively upload a part of the vehicle data to the roadside unit to prepare for subsequent data sharing and incremental learning.
[0112] 205. Integrate the uploaded vehicle data based on the new and old ratios and the change rates of important model parameters to generate shared data;
[0113] In the embodiment of the present invention, new data will be continuously added to the data buffer during the driving process of the ICV, and as the data in the data buffer grows to saturation, old data will be discarded.
[0114] In the embodiment of the present invention, in order to protect the privacy of user data, Laplace noise is added before uploading local data to meet the differential privacy requirements, and the shared data set D is synthesized in the data buffer. s .
[0115] 206. Send shared data to multiple intelligent connected vehicles.
[0116] In this embodiment, since the shared data set already meets the differential privacy requirements, there will be no privacy leakage when the roadside unit sends shared data to the intelligent connected vehicle.
[0117] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0118] It can be understood that the low-latency data sharing method of intelligent connected vehicles based on distributed learning of the present invention can be applied to different execution entities, and their corresponding technical features can be referenced to each other, and the present invention will not go into details one by one.
[0119] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0120] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, computer, server, etc.) to execute the method of secure data collaboration described in multiple embodiments of the present invention.
[0121] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the relevant hardware through a program, and the program can be stored in a computer-readable storage medium, which can include: ROM, RAM, disk or CD, etc.
[0122] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A low-latency data sharing method for intelligent connected vehicles based on distributed learning, characterized in that: Applied to one or more intelligent networked vehicles, the intelligent networked vehicles are communicative devices in the Internet of Vehicles and can communicate with roadside units in the Internet of Vehicles, the method includes: Obtaining a global model sent from a roadside unit; the global model is obtained by aggregating a student model and a global aggregation weight; Model v i The global aggregation weight is expressed as: in, Represents the CE loss value of the teacher model; Collect vehicle data, and train the student model and teacher model corresponding to the global model locally; adopt an adaptive learning rate based on vehicle activity for training, and the adaptive learning rate based on vehicle activity is expressed as: Among them, η i Represents the student model v i The adaptive learning rate of the global model; η represents the learning rate of the global model; A i Represents the local training student model v i The vehicle activity of the intelligent connected car; γ is the adjustment coefficient; Uploading the locally trained student model and the global aggregation weight determined based on the teacher model to the roadside unit; if the degree of deviation between the global model and the locally trained student model exceeds a preset threshold, uploading part of the vehicle data to the data buffer of the roadside unit; Acquire shared data sent from a roadside unit, and locally correct the student model and the teacher model corresponding to the global model; the shared data is determined by the new and old ratios of the uploaded part of the vehicle data and the change rates of important model parameters; obtain the vehicle data corresponding to the important model parameters and the corresponding ratio as shared data by minimizing the total change rate of the model parameters determined by the new and old ratios of the uploaded part of the vehicle data and the change rates of the important model parameters, and update the vehicle data in the data buffer; The model for minimizing the degree of forgetting of shared data is expressed as: Where L(w) represents the total rate of change of model parameters, H is the number of current training rounds, n is the number of model parameters, and f h is the proportion of old data for the hth round of training, f H is the proportion of new data in the current H-th round of training, F h,j is the Fisher information matrix of the j-th model parameter in the h-th round of training, represents the jth parameter of the local model trained for the k-1th time in the Hth round of training, w h,j represents the jth parameter of the global model in the hth round of training.
2. According to claim 1, a low-latency data sharing method for intelligent connected vehicles based on distributed learning is characterized in that: The locally trained student model v i The method for calculating the vehicle activity of the intelligent connected vehicle includes determining the vehicle activity of the intelligent connected vehicle according to the number of recent training times of the intelligent connected vehicle participating in global aggregation; if the number of recent training times of the intelligent connected vehicle participating in global aggregation is lower than a preset threshold, the intelligent connected vehicle is forced to obtain the global model sent from the roadside unit, and upload the student model after local training and the global aggregation weight determined based on the teacher model to the roadside unit within a specified time; Reset the vehicle activity of the smart connected car.
3. A low-latency data sharing method for intelligent connected vehicles based on distributed learning, characterized in that: Applied to one or more roadside units, the roadside units are communicative devices in the Internet of Vehicles and can communicate with intelligent connected vehicles in the Internet of Vehicles. The method includes: Obtain student models uploaded from multiple intelligent connected vehicles and global aggregation weights determined based on the teacher model; model v i The global aggregation weight is expressed as: in, Represents the CE loss value of the teacher model; Select the M uploaded student models with the closest arrival time and the corresponding global aggregation weights, and aggregate the M student models into a global model according to the global aggregation weights; the value of M is determined by calculating the expected number of iterations required for model accuracy based on the iteration number factor; the value of M is determined based on the minimum delay sum of the arrival time of the student model within the expected number of iterations; the minimum delay sum model of the arrival time of the student model within the expected number of iterations is expressed as: st C1: C2: C3: C4: C5: C6: Where T represents the delay sum of the arrival time of the student model within the expected number of iterations; K represents the expected number of iterations, θ represents the iteration factor, and ε represents the expected accuracy; Represents the student model v in the kth iteration i Arrival time, Represents the student model v in the kth iteration i Preparation time; Represents the student model v i Model training time, Represents the student model v i Model upload time; Indicates the maximum model training time; Indicates the maximum model upload time; Distribute global models to multiple intelligent connected vehicles; If the degree of deviation between the global model and the locally trained student model exceeds a preset threshold, receiving part of the vehicle data uploaded from the intelligent networked vehicle; Integrate the uploaded vehicle data based on the new and old ratios and the change rates of important model parameters to generate shared data; Send shared data to multiple intelligent connected vehicles.