### A Self-Optimizing Technique Based on Vertical Handover for Load Balancing in HWN Using BD Analytics
Figure 7: The results of generated heterogeneous network statistics: (**a**) The active_user table is filled; (**b**) the request_user table is full. In order to fully run the model and quickly process the statistical data, it is necessary to ensure that the Cassandra database interacts with the Spark platform. Next, we proceed to data analysis. Figure 9 shows the algorithm, which allows optimal management of heterogeneous network resources. The operation of the algorithm begins by writing input data to the Cassandra database. The input data include service requests from UEs as well as data on the state of the heterogeneous network (active sessions for each access technology). After recording the statistical data, we proceed to their analysis and comparison with the maximum allowable values for each of the technologies. With the help of data analysis, the critical points in the network are evaluated and decisions are made on the connection of requests from UEs (if there are free resources in the network) arriving at a particular point in time. If a heterogeneous network is loaded, a detailed NP (Network Parameters) analysis of active sessions and requests received is performed. Then, the free resources in the heterogeneous network are calculated and compared with the required number of resources to serve incoming requests. If the required number of resources exists, then the load is redistributed and balanced in the heterogeneous network, and signaling data are sent to each of the UEs with the optimal BS that can serve them. Otherwise, the priority of active sessions and incoming requests is analyzed. The non-priority sessions and requests are rejected and will be served later, while the priority requests are served with the required quality of service. After that, the algorithm is executed again after a time \(\Delta t\). This algorithm can actually prove  
Figure 9: Algorithm of heterogeneous network simulation model using BD analysis. that mobile communication improves the transmission success rate, so that the user can continue driving while traveling without the mobile service being interrupted. We use the developed mathematical method to generate the data analysis. \[ \begin{array}{l}P_{area.ij}(t)=P_{max.ij}(t)-P_{cur.ij}(t),\\ P_{max.ij}=const.\end{array}  \tag{16}\]  
where \(P_{area.ij}\) (\(t\)) is the number of requests from users, which can be served by the BS at a certain point in time, \(P_{max.ij}\) (\(t\)) is the maximum allowable number of active sessions of users without degradation of QoS, where \(i\) is the type of technology and \(j\) is the type of service, and \(P_{cur.ij}\) (\(t\)) is the current number of active sessions at time \(t\). \[P_{input.ij}(t)=P_{req.ij}(t)+P_{cur.ij}(t), \tag{17}\]  
where \(P_{input.ij}\) (\(t\)) is the number of incoming requests from users to the BS at a certain moment of time \(t\). \[P_{lost.ij}(t)=P_{req.ij}(t)-P_{area.ij}(t), \tag{18}\]  
where \(P_{lost.ij}\) (\(t\)) is the number of rejected requests from users, for a particular type of service at the time \(t\). Based on the data obtained from the network analysis, graphs of heterogeneous network load were plotted. The analysis was performed for each technology and service separately to calculate and analyze user data Jobs scripts in the Python programming language for Spark. As an example, the results of the data analysis for overloaded 3G technology are shown in Figure 10.  
Figure 10: Experimental results of developed big data analysis 3G mobile system: (**a**) The incoming VoIP load on 3G; (**b**) the incoming internet downloading on 3G; (**c**) the incoming internet uploading load on 3G; (**d**) the incoming IPTV load on 3G; (**e**) the incoming web load on 3G; (**f**) the incoming videoconference load on 3G.