Better algo

This commit is contained in:
Thomas Forgione 2019-10-09 11:02:10 +02:00
parent 4c15b06d95
commit c1bb5662c7
No known key found for this signature in database
GPG Key ID: 203DAEA747F48F41
2 changed files with 37 additions and 33 deletions

View File

@ -160,23 +160,25 @@ Algorithm~\ref{d3:next-segment} details how our DASH client makes decisions.
\begin{algorithm}[th] \begin{algorithm}[th]
\SetKwInOut{Input}{input} \SetKwInOut{Input}{input}
\SetKwInOut{Output}{output} \SetKwInOut{Output}{output}
\SetKw{Continue}{continue}
\SetKwData{Bw}{bw\_estimation}
\SetKwData{Rtt}{rtt\_estimation}
\SetKwData{Segment}{best\_segment}
\SetKwData{Candidates}{candidates}
\SetKwData{AllSegments}{all\_segments}
\SetKwData{DownloadedSegments}{downloaded\_segments}
\SetKwData{Frustum}{frustum}
\SetKwFunction{Argmax}{argmax}
\SetKwFunction{Filter}{filter}
\SetKwFunction{EstimateNetwork}{estimate\_network\_parameters}
\Input{Current index $i$, time $t_i$, viewpoint $v(t_i)$, buffer of already downloaded \texttt{segments} $\mathcal{B}_i$, MPD} \Input{Current index $i$, time $t_i$, viewpoint $v(t_i)$, buffer of already downloaded \texttt{segments} $\mathcal{B}_i$, MPD}
\Output{Next segment $s^{*}_i$ to request, updated buffer $\mathcal{B}_{i+1}$} \Output{Next segment $s^{*}_i$ to request, updated buffer $\mathcal{B}_{i+1}$}
\SetAlgoLined{} (\Bw, \Rtt) \leftarrow{} \EstimateNetwork{}\;
{- Estimate the bandwidth $\widehat{BW_i}$ and RTT $\widehat{\tau_i}$ \;}
{- Among all \texttt{segments} that are not already downloaded $s \in \mathcal{S} \backslash \mathcal{B}_i$, % \;}
% {-
keep the ones inside the upcoming viewing frustums $\mathcal{FC}=\mathbb{FC}(\widehat{v}(t_i)), t\in [t_i, t_i+\chi]$ thanks to a viewpoint predictor $t_i \rightarrow \hat{v}(t_i)$, a temporal horizon $\chi$ and a frustum culling operator $\mathbb{FC}$ \;}
{- Optimize a criterion $\Omega$ based on $\mathcal{U}$ values and well chosen viewpoint $v(t_i)$ to select the next segment to query }
{\begin{equation*} s^{*}_i= \argmax{s \in \mathcal{S} \backslash \mathcal{B}_i \cap \mathcal{FC}} \Omega_{\theta_i} \Big(\mathcal{U}\left(s,v(t_i)\right)\Big) \label{d3:eq1}\end{equation*} \\
given parameters $\theta_i$ that gathers both online parameters $(i,t_i,v(t_i),\widehat{BW_i}, \widehat{\tau_i}, \mathcal{B}_i)$ and offline metadata\;}
{- Update the buffer $\mathcal{B}_{i+1}$ for the next decision: $s^{*}_i$ and lowest \texttt{representations} of $s^{*}_i$ are considered downloaded\;}
{- \Return{segment $s^{*}_i$, buffer $\mathcal{B}_{i+1}$}\;}
\Candidates\leftarrow{}\AllSegments\newline\makebox[1cm]{}.\Filter{$\Segment\rightarrow\Segment\notin\DownloadedSegments\land\Segment\in\Frustum$}\;
\Segment\leftarrow{} \Argmax{\Candidates, \Segment\rightarrow{} $\Omega\left(\mathcal{U}(\Segment)\right)$}\;
{\caption{Algorithm to identify the next segment to query\label{d3:next-segment}}} {\caption{Algorithm to identify the next segment to query\label{d3:next-segment}}}
\end{algorithm} \end{algorithm}
@ -302,36 +304,38 @@ The \texttt{DashLoader} class accepts as parameter a function that will be calle
\begin{figure}[ht] \begin{figure}[ht]
\centering \centering
\begin{tikzpicture}[scale=0.65] \begin{tikzpicture}[scale=0.65]
\draw (0, 0) rectangle (5, -4); \draw (0, 0) rectangle (5, -2.5);
\draw (0, -1) -- (5, -1); \draw (0, -1) -- (5, -1);
\node at (2.5, -0.5) {DashClient}; \node at (2.5, -0.5) {DashClient};
\node[right] at (0, -1.5) {\scriptsize loadNextSegment()}; \node[right] at (0, -1.5) {\scriptsize loadNextSegment()};
\draw (5, -2) -- (8, -2); \draw (5, -1.25) -- (8, -1.25);
\draw (8, 0) rectangle (14, -4); \draw (8, 0) rectangle (14, -2.5);
\draw (8, -1) -- (14, -1); \draw (8, -1) -- (14, -1);
\node at (11, -0.5) {LoadingPolicy}; \node at (11, -0.5) {LoadingPolicy};
\node[right] at (8, -1.5) {\scriptsize nextSegment(mpd, camera)}; \node[right] at (8, -1.5) {\scriptsize nextSegment(mpd, camera)};
\draw (1, -6) rectangle (7, -10); \begin{scope}[shift={(0, 1.5)}]
\draw (1, -7) -- (7, -7); \draw (1, -6) rectangle (7, -8.5);
\node at (4, -6.5) {Greedy}; \draw (1, -7) -- (7, -7);
\node[right] at (1, -7.5) {\scriptsize nextSegment(mpd, camera)}; \node at (4, -6.5) {Greedy};
\node[right] at (1, -7.5) {\scriptsize nextSegment(mpd, camera)};
\draw (8, -6) rectangle (14, -10); \draw (8, -6) rectangle (14, -8.5);
\draw (8, -7) -- (14, -7); \draw (8, -7) -- (14, -7);
\node at (11, -6.5) {GreedyPredictive}; \node at (11, -6.5) {GreedyPredictive};
\node[right] at (8, -7.5) {\scriptsize nextSegment(mpd, camera)}; \node[right] at (8, -7.5) {\scriptsize nextSegment(mpd, camera)};
\draw (15, -6) rectangle (21, -10); \draw (15, -6) rectangle (21, -8.5);
\draw (15, -7) -- (21, -7); \draw (15, -7) -- (21, -7);
\node at (18, -6.5) {Proposed}; \node at (18, -6.5) {Proposed};
\node[right] at (15, -7.5) {\scriptsize nextSegment(mpd, camera)}; \node[right] at (15, -7.5) {\scriptsize nextSegment(mpd, camera)};
\draw[-{Triangle[open, length=3mm, width=3mm]}] (4, -6) -- (4, -5) -- (11, -5) -- (11, -4); \draw[-{Triangle[open, length=3mm, width=3mm]}] (4, -6) -- (4, -5) -- (11, -5) -- (11, -4);
\draw (11, -6) -- (11, -5) -- (8, -5); \draw (11, -6) -- (11, -5) -- (8, -5);
\draw (18, -6) -- (18, -5) -- (8, -5); \draw (18, -6) -- (18, -5) -- (8, -5);
\end{scope}
\end{tikzpicture} \end{tikzpicture}
\caption{Class diagram of our DASH client\label{d3:dash-loader}} \caption{Class diagram of our DASH client\label{d3:dash-loader}}
\end{figure} \end{figure}

View File

@ -117,7 +117,7 @@ This order is then saved as a JSON file that a client can download it to know wh
\OptimalOrder\leftarrow{} []\; \OptimalOrder\leftarrow{} []\;
\EmptyRender\leftarrow\Render{\EmptyModel,\BookmarkViewpoint}\; \EmptyRender\leftarrow\Render{\EmptyModel,\BookmarkViewpoint}\;
\PreviousPsnr\leftarrow\Psnr(\EmptyRender,\GroundTruthRender)\; \PreviousPsnr\leftarrow\Psnr{\EmptyRender,\GroundTruthRender}\;
\TotalModel\leftarrow\EmptyModel\; \TotalModel\leftarrow\EmptyModel\;