# An Integrated DQN and RF Packet Routing Framework for the V2X Network
## 3 Design of the IDRF System  
V2X is a VANET in which vehicles are interconnected with other vehicles, people, and infrastructure as nodes. Compared to other point-to-point networks, V2X exhibits higher mobility characteristics, enhancing its scalability and flexibility. However, maintenance of the V2X network topology remains a significant challenge due to its dynamic nature. The primary nodes in V2X are vehicles, either traveling along road segments or at intersections. Within road segments, vehicles can have a maximum of two travel directions (forward and reverse). However, due to the high mobility of vehicles, the establishment of communication links with vehicles in the reverse direction is often more challenging. In [24],  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline  
the density of vehicles at intersections was shown to generally be higher than that within road segments. Moreover, the density tends to increase as vehicles approach intersections. This indirectly signifies that there are more transmitting nodes at intersections, offering a better option for relay decisions. To select a relay node that can successfully transmit packets at intersections, the neighbor vehicles present at the intersection must be known, and pairs of neighbor vehicles during the communication time must be chosen to allow complete packet transmission. In this study, the following assumptions about the VANET environment were made:  
1. There are RSUs at each intersection, and physical network lines interconnect these RSUs.
2. On each road segment connected at intersections, vehicles periodically transmit vehicle information to an RSU.  
Figure 6 depicts the IDRF platform proposed in this study, which can be divided into two phases.  
* Phase 1 (Offline Phase):  
The SDN CN performs offline execution of the correction unit to rectify actual vehicle trajectory data, as presented in Section 3.1. It primarily corrects the coordinate offsets through GPS positioning to align them with the actual road. Subsequently, the rectified trajectories are categorized as sufficient data and insufficient data. Trajectory data classified as insufficient data are discarded, and the corresponding vehicle is considered to be an unknown vehicle with no historical trajectory information during the real-time phase. Trajectory data categorized as sufficient data undergoes the RF prediction unit process. The rectified trajectory data trains the Vehicle Intersection Model using the RF prediction unit. The corrected historical trajectory data feeds into the analysis unit during the real-time phase. Simultaneously, the DQN training unit undergoes DQN training to generate the Packet Relay Vehicle Model. During the real-time phase, the integration unit utilizes the historical model containing the trained Vehicle Intersection and Packet Relay Vehicle Models.  
* Phase 2 (Real-Time Phase):  
The SDN DN periodically transmits vehicle information to intersection RSUs through wireless communication. The RSUs perform the analysis unit process to estimate the vehicles' times of arrival at the intersection, the inter-vehicle link reliability, and the road segment delay based on real-time information transmitted by vehicles. This information is organized into the segment table for the corresponding road segment and the intersection table for the respective intersection. These two tables represent the real-time vehicle information in the integration unit of the SDN DN during the real-time phase. Finally, by combining the relay node delay decided by the DQN and the intersection relay probability calculated by RF in the offline phase, the real-time vehicle decision unit computes the  
Figure 6: The IDRF system architecture.  
segment delay. It determines the packet forwarding path with the shortest end-to-end delay from the source to the destination when a new vehicle enters the V2X network in real time.