## 4 Proposed Work
### Cluster-Based Vehicle Motion Detection
\begin{array}{l}l^{\prime}_{i,dim}=(l_{i,dim}-L_{u,dim})+L_{i}(\text {dim}),\text{ {if}}l_{i,dim}>L_{u,dim}\\ l^{\prime}_{i,dim}=(l_{i,dim}-L_{i,dim})+L_{u}(\text{dim}),\text{ {if}}l_{i,dim}<L_{i, dim}\end{array} \right. \tag{36}\]Here, \(l_{i,dim}\) is the location of the \(i^{th}\) vehicle in \(dim\), which is updated as \(l^{\prime}_{i,dim}\) once the boundary constraint is satisfied. If there is no fog node in the region to be alerted, a virtual fog node is deployed through a constraint-based quantum entropy function to alert the vehicles in that region. The constraint for the deployment of the virtual fog node is expressed as follows. \[F(p|q)_{e}\stackrel{{\text{def}}}{{=}}F(pq)_{e}F(q)_{e} \tag{37}\]

where \(p\) and \(q\) are probabilities of entropy measures of fog deployment, and \(e\) represents the reward function of each virtual fog deployment. By doing so, the alert messages are disseminated to the surrounding vehicles and to the vehicles in the nearest area to optimize the traffic flow. Figure 4 illustrates the overall flow of alert message dissemination to the relay vehicles. ### Tri-State-Aware Personalized Assistance

Each individual driver is precisely assisted on the basis of their behavior in order to avoid dangerous situations. The precise assistance is based on the past, present, and future behavior of the driver. The vehicle's current location from the GPS present in the on-board system is used for generating precise recommendations. For instance, if the driver's current state is found to be drowsy, then the location of the vehicle is obtained to assist the driver in taking a break at a nearby hotel or coffee shop. In the case that the vehicle is located in a remote area and there are no nearby locations, the recommendation will be to take a short break or to have a short nap. Assistance is provided one or more times in accordance with the current state of the driver with the multi-attribute utility model. For example, if the current state of the driver is detected as drowsy and distracted, the model will assist, such as recommending having a cup of coffee and driving attentively. These recommendations are provided through the audio system of the vehicle; thus, the driver will be aware thereby preventing road accidents. The proposed model is significant in decision making in which the precise recommendation is provided based on the number of attributes in a certain period of time. This decision making is carried out to overcome false recommendations given under uncertain conditions. Here, recommendations are provided in both certain and uncertain situations. The utility function that represents the state is calculated for all attributes (\(a\)), and a decision regarding a recommendation is provided by leveraging the additive independence property which can be expressed as follows. \[a(y_{1},y_{2},\ldots,\ y_{n})=a_{1}(y_{1})+a_{2}(y_{2})+\ldots+a_{n}(y_{n}) \tag{38}\]

Here, \(n=1,\ 2\ \ldots\ 6\) indicates the number of attributes, and the expectation (\(E\)) of obtaining assistance based on attributes can be represented as follows. \[E[a(y_{1},y_{2},\ldots,\ y_{n})]=E[a_{1}(y_{1})]+E[a_{2}(y_{2})]+\ldots+E[a_{n }(y_{n})] \tag{39}\]

Preference toward assistance for \(n\) number of attributes can be obtained as follows. \[a(y_{1},y_{2},\ldots,\ y_{n})=\sum_{i=1}^{n}h_{i}a_{i}(y_{i}) \tag{40}\]

Here, \(h_{i}\) is the constant of normalization for normalizing \(a\) and \(a_{i}\) in the range of (0, 1). This assistance, along with the driver's preference and style, will get stored in the cloud for more accurate assistance. This is further used to update the A3C algorithm and AttResNet model. ## 5 Experimental Results

In this section, an experimental analysis of the proposed driver behavior analysis and personalized assistance (DBA-PA) is carried out. It comprises several sub-sections, namely simulation setup, use case, comparative analysis, and research highlights.