In this subsection, the multi-metric is categorized into two (2), including multi-metric evaluation without and with dynamic self-weighting for video data forwarding, which involves the aforementioned metrics.

#### 3.2.1. Multi-Metric Video Streaming without Dynamic Self-Weighting Score

The Multi-metric, which consist of VDR, VTJ,

${\mathrm{T}}_{{\mathrm{H}}_{\mathrm{m}}{\mathrm{R}}_{\mathrm{r}}},\text{}$ ABE and SINR as discussed in

Section 3.1 have been employed for selecting optimal NFV. These metrics are computed in order to select optimal NFV. The concept of the video data forwarding considering different frames based on frame splitting has been discussed earlier in

Section 1. Considering the number of multi-metrics employed, an equal fixed weight value has been assigned to each of the metrics in order to evaluate the most optimal C-NFV. The vehicle with the highest multi-metric score is considered as the most optimal NFV. The weight assigned is denoted as

$\mathrm{weights}={\mathrm{wt}}_{1},{\text{}\mathrm{wt}}_{2},\text{}\dots ,{\text{}\mathrm{wt}}_{\mathrm{n}}$,

$\mathrm{n}$ represents the number of metrics, since the number of metrics utilized are five (5),

$\mathrm{n}=5$. The weight of each metric is given as

$\frac{1}{5}=0.2$ Further, the weights

${\mathrm{wt}}_{\mathrm{n}}$ are allocated to the metrics

${\mathrm{mt}}_{\mathrm{n}},$ which includes

${\mathrm{mt}}_{\mathrm{VDR}},{\text{}\mathrm{mt}}_{\mathrm{VTJ}},{\text{}\mathrm{mt}}_{{\mathrm{T}}_{{\mathrm{H}}_{\mathrm{m}}{\mathrm{R}}_{\mathrm{r}}}},{\text{}\mathrm{mt}}_{{\mathrm{ABE}}_{\mathrm{C}-\mathrm{NFV}}}$ and

${\mathrm{mt}}_{\mathrm{SINR}}$. These metrics are normalized since they have different units. Thus, the total summation of the multi-metric score for each of the C-NFV is represented in Equation (16) as follows.

In Algorithm 1, the video data forwarding procedure is highlighted. Video packet and video ID are generated including I-frame, P-frame and B-frame as discussed earlier in

Section 1. The algorithm employs the multiple metrics including VDR, VTJ,

${\mathrm{T}}_{{\mathrm{H}}_{\mathrm{m}}{\mathrm{R}}_{\mathrm{r}}}$, ABE and SINR. The five metrics are introduced into the video data forwarding algorithm in order to select an optimal NFV. Lines 1 to 10 calculate the metrics and identify the first two suitable vehicles as the RVNs, which are neighbors to the SVN for multipath transmission. At line 12, if a C-NFV is not selected as the RVN, then it is discarded. Line 13 to 19 involves the evaluation of the metrics in order to select a suitable vehicle as the NFV. A C-NFV with a maximum value of the five metrics is selected. Equal weighting factor has been assigned to the five metrics in order to assign equal priority to the metrics. In addition, after each packet forwarding, the PFV retransmit I-frame when hello message is not received from the last NFV within the period of one second, this is necessary in order to guarantee delivery of the important frame, which in turn improves the quality of the video streaming since UDP has been considered as the transmission protocol in this study. At the intermediary vehicles, lines 20 to 31 are invoked to compute the multi-metric for selecting the optimal NFV. Whenever video data is forwarded, information regarding the qualified vehicles is stored in the TNI at the vehicle

${\mathrm{P}}_{2}$. The forwarding of video data continues until the C-NFV is the DVN, then the video packet is forwarded to DVN. The DVN receives the video data compare and discard duplicate I-frame. Then the DVN rearranges video packet for streaming and the video data forwarding procedure terminates.

Figure 3 depicts the flow of the multi-metric video streaming forwarding procedure.

**Algorithm 1.** Multi-metric Video Streaming Forwarding |

$\hspace{1em}\mathit{I}\mathit{n}\mathit{i}\mathit{a}\mathit{t}\mathit{e}:videopacket$ $\hspace{1em}\mathit{I}\mathit{n}\mathit{i}\mathit{a}\mathit{t}\mathit{e}:videopktid$ $\hspace{1em}\mathit{I}\mathit{n}\mathit{s}\mathit{e}\mathit{r}\mathit{t}:videopkttp=I\_frame,P\_frame,B\_frame$ $\hspace{1em}\mathit{I}\mathit{n}\mathit{s}\mathit{e}\mathit{r}\mathit{t}:IDofDVNwhenforwardingvideopkt$ $\hspace{1em}\mathit{O}\mathit{u}\mathit{t}\mathit{p}\mathit{u}\mathit{t}:ForwardvideopktfromSVNtoDVN$ 1: $\mathit{P}\mathit{r}\mathit{o}\mathit{c}\mathit{e}\mathit{d}\mathit{u}\mathit{r}\mathit{e}VideoDataForwarding\left({p}_{i},data\right)$ 2: $\mathit{I}\mathit{f}videorequestreceivedbySVN\mathit{T}\mathit{h}\mathit{e}\mathit{n}$ 3:$\mathit{O}\mathit{b}\mathit{t}\mathit{a}\mathit{i}\mathit{n}speed,vehicle-id,road-id,direction,timestamp,position,Hmcountof{p}_{i\left(s\right)}$ 4: $\mathit{C}\mathit{o}\mathit{m}\mathit{p}\mathit{u}\mathit{t}\mathit{e}VDRof{p}_{i\left(s\right)}usingEq.\left(1\right)$ 5: $\mathit{C}\mathit{o}\mathit{m}\mathit{p}\mathit{u}\mathit{t}\mathit{e}VT{J}_{\left(C-NFV\right)}usingEq.\left(7\right)$ 6: $\mathit{C}\mathit{o}\mathit{m}\mathit{p}\mathit{u}\mathit{t}\mathit{e}{H}_{m}{R}_{r}usingEq.\left(10\right)$ 7: $\mathit{C}\mathit{o}\mathit{m}\mathit{p}\mathit{u}\mathit{t}\mathit{e}AB{E}_{\left(C-NFV\right)}usingEq.\left(14\right)$ 8: $\mathit{C}\mathit{o}\mathit{m}\mathit{p}\mathit{u}\mathit{t}\mathit{e}SINRusingEq.\left(15\right)$ 9: $\mathit{C}\mathit{o}\mathit{m}\mathit{p}\mathit{u}\mathit{t}\mathit{e}MetricvalueofeachC-NFVusingEquation\left(16\right)$ 10: $\mathit{I}\mathit{d}\mathit{e}\mathit{n}\mathit{t}\mathit{i}\mathit{f}\mathit{y}suitablefirsttwo\left({p}_{i\left(s\right)}RVN\right)basedon{S}_{Area}andmultimetric$ 11: $\mathit{I}\mathit{n}\mathit{p}\mathit{u}\mathit{t}IDfortheselectedfirsttwo\left(RVN={P}_{2},{P}_{3}\right)$ 12: $\mathit{E}\mathit{l}\mathit{s}\mathit{e}$ 13: $\mathit{D}\mathit{i}\mathit{s}\mathit{c}\mathit{a}\mathit{r}\mathit{d}{p}_{i\left(s\right)}ID$ 14: $\mathit{I}\mathit{f}{p}_{i}Max\left(VDR\&\&VT{J}_{\left(C-NFV\right)}\&\&{H}_{m}{R}_{r}\&\&AB{E}_{C-NFV}\&\&SINR\right)\mathit{T}\mathit{h}\mathit{e}\mathit{n}$ 15: $\mathit{F}\mathit{o}\mathit{r}\mathit{w}\mathit{a}\mathit{r}\mathit{d}videopkttp\left({I}_{frame}\right)\&videopktidto{P}_{2}\&other{p}_{i}$ 16: $\mathit{F}\mathit{o}\mathit{r}\mathit{w}\mathit{a}\mathit{r}\mathit{d}videopkttp\left({P}_{frame},{B}_{frame}\right)to{P}_{3}\&other{p}_{i}$ 17: $\mathit{W}\mathit{a}\mathit{i}\mathit{t}forRandAmtTime$ 18: $\mathit{R}\mathit{e}\mathit{t}\mathit{r}\mathit{a}\mathit{n}\mathit{s}\mathit{m}\mathit{i}\mathit{t}videopkttp\left(I\_frame\right)via{P}_{2}path$ 19: $\mathit{E}\mathit{n}\mathit{d}\mathit{i}\mathit{f}$ 20: $\mathit{E}\mathit{l}\mathit{s}\mathit{e}$ 21: $\mathit{I}\mathit{f}{P}_{2},{P}_{3}alreadyreceivesvideopkttp\mathit{T}\mathit{h}\mathit{e}\mathit{n}$ 22: $\mathit{C}\mathit{o}\mathit{m}\mathit{p}\mathit{u}\mathit{t}\mathit{e}theMultimetrics$ 23: $\mathit{S}\mathit{e}\mathit{l}\mathit{e}\mathit{c}\mathit{t}qualifiedC-NFVbasedonline14-16$ 24: $\mathit{F}\mathit{o}\mathit{r}\mathit{w}\mathit{a}\mathit{r}\mathit{d}videopkttpfrom{P}_{2},{P}_{3}totheirNFVs$ 25: $\mathit{I}\mathit{n}\mathit{p}\mathit{u}\mathit{t}IDofqualifiedNFVstoTNIof{P}_{2},{P}_{3}$ 26: $\mathit{E}\mathit{n}\mathit{d}\mathit{i}\mathit{f}$ 27: $\mathit{E}\mathit{l}\mathit{s}\mathit{e}$ 28: $\mathit{I}\mathit{f}{p}_{i}notoptimal\mathit{T}\mathit{h}\mathit{e}\mathit{n}$ 29: $\mathit{D}\mathit{i}\mathit{s}\mathit{c}\mathit{a}\mathit{r}\mathit{d}\left(videopkt{p}_{i\left(s\right)}\right)$ 30: $\mathit{E}\mathit{n}\mathit{d}\mathit{i}\mathit{f}$ 31: $\mathit{E}\mathit{l}\mathit{s}\mathit{e}$ 32:$\mathit{F}\mathit{o}\mathit{r}\mathit{w}\mathit{a}\mathit{r}\mathit{d}\left(videopkt\right)toqualifiedNFV$ 33: $\mathit{I}\mathit{f}NFV==DVN\mathit{T}\mathit{h}\mathit{e}\mathit{n}$ 34: $\mathit{F}\mathit{o}\mathit{r}\mathit{w}\mathit{a}\mathit{r}\mathit{d}\left(videopkt\right)toDVNwithoutcomputingmetrics$ 35: $\mathit{C}\mathit{h}\mathit{e}\mathit{c}\mathit{k}forduplicateI-FramewiththesameIDandDiscardone$ 36: $\mathit{E}\mathit{l}\mathit{s}\mathit{e}$ 37: $\mathit{F}\mathit{o}\mathit{r}\mathit{w}\mathit{a}\mathit{r}\mathit{d}\left(videopkt\right)toNFV$ 38: $\mathit{E}\mathit{n}\mathit{d}\mathit{i}\mathit{f}$ 39: $\mathit{E}\mathit{n}\mathit{d}\mathit{i}\mathit{f}$ 40: $\mathit{E}\mathit{n}\mathit{d}\mathit{P}\mathit{r}\mathit{o}\mathit{c}\mathit{e}\mathit{d}\mathit{u}\mathit{r}\mathit{e}$ |

#### 3.2.2. Multi-Metric Video Streaming with Dynamic Self-Weighting Score

In this subsection, the multi-metric score is further enhanced to be dynamically self-configured for obtaining a more realistic score in order to weight the multiple metrics. In most of the existing multi-metric forwarder schemes, equal or varied fixed weight value has always been assigned without considering the change in the network condition. Considering the nature of VANETs and most especially the urban scenario where there are several obstructions, there is a need to adapt the multi-metric forwarder scheme to be dynamic in operation.

The multi-metrics are made to be self-configured, that is, dynamic. The dynamic weighting score mechanism assigns weight to the different metrics based on the network situation. The dynamic weight score is better than the fixed variable or equal value weighting because a metric is usually important based on a certain situation in the VANETs environment. In selecting an optimal NFV, the PFV need to evaluate the optimality of the NFV. Moreover, several metrics are considered. In most of the previous work, the metrics are usually given equal or varied fixed value based on some assumption of perceived importance. However, this is not always true because some metrics become more important based on the current network situation. For example, considering VDR and SINR, the score for SINR might need to be given higher value compared to that of the vehicle density of the road when the vehicle is at the junction area, because of many obstructing objects. Both the SINR and vehicle trajectory are important metrics but in different situations. Therefore, a Road-based Multi-metric Forwarder evaluation for Multipath Video Streaming with Dynamic Self-Weighting (RMF-MVS + DSW) has been developed, which adapts to the network situation. The dynamic weight distribution categorizes vehicles in an enhanced pattern by assigning each metric a certain priority depending on the most recent network situations. In the DSW, higher weight score is assigned to the metric that has a lower value, which tends to zero, while metrics with a higher value closer to one are given lower weight. The whole idea is that the network conditions are collected and weights are provided in such a way that it adapts to the variable of the network condition. With this concept, the important metrics based on the network condition will not be assigned a smaller weight. This concept is carried out on all C-NFVs. Thus, it enhances the selection of optimal NFV. The overall weights of all metrics are not greater than one (1).

The PFV categorizes the C-NFV from the most suitable to the less suitable by employing the multi-metric score mechanism. The weights of the metrics can be assigned as $\mathrm{Weights}={\mathrm{wt}}_{1},{\text{}\mathrm{wt}}_{2},\text{}.\text{}.\text{}.,{\text{}\mathrm{wt}}_{\mathrm{n}}$, the $\mathrm{n}$ represent the number of metrics, since the number of metrics utilized are five (5), $\mathrm{n}=5$. These different metrics are calculated by the algorithm in order to have a dynamic update considering the current network situation of the C-NFV. The concept is to point out the metrics that can lead to better selection of the NFV among the C-NFVs.

The five metrics are represented as

$\mathrm{Metrics}={\mathrm{mt}}_{1},{\text{}\mathrm{mt}}_{2},{\text{}\mathrm{mt}}_{3},{\text{}\mathrm{mt}}_{4},{\text{}\mathrm{mt}}_{5}$ which are equal to

$\mathrm{VDR},\text{}\mathrm{VTJ},{\text{}\mathrm{H}}_{\mathrm{m}}{\mathrm{R}}_{\mathrm{r}},\text{}\mathrm{ABE}\text{}\mathrm{and}\text{}\mathrm{SINR}$, respectively. Hence, the variation value of each metrics is represented as

${\mathrm{VR}}_{\mathrm{m}}$ between the time interval of

${\mathrm{t}}_{0}$ and

${\mathrm{t}}_{1}$, such that

${\mathrm{t}}_{1}>{\mathrm{t}}_{0}$, derived as follows in Equation (17).

where

$\text{}0\le {\mathrm{mt}}_{\mathrm{n}}\left[{\mathrm{t}}_{0}\right]$,

${\mathrm{mt}}_{\mathrm{n}}\left[{\mathrm{t}}_{1}\right]\le 1$ and

$0\le {\mathrm{AV}}_{{\mathrm{mt}}_{\mathrm{n}}}\left[{\mathrm{t}}_{0}\right]$,

${\mathrm{AV}}_{{\mathrm{mt}}_{\mathrm{n}}}\left[{\mathrm{t}}_{1}\right]\le 1$, such that

$\mathrm{n}\in \left(1,\text{}5\right)$. The

${\mathrm{mt}}_{\mathrm{n}}\left[{\mathrm{t}}_{0}\right]$ and

${\mathrm{mt}}_{\mathrm{n}}\left[{\mathrm{t}}_{1}\right]$ are the initial score of individual metrics

${\mathrm{mt}}_{\mathrm{n}}$ for period

${\mathrm{t}}_{0}$ and

${\mathrm{t}}_{1}$, respectively. The

${\mathrm{AV}}_{{\mathrm{mt}}_{\mathrm{n}}}\left[{\mathrm{t}}_{0}\right]$ and

${\mathrm{AV}}_{{\mathrm{mt}}_{\mathrm{n}}}\left[{\mathrm{t}}_{1}\right]$ are the mean score value of metrics

${\mathrm{mt}}_{\mathrm{n}}$ computed for all the C-NFV. Thus, if

${\mathrm{VR}}_{\mathrm{m}}\le 0$, it depicts that the metrics

${\mathrm{mt}}_{\mathrm{n}}$ is becoming worst at the period

$({\mathrm{t}}_{1}-{\mathrm{t}}_{0})$, as a result of this, the variation value tends to zero

${\mathrm{VR}}_{\mathrm{m}}\to 0$. Consequently, a vector related to

${\mathrm{VR}}_{\mathrm{m}}$ is derived as

${\mathrm{VR}}_{\mathrm{m}}=\left({\mathrm{VR}}_{\mathrm{m}1},{\text{}\mathrm{VR}}_{\mathrm{m}2},\text{}\dots ,{\text{}\mathrm{VR}}_{\mathrm{m}5}\right).$ Assuming that the maximum score of a vector

${\mathrm{VR}}_{\mathrm{m}}$ is

${\mathrm{VR}}_{{\mathrm{m}}_{\mathrm{max}\left(\mathrm{x}\right)}}$ such that

$\mathrm{x}\in \left(1-\text{}5\right)$. The highest vector variation value is termed as the

${\mathrm{VR}}_{{\mathrm{m}}_{\mathrm{max}\left(\mathrm{x}\right)}}$. Then, it follows the normalization of the vectors

${\mathrm{VR}}_{\mathrm{m}}$ between

$0$ and

$1$, that is,

$\text{}0\ge {\mathrm{VR}}_{\mathrm{m}}\le 1$; the normalized vector is named

${\mathrm{N}}_{\mathrm{v}}$, which is represented in Equation (18).

In order to make sure that the total sum of weights of the metrics is equal to the maximum value of one. Hence, a parameter

$\mathsf{\tau}$ value based on Equation (19) is formulated.

Further, vectors of weights

$\mathrm{Wt}$ are normalized as follows in Equation (20):

Therefore, the weight scores (${\mathrm{Wt}}_{1}$, ${\mathrm{Wt}}_{2}$, ${\mathrm{Wt}}_{3}$, ${\mathrm{Wt}}_{4}$, ${\mathrm{Wt}}_{5}$) of all the metrics are dynamically computed instead of assigning equal or varied fixed weight to the multiple metrics. In the case that, all metrics are becoming worst, which is a very rare situation, then all metrics are giving equal weight scores ${\mathrm{Wt}}_{\mathrm{n}}=\frac{1}{5}$. However, this kind of situation is very difficult to occur. Thus, the dynamic self-weighting mechanism improves the optimality in the selection of NFV from the set of C-NFV. Thus, this leads to higher video packet delivery.

Algorithm 2 computes the multi-metric dynamic self-weighting score for optimal NFV selection. In line 1, the weighting score is initiated by computing the metrics and their corresponding scores, which is in lines 2 and 3, respectively. Line 4 evaluates the variation value, which is based on the difference between the average metric value of a C-NFV and the initial metric value at initial time and at a different period of time, that is, line 5. The

$V{R}_{m}$ vector values are normalized to values between 0 and 1 and the sum of the weight values are equalized to a value of 1, which is in line 6. In line 7, the whole vector weight is normalized using Equation (20). Then, lines 8 and 9 test the variation of the metric value and then assign a higher weight value to the metric that tends to zero, otherwise the optimal NFV is selected based on the dynamic self-weighting of the metrics, which is in line 11. Lines 12 and 13 terminate the algorithm procedure.

Figure 4 depicts the flow representation of the dynamic self-weighting score.

**Algorithm 2.** Dynamic Self-Weighting Score |

$\hspace{1em}\mathit{I}\mathit{n}\mathit{p}\mathit{u}\mathit{t}:Multimetricvalues$ **Output**: Dynamic self-weighting score for NFV selection 1: $\mathit{P}\mathit{r}\mathit{o}\mathit{c}\mathit{e}\mathit{d}\mathit{u}\mathit{r}\mathit{e}WeightingscoreforNFVs$ 2: $\mathit{C}\mathit{o}\mathit{m}\mathit{p}\mathit{u}\mathit{t}\mathit{e}VDR,VTJ,ABE,{H}_{m}{R}_{r},SINR$ 3: $\mathit{C}\mathit{o}\mathit{m}\mathit{p}\mathit{u}\mathit{t}\mathit{e}MultimertricscoreusingEquation16$ 4: $\mathit{E}\mathit{v}\mathit{a}\mathit{l}\mathit{u}\mathit{a}\mathit{t}\mathit{e}V{R}_{m}VariationvalueofmetricsusingEquation17$ 5: $\mathit{N}\mathit{o}\mathit{r}\mathit{m}\mathit{a}\mathit{l}\mathit{i}\mathit{z}\mathit{e}VectorV{R}_{m}\in \left(0\ge V{R}_{m}\le 1\right)usingEquation18$ 6:$\mathit{E}\mathit{x}\mathit{p}\mathit{r}\mathit{e}\mathit{s}\mathit{s}thesumofweightsofmetrics==1usingEquation19$ 7: $\mathit{N}\mathit{o}\mathit{r}\mathit{m}\mathit{a}\mathit{l}\mathit{i}\mathit{z}\mathit{e}VectorofWtusingEquation20$ 8: $\mathit{I}\mathit{f}metricscorevariationishigh\left(V{R}_{m}\to 0\right)\mathit{t}\mathit{h}\mathit{e}\mathit{n}$ 9:$\mathit{A}\mathit{s}\mathit{s}\mathit{i}\mathit{g}\mathit{n}higherWttothemetricforoptimalNFVselection$ 10: $\mathit{E}\mathit{l}\mathit{s}\mathit{e}$ 11: $\mathit{S}\mathit{e}\mathit{l}\mathit{e}\mathit{c}\mathit{t}optimalNFVbasedontheWtscore$ 12: $\mathit{E}\mathit{n}\mathit{d}\mathit{i}\mathit{f}$ 13: $\mathit{E}\mathit{n}\mathit{d}\mathit{P}\mathit{r}\mathit{o}\mathit{c}\mathit{e}\mathit{d}\mathit{u}\mathit{r}\mathit{e}$ |

The whole concepts discussed in this section are implemented based on greedy-based geographic routing. The complete implementation process including simulation settings and performance evaluation of the proposed scheme are presented in

Section 4.