In this paper, we study the joint optimization problem of the spectrum and power allocation for multiple vehicle-to-infrastructure (V2I) and vehicle-to-vehicle (V2V) users in cellular vehicle-to-everything (C-V2X) communication, aiming to maximize the sum rate of V2I links while satisfying the low latency requirements of V2V links. However, channel state information (CSI) is hard to obtain accurately due to the mobility of vehicles. In addition, the effective sensing of state information among vehicles becomes difficult in an environment with complex and diverse information, which is detrimental to vehicles collaborating for resource allocation. Thus, we propose a framework of multi-agent deep reinforcement learning based on attention mechanism (AMARL) to improve the V2X communication performance. Specifically, for vehicle mobility, we model the problem as a multi-agent reinforcement learning process, where each V2V link is regarded an agent and all agents jointly intercommunicate with the environment. Each agent allocates spectrum and power through its deep Q network (DQN). To enhance effective intercommunication and the sense of collaboration among vehicles, we introduce an attention mechanism to focus on more relevant information, which in turn reduces the signaling overhead and optimizes their communication performance more explicitly. Experimental results show that the proposed AMARL-based approach can satisfy the requirements of a high rate for V2I links and low latency for V2V links. It also has an excellent adaptability to environmental change.
Traffic flow forecasting is the foundation of intelligent transportation systems. Accurate traffic forecasting is crucial for intelligent traffic management and urban development. However, achieving highly accurate traffic flow prediction is challenging due to road networks’ complex dynamic spatial and temporal dependencies. Previous work using predefined static adjacency matrices in graph convolutional networks needs to be revised to reflect the dynamic spatial dependencies in the traffic system. In addition, most current methods ignore the hidden dynamic spatial–temporal correlations between road network nodes as they evolve. We propose a spatial–temporal dynamic graph differential equation network (ST-DGDE) for traffic prediction to address the above problems. First, the model captures the dynamic changes between spatial nodes over time through a dynamic graph learning network. Then, dynamic graph differential equations (DGDE) are used to learn the spatial–temporal dynamic relationships in the global space that change continuously over time. Finally, static adjacency matrices are constructed by static node embedding. The generated dynamic and predefined static graphs are fused and input into a gated temporal causal convolutional network to jointly capture the fixed long-term spatial association patterns and achieve a global receiver domain that facilitates long-term prediction. Experiments of our model on two natural traffic flow datasets show that ST-DGDE outperforms other baselines.