## 2 Adaptive Streaming Algorithm for Internet of Autonomous Vehicles
### Real-Time Streaming Bandwidth Allocation at the RSU
 \tag{31}\]  
subject to:  
\[\mathcal{R}^{\sigma,A}_{\mathrm{P}^{\sigma}_{k}}=\left[\left(r^{ \sigma,A}_{\mathrm{P}^{\sigma,1}_{k}},r^{\sigma,A}_{\mathrm{P}^{\sigma,2}_{k }}\right),\cdots,\left(r^{\sigma,A}_{\mathrm{P}^{\sigma,k}_{k}-1},r^{\sigma, A}_{\mathrm{P}^{\sigma,k}_{k}}\right),\cdots,\left(r^{\sigma,A}_{\mathrm{P}^{ \sigma,A}_{k}-1},r^{\sigma,A}_{\mathrm{P}^{\sigma,A}_{k}}\right)\right],\;\;1 \leq f<\mathrm{P}^{\sigma,A}_{k},\;1\leq k<h^{\sigma} \tag{32}\] \[r^{\sigma,A}_{\mathrm{P}^{\sigma,A}_{k}}=\sigma,\;1\leq k<h^{ \sigma}\] (33) \[at_{\mathrm{P}^{\sigma}_{1}}\leq t^{\sigma,A}_{1}\leq t^{\sigma,A}_{ \mathrm{P}^{\sigma,A}_{A}}\leq at_{\mathrm{P}^{\sigma,A}_{k}}\leq at_{\mathrm{ P}^{\sigma,A}_{k}},\;\;1\leq l\leq e^{\sigma,A}\] (34) \[at_{\mathrm{P}^{\sigma}_{k}}\leq t^{\sigma,A}_{l}<at_{\mathrm{P}^{ \sigma,A}_{k+1}},\;\;1\leq l\leq e^{\sigma,A},\;1\leq k<h^{\sigma}\] (35) \[\sum_{\sigma^{\prime}}ub^{\sigma^{\prime},r^{\sigma,A}_{l},A}_{l ^{\sigma,A}}\geq\underline{\mathrm{UR}}\bigg{(}\mathit{wr}^{\sigma,A}_{l^{ \sigma,A}_{l}}\bigg{)}>\sum_{\theta}ub^{\theta,\sigma,A}_{l^{\sigma,A}_{l}}, \;\;1\leq k<h^{\sigma},\text{if }\gamma^{\sigma,A}=1\] (36) \[\sum_{\theta^{\prime}}db^{\sigma^{\prime},r^{\sigma,A}_{l}}_{l ^{\sigma,A}}\geq\underline{\mathrm{DR}}\bigg{(}\mathit{d}\mathit{v}^{\sigma, A}_{l^{\sigma,A}_{l}}\bigg{)}>\sum_{\theta}db^{\theta,\sigma,A}_{l^{\sigma,A}_{l}},\;1 \leq k<h^{\sigma}\] (37) \[ut^{r^{\sigma,A}_{l^{\sigma,A}_{l}},r^{\sigma,A}_{l^{\sigma,A}_{l} }}_{l^{\sigma,A}}\geq\underline{\mathrm{UR}}\bigg{(}\mathit{wr}^{\sigma,A}_{l ^{\sigma,A}_{l}}\bigg{)}>\sum_{\theta}ub^{\theta,\sigma}_{l^{\sigma,A}_{l^{ \sigma,A}_{l}}},\;\;1\leq f<\mathrm{P}^{\sigma,A}_{k},\;1\leq k<h^{\sigma},\; \;\text{if }\gamma^{\sigma,A}=1\] (38) \[dt^{r^{\sigma,A}_{l^{\sigma,A}_{l}},r^{\sigma,A}_{l}}_{l^{\sigma,A} }\geq\underline{\mathrm{DR}}\bigg{(}\mathit{d}\mathit{v}^{\sigma,A}_{l^{ \sigma,A}_{l}}\bigg{)}>\sum_{\theta}db^{\theta,\sigma}_{l^{\sigma,A}_{l}},\; \;1\leq f<\mathrm{P}^{\sigma,A}_{k},\;1\leq k<h^{\sigma} \tag{39}\]  
where the binary flag \(\gamma^{\sigma,A}=1\) signifies that the streaming service application \(\alpha\) is a videotelephony. \(p^{\sigma}_{k}\) represents the road segment with insufficient bandwidth. \(\mathcal{R}^{\sigma,A}_{p^{\sigma}_{k}}\) represents the fleet initiated from the requested autonomous vehicle on road segment \(p^{\sigma}_{k}\), and \(\mathrm{P}^{\sigma,A}_{k}\) denotes the number of vehicles within the established fleet. \(x_{r^{\rho,\alpha}_{p^{\rho}_{k},f}}\) and \(y_{r^{\rho,\alpha}_{p^{\rho}_{k},f}}\) stand for the coordinates of the _f_-th vehicle within the established fleet. \(u_{t^{\rho}_{k},f+t^{\rho}_{k},r^{\rho,\alpha}_{p^{\rho}_{k},f}}\) and \(u_{t^{\rho}_{k},f+t^{\rho}_{k},r^{\rho,\alpha}_{p^{\rho}_{k},f}}^{r^{\rho,\alpha} _{p^{\rho}_{k},f}}\), respectively, denote the upload and download bandwidth between autonomous vehicles \(r^{\rho,\alpha}_{p^{\rho}_{k},f}\) and \(r^{\rho,\alpha}_{p^{\rho}_{k},f+1}\) at time \(t^{\sigma,\alpha}_{l}\). Step 5: The results of the bandwidth relay are sent back to the initiating autonomous vehicle and the execution of this module is finalized. Step 6: If the allocation of bandwidth from the base stations to real-time streaming within the same time slot results in video clips for other on-demand streaming or 360-degree streaming being unable to be preloaded promptly, this module triggers the \"Video Clip Preloading\" module. This activation aims to aid in meeting the preleoading prerequisites for the pertinent supported video clips. The main computational burden in this module arises during Step 4, which involves organizing a fleet of vehicles to transfer essential bandwidth to the passenger's vehicle through V2V communication from base stations equipped with sufficient bandwidth capabilities.