CN114827198A - Multilayer center asynchronous federal learning method applied to Internet of vehicles - Google Patents

Multilayer center asynchronous federal learning method applied to Internet of vehicles Download PDF

Info

Publication number
CN114827198A
CN114827198A CN202210345422.7A CN202210345422A CN114827198A CN 114827198 A CN114827198 A CN 114827198A CN 202210345422 A CN202210345422 A CN 202210345422A CN 114827198 A CN114827198 A CN 114827198A
Authority
CN
China
Prior art keywords
model
vehicle
local
training
round
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210345422.7A
Other languages
Chinese (zh)
Other versions
CN114827198B (en
Inventor
张明
胡健龙
李慧
廖丹
陈雪
张海玲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Electronic Science and Technology of China
Original Assignee
University of Electronic Science and Technology of China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by University of Electronic Science and Technology of China filed Critical University of Electronic Science and Technology of China
Priority to CN202210345422.7A priority Critical patent/CN114827198B/en
Publication of CN114827198A publication Critical patent/CN114827198A/en
Application granted granted Critical
Publication of CN114827198B publication Critical patent/CN114827198B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/142Network analysis or design using statistical or mathematical methods
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/145Network analysis or design involving simulating, designing, planning or modelling of a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Medical Informatics (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Health & Medical Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Pure & Applied Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Algebra (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Traffic Control Systems (AREA)

Abstract

The invention discloses a multilayer center asynchronous federal learning method applied to a vehicle networking, which provides an asynchronous federal learning framework by using a federal learning technology, wherein the asynchronous federal learning framework comprises vehicle nodes, edge computing servers and a center cloud server. According to the invention, a machine learning model is finally generated in the learning framework, and the model can output a result according to the data of the vehicle, so that the functions of prediction and the like are realized. The mode of sharing the model replaces direct transmission of data, privacy protection can be achieved, and meanwhile more efficient data application is achieved. Meanwhile, compared with original data, the model has smaller data size, and can greatly reduce the network load during transmission.

Description

Multilayer center asynchronous federal learning method applied to Internet of vehicles
Technical Field
The invention relates to the field of deep learning, in particular to a multi-layer central asynchronous federal learning method applied to the Internet of vehicles.
Background
The development of technologies such as cloud computing, edge computing, internet of things and 5G lays a foundation for the field application of the Internet of vehicles, meanwhile, the continuous increase of the number of road vehicles around the world provides a platform for the application of the Internet of vehicles, and the field application and popularization of the Internet of vehicles have important significance for building intelligent traffic and intelligent cities. In the vehicle-mounted network, due to the limitation of computing resources and network bandwidth resources, it is a challenge for vehicles to utilize and process mass data to improve the service quality of services such as travel traffic prediction and automatic driving of vehicles.
In the vehicle-mounted network, mass data generated during the driving of the vehicle can be more effectively processed and shared by using the AI technology. The edge calculation can effectively solve the problem of resource limitation, and the artificial intelligence algorithm enables the edge nodes to process and analyze diversified data, classify, predict and the like. However, performing distributed machine learning on edge nodes in an edge computing scenario such as the internet of vehicles remains a challenging task. Data owned by each vehicle unit naturally forms an independent data island, and traditional machine learning needs to be performed with data fusion firstly, but privacy information of each vehicle user can be directly exposed, and resource limitation is also a main problem. That is, there are two problems that cannot be compromised:
in the traditional scheme for sharing data by means of encryption and trust model construction, the service quality of a vehicle is limited due to the limitation of computing resources and network bandwidth resources;
the introduction of the AI technology replaces shared data by a shared model, which greatly reduces the network bandwidth of resource transmission, but data owned by each vehicle form a data island, and data concentration is required in the traditional machine learning. The process of collecting data poses a risk of data security and privacy leakage in the vehicle itself.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a multi-layer central asynchronous federal learning method applied to the Internet of vehicles.
In order to achieve the purpose of the invention, the invention adopts the technical scheme that:
a multi-layer central asynchronous federal learning method applied to the Internet of vehicles comprises the following steps:
s1, constructing an Internet of vehicles model based on asynchronous federal learning, and in each training process, operating a gradient descent algorithm by each vehicle participant according to data acquired by the vehicle participant to obtain a local model;
s2, uploading the obtained local models to an edge server in the covered range of the vehicle by each vehicle participant, asynchronously receiving the local models uploaded by each vehicle participant by the edge server, and aggregating to obtain a new model;
and S3, the edge server uploads the new model obtained in the S2 to the cloud server, the new model is asynchronously received by the cloud server and then aggregated, and the aggregated model is sent to each edge server or is sent to the vehicle participants after being requested by the vehicle participants.
Further, the S1 specifically includes:
s11, initializing global model M 0 And an initial time stamp
Figure BDA0003576358590000022
And issued to the idle vehicle V i In the ith round of interaction, the vehicle V is idle i Active edge servers E j SendingA training request;
s12, judging whether the number of the vehicle participants in the current round is less than the number N.C of the vehicle participants participating in the aggregation in the current round, wherein C is a proportionality coefficient, and passing through an edge server E j To the idle vehicle V i Responding to the latest global model M i-1 And update V i Local model of the current round
Figure BDA0003576358590000021
S13, randomly extracting a plurality of data in the local data sets of the vehicle participants as a training set of the current round of interaction
Figure BDA0003576358590000031
S14, carrying out iteration by using a gradient descent algorithm to obtain an idle vehicle V i Local training model of this round
Figure BDA0003576358590000032
S15, local training model of the round
Figure BDA0003576358590000033
Upload to edge Server E j And recording the receiving time stamp of the edge server by the edge server according to the uploading time of the local training model
Figure BDA0003576358590000034
Calculating a time difference from the acceptance timestamp and the initial timestamp
Figure BDA0003576358590000035
And meanwhile, calculating the average square error of the local model uploaded by the vehicle participants in the current round.
Further, the gradient descent algorithm in S15 is represented as:
Figure BDA0003576358590000036
wherein ,
Figure BDA0003576358590000037
and
Figure BDA0003576358590000038
represents the updated parameters of the model in the k-th and k-1-th local training respectively in the ith round of interaction, and is zeta k,k-1 Represents the learning rate in the k-th training,
Figure BDA0003576358590000039
is expressed in the parameters of the model
Figure BDA00035763585900000310
From the extracted data set when performing an update
Figure BDA00035763585900000311
The kth training set in (1), L (M, x (D)) represents a pair data set
Figure BDA00035763585900000312
The loss function for the model parameters M when training is performed,
Figure BDA00035763585900000315
is the first derivative with respect to M, x (D) denotes the data set D n The data of (1).
Further, the average square error calculation formula in S15 is:
Figure BDA00035763585900000313
where MSE is the mean square error, y i As output of the i-th local model, x i For the input of the ith round of local model, N represents the number of largest supported vehicle participants participating in the training at full load.
Further, the S2 specifically includes:
s21, initializing buffer factor rho epsilon (0,1)Receiving a local training model of a current round uploaded by a vehicle participant
Figure BDA00035763585900000314
And a time stamp T k
S22, judging whether the length of the edge server cache queue is less than N.rho, if so, training the local training model
Figure BDA0003576358590000041
Putting the data into a cache degree column; if not, the edge server caches all elements in the queue and clears the cache queue, performs weight distribution on the local model uploaded by each vehicle participant according to the model aggregation weighting weight, and updates the global model;
and S23, uploading the global model updated in the step S22 to a central server for cloud synchronization.
Further, in S22, the specific calculation manner of performing weight distribution on the local model uploaded by each vehicle participant according to the model aggregation weighting weight is as follows:
Figure BDA0003576358590000042
wherein ,
Figure BDA0003576358590000043
weights that are affected by the local model uploaded by each vehicle participant at the time of aggregation due to different timestamps,
Figure BDA0003576358590000044
weight, γ, of local model uploaded by each vehicle participant at the time of aggregation due to performance differences i For the final weight assignment, α is the weight parameter.
Further, the calculation method for updating the global model in S22 is as follows:
Figure BDA0003576358590000045
wherein M (i +1) is aggregated with the parameters from the i-th round to the i + 1-th round represented by M (i), M j And representing the j updated model parameters received by the edge server in the ith round of parameter aggregation.
Further, the S3 specifically includes:
s31, initializing the capacity upper limit cap and the maximum waiting period T of the central server cache queue, and receiving the aggregated model of the edge server
Figure BDA0003576358590000046
And entering a buffer queue for aggregation;
s32, judging whether the number of the models in the cache queue of the central server touches the upper limit cap of the capacity or whether the waiting interval time reaches the maximum waiting period T, if not, continuing to put the models and executing waiting;
and S33, if the central server cache queue overflows or the waiting time interval exceeds the maximum waiting period, extracting all models in the cache queue and emptying the central server cache queue, performing weight distribution on the local models uploaded by each edge server according to model aggregation weighting weight, and updating the global model according to the average square error.
Further, the calculation method for updating the global model according to the mean square error in S33 is as follows:
Figure BDA0003576358590000051
wherein ,γP Aggregation weights assigned to MSEs according to models uploaded by edge servers, aggregation of M (i +1) with parameters from round i to round i +1 represented by M (i), M j Representing the j updated model parameters received by the central server in the ith round of parameter aggregation.
The invention has the following beneficial effects:
1. accuracy of data sharing: the invention utilizes AI technology to replace the direct transmission of data by a shared data model, and the information quantity of the original data needs to be restored. Compared with direct transmission (including encryption transmission) of data, the mode of sharing the data model completes the work of screening and analyzing the original data, directly outputs results in forms of prediction and the like, and can realize more accurate data application.
2. Privacy protection: the invention avoids the problem of privacy disclosure caused by data transmission process or a receiver because the whole process does not relate to the direct sharing of the data of each vehicle.
3. Global data sharing: the invention considers vehicle nodes, edge computing servers and central cloud servers. The method has the advantages that vehicles with strong or weak computing power can be stimulated to participate in the training of the whole model, the coverage range of the vehicles is wide, and the vehicle data sharing in a certain area is not limited.
Drawings
FIG. 1 is a schematic flow diagram of a multi-layer central asynchronous federal learning method applied to the Internet of vehicles.
Fig. 2 is a schematic view of a multi-layer central federal learning model oriented to the internet of vehicles according to an embodiment of the present invention.
FIG. 3 is a schematic structural diagram of an asynchronous federated learning model according to an embodiment of the present invention.
Fig. 4 is a diagram illustrating an example of communication between nodes in asynchronous federated learning according to an embodiment of the present invention.
Fig. 5 is a schematic diagram of a vehicle participating in model training request and uploading strategy according to an embodiment of the present invention.
FIG. 6 is a diagram illustrating a central server communication according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention is provided to facilitate the understanding of the present invention by those skilled in the art, but it should be understood that the present invention is not limited to the scope of the embodiments, and it will be apparent to those skilled in the art that various changes may be made without departing from the spirit and scope of the invention as defined and defined in the appended claims, and all matters produced by the invention using the inventive concept are protected.
A multi-layer central asynchronous federal learning method applied to the Internet of vehicles is disclosed, as shown in FIG. 1, and comprises the following steps:
s1, constructing an Internet of vehicles model based on asynchronous federal learning, and in each training process, operating a gradient descent algorithm by each vehicle participant according to data acquired by the vehicle participant to obtain a local model;
as shown in fig. 2, the entire internet of vehicles is composed of cloud servers, mobile edge computing (edge computing) servers, and vehicles. Each vehicle in the internet of vehicles comprises an on-board unit (OBU), has data acquisition and sensing capabilities and certain calculation and storage capabilities, but the calculation capability and the storage capability of each vehicle are different. The edge computing server is more powerful in computing and caching than the storage capacity of the vehicle, and can perform computing and caching with a larger task load. The edge computing server directly communicates with vehicles covered by the roadside unit through the roadside unit and directly communicates with the cloud server through the uplink. The cloud server has the most powerful computing and storage capacity in the internet of vehicles, can execute a large number of computing and caching tasks, and is far away from the logic distance of the vehicles in the network topology. When a vehicle participating in the federal learning framework processes or calculates tasks (such as training a regression model for machine learning), the vehicle performs calculation and training together through self independent training and federal cooperation.
In each round of training, each vehicle participant firstly runs a gradient descent algorithm according to the acquired relevant data to obtain a local model. For a single vehicle in the internet of vehicles, there are three network communication channels: vehicle-to-vehicle (V-V), vehicle-to-RSU (V-R), and vehicle-to-cloud server (V-C). And then the vehicle uploads the model to an edge calculation server of a road side unit in the covered range of the vehicle, and the edge calculation server asynchronously receives the model uploaded by each vehicle and performs one-round aggregation to obtain a new model. The model will continue to be uploaded to a logically and physically more central cloud server, while the model may be sent to the vehicle upon request by the vehicle participants. The cloud server aggregates the models received asynchronously from the edge computing servers and then sends the aggregated models to the edge computing servers, and meanwhile, the models can be sent to the vehicle after being requested by the vehicle participants. In addition, original data of the vehicle in federal learning are only kept locally for training and other data analysis, and protection of user information privacy can be guaranteed. FIG. 3 shows a multi-layer central heterogeneous federated learning framework under a car networking scenario proposed in this chapter, and the whole framework includes three modules of "independent training of participants", "updating of parameters of participants", and "increasing of convergence rate
Federal learning is a new scheme for realizing data analysis and sharing in edge computing. The federal learning scheme provided by the application is mainly oriented to a scene of data safety sharing in a vehicle-mounted network. In data sharing, all vehicle users train a global data model by writing related data through a federal learning algorithm, and share original data instead of sharing the original data in a data model sharing mode. The data model contains effective information of the requested data and protects the privacy of the data owner. In view of the advantages of the federal study, the federal study is applied to the internet of vehicles, so that training tasks related to data sharing are achieved.
The federated learning is applied to related calculation tasks in the data security sharing of the Internet of vehicles, so that the efficient sharing and privacy protection of data are considered. The cloud server is denoted C, the set of wayside units is denoted R ═ { R1, R2, …, Rn }, and the set of vehicle participants is denoted V ═ { V ═ V } 1 ,V 2 ,…,V n }. Each vehicle participant vi has a local data set Di { (x) 1 ,y 1 ),(x 2 ,y 2 ),…,(x n ,y n ) Where xi is the input to the trained model and yi is the output of the model (i.e., the label of xi). Di, as a local dataset of one vehicle participant, is a subset of the entire dataset D ═ { D1 ═ D2 ═ … ═ Dn } including datasets held by all vehicle participants and edge calculation servers.
Different from a learning framework for training a traditional unified data set, the federal learning comprises a plurality of communication processes of vehicle participants, an edge computing server and a cloud server, and the convergence rate of a model is greatly influenced by the communication times. As shown in fig. 4, a communication process between a vehicle participant and a mobile edge server and a cloud server in a single parameter update is shown. The method comprises the steps of (I) representing a process that each vehicle participant trains a local model in a vehicle, (II) representing a parameter uploading stage, wherein the process comprises the steps that the vehicle participants send the model to an edge computing server after multiple rounds of local training, the edge computing server aggregates the collected models and uploads the collected models to a more central cloud server, and (III) representing a parameter issuing stage, wherein the process comprises the steps that the cloud server aggregates the models uploaded by the edge computing server, broadcasts the aggregated models to each edge computing server, and responds to the request of the vehicle participants for the model directly from the cloud server. The following describes in detail the process of local training and updating parameters of each node of a vehicle participant by taking a certain round of communication process in the training process as an example, and specifically includes the following steps:
s11, initializing global model M 0 In the ith round of interaction, the vehicle V is idle i Active edge servers E j Sending a training request;
as shown in FIG. 5, the vehicle V k Calculation server E at the drive-in edge j Is within the coverage range of (a), a certain amount of power remains to participate in the training. At this time, the vehicle V k To E j Actively sending a training request, E j Responding, i.e. sending the initial model, after receiving the request
Figure BDA0003576358590000081
If the time T elapses 1 ,T 1 Is a generic term without specific meaning and is used for the following description. Vehicle V k And finishing the training of the local model. At this time, the vehicle V k While located at edge compute server E j and Ej+1 Within the coverage of (c). Since V is in the current round of training k Is from E j The initial model obtained, and therefore the updated model will be uploaded preferentially
Figure BDA0003576358590000091
To E j . And a vehicle V k And E j A reliable communication connection is constructed between the two, if V k Not confirmedE j Received model
Figure BDA0003576358590000092
Will be retransmitted. Repeat upload E j If not successful, uploading the updated model
Figure BDA0003576358590000093
To E j+1 . If the time T elapses 1 + 2 Vehicle V k And finishing the training of the local model. At this time, the vehicle V k Has completely driven away from E 1 Into E j+1 Coverage of, vehicle V k Update model to upload
Figure BDA0003576358590000094
To E j+1 From E j+1 Completing update model
Figure BDA0003576358590000095
The polymerization of (2).
S12, judging whether the number of the vehicle participants in the current round is less than the number N.C of the vehicle participants participating in the aggregation in the current round, wherein C is a proportionality coefficient, and passing through an edge server E j To the idle vehicle V i Responding to the latest global model M i-1 And update V i Local model of the current round
Figure BDA0003576358590000096
S13, randomly extracting a plurality of data in the local data sets of the vehicle participants as a training set of the current round of interaction
Figure BDA0003576358590000097
The idle vehicle actively sends a training request to a peripheral edge computing server to obtain an initial model
Figure BDA0003576358590000098
Rear, vehicle V k I.e. training of the local model from the local data set,note vehicle V k Has a local data set of D n . During the movement of the vehicle, its own sensors will sense and collect relevant data in real time and update the local data set D n . During each local training, t different batches of data sets were randomly drawn and recorded
Figure BDA0003576358590000099
Collectively referred to as
Figure BDA00035763585900000910
The t data sets have consistent data distribution and similar data quantity. Completing the vehicle unit V from the t data sets k And (5) performing interactive local model training in the ith round.
S14, carrying out iteration by using a gradient descent algorithm to obtain an idle vehicle V i Local training model of this round
Figure BDA00035763585900000911
And records the current timestamp T i
The optimization of the model parameters is generally performed in a manner of minimizing an objective function, here, in order to minimize a loss function to obtain an optimization result, an optimization algorithm in this chapter adopts a Stochastic Gradient Descent (SGD), and after an ith round of local model update, the model can be mathematically expressed as:
Figure BDA0003576358590000101
wherein ,
Figure BDA0003576358590000102
and
Figure BDA0003576358590000103
respectively representing the updating parameters of the model in the k-th and k-1-th local training in the ith round of interaction process, and mathematically representing the updating parameters as vectors
Figure BDA0003576358590000104
Or is a tensor, ζ k,k-1 Represents the learning rate in the k-th round of training,
Figure BDA0003576358590000105
is expressed in the parameters of the model
Figure BDA0003576358590000106
When updating, from the extracted data set
Figure BDA0003576358590000107
The kth training set in (1), L (M, x (D)) represents a pair data set
Figure BDA0003576358590000108
A loss function with respect to the model parameter M when training is performed. x (D) represents a data set D n The data of (1). To ensure the training effect, the size of the data set randomly selected in each round needs to be fixed, i.e. set
Figure BDA0003576358590000109
Is a constant value N m . After the training of the local model of each vehicle participant is completed, the timestamp of the training completion time needs to be recorded, and meanwhile, the performance index of the model needs to be provided for the server. In the asynchronous update strategy, the different timestamps of the local models and the performance difference directly influence the weight distribution of the central aggregation.
S15, local training model of the round
Figure BDA00035763585900001010
Upload to edge Server E j And recording the receiving time stamp of the edge server by the edge server according to the uploading time of the local training model
Figure BDA00035763585900001011
Calculating a time difference from the acceptance timestamp and the initial timestamp
Figure BDA00035763585900001012
Simultaneous counting book wheelThe mean square error of the local model uploaded by the secondary vehicle participant.
The performance difference is represented on the data set of the current round of training and is expressed as Mean Square Error (MSE), namely L 2 Norm loss, expressed as:
Figure BDA00035763585900001013
in this embodiment, the smaller the MSE, the better the quality of the model.
S2, uploading the obtained local models to an edge server in the covered range of the vehicle by each vehicle participant, asynchronously receiving the local models uploaded by each vehicle participant by the edge server, and aggregating to obtain a new model;
as shown in fig. 4, in the scenario of car networking, consider the situation that the coverage of the edge computing server is limited, the mobility of the vehicle, and the communication cause causes a drop. In each training round, there are many situations in which the vehicle participating in the training exits the range of the current edge computing server, a new vehicle enters and sends a training request, and the vehicle participating in the training is disconnected due to communication and the like. To alleviate the above problem, the present embodiment performs aggregation in the edge server in the following manner.
S21, initializing a cache factor rho epsilon (0,1), and receiving a local training model of the current round uploaded by a vehicle participant
Figure BDA0003576358590000111
And a time stamp T k
A buffer queue Q is arranged in an edge computing server, and the capacity of Q is controlled by a buffer factor rho, namely the upper limit of the capacity size is N.rho. Each time a model is received from a vehicle participant, it enters a buffer queue to await aggregation.
S22, judging whether the length of the edge server cache queue is less than N.rho, if so, training the local training model
Figure BDA0003576358590000112
Putting the data into a cache degree column; if not, the edge server caches all elements in the queue and clears the cache queue, weight distribution is carried out on the local models uploaded by all vehicle participants according to model aggregation weighting weights, and a global model is updated;
and detecting whether the real-time length len of the cache queue is greater than or equal to N.rho, if so, acquiring data in Q, starting aggregation, and emptying Q. The vehicle is required to carry the timestamp and performance index of the local model update at the same time as sending the updated model. When the server performs aggregation, the timestamp of the model will influence the weight of its aggregation, which is expressed as:
Figure BDA0003576358590000113
wherein ,t1 ,t 2 ,…,t The corresponding time stamp of the model is shown (note: the model is enqueued according to the time sequence in the present scenario),
Figure BDA0003576358590000121
the weights of the influence of each local model due to different time stamps in the aggregation. In addition, there is a difference in performance between the various models received by the server during each iteration. For models that behave differently, it is not fair to assign different weights only considering the time differences. Meanwhile, in order to accelerate the convergence of the models, the influence caused by performance difference needs to be considered when weights are allocated to different models. For the condition that a malicious party exists in the training process, different weights are distributed according to the performance, so that the probability that the malicious model destroys the training can be effectively reduced, and the expression is as follows:
Figure BDA0003576358590000122
wherein ,
Figure BDA0003576358590000123
weight, MSE, representing the influence of local models on the polymerization due to differences in performance i I.e. a quantitative representation of the performance of the respective local model, sum means
Figure BDA0003576358590000124
sum is the reciprocal sum of the performance quantification of each local model, and when the performance of the model is represented by MSE, the MSE is smaller, the representation difference between the result of the model and the data set label is smaller, and the quality of the model is better. In the aggregation process, better quality models will be assigned higher weights, and therefore,
Figure BDA0003576358590000125
weighting is performed according to the inverse relation of the MSE of the local model. Final weight assignment of local model e.g.
Figure BDA0003576358590000126
In the formula, the time stamp and the performance are dynamically adjusted by α, and the final weight is assigned to each local model.
And S23, uploading the global model updated in the step S22 to a central server for cloud synchronization.
The numerical value of the polymerization process is expressed as
Figure BDA0003576358590000127
Wherein M (i +1) is aggregated with the parameters from round i to round i +1 represented by M (i), wherein M j And representing the j updated model parameters received by the edge computing server in the ith round of parameter aggregation. And after each round of updating is finished, the edge computing server sends the model to the central server.
And S3, the edge server uploads the new model obtained in the S2 to the cloud server, the new model is asynchronously received by the cloud server and then aggregated, and the aggregated model is sent to each edge server or is sent to the vehicle participants after being requested by the vehicle participants.
As shown in fig. 4, the different edge computing servers are asynchronous in model aggregate update for each round due to the difference of the subordinate vehicle participants. The connection media between the edge computing servers is the central cloud server. In order to ensure that the vehicle obtains the latest training model when the vehicle carries out a training request to the edge computing server, so as to accelerate the convergence speed. The central cloud server is required to re-aggregate and synchronize the aggregated and updated models of the edge computing servers. In addition, in some road scenes, the arrangement or the function of the edge computing server itself is limited due to the limitation of the environment. When a vehicle with residual computing power wants to participate in federal learning training, the vehicle needs to skip the edge computing server and directly send a training request to the central server. In this embodiment, a schematic diagram of aggregation synchronization of an upload model of an edge computing server in a central server is shown in fig. 6, and specifically includes the following steps:
s31, initializing the capacity upper limit cap and the maximum waiting period T of the central server cache queue, and receiving the aggregated model of the edge server
Figure BDA0003576358590000131
And entering a buffer queue for aggregation;
model with central server continuously receiving aggregation from edge computing server along with time advance
Figure BDA0003576358590000132
Since the receiving process is asynchronous, as with the edge compute server,
Figure BDA0003576358590000133
the method enters a buffer queue Q to wait for aggregation.
S32, judging whether the number of the models in the cache queue of the central server touches the upper limit cap of the capacity or whether the waiting interval time reaches the maximum waiting period T, if not, continuing to put the models and executing waiting;
the operations of receiving model and training requests, model aggregation and issuing are waited and executed until convergence. Aggregation is performed when the number of models in Q touches the capacity cap, while Q itself empties to store the newly received models.
And S33, if the central server cache queue overflows or the waiting time interval exceeds the maximum waiting period, extracting all models in the cache queue and emptying the central server cache queue, performing weight distribution on the local models uploaded by each edge server according to model aggregation weighting weight, and updating the global model according to the average square error.
Due to V k Upload update model to E i, and Ei Uploading the aggregation model to C again, there will be two delays. If the aggregation operation is executed only when the cache queue overflows, the central server does not execute the aggregation operation for a long time, and each node cannot obtain the latest model in the whole federal learning process, so that the convergence speed is reduced. Therefore, a parameter T, i.e. a maximum waiting period, is initialized in the central server to limit the waiting time of the server before each round of aggregation. When Q overflows or the waiting time interval T reaches T, the aggregation operation is started. In the aggregation of the central server, the influence of the time difference of the received models on the weighting weight is not considered any more, and the weighting of the model aggregation is determined only by the respective performances.
MSE is used as a quantitative index of model performance, and the edge calculation server calculates the model according to the own data set after each round of aggregation update
Figure BDA0003576358590000141
And the MSE of the central server is uploaded to the central server. In the algorithm, considering that the model received in the central server is only taken from the edge computing server, the authenticity of the MSE of the model is directly trusted, and therefore, the aggregation of the models is represented as:
Figure BDA0003576358590000142
wherein ,γP Aggregation weights assigned to MSEs according to the respective models. After the central server completes the aggregation update, the new model M C And sending the data to all edge computing servers to realize the synchronization of the latest training model in the whole frame.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principle and the implementation mode of the invention are explained by applying specific embodiments in the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
It will be appreciated by those of ordinary skill in the art that the embodiments described herein are intended to assist the reader in understanding the principles of the invention and are to be construed as being without limitation to such specifically recited embodiments and examples. Those skilled in the art can make various other specific changes and combinations based on the teachings of the present invention without departing from the spirit of the invention, and these changes and combinations are within the scope of the invention.

Claims (9)

1. The multi-layer central asynchronous federal learning method applied to the Internet of vehicles is characterized by comprising the following steps of:
s1, constructing an Internet of vehicles model based on asynchronous federal learning, and in each training process, operating a gradient descent algorithm by each vehicle participant according to data acquired by the vehicle participant to obtain a local model;
s2, uploading the obtained local models to an edge server in the covered range of the vehicle by each vehicle participant, asynchronously receiving the local models uploaded by each vehicle participant by the edge server, and aggregating to obtain a new model;
and S3, the edge server uploads the new model obtained in the S2 to the cloud server, the new model is asynchronously received by the cloud server and then aggregated, and the aggregated model is sent to each edge server or is sent to the vehicle participants after being requested by the vehicle participants.
2. The method for multi-layer central asynchronous federal learning applied to internet of vehicles according to claim 1, wherein the S1 specifically comprises:
s11, initializing global model M 0 And an initial time stamp
Figure FDA0003576358580000011
And issued to the idle vehicle V i In the ith round of interaction, the vehicle V is idle i Active edge servers E j Sending a training request;
s12, judging whether the number of the vehicle participants in the current round is less than the number N.C of the vehicle participants participating in the aggregation in the current round, wherein N represents the number of the vehicle participants participating in the training which are supported maximally under full load, C is a proportionality coefficient, if yes, passing through an edge server E j To the idle vehicle V i Responding to the latest global model M i-1 And update V i Local model of the current round
Figure FDA0003576358580000012
S13, randomly extracting a plurality of data in the local data sets of the vehicle participants as a training set of the current round of interaction
Figure FDA0003576358580000013
S14, carrying out iteration by using a gradient descent algorithm to obtain an idle vehicle V i Local training model of this round
Figure FDA0003576358580000014
S15, local training model of the round
Figure FDA0003576358580000021
Upload to edge Server E j And recording the receiving time stamp of the edge server by the edge server according to the uploading time of the local training model
Figure FDA0003576358580000022
Calculating a time difference from the acceptance timestamp and the initial timestamp
Figure FDA0003576358580000023
And meanwhile, calculating the average square error of the local model uploaded by the vehicle participants in the current round.
3. The asynchronous federal learning method of multi-layer center applied in car networking as claimed in claim 2, wherein the gradient descent algorithm in S15 is represented as:
Figure FDA0003576358580000024
wherein ,
Figure FDA0003576358580000025
and
Figure FDA0003576358580000026
represents the updated parameters of the model in the k-th and k-1-th local training respectively in the ith round of interaction, and is zeta k,k-1 Represents the learning rate in the k-th training,
Figure FDA0003576358580000027
is expressed in the parameters of the model
Figure FDA0003576358580000028
From the extracted data set when performing an update
Figure FDA0003576358580000029
The kth training set in (1), L (M, x (D)) represents a pair data set
Figure FDA00035763585800000210
The loss function for the model parameters M when training is performed,
Figure FDA00035763585800000211
is the first derivative with respect to M, x (D) denotes the data set D n The data of (1).
4. The asynchronous federal learning method in multi-layer center applied to internet of vehicles as claimed in claim 2, wherein the mean square error calculation formula in S15 is:
Figure FDA00035763585800000212
where MSE is the mean square error, y i As output of the i-th local model, x i For the input of the ith round of local model, N represents the number of vehicle participants participating in the training that are maximally supported at full load.
5. The method for multi-layer central asynchronous federal learning applied to internet of vehicles according to claim 1, wherein the S2 specifically comprises:
s21, initializing a cache factor rho epsilon (0,1), and receiving a local training model of the current round uploaded by a vehicle participant
Figure FDA00035763585800000213
And recording the time stamp at reception
Figure FDA00035763585800000214
S22, judging whether the length of the edge server cache queue is less than N.rho, if so, training the local training model
Figure FDA0003576358580000031
Putting the data into a cache degree column; if not, the edge server caches all elements in the queue and clears the cache queue, weight distribution is carried out on the local models uploaded by all vehicle participants according to model aggregation weighting weights, and a global model is updated;
and S23, uploading the global model updated in the step S22 to a central server for cloud synchronization.
6. The multi-layer central asynchronous federal learning method applied to the internet of vehicles according to claim 5, wherein the specific calculation manner of performing weight distribution on the local models uploaded by each vehicle participant according to the model aggregation weighting weight in the S22 is as follows:
Figure FDA0003576358580000032
wherein ,
Figure FDA0003576358580000033
weights that are affected by the local model uploaded by each vehicle participant at the time of aggregation due to differences in time differences,
Figure FDA0003576358580000034
weight of local model influence due to performance difference, gamma, uploaded by each vehicle participant during aggregation i And alpha is a weight parameter for final weight distribution.
7. The multi-layer central asynchronous federal learning method applied to internet of vehicles as claimed in claim 5, wherein the calculation method for updating the global model in S22 is as follows:
Figure FDA0003576358580000035
wherein M (i +1) is aggregated with the parameters from the i-th round to the i + 1-th round represented by M (i), M j And representing the j updated model parameters received by the edge server in the ith round of parameter aggregation.
8. The method for multi-layer central asynchronous federal learning applied to internet of vehicles according to claim 1, wherein the S3 specifically comprises:
s31, initializing the capacity upper limit cap and the maximum waiting period T of the central server cache queue, and receiving the aggregated model of the edge server
Figure FDA0003576358580000036
And entering a buffer queue for aggregation;
s32, judging whether the number of the models in the cache queue of the central server touches the upper limit cap of the capacity or whether the waiting interval time reaches the maximum waiting period T, if not, continuing to put the models and executing waiting;
and S33, if the central server cache queue overflows or the waiting time interval exceeds the maximum waiting period, extracting all models in the cache queue and emptying the central server cache queue, performing weight distribution on the local models uploaded by each edge server according to model aggregation weighting weight, and updating the global model according to the average square error.
9. The method as claimed in claim 8, wherein the calculation manner for updating the global model according to the mean square error in S33 is as follows:
Figure FDA0003576358580000041
wherein ,γP Aggregation weights assigned to MSEs according to models uploaded by edge servers, aggregation of M (i +1) with parameters from round i to round i +1 represented by M (i), M j Representing the j updated model parameters received by the central server in the ith round of parameter aggregation.
CN202210345422.7A 2022-03-31 2022-03-31 Multi-layer center asynchronous federal learning method applied to Internet of vehicles Active CN114827198B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210345422.7A CN114827198B (en) 2022-03-31 2022-03-31 Multi-layer center asynchronous federal learning method applied to Internet of vehicles

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210345422.7A CN114827198B (en) 2022-03-31 2022-03-31 Multi-layer center asynchronous federal learning method applied to Internet of vehicles

Publications (2)

Publication Number Publication Date
CN114827198A true CN114827198A (en) 2022-07-29
CN114827198B CN114827198B (en) 2023-04-28

Family

ID=82533654

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210345422.7A Active CN114827198B (en) 2022-03-31 2022-03-31 Multi-layer center asynchronous federal learning method applied to Internet of vehicles

Country Status (1)

Country Link
CN (1) CN114827198B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116346863A (en) * 2023-05-29 2023-06-27 湘江实验室 Vehicle-mounted network data processing method, device, equipment and medium based on federal learning
CN116506829A (en) * 2023-04-25 2023-07-28 江南大学 Federal edge learning vehicle selection method based on C-V2X communication
CN116546429A (en) * 2023-06-06 2023-08-04 江南大学 Vehicle selection method and system in federal learning of Internet of vehicles
CN116580448A (en) * 2023-04-11 2023-08-11 深圳市大数据研究院 Behavior prediction method, system, electronic equipment and storage medium
CN116681126A (en) * 2023-06-06 2023-09-01 重庆邮电大学空间通信研究院 Asynchronous weighted federation learning method capable of adapting to waiting time
CN117010485A (en) * 2023-10-08 2023-11-07 之江实验室 Distributed model training system and gradient protocol method in edge scene

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2020101613A4 (en) * 2020-08-02 2020-09-10 B.P.R.V.S, Priyatham MR Collaborative federative learning approach for internet of vehicles traffic prediction
DE102020129306A1 (en) * 2019-11-06 2021-05-06 Intel Corporation TRANSMISSION OF PAGING SUPPORT INFORMATION FOR NOTIFICATION OF THE CALLER IDENTIFICATION (CID)
CN114116198A (en) * 2021-10-21 2022-03-01 西安电子科技大学 Asynchronous federal learning method, system, equipment and terminal for mobile vehicle

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102020129306A1 (en) * 2019-11-06 2021-05-06 Intel Corporation TRANSMISSION OF PAGING SUPPORT INFORMATION FOR NOTIFICATION OF THE CALLER IDENTIFICATION (CID)
AU2020101613A4 (en) * 2020-08-02 2020-09-10 B.P.R.V.S, Priyatham MR Collaborative federative learning approach for internet of vehicles traffic prediction
CN114116198A (en) * 2021-10-21 2022-03-01 西安电子科技大学 Asynchronous federal learning method, system, equipment and terminal for mobile vehicle

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116580448A (en) * 2023-04-11 2023-08-11 深圳市大数据研究院 Behavior prediction method, system, electronic equipment and storage medium
CN116580448B (en) * 2023-04-11 2024-04-16 深圳市大数据研究院 Behavior prediction method, system, electronic equipment and storage medium
CN116506829A (en) * 2023-04-25 2023-07-28 江南大学 Federal edge learning vehicle selection method based on C-V2X communication
CN116506829B (en) * 2023-04-25 2024-05-10 广东北斗烽火台卫星定位科技有限公司 Federal edge learning vehicle selection method based on C-V2X communication
CN116346863A (en) * 2023-05-29 2023-06-27 湘江实验室 Vehicle-mounted network data processing method, device, equipment and medium based on federal learning
CN116346863B (en) * 2023-05-29 2023-08-01 湘江实验室 Vehicle-mounted network data processing method, device, equipment and medium based on federal learning
CN116546429A (en) * 2023-06-06 2023-08-04 江南大学 Vehicle selection method and system in federal learning of Internet of vehicles
CN116681126A (en) * 2023-06-06 2023-09-01 重庆邮电大学空间通信研究院 Asynchronous weighted federation learning method capable of adapting to waiting time
CN116546429B (en) * 2023-06-06 2024-01-16 杭州一诺科创信息技术有限公司 Vehicle selection method and system in federal learning of Internet of vehicles
CN116681126B (en) * 2023-06-06 2024-03-12 重庆邮电大学空间通信研究院 Asynchronous weighted federation learning method capable of adapting to waiting time
CN117010485A (en) * 2023-10-08 2023-11-07 之江实验室 Distributed model training system and gradient protocol method in edge scene
CN117010485B (en) * 2023-10-08 2024-01-26 之江实验室 Distributed model training system and gradient protocol method in edge scene

Also Published As

Publication number Publication date
CN114827198B (en) 2023-04-28

Similar Documents

Publication Publication Date Title
CN114827198B (en) Multi-layer center asynchronous federal learning method applied to Internet of vehicles
Wang et al. A novel reputation-aware client selection scheme for federated learning within mobile environments
CN111629380B (en) Dynamic resource allocation method for high concurrency multi-service industrial 5G network
CN113435472A (en) Vehicle-mounted computing power network user demand prediction method, system, device and medium
CN113132943B (en) Task unloading scheduling and resource allocation method for vehicle-side cooperation in Internet of vehicles
WO2024032121A1 (en) Deep learning model reasoning acceleration method based on cloud-edge-end collaboration
CN105224393B (en) A kind of scheduling virtual machine mechanism of JT-CoMP under C-RAN frameworks
CN108810846A (en) A kind of In-vehicle networking group's sensor coverage method based on urban public transport
CN114301935B (en) Reputation-based internet of things edge cloud collaborative federal learning node selection method
WO2023159986A1 (en) Collaborative caching method in hierarchical network architecture
CN111491312A (en) Method and equipment for predicting, allocating, acquiring and training neural network of wireless resources
Huang et al. Enabling DNN acceleration with data and model parallelization over ubiquitous end devices
Li et al. FEEL: Federated end-to-end learning with non-IID data for vehicular ad hoc networks
Guo et al. NOMA-assisted multi-MEC offloading for IoVT networks
CN113012013A (en) Cooperative edge caching method based on deep reinforcement learning in Internet of vehicles
CN114374949B (en) Information freshness optimization-based power control mechanism in Internet of vehicles
CN113094180B (en) Wireless federal learning scheduling optimization method and device
CN111710153B (en) Traffic flow prediction method, device, equipment and computer storage medium
CN115208892B (en) Vehicle-road collaborative online task scheduling method and system based on dynamic resource demand
Liu et al. Resource allocation via edge cooperation in digital twin assisted Internet of Vehicle
CN115640852A (en) Federal learning participation node selection optimization method, and federal learning method and system
CN114995990A (en) Method and device for unloading computing tasks, electronic equipment and computer storage medium
CN114331299A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN115080249B (en) Vehicle networking multidimensional resource allocation method and system based on federal learning
Yang et al. RaftFed: a lightweight federated learning framework for vehicular crowd intelligence

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant