## 2 Adaptive Streaming Algorithm for Internet of Autonomous Vehicles  
As illustrated in Figure 1, this study introduces a decentralized computational framework aimed at allocating bandwidth in alignment with the requirements of autonomous vehicle passengers. The management of bandwidth allocation for distinct road segments is carried out by the RSUs strategically positioned along these specific segments. Autonomous vehicle passengers plan their routes in advance, and as autonomous vehicles traverse their designated paths, the RSU associated with each segment orchestrates bandwidth allocation in alignment with the streaming service application requisites of the corresponding autonomous vehicle passengers. In scenarios where the streaming service dedicated to autonomous vehicle passengers falls short of fulfilling their bandwidth demands while navigating through congested road segments, the autonomous vehicle has the capability to solicit assistance from the overseeing RSU responsible for that specific segment. This support encompasses procuring the necessary streaming service bandwidth. The basis of this study revolves around categorizing the multimedia streaming applications employed by passengers in autonomous vehicles into four distinct types: bidirectional videotelephony, unidirectional live streaming, on-demand streaming, and 360-degree streaming. Figure 2 illustrates the system architecture of the proposed algorithm, which is meticulously designed to meet the bandwidth requirements of multimedia streaming applications used by passengers in autonomous vehicles. Before embarking on the journey, an autonomous vehicle activates the \"Real-Time Driving Speed and Time Calculation\" module integrated within the On-Board Unit (OBU) to plan the driving route. This route informa  
Figure 1: Illustration of streaming services in the Internet of autonomous vehicles. tion is then transmitted to the RSUs responsible for supervising the individual segments along the designated route. Each RSU hosts the \"Real-Time Vehicle Speed Calculation\" module, which estimates the average vehicle speed as the autonomous vehicle progresses through the managed segments within specific time intervals. It is worth noting that in recent academic research, the Bidirectional Long Short-Term Memory (BILSTM) architecture has garnered significant attention for its effectiveness in predicting vehicle traffic flow across various road segments, as highlighted in previous studies [29; 30; 31; 32]. Given the substantial impact of traffic flow patterns on the driving speed of autonomous vehicles, this module utilizes the BILSTM model introduced in [27] to compute the average vehicle speed. In cases where streaming service applications are needed during the vehicle's journey, the OBU's \"Streaming Service Support\" module establishes a connection with the streaming service provider. This connection enables the acquisition of the relevant requirements and specifications associated with the application. Guided by the service quality criteria predefined by the autonomous vehicle passenger and assisted by the most up-to-date traffic patterns and base station bandwidth data provided by the RSUs for each road segment, the module dynamically adjusts the bandwidth requirements and quality tailored to the streaming service. Following this, the OBU will communicate the obtained bandwidth requirements for streaming service applications to the RSUs as the autonomous vehicle progresses through various road segments during the usage of these applications. Subsequently, each RSU will allocate the necessary bandwidth for the streaming service application based on its specific demands using the \"Real-Time Streaming Bandwidth Allocation\" and \"Video Clip Preloading\" modules. These modules leverage the three categories of base stations mentioned earlier: terahertz micro base stations, NLOS-FSOC small base stations with diffusers, and sub-6 GHz macro base stations.