Time efficiency optimization method based on multi-agent federated reinforcement learning
By adopting the GNN-based multi-agent federated reinforcement learning method in vehicle edge computing, the problems of AoI performance degradation and information leakage in traditional collaborative offloading methods are solved, efficient data offloading decision-making and model aggregation are achieved, and system efficiency is improved. and model stability.
Patent Information
- Application Number
- CN202410535066.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-30
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-04-30
AI Technical Summary
In vehicle edge computing, traditional collaborative offloading methods lead to age of information (AoI) performance degradation, and frequent information exchange during multi-agent deep reinforcement learning (MADRL) training increases communication bandwidth resource overhead, leading to vehicle information leakage and distrust. question.
A multi-agent federated reinforcement learning method based on graph neural network (GNN) is adopted. Through a distributed federated learning algorithm, each round includes the steps of downloading the model, local training, local aggregation and global aggregation, and uses GNN to capture the complex relationships between vehicles. , reduce communication bandwidth requirements and improve model stability.
It significantly improves the overall efficiency and model stability of the system, reduces the complexity of decision-making, reduces the dependence on external information, improves the adaptability and reliability of the vehicle offloading strategy, and solves the problem of vehicle information leakage.
Smart Images

Figure CN118278544B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of federated deep reinforcement learning of Internet of Vehicles, and in particular to a time-efficiency optimization method based on multi-agent federated reinforcement learning. Background Art
[0002] With the development of autonomous driving technology and intelligent transportation system (ITS), intelligent vehicles achieve environmental perception by deploying sensors such as cameras and lidar, and perform computationally intensive and delay-sensitive tasks to assist driving or achieve autonomous driving. The application of these technologies increases the demand for computing and storage resources, which in turn increases the deployment cost of autonomous vehicles. At the same time, with the increase in the number of autonomous vehicles, emerging applications such as image-aided navigation and augmented reality (AR) driving have put forward higher computing resource requirements for on-board units, which poses a challenge to vehicles with limited resources.
[0003] Vehicular Edge Computing (VEC) is considered a promising model to support real-time vehicle applications, that is, deploying edge servers with sufficient computing and storage capabilities near vehicles on the roadside to cooperate with vehicles for processing. In this case, the vehicle first offloads the task to the nearby Road Side Unit (RSU), which is then processed by the VEC server deployed at the RSU, and then the VEC server returns the processed results to the vehicle, so that real-time vehicle applications can be supported. At the same time, in vehicle systems and applications, the freshness of data is increasingly valued. Different from the essence of traditional performance indicators, Age of Information (AoI), as a key indicator for measuring data freshness, comprehensively considers the generation time and transmission delay of data. Therefore, in vehicle edge computing tasks, AoI plays an important role in ensuring the timeliness and accuracy of data, especially when processing data from smart vehicles. However, RSU communication resources are limited. As the number of vehicles or computing tasks continue to increase, the transmission interference between vehicles increases, which may lead to the inability to guarantee AoI for each vehicle's task. Therefore, each vehicle needs to consider the data size of its task and the resource occupation of RSU communication bandwidth to decide whether to offload its task to the VEC server. Therefore, the offloading decision of each vehicle can be regarded as a resource competition problem. At the same time, optimizing AoI requires all vehicles to work together to ensure that data can be updated in a timely manner, thereby maximizing the efficiency of the entire system.
[0004] Traditional collaborative unloading methods are bound to reduce AoI performance because they require vehicles to wait for RSUs for centralized scheduling. In recent years, Multi-agent Deep Reinforcement Learning (MADRL) has provided a new solution for multi-vehicle task unloading. In MADRL, each vehicle acts as a separate agent and only needs to observe its own environment to make the best data unloading decision and implement a decentralized decision-making system without waiting for centralized scheduling. At the same time, MADRL's adaptive learning ability enables vehicles to continuously optimize unloading strategies in a dynamic environment, further improving the overall efficiency and reliability of the system. However, most MADRL training is now based on communication learning and centralized training. In addition, vehicle training and decision-making require the decision and status information of other vehicles, and frequent information exchange increases the overhead of communication bandwidth resources. At the same time, when RSU collects all the data of each vehicle for training, it will cause the leakage of vehicle information. Therefore, the vehicle's distrust of RSU and the risk of eavesdropping on the original data have become the main bottlenecks of MADRL. Summary of the invention
[0005] The purpose of the present invention is to provide a time-efficiency optimization method based on multi-agent federated reinforcement learning to optimize the AoI of the entire system, maximize the efficiency of the entire system, and solve the problem of vehicle information leakage.
[0006] Graph Neural Networks (GNN) have been widely used in various fields in recent years due to their powerful ability to extract graph structure information. GNN can effectively extract features from vehicle road scene graph data and learn the information in the graph structure to generate FL aggregation model weights, which makes the final MADRL model more adaptable and performant by taking into account the individual characteristics and contribution of each vehicle.
[0007] The time-efficiency optimization method based on multi-agent federated reinforcement learning of the present invention executes a total of Rounds, each round consists of the following five steps:
[0008] Download model: In our scenario, once the vehicle enters the RSU coverage, it downloads the latest reinforcement learning Soft Actor Critic (SAC) model from the RSU. In our scenario, the reinforcement learning model we use is based on the Actor Critic framework. The vehicle downloads the latest global Actor network model from the RSU coverage area , Global Critic Network Model And the global Target Critic network model As your own local model , and .
[0009] Local Training: Vehicles The local training process begins after acquiring the global reinforcement learning model from the RSU. This process involves interacting with the environment to collect data reflecting its current state and conditions and storing it in a storage capacity of a certain size. Replay buffer The data collected during the training process serves as the basis for training local models, allowing the vehicle to effectively adapt and respond to its unique environment. For iterative training, the update rule can be formally expressed as:
[0010]
[0011] in express The gradient of is a fixed learning rate. Due to the on-board computing resources and the number of iterative training Different, so each car has a different training time. .
[0012] Local aggregation: GNN is used to capture this complex and dynamic relationship between vehicles. The RSU communication coverage radius The vehicle road scene in is regarded as a graph and represented as , where each predetermined length is Road segments of meters are considered as sets Therefore, the number of nodes within the RSU communication coverage area is equal to Where L represents the number of lanes. For any given node , we define it in the time slot The eigenvector of as follows:
[0013]
[0014] in Representative time slot node The number of vehicles in Represents the average number of times all vehicle models in the node participate in local aggregation. In addition, , and They correspond to the actor network, critic network, and average loss value of the critic network of all vehicle reinforcement models in this node.
[0015] Edge Set It is built based on the communication range of the vehicle. Specifically, for the node , we can define a set , which contains all nodes Communication range of vehicles within For nodes within The set of nodes connected to it can be represented as all the nodes in Communication range of vehicles within The union of the nodes in ,in Indicates that at the node The vehicle collection within Indicates vehicle Communication range The set of nodes where all vehicles are located. Then, for each node in the set Nodes in , we are at the node and nodes In this way, we get the node All adjacent edges of . If a node There are 2 cars in the room, and the communication range of both cars is ,vehicle Vehicles within the communication range of the node ,vehicle The vehicle nodes within the communication range are , then the node Just like the node and Construct undirected edges. Similarly, the construction of edges between other nodes is the same. Finally, an undirected graph can be constructed, which reflects the communication relationship between vehicles. Then define the vehicle network topology graph of Adjacency Matrix ,like ,but ,otherwise .
[0016] In the GNN model, the first step is feature transformation. This step enables GNN to learn ideal node embeddings. In layer The intermediate representation is expressed as , calculated as follows:
[0017]
[0018] Here, It is a layer The learnable transformation matrix (Learnable TransformationMatrix), Is a node In the previous layer, i=0 means is the input node feature vector This feature transformation step enables GNN to optimize the embedding representation of nodes by learning a transformation matrix to better capture and utilize the information in graph-structured data.
[0019] The second step is neighborhood aggregation, where nodes In layer The nodes are represented as , update as follows:
[0020]
[0021] in, is aggregated information. is the aggregation weight, is a nonlinear activation function. The learnable function Designed to capture the complex relationships between these features and their neighbors, it is trained to weigh the importance of each feature and its neighbors, allowing GNNs to adapt to the dynamics of vehicle networks.
[0022] The last step is to extract node features. Afterwards, it outputs an encoded graph .here is the dimension of the feature space, Indicates the number of network layers of GNN. Given a node in time slot Node The feature embedding of , this embedded node feature is a vector that captures the basic characteristics of the vehicle state and its interactions with other vehicles in the network. To represent the set of feature vectors extracted from all nodes. These node feature embeddings serve as the weights for model aggregation in our subsequent algorithms. By leveraging the rich information contained in these embeddings, the model can make accurate and timely decisions, thereby improving the efficiency and safety of vehicle road scenarios.
[0023] Assume that in the time slot ,vehicle The latest critic model parameters are The weight of the model aggregation is determined by performing softmax processing on the node features extracted by GNN at the node where the vehicle is located. Specifically, for the vehicle , the extracted node feature vector of the node where it is located is expressed as Then, define a set , the set contains vehicles The node characteristics of all nodes where vehicles within the communication range are located are: .in, Indicates vehicle The set of nodes where vehicles are located within the communication range. Note that if multiple vehicles are located at the same node, the node features of these vehicles are in the set Then, by All node features in are softmax processed to determine the weight of model aggregation, namely:
[0024] ,
[0025] in, Indicates vehicle Weights in the model aggregation. Vehicle The Critic model aggregation is:
[0026] ,
[0027] in Indicates time slot vehicle The collection of vehicles within the communication range. After the vehicles complete local aggregation, the next round of local training begins.
[0028] Upload model: When the vehicle Before driving out of RSU coverage, the vehicle will train the latest Actor network model , Critic network model and Target Critic Network Model Upload to RSU.
[0029] Global aggregation: After receiving the local model of all vehicles that are about to leave its coverage area, the RSU performs asynchronous federated aggregation. To indicate time slot The set of all vehicles that are about to leave the RSU coverage area. The RSU uses the Federated Averaging Algorithm (FedAvg) algorithm to calculate the new global Actor network model for all received local models. , Global Critic Network Model and the global TargetCritic network model , and its calculation formula is:
[0030]
[0031] in Indicates missing vehicle In time slot The latest local model. At this point, the federation aggregation process is complete, and the RSU has obtained an updated global model. This newly constructed global model is then used to train and update the local models of newly entered vehicles. The RSU then sends the updated global model to all new vehicles entering the coverage area for training of each vehicle.
[0032] Compared with the prior art, the present invention has the following beneficial effects:
[0033] The present invention is based on a federated learning framework that combines distributed local federated aggregation and centralized global federated aggregation. By utilizing the vehicle road graph structure information extracted by GNN, distributed local federated aggregation can effectively generate the weights of federated learning aggregation, while taking into account the unique characteristics and contribution of each vehicle, significantly reducing the communication bandwidth requirements during model upload. Centralized global federated aggregation further improves the stability and generalization performance of the overall model by integrating all local models, thereby significantly improving the overall efficiency of the system.
[0034] In the present invention, each vehicle only needs to make decisions based on its own status, without relying on the decisions and status information of other vehicles, which greatly reduces the complexity of decision-making and improves the efficiency of unloading decisions. The algorithm effectively improves the adaptability and reliability of vehicle unloading strategies by reducing dependence on external information. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 This is a schematic diagram of the vehicle-mounted edge computing system model of the present invention;
[0036] Figure 2 This is a schematic diagram of distributed federated learning based on graph neural network of the present invention;
[0037] Figure 3 A structural diagram of a road scene graph structure of the present invention;
[0038] Figure 4 This is a graph showing the convergence time relationship of the algorithm under different road grid lengths of the present invention. DETAILED DESCRIPTION
[0039] In order to make the technical means, creative features, objectives and effects of the present invention easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0040] The time efficiency optimization method based on multi-agent federated reinforcement learning of this embodiment includes the following steps:
[0041] S1. Vehicle After entering the coverage area of the roadside unit RSU, the latest reinforcement learning model is downloaded from the roadside unit RSU. The reinforcement learning model is based on the Actor Critic framework and is used in the time slot. ,vehicle Download the latest global Actor network model from the roadside unit RSU coverage area , Global Critic Network Model and the global TargetCritic network model As a locally trained model , and .
[0042] S2. Locally train the reinforcement learning model; locally train the model Iterative training, the update rule is expressed as:
[0043]
[0044] in, express The gradient of is a fixed learning rate.
[0045] S3. Use graph neural network GNN to capture the relationship between vehicles to obtain a GNN model, and perform local aggregation on the GNN model; Use graph neural network GNN to capture the relationship between vehicles, including:
[0046] RSU communication coverage radius The vehicle road scene in is regarded as a graph and represented as ;
[0047] Each predetermined length is Road segments of meters are considered as sets If a roadside unit RSU is an independent node in the communication coverage area, the number of nodes is equal to , where L represents the number of lanes. For any given node , define its time slot The eigenvector of as follows:
[0048] ,
[0049] in, Representative time slot node The number of vehicles in Represents the average number of times all vehicle models in the node participate in local aggregation, , and The actor network, critic network, and average loss value of the critic network for all vehicle reinforcement models in the node respectively;
[0050] Edge Set Based on the communication range of the vehicle, for the node , define a set , which contains all nodes Communication range of vehicles within For nodes within The set of nodes connected to it is represented by all Communication range of vehicles within The union of the nodes in ,
[0051] in Indicates that at the node The vehicle collection within Indicates vehicle Communication range The node set where all vehicles are located,
[0052] For each in the set Nodes in , at the node and nodes Create an edge between them and get the node All adjacent edges of construct an undirected graph to reflect the communication relationship between vehicles and define the graph The adjacency matrix of ,like ,but ,otherwise .
[0053] Local aggregation of the GNN model includes:
[0054] S31, feature conversion, enables GNN to learn the ideal node embedding, node In layer The intermediate representation is expressed as ,as follows:
[0055] ,
[0056] In the formula, It is a layer The learnable transformation matrix, Is a node Representation in the previous layer;
[0057] S32, Neighborhood Aggregation, Node In layer The nodes are represented as , update as follows:
[0058] ,
[0059] In the formula, is aggregated information. is the aggregation weight, It is a nonlinear activation function that is used to capture the complex relationship between features and their neighbors, weigh the importance of each feature and its neighbors, and adapt GNN to the dynamics of vehicle networks;
[0060] S33, extract node features, GNN process vehicle network topology After that, output a coding map , where is the dimension of the feature space, Represents the number of network layers of GNN, given a node in time slot Node The feature embedding of ,The embedded node feature is a vector that captures the basic characteristics of the vehicle state and its interaction with other vehicles in the network, To represent the set of feature vectors extracted from all nodes;
[0061] Defining a Collection , the set contains vehicles The node characteristics of all nodes where vehicles within the communication range are located are: ;
[0062] in, Indicates vehicle The node set where the vehicles are located within the communication range; All node features in are processed by softmax to determine the weight of model aggregation, namely:
[0063] ,
[0064] in, Indicates vehicle Weights in model aggregation;
[0065] vehicle The Critic model aggregation is:
[0066]
[0067] in, Indicates time slot vehicle The collection of vehicles within communication range.
[0068] S4. Vehicles Before driving out of the coverage of the roadside unit RSU, upload the latest trained local model to the roadside unit RSU;
[0069] S5. After receiving the local models of all vehicles that are about to leave its coverage area, the roadside unit RSU performs asynchronous federated aggregation to obtain a global model; use To indicate time slot The set of all vehicles that are about to leave the coverage of the roadside unit RSU. The roadside unit RSU uses the federated average algorithm to calculate the new global Actor network model for all received local models , Global Critic Network Model and the global TargetCritic network model , and its calculation formula is:
[0070]
[0071] in Indicates missing vehicle In time slot The latest local models.
[0072] S6. The roadside unit RSU sends the updated global model to all vehicles newly entering the coverage area of the roadside unit RSU to train each vehicle.
[0073] This embodiment discloses a simulation experiment, which is implemented by Python 3.7. The simulation scene is built according to the system model. Table 1 lists the parameter settings of the simulation environment used in the simulation. The vehicle arrival rates of the four lanes are divided into Car / s, Car / s, Car / s, Vehicle / s. The vehicle speeds are km / h, km / h, km / h, km / h.
[0074]
[0075] Table 1 Simulation environment parameters
[0076] The actor network and critic network in SAC use four-layer fully connected deep neural networks (DNN), and the number of neurons in each of the two middle hidden layers is 256.
[0077] Consider the heterogeneity of each vehicle, that is, the number of iterations of training the SAC model for each vehicle is different Each vehicle randomly obtains an iteration number value when entering the RSU coverage area In Table 2, the SAC algorithm hyperparameters listed include the learning rates used to adjust the actor network and the critic network (labeled as and ), as well as the discount factor γ and the target update rate and Learning rate and Determines the magnitude of the network weight update in each iteration. Too large a value may lead to unstable training, while too small a value may lead to slow training progress. The discount factor γ is used to calculate the current value of future rewards, and its value determines the importance of future rewards in reward prediction. Target network update rate and Controls the speed at which the target network parameters converge to the main network parameters, which helps stabilize the learning process. and denote the batch size and the frequency of network updates, respectively, and is the capacity of the replay buffer, which determines the amount of experience data that can be used for learning. Finally, the ReLU activation function is used for nonlinear transformations in the network, helping the model capture complex function mappings. These parameters work together to ensure that the algorithm can effectively learn and adapt in a changing environment.
[0078]
[0079] Table 2 SAC hyperparameters
[0080] in and are the learning rates of the actor network and the critic network respectively. The activation function of each intermediate layer is the ReLU function.
[0081] The GNN network uses a four-layer DNN network, and the number of neurons in the middle two hidden DNN networks is 128 and 64 respectively. The activation function of the hidden layer is the Tanh function. The GNN critic network and the target GNN critic network both use a four-layer DNN network, and the number of neurons in the middle two hidden DNN networks is 256. The hyperparameters of the GNN critic network are basically the hyperparameters of the Critic network in the SAC model. Table 3 lists the hyperparameters used by the GNN network and the GNN critic network.
[0082]
[0083] Table 3. Hyperparameters of GNN and GNN critic
[0084] in and are the learning rates of the GNN critic network and the target GNN critic network, respectively.
[0085] Figure 4 Showing different road sections Learning curve of the SAC model over time under different grid lengths. The larger the value, the fewer nodes the GNN has. As can be seen from the figure, all learning curves gradually decrease over time and finally stabilize, which means that all models converge after a certain period of training. As the length of the road segment increases, the model converges faster. The smaller it is, the more nodes there are in the vehicle graph structure, which makes the GNN network structure more complex. Therefore, more time is required to train the GNN network, which in turn increases the training time of the SAC model. Equal to 20m, but the convergence speed is greater than is equal to 25m, because when When it is equal to 20m, there will be more edges, which will promote model training. However, in the end, the training of all models finally converges, proving the feasibility of the solution.
[0086] The above is only an embodiment of the present invention, and the common sense such as the known specific structure and characteristics in the scheme is not described in detail here. For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and the present invention can be implemented in other specific forms without departing from the spirit or basic characteristics of the present invention. Therefore, no matter from which point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present invention is defined by the attached claims rather than the above description, so it is intended to include all changes within the meaning and scope of the equivalent elements of the claims. Any figure mark in the claims should not be regarded as limiting the claims involved.
Claims
1. A time-efficiency optimization method based on multi-agent federated reinforcement learning, characterized in that: The following steps are involved: S1. Vehicle After entering the coverage area of the roadside unit RSU, download the latest reinforcement learning model from the roadside unit RSU; S2. Locally training the reinforcement learning model; S3. Use graph neural network (GNN) to capture the relationship between vehicles to obtain a graph neural network (GNN) model, and perform local aggregation on the graph neural network (GNN) model; The graph neural network GNN is used to capture the relationship between vehicles, including: The communication coverage radius of the roadside unit RSU The vehicle road scene in is regarded as a graph and represented as ; Each predetermined length is Road segments of meters are considered as sets If a roadside unit RSU is an independent node in the communication coverage area, the number of nodes is equal to , where L represents the number of lanes. For any given node , define its time slot The eigenvector of as follows: , in, Representative time slot node The number of vehicles in Represents the average number of times all vehicle models in the node participate in local aggregation, , and The actor network, critic network, and average loss value of the critic network for all vehicle reinforcement models in the node respectively; Edge Set Based on the communication range of the vehicle, for the node , define a set , which contains all nodes Communication range of vehicles within For nodes within The set of nodes connected to it is represented by all Communication range of vehicles within The union of the nodes in , in Indicates that at the node The vehicle collection within Indicates vehicle Communication range The node set where all vehicles are located, For each in the set Nodes in , at the node and nodes Create an edge between them and get the node All adjacent edges of , construct an undirected graph to reflect the communication relationship between vehicles and define the vehicle network topology graph of Adjacency Matrix ,like ,but ,otherwise ; The local aggregation of the graph neural network GNN model includes: S31, feature conversion, so that the graph neural network GNN model learns the ideal node embedding, node In layer The intermediate representation is ,as follows: , In the formula, It is a layer The learnable transformation matrix, Is a node Representation in the previous layer; S32, Neighborhood Aggregation, Node In layer The nodes are represented as , update as follows: , In the formula, is aggregated information. is the aggregation weight, It is a nonlinear activation function that is used to capture the complex relationship between features and their neighbors, weigh the importance of each feature and its neighbors, and adapt GNN to the dynamics of vehicle networks; S33. Extract node features and process vehicle network topology in GNN After that, output a coding map ,in represents the communication coverage radius of RSU, where is the dimension of the feature space, Indicates the number of network layers of GNN, A given node in time slot Node The feature embedding of ,The embedded node feature is a vector that captures the basic characteristics of the vehicle state and its interaction with other vehicles in the network, To represent the set of feature vectors extracted from all nodes; Defining a Collection , the set contains vehicles The node characteristics of all nodes where vehicles within the communication range are located are: ; in, Indicates vehicle The set of nodes where vehicles are located within the communication range; Through the collection All node features in are processed by softmax to determine the weight of model aggregation, namely: , in, Indicates vehicle Weights in model aggregation; vehicle The Critic model aggregation is: , in, Indicates time slot vehicle The collection of vehicles within the communication range; S4. Vehicles Before driving out of the coverage of the roadside unit RSU, upload the latest trained local model to the roadside unit RSU; S5. After receiving the local models of all vehicles that are about to leave its coverage area, the roadside unit RSU performs asynchronous federated aggregation to obtain a global model. S6. The roadside unit RSU sends the updated global model to all vehicles newly entering the coverage area of the roadside unit RSU to train each vehicle.
2. The time-efficiency optimization method based on multi-agent federated reinforcement learning according to claim 1 is characterized in that: The reinforcement learning model is based on the Actor Critic framework and will ,vehicle Download the latest global Actor network model from the roadside unit RSU coverage area , Global Critic Network Model and the global TargetCritic network model As a locally trained model , and .
3. The time-efficiency optimization method based on multi-agent federated reinforcement learning according to claim 2 is characterized in that: The local training model is performed Iterative training, the update rule is expressed as: in, express The gradient of is a fixed learning rate.
4. The time-efficiency optimization method based on multi-agent federated reinforcement learning according to claim 1 is characterized in that: The roadside unit RSU performs asynchronous federation aggregation to obtain a global model including: using To indicate time slot The set of all vehicles that are about to leave the coverage of the roadside unit RSU. The roadside unit RSU uses the federated average algorithm to calculate the new global Actor network model for all received local models , Global Critic Network Model And the global Target Critic network model , and its calculation formula is: in Indicates missing vehicle In time slot The latest local models.
Citation Information
Patent Citations
Multilayer factory workshop scheduling method based on reinforcement learning
CN116594358A
Fine-grained task scheduling method and service architecture in vehicle edge calculation
CN117290071A
Personalized trusted federated map neural network framework construction method supporting privacy protection
CN117521777A
System, method, and computer program product for determining long-range dependencies using a non-local graph neural network (GNN)
WO2023069589A1
