## 2 Adaptive Streaming Algorithm for Internet of Autonomous Vehicles
These base stations are employed to fulfill the essential bandwidth requirements for the streaming service applications as the autonomous vehicle traverses its managed route segments. In this framework, it is assumed that each RSU maintains a server to record the supply and demand information for streaming applications across distinct time intervals within its managed segments. Consequently, the base stations situated along the route segments will provide the required bandwidth, aligning with the anticipated streaming service quality standards and specifications preset by autonomous vehicle passengers. If the coverage area of a managed route segment's base station falls short of delivering the required bandwidth, the RSU will step in to ensure that the streaming service quality standards are met, tailoring its approach to the characteristics of the streaming service application. For videotelephony and live streaming, bandwidth allocation can be facilitated through V2V communication with other nearby roadside base stations. Conversely, for on-demand streaming and 360-degree streaming, a video clip preloading mechanism is employed. Figure 2: Schematic diagram of adaptive streaming for the Internet of autonomous vehicles. In scenarios of insufficient bandwidth for on-demand streaming or 360-degree streaming, the RSU examines other autonomous vehicles arriving at the same road segment and time as the streaming-enabled autonomous vehicles. It analyzes their travel routes to identify whether there are base stations capable of providing the required bandwidth for preloading video clips. Upon finding a suitable base station, the managing RSU of that segment coordinates with the supported autonomous vehicles to preload video clips from the base station's coverage area when they traverse the corresponding road segment. These preloaded video clips are stored in the storage facilities of the designated autonomous vehicles. Consequently, when both the autonomous vehicle equipped with a specific preloaded video clip and the one engaged in streaming reach the same road segment, the V2V communication is employed to transmit the preloaded video clip to the autonomous vehicle passenger who is streaming the content. Furthermore, it is important to note that one of the primary objectives of this research is to evaluate the effectiveness of the pre-loading strategy via V2V communication proposed in this work. Therefore, it is assumed that each required video clip is cached at the base station for access before the conveying autonomous vehicles arrive in the vicinity of the base station to initiate the pre-loading process. Passengers in autonomous vehicles who utilize streaming services also conduct intermittent evaluations of the streaming service quality while it is being used. In situations where modifications to the streaming service quality are deemed necessary, such as reducing it during periods of high demand, the vehicle will establish communication with the \"Real-Time Streaming Bandwidth Allocation\" or \"Video Clip Preloading\" module located at the managed Roadside Unit (RSU). This interaction will prompt the respective module to undertake the subsequent task of adjusting the streaming bandwidth as required. The detailed description of each module shown in Figure 2 is as follows.