A hierarchical federated learning client selection method for Internet of Vehicles
By adopting a layered federated learning architecture and reputation mechanism to select vehicle clients in the Internet of Vehicles environment, the impact of high mobility and limited resources on federated learning is solved, and more efficient resource allocation and more stable model quality is achieved.
Patent Information
- Application Number
- CN202411404244.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2044-10-10
AI Technical Summary
In the Internet of Vehicles scenario, the high mobility of vehicles and limited communication computing resources affect the stability and efficiency of federated learning. Traditional solutions fail to fully consider these factors, resulting in waste of resources and instability in model quality.
Adopt a layered federated learning architecture and select vehicle clients through reputation mechanisms, consider vehicle mobility and historical contribution, dynamically calculate the reputation value of vehicle clients, optimize resource allocation and improve model quality.
It effectively improves the efficiency of federated learning for vehicles in the Internet of Vehicles environment when the vehicle is highly mobility, optimizes resource allocation, enhances model quality and stability, and reduces resource waste.
Smart Images

Figure CN118900423B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of intelligent vehicle networking and relates to a hierarchical federated learning client selection method for vehicle networking. Background Art
[0002] With the rapid development of Internet of Things (IoT) and Artificial Intelligence (AI) technologies, the Internet of Vehicles (IoV) has gradually become an important part of the future intelligent transportation system. IoV achieves information sharing and collaborative work through communication between vehicles and infrastructure, other vehicles, and cloud servers, thereby improving traffic efficiency, enhancing driving safety, and providing a better user experience.
[0003] Federated learning is a distributed machine learning technology that aims to train models without private data leaving the local device. Federated learning trains models locally on each participating device and only shares model parameters instead of raw data. The server aggregates the shared model parameters to form a global model. This overcomes the traditional centralized machine learning method that requires a large amount of training data to be concentrated on a server for processing, resulting in increased data transmission costs and time, as well as risks in data privacy and security. It allows multiple parties to collaborate on model training while effectively protecting data privacy.
[0004] By applying federated learning to the Internet of Vehicles scenario, we can make full use of the massive traffic data generated by smart vehicles, conduct machine learning training in a safer environment, and form a global model containing more data information, thereby providing better smart Internet of Vehicles services. However, the high mobility of vehicles and limited communication computing resources have brought new challenges to federated learning. In the application scenario of Internet of Vehicles combined with federated learning, the high mobility of vehicles will affect the stability and efficiency of federated learning. Because vehicles constantly enter or leave the communication range of a certain edge server, the vehicle clients participating in the learning change frequently. In addition, the computing power and network connection status of vehicles are also different. These factors will affect the stability and quality of vehicles participating in federated learning. In order to solve these problems, existing researchers have also proposed some targeted methods.
[0005] For example, for the evaluation of vehicle mobility, some researchers have proposed a joint optimization algorithm that uses the probability matrix of vehicle client transfers between different edge servers to represent node mobility, thereby considering the stability of vehicle participation in federated learning. However, when considering the probability matrix, the probability of transfer between adjacent edge servers is the same, which cannot more realistically simulate vehicle movement in real scenarios. In addition, for vehicle communication efficiency and computing resource optimization, some researchers have proposed a utility-driven and heterogeneous-aware user selection method, which first uses the optimization method to select users with the least computing and communication time, and then in the subsequent federated learning process, rearranges the client computing working frequency according to the user computing and communication time to save energy. However, this method does not take into account that the communication time is not only affected by the amount of data transmitted, but also that the transmission delay caused by the change in distance during the movement of the vehicle client will change. Therefore, this method has some defects.
[0006] In summary, when designing federated learning solutions for the Internet of Vehicles scenario, traditional solutions do not fully consider the limitations brought by node mobility and limited resources, that is, they do not fully consider the impact of high mobility of vehicle clients on the stability and effect of federated learning, and the ineffective occupation of resources by clients with limited resources and low model contribution in edge scenarios, resulting in resource waste. In addition, the current hierarchical federated learning architecture has also been widely studied in the context of the integration of Internet of Vehicles and federated learning. For example, some researchers have verified that the three-layer federated learning architecture can effectively improve communication efficiency and reduce the consumption of local computing resources compared to the two-layer federated learning, but the solution does not involve too much node mobility. Summary of the invention
[0007] The purpose of the present invention is to propose a hierarchical federated learning client selection method for the Internet of Vehicles. It uses a hierarchical federated architecture to improve communication efficiency in the Internet of Vehicles environment, and designs a vehicle selection method that takes vehicle mobility and reputation into consideration. This method uses a reputation mechanism to select vehicle clients with better quality to participate in federated learning training, thereby improving the efficiency of federated learning in the Internet of Vehicles environment when facing high vehicle mobility.
[0008] In order to achieve the above object, the present invention adopts the following technical scheme:
[0009] A hierarchical federated learning client selection method for the Internet of Vehicles. In the Internet of Vehicles scenario, by introducing hierarchical federated learning, vehicle users are divided into a federated learning architecture centered on an edge server and an upper-layer federated learning architecture composed of an edge server and a cloud server. The hierarchical federated learning client selection method for the Internet of Vehicles includes the following steps:
[0010] Step I: First, the edge server obtains the relative distance between itself and the vehicle client, as well as the vehicle's moving direction and speed, and then calculates the vehicle client's residence time within the coverage area of the adjacent edge server. Then, the vehicles are sorted in descending order according to the residence time, and higher scores are given to vehicles with longer residence time. Secondly, the utility value brought by its participation in this round of federated learning is calculated by combining the score value given by the vehicle's residence time and the reputation value updated after the last participation in federated learning.
[0011] Step II. Select the top M vehicle clients to participate in the federated learning training according to their utility values;
[0012] Step III. The edge server updates the reputation value of each vehicle client in this round of training process, specifically:
[0013] First, the model contribution of the vehicle client in this round of training is calculated; then, the model cosine similarity is calculated based on the model parameters obtained after the previous round of local training of the vehicle client and the final global model parameters of the previous round; the reputation change value of the vehicle client is obtained by combining the score assigned to the model contribution of the vehicle client and the model cosine similarity; finally, based on the historical reputation value of the vehicle client and the reputation change value, the final reputation value of the vehicle client in this round is updated.
[0014] The present invention has the following advantages:
[0015] As described above, the present invention relates to a hierarchical federated learning client selection method for the Internet of Vehicles. The method effectively improves the efficiency of federated learning in the face of high mobility of vehicles in the Internet of Vehicles environment by adopting a reputation mechanism, combining the high mobility characteristics and historical contribution of vehicle clients. This efficiency improvement is mainly reflected in optimizing resource allocation and enhancing model quality and stability. By dynamically calculating the reputation value of the vehicle client and selecting the vehicle participating in the federated learning accordingly, the resources occupied by inefficient vehicle clients to participate in the training are reduced, and the allocation of communication and computing resources is optimized. In addition, since the selected vehicle client is more likely to have a longer stay time within the coverage area of the edge server, the communication interruption caused by the vehicle moving out of the coverage area quickly is reduced, and the stability of the system is enhanced. The vehicle client selected by the reputation mechanism is more likely to complete high-quality training tasks within its stay time, which enables each training iteration to collect more reliable and high-quality model updates, thereby improving the quality of the global model and the learning stability of the system. The method of the present invention effectively improves the efficiency of federated learning in the face of high mobility of vehicles in the Internet of Vehicles environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A system architecture diagram of a hierarchical federated learning client selection method for Internet of Vehicles in an embodiment of the present invention;
[0017] Figure 2 This is a workflow diagram for each round of hierarchical federated learning in an embodiment of the present invention;
[0018] Figure 3 A schematic diagram of a process flow of a vehicle client selection method according to an embodiment of the present invention;
[0019] Figure 4 The figure is a general workflow diagram of the hierarchical federated learning client selection method for Internet of Vehicles in an embodiment of the present invention. DETAILED DESCRIPTION
[0020] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:
[0021] Example 1
[0022] When designing federated learning solutions for current Internet of Vehicles scenarios, traditional solutions have not fully considered the impact of high mobility of vehicle clients on the stability and effectiveness of federated learning, as well as the ineffective occupation of resources by clients with limited resources and low model contribution in edge scenarios, resulting in resource waste. With the help of the idea of a layered federated learning architecture, the present invention adds a vehicle mobility perception solution to the three-layer federated learning framework. At the same time, it considers the performance of the vehicle in the historical federated learning training process and evaluates its reputation value, thereby reducing the participation of vehicle clients that do not contribute much to federated learning but still consume communication and computing resources, thereby optimizing resource allocation and improving the overall efficiency of federated learning.
[0023] like Figure 1 As shown, the present invention first builds a hierarchical federated learning system architecture diagram in the Internet of Vehicles scenario. The system mainly includes three roles: vehicle client, edge server, and cloud server. Before performing hierarchical federated learning, the vehicle client is selected first. During the driving process, the neighboring edge server calculates the link time that can be established between the vehicle client and the vehicle client. After completing the vehicle client selection, the edge server formally establishes a wireless communication link with the selected vehicle client, and the vehicle client starts local training. The edge layer is responsible for communicating with the lower-level vehicle client and with the upper-level cloud server: after receiving the local model parameters of the vehicle client, the edge server is responsible for intermediate model aggregation, and after a certain number of rounds, the intermediate aggregation results are uploaded to the cloud server of the cloud layer; the cloud server then performs global aggregation to form a global model, and then the cloud server communicates with the edge server to send the global model; finally, the edge server communicates with the lower-level vehicle client to send the global model.
[0024] like Figure 2This is the flowchart of each round of work for hierarchical federated learning in the vehicle networking scenario of the present invention. Among the key steps: after the reputation value update of the vehicle client and the calculation of the utility value of the vehicle client, the selected vehicle client receives the initial global model from the edge server, then conducts local model training, and then uploads the local model parameters to the edge server. The unselected vehicle clients do not participate in the federated learning training of this round. Next, the edge server performs edge aggregation in sequence and uploads it to the cloud server for global aggregation. After completing one round of federated learning training, the cloud server issues the updated global model for the next round of training. The present invention introduces a hierarchical federated learning architecture in the vehicle networking scenario, combines with a reputation mechanism, takes into account the high mobility characteristics and historical contribution degrees of vehicle clients, and effectively improves the federated learning efficiency in the vehicle networking environment when facing high vehicle mobility.
[0025] As Figure 3 This is the flowchart of the vehicle client selection algorithm of the present invention. Vehicle client selection, as a key technology in the present invention, mainly completes the task of selecting vehicle clients to participate in federated learning by evaluating the mobility and historical reputation values of vehicle clients (which will be discussed in detail below).
[0026] As Figure 4 This is the overall flowchart of the method of the present invention. Before the start of each federated learning training, the vehicle selection algorithm is first executed. In steps I-1 and I-2, the utility value of a certain vehicle client is evaluated by combining the relevant information of the vehicle client's mobility and the historically generated reputation value. In step I-3, the required number of vehicle clients are selected from high to low according to the utility values of each vehicle client to participate in the subsequent federated learning training process. From step II-1 to step II-7 is the training process under the hierarchical federated learning architecture. In the final step III, the edge server evaluates the model contribution degree of each vehicle client in this federated learning and updates the latest reputation value in combination with the historical reputation value to prepare for the calculation of the utility value in the next vehicle selection.
[0027] Next, in combination with the attached Figure 1 to the attached Figure 4 , the method for selecting clients for hierarchical federated learning for vehicle networking in this embodiment will be described in detail. Before that, the present invention first aims at the vehicle networking scenario. By introducing hierarchical federated learning technology, a large number of vehicle users are divided into a federated learning architecture centered on the edge and an upper-layer federated learning architecture composed of an edge server and a cloud server, so as to be able to coordinate small-scale federated learning systems more efficiently, as Figure 1 shown.
[0028] As Figure 3 and Figure 4 shown, the method for selecting clients for hierarchical federated learning for vehicle networking specifically includes the following steps:
[0029] Step I. Vehicle Selection.
[0030] First, the edge server obtains the relative distance between itself and the vehicle client, as well as the vehicle's moving direction and speed. It then calculates the vehicle client's residence time within the coverage area of the adjacent edge server, and then sorts the vehicles in descending order based on the residence time, giving higher scores to vehicles with longer residence times. Secondly, the utility value brought by the vehicle's participation in this round of federated learning is calculated by combining the score value assigned to the vehicle's residence time and the reputation value updated after the last participation in federated learning.
[0031] In view of the impact of high mobility of vehicle clients on federated learning in the Internet of Vehicles scenario, the present invention adopts a method of calculating the time that a vehicle client stays in the management range of a neighboring edge server, and uses the length of time the vehicle client stays to represent its mobility: a vehicle client with higher mobility will leave the management range of a neighboring edge server faster, that is, the shorter the stay time, and the ranking of the stay time is used to represent the stability of the corresponding vehicle client in connecting within the management range.
[0032] like Figure 3 As shown, the step I is specifically as follows:
[0033] Step I-1: Obtain the relative distance between the edge server and the vehicle client, as well as the vehicle moving direction and speed, and calculate the residence time of the vehicle client within the coverage area of the adjacent edge server.
[0034] The residence time of vehicle client i within the coverage area of the adjacent edge server is defined as The formula for calculating the residence time of the i-th vehicle client within the coverage of the adjacent edge server j is shown in formula (1):
[0035]
[0036] Where i∈[1,N], N is the total number of candidate vehicle clients; L is the coverage distance of the edge server; pos i is the position of vehicle client i; v i is the driving speed of vehicle client i in direction.
[0037] When the vehicle is moving in a positive direction, the speed v i When the vehicle is moving in a negative direction, the speed v i Less than zero.
[0038] The longer the vehicle stays, the longer the vehicle client can access the training in this round, and the more stable the process of selecting it to participate in federated learning. Then, the vehicles are sorted in descending order according to the stay time, and higher scores are given to vehicles with longer stay time.
[0039] definition is the ranking of vehicle client i according to the stay time, The range is [1,|V j |]. Then the calculation formula for assigning scores based on the vehicle's stay time is as shown in formula (2):
[0040]
[0041] in, represents the score assigned according to the residence time of vehicle client i, V j is the set of candidate vehicle clients currently under the coverage of edge server j; the longer the vehicle stays, the higher the score assigned to the vehicle.
[0042] Step I-2: When selecting clients to participate in federated learning, in order to simultaneously solve the problems of the impact of vehicle client mobility and the impact of low-quality nodes participating in training on the efficiency of federated learning, the present invention designs a method for calculating the utility of vehicle clients. By comprehensively evaluating the mobility and reputation value of the vehicle client, its utility value is calculated, and finally, based on the level of utility, the vehicle client that can participate in training for a longer time and is more reliable in training is selected.
[0043] The edge server combines the score value assigned by the vehicle's stay time and the reputation value updated after the last participation in federated learning to calculate the utility value brought by its participation in this round of federated learning as follows:
[0044] Define the utility value of the i-th vehicle client as Util i , and its calculation formula is shown in formula (3):
[0045]
[0046] in, represents the score assigned according to the residence time of vehicle client i, is the historical reputation value of the i-th vehicle client; h i is the number of times the i-th vehicle client has participated in federated learning in history; μ is the attenuation coefficient, ranging from (0,1); α is the weight parameter of the vehicle client’s residence time, and β is the weight parameter of the historical reputation value.
[0047] It is not difficult to see from the above formula (3) that the calculation of the utility value of the vehicle client takes into account the impact of the vehicle client's mobility and the effect of its historical participation in training. The higher the utility of the vehicle client, the better the effect of selecting it to participate in federated learning.
[0048] Step I-3: The edge server selects each vehicle client from high to low according to the utility value calculated by formula (3), and screens out the first M vehicle clients required for this round of federated learning, where M is a natural number.
[0049] Step II. Use the first M vehicle clients selected in step I to participate in the federated learning training, where the vehicle client participates in each round of hierarchical federated learning workflow diagram, as shown in Figure 2 shown.
[0050] Step II-1. The edge server sends the edge model to the selected vehicle clients under its management scope.
[0051] Step II-2. The vehicle client performs local training.
[0052] The model update formula for local training by the vehicle client is shown in formula (4):
[0053] ω i (k) = ω i (k-1)-η▽F(ω i (k-1)) (4)
[0054] where ω i (k) is the local model parameter of vehicle client i at the kth iteration, ω i (k-1) is the local model parameter of vehicle client i at the k-1th iteration, η is the learning rate, and ▽F is the gradient of the loss function.
[0055] The calculation formula of the loss function F(ω) is shown in formula (5):
[0056]
[0057] Where D i is the local data set, d is D i A sample of d (ω) is the loss function of sample d.
[0058] Step II-3. After the vehicle client training is completed, upload the local model parameters to the edge server.
[0059] Step II-4. The edge server asynchronously aggregates the model parameters of each vehicle client.
[0060] Define the edge model aggregation method of the jth edge server as shown in formula (6).
[0061]
[0062] Among them, ω j (b) represents the model parameters obtained by the edge model of the jth edge server at the bth edge iteration aggregation, V S,j is the set of vehicle clients selected under the jth edge server; D S,j The vehicle client set VS,j The sum of local data sets; K1 is the number of local iterations of the vehicle client, ω i (b*K1) is the local model parameter uploaded during the communication process between vehicle client i and edge server j in the bth edge iteration.
[0063] Step II-5. The edge server uploads the edge model parameters to the cloud server.
[0064] Step II-6. The cloud server performs global aggregation to obtain a global model.
[0065] The cloud server performs a global model aggregation formula, as shown in formula (7):
[0066]
[0067] Among them, ω G (t) represents the model parameters of the cloud server after global aggregation in the tth round, J is the total number of edge servers, j∈[1,J], K2 is the number of edge iterations, acc j is the model test accuracy of edge server j, and ACC(t) is the sum of the model test accuracy of all edge servers.
[0068] Step II-7. The edge server receives the global model from the cloud server and distributes it to the vehicle client for synchronization.
[0069] Step III. Reputation value update.
[0070] When considering the historical training behavior of the vehicle client, the present invention introduces a reputation value evaluation method to consider the effects of the vehicle client's historical training rounds and current training rounds, thereby using the reputation value to reflect the reliability of the vehicle client's participation in the training process.
[0071] Specifically, the edge server updates the reputation value of each vehicle client in this round of training. The reputation value evaluates the effect of the vehicle client's historical training rounds and the current training round. The reputation value update process is as follows:
[0072] Step III-1: First, the edge server calculates the model contribution of the vehicle client in this round of training.
[0073] Define the loss contribution of the i-th vehicle client in the current training round calculated by the edge server as Its calculation formula is shown in formula (8):
[0074]
[0075] Where B is a batch of samples in the local dataset of the i-th vehicle client; Loss(B) is the average loss value of sample batch B, B∈D i .
[0076] Then the edge server contributes The value is ranked and scored. Definition It is a score assigned according to the loss contribution value of vehicle client i, and its calculation formula is as follows:
[0077]
[0078] in For vehicle client i, the loss contribution To sort the rankings, The range is [1,|V S,j |],V S,j The set of vehicle clients selected by edge server j.
[0079] A higher score is given to a vehicle client that contributes more to the loss.
[0080] Step III-2: Calculate the model cosine similarity based on the gradient obtained after the last round of local training and the gradient of the initial global model in the last round. Considering the impact of historical training rounds, the cosine similarity of model parameters is used to evaluate the gap between the local model of the vehicle client and the final global model. The cosine similarity Sim i,t The calculation formula is shown in formula (10):
[0081]
[0082] Among them, ω i,t is the local model parameter obtained by the i-th vehicle client in the last round of federated learning, ω G,t are the final global model parameters in the tth round of federated learning, <·,·> represents the dot product of vectors, and ||·|| represents the modulus of the vector.
[0083] Step III-3: Combine the score assigned by the vehicle client model contribution obtained in step III-1 and the model cosine similarity obtained in step III-2 to obtain the reputation change value of the vehicle client.
[0084] Define the reputation value change of vehicle client i as
[0085] The edge server calculates the reputation change value of the i-th vehicle client as shown in formula (11):
[0086]
[0087] in, is the score assigned according to the loss contribution of vehicle client i in round t, Sim i,t-1 is the cosine similarity of the model parameters of vehicle client i in the t-1th round, Util i,t-1 represents the utility value of the i-th vehicle client in the t-1th round, λ and γ are weight parameters, λ+γ=1.
[0088] Step III-4: Finally, based on the historical reputation value of the vehicle client and the reputation change value, the final reputation value of the vehicle client in this round is updated to prepare for the calculation of the utility value in the next vehicle selection process.
[0089] The final reputation value of the t-th round node The update formula is shown in formula (12):
[0090]
[0091] in, is the historical reputation value, represents the change in reputation value of vehicle client i, and defines but Used to control the reputation value range to (0,1).
[0092] The present invention mainly aims at the scenario of Internet of Vehicles. By introducing hierarchical federated learning, large-scale vehicle users are divided into an edge-centric federated learning architecture and an upper-layer federated learning architecture composed of edge servers and cloud servers, so that small-scale federated learning systems can be coordinated more efficiently. In addition, the present invention also designs a mobile-aware vehicle selection algorithm based on a reputation mechanism, which improves the stability and efficiency of model training under the hierarchical federated learning architecture for Internet of Vehicles. The residence time and reputation value of the vehicle within the range of the edge server are evaluated as the basis for selecting the vehicle client, wherein the influence of the initial position and speed are considered when evaluating the mobility of the vehicle, and the performance of the vehicle in the current round and the historical round is considered when evaluating the reputation value. Through the vehicle selection algorithm, the participation of vehicle clients that do not contribute much to federated learning but still consume communication and computing resources is reduced, thereby optimizing resource allocation and improving the overall efficiency of federated learning. Finally, after completing the selection of the vehicle client, the federated learning training phase is entered: the edge server receives the global initial model and sends it to the selected vehicle client for training; after the vehicle client completes the training, the local model parameters are uploaded, and the local model parameters are uploaded to the cloud server after asynchronous aggregation by the edge server, and finally the global model is obtained. The method of the present invention effectively improves the efficiency of federated learning in the face of high mobility of vehicles in a connected vehicle environment.
[0093] The present invention makes up for the shortcomings of existing federated learning research on mobile vehicle clients in the application scenarios of the Internet of Vehicles, but retains the advantages of federated learning in protecting data privacy. At the same time, combined with the reputation mechanism, it further ensures that only reliable vehicles participate in the federated learning process, thereby enhancing the security and stability of the entire system.
[0094] Of course, the above description is only a preferred embodiment of the present invention, and the present invention is not limited to the above embodiments. It should be noted that all equivalent substitutions and obvious deformation forms made by any technician familiar with the field under the guidance of this specification fall within the essential scope of this specification and should be protected by the present invention.
Claims
1. A hierarchical federated learning client selection method for the Internet of Vehicles. In the Internet of Vehicles scenario, by introducing hierarchical federated learning, vehicle users are divided into a federated learning architecture centered on an edge server and an upper-layer federated learning architecture consisting of an edge server and a cloud server; characterized in that: The method comprises the following steps: Step I: First, the edge server obtains the relative distance between itself and the vehicle client, as well as the vehicle's moving direction and speed, and then calculates the vehicle client's residence time within the coverage area of the adjacent edge server. Then, the vehicles are sorted in descending order according to the residence time, and higher scores are given to vehicles with longer residence time. Secondly, the utility value brought by its participation in this round of federated learning is calculated by combining the score value given by the vehicle's residence time and the reputation value updated after the last participation in federated learning. Define the utility value of the i-th vehicle client as Util i , and its calculation formula is as follows: in, represents the score assigned according to the residence time of vehicle client i, is the historical reputation value of the i-th vehicle client; h i is the number of times the i-th vehicle client has participated in federated learning in history; μ is the attenuation coefficient, ranging from (0,1); α is the weight parameter of the vehicle client’s residence time, and β is the weight parameter of the historical reputation value; Step II. Select the first M vehicle clients to participate in the federated learning training according to the utility value, where M is a natural number; Step III. The edge server updates the reputation value of each vehicle client in this round of training process, specifically: First, the model contribution of the vehicle client in this round of training is calculated; then the model cosine similarity is calculated based on the model parameters obtained after the vehicle client's previous round of local training and the final global model parameters of the previous round; then the reputation change value of the vehicle client is obtained by combining the score assigned by the vehicle client's model contribution and the model cosine similarity; finally, the final reputation value of the vehicle client in this round is updated based on the historical reputation value of the vehicle client and the reputation change value; The final reputation value of the vehicle client in round t The update formula is as follows: in, is the historical reputation value, represents the change in reputation value of vehicle client i, and defines but in Used to control the reputation value range to (0,1).
2. The hierarchical federated learning client selection method for Internet of Vehicles according to claim 1 is characterized in that: In step I, the calculation process of the residence time of the vehicle client within the coverage area of the adjacent edge server is as follows: Define the residence time of vehicle client i within the coverage of neighboring edge server j as The calculation formula is as follows; Where i∈[1,N], N is the total number of candidate vehicle clients; L is the coverage distance of edge server j; pos i is the position of vehicle client i; v i is the driving speed of vehicle client i in direction; When the vehicle is moving in a positive direction, the speed v i greater than zero, when the vehicle is moving in a negative direction, the speed v i Less than zero.
3. The hierarchical federated learning client selection method for Internet of Vehicles according to claim 1 is characterized in that: In step I, the calculation process of assigning scores according to the vehicle stay time is as follows: First, sort the vehicles in descending order according to their stay time, and define is the ranking of vehicle client i according to the stay time, The range is [1,|V j |], the calculation formula for assigning scores based on the vehicle's dwell time is as follows: in, represents the score assigned according to the residence time of vehicle client i, V j is the set of candidate vehicle clients currently under the coverage of edge server j; the longer the vehicle stays, the higher the score assigned to the vehicle.
4. The hierarchical federated learning client selection method for Internet of Vehicles according to claim 1 is characterized in that: In step II, the process of the selected vehicle clients participating in the federated learning training is as follows: Step II-1. The edge server sends the edge model to the selected vehicle client under its management scope; Step II-2. The vehicle client performs local training; Step II-3. After the vehicle client completes training, it uploads the local model parameters to the edge server; Step II-4. The edge server asynchronously aggregates the model parameters of each vehicle client; Step II-5. The edge server uploads the edge model parameters to the cloud server; Step II-6. The cloud server performs global aggregation to obtain a global model; Step II-7. The edge server receives the global model from the cloud server and distributes it to the vehicle client for synchronization.
5. The hierarchical federated learning client selection method for Internet of Vehicles according to claim 4 is characterized in that: In step II-2, the model update formula for local training of vehicle client i is as follows: oh i (k)=ω i (k-1)-η▽F(ω i (k-1)); where ω i (k) is the local model parameter of vehicle client i at the kth iteration, ω i (k-1) is the local model parameter of vehicle client i at the k-1th iteration, η is the learning rate, and ▽F is the gradient of the loss function; The calculation formula of the loss function F(ω) is as follows: Where D i is the local data set, d is D i A sample of d (ω) is the loss function of sample d; In step II-4, the edge model aggregation formula of the jth edge server is as follows: Among them, ω j (b) represents the model parameters obtained by the edge model of the jth edge server at the bth edge iteration aggregation, V S,j is the set of vehicle clients selected under the jth edge server; D S,j The vehicle client set V S,j The sum of local data sets; K1 is the number of local iterations of the vehicle client, ω i (b*K1) is the local model parameter uploaded during the communication process between vehicle client i and edge server j in the bth edge iteration; In step II-6, the formula for global model aggregation performed by the cloud server is as follows: Among them, ω G (t) represents the model parameters of the cloud server after global aggregation in the tth round, J is the total number of edge servers, j∈[1,J], K2 is the number of edge iterations, acc j is the model test accuracy of edge server j, and ACC(t) is the sum of the model test accuracy of all edge servers.
6. The hierarchical federated learning client selection method for Internet of Vehicles according to claim 5 is characterized in that: In step III, the process of calculating the model contribution of the vehicle client in this round of training is as follows: First, the loss contribution of the i-th vehicle client in the current training round is calculated by the edge server as The calculation formula is as follows: Where B is a batch of samples in the local dataset of the i-th vehicle client; Loss(B) is the average loss value of sample batch B, B∈D i ; Then the edge server contributes The value is ranked and scored; definition It is a score assigned according to the loss contribution value of vehicle client i, and its calculation formula is as follows: in For vehicle client i, the loss contribution To sort the rankings, The range is [1,|V S,j |],V S,j The set of vehicle clients selected by edge server j.
7. The hierarchical federated learning client selection method for Internet of Vehicles according to claim 1, characterized in that: In step III, the cosine similarity of the model parameters is used to evaluate the gap between the local model of the vehicle client and the final global model while considering the impact of the historical training rounds. i,t The calculation formula is as follows: Among them, ω i,t is the local model parameter obtained by the i-th vehicle client in the last round of federated learning, ω G,t are the final global model parameters in the tth round of federated learning, <·,·> represents the dot product of vectors, and ||·|| represents the modulus of the vector.
8. The hierarchical federated learning client selection method for Internet of Vehicles according to claim 1, characterized in that: In step III, the process of obtaining the vehicle client reputation change value by combining the model contribution and the model similarity is as follows: Define the reputation value change of vehicle client i as The calculation formula for the reputation change value of the i-th vehicle client in the t-th round calculated by the edge server is as follows: in, is the score assigned according to the loss contribution of vehicle client i in round t, Sim i,t-1 is the cosine similarity of the model parameters of vehicle client i in the t-1th round, Util i,t-1 represents the utility value of the i-th vehicle client in the t-1th round, λ and γ are weight parameters, λ+γ=1.
Citation Information
Patent Citations
Vehicle selection method and system in Internet of Vehicles federated learning
CN116546429A
Cited By
A hierarchical federated learning method and system based on split meta-learning
CN121351939B