{'fraction_non_alphanumeric': 0.025494892761763168, 'fraction_numerical': 0.007103328652845462, 'mean_word_length': 5.139621365787694, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Shared Mobility Intelligence Using Permissioned Blockchains for Smart Cities

Suggesting tourists/residents about the pollution-free locations and controlling the number of passengers in a shareable vehicle have become crucial tasks to smart city officials as they plummet health issues such as asthma or COVID-19. Recently, city authorities, transport logistic designers, and policymakers have tasked researchers/entrepreneurs to innovate in shared mobility systems. This paper proposes a Blockchain-Enabled Shared Mobility (BESM) architecture that allocates seats to residents/tourists in a shareable vehicle based on air quality and COVID-19 information of traveling locations. BESM involves smart city authorities, vehicle owners, hospital authorities, and residents using permissioned-blockchains to collaboratively decide on allocating travel seats. Experiments were carried out at the IoT Cloud research laboratory to manifest the allocation of seats. For instance, BESM excluded in allocating seats to asthma patients and limited the number of travelers in the cities where COVID-19 cases or pollution levels were higher in numbers using BESM. The pollution levels of cities were monitored using air quality monitoring sensors or predicted using a few prediction algorithms such as Random Forests (RF), Linear Regression (LR), Quantile Regression (QR), Ridge Regression (RR), Lasso Regression (LaR), ElasticNet Regression (ER), Support Vector Machine (SVM), and Recursive Partitioning (RP). In succinct, the article unfolded the primordial importance of the proposed BESM architecture for promoting efficient shared mobility aspects in smart cities.


Introduction
Owning vehicles for mobility no longer seems to be a major attraction for smart city officials/residents, given the hype around shared mobility advantages, especially when the near future automated vehicles are concerned. Sharing transportation services and vehicles can reduce the vehicle kilometer demand in major cities; it promotes productivity, improves vehicle utilization, increases economics, and lowers pollution by reducing traffic congestions.
Significant segments of researchers and startup enthusiasts reportedly contribute to enabling innovations in the existing shared mobility systems by foreseeing the substantial reduction in costs involved in accessing vehicles. For instance, innovations in shared mobility gave birth to several types of shareable vehicles: bike-sharing, scooter sharing, car sharing, bus sharing, ride sharing, public transiting, and so forth.
Recently, smart city policymakers and urban sustainability teams have ushered in some promotional schemes to innovate on-demand shared mobility practices. For instance, the Innovation and Knowledge acceleration program of the USA has strategically planned to use 100000 cars on-demand [25]; NITI Aayog of India has decided to reduce the overwhelming interests of citizens to own private vehicles by foreseeing the congestion/health hazards of emerging smart cities such as Bangalore, Chennai, Delhi, and Mumbai [34]. Precisely, there is a need for promoting shared mobility practices in cities to reduce pollution/congestion.
In fact, air pollution because of vehicles is a challenging health issue for the tourists/residents of smart cities. Notably, using deprecated vehicles, poor-quality fuels, and delirious driving practices could adversely increase air pollution rates in cities, especially in traffic-congested cities. When fuel burns, NO 2 is formed which acutely affects the humans' lung functions. Consequently, the asthma and bronchitis patients avoid urban living or city trips; besides, the patients are driven to lung or similar cancer diseases-a long-standing health concern to the urban residents. In addition, air pollution due to the emission of NO 2 from vehicles remains a toxic element to plants which reduces the growth rate of plants or crop productions.
One aspect that has been widely practiced in many countries is to adopt policies and regulations to counteract the air pollution due to vehicles. For instance, Air Pollution Control Act, July 1955, was extended with several amendments, including the motor vehicle control act, by the US Congress; an Air Act of the parliament of India [3] was strengthened with several enforcement schemes to improve the air quality standards of over 102 cities that are below the National Ambient Air Quality Standards set by the US [33]; emissions of NO 2 were controlled by Euro 5/6 regulation 715/2007/EC in Europe [18]. Unfortunately, not all countries are diligent to enforce the laws and procedures to a practical extent, especially in developing countries, owing to the poor availability of control measures or rigorous enforcement practices.
This article proposes a Blockchain-Enabled Shared Mobility (BESM) architecture that involves smart city authorities, vehicle owners, hospital management, and residents/tourists to decide on collaboratively utilizing a shareable vehicle in smart cities. BESM collaboratively allocates seats to travelers in a shareable vehicle depending on the air quality and COVID-19 cases of traveling destinations. The air quality information is obtained from air quality monitoring sites [4,8] or predicted using prediction algorithms for the latitude or longitude of traveling locations.
Experiments were carried out at the IoT cloud research laboratory. The article discloses the evaluation results highlighting BESM architecture's importance for practicing shared mobility in smart cities. A few case studies were presented to demonstrate the proposed BESM architecture. Besides, a comparison of various prediction algorithms was studied while predicting the air quality information of a location in BESM.
The primordial contributions of the work include: -A BESM architecture is proposed which includes smart city policymakers to quickly decide on the number of travelers on a shareable vehicle based on the air quality and COVID-19 information of smart cities or traveling locations. -A comparison of several prediction algorithms while predicting the air quality values of different traveling locations of a traveler was discussed. -The findings due to implementing a smart shared mobility system were detailed in the article with a few case studies.
The rest of the article is expressed as follows: the next section explores the state-ofthe-art discussions on shared mobility systems of smart cities. The subsequent section explains the proposed BESM architecture and the associated entities involved in incorporating blockchain approach for shared mobility followed by which the prediction algorithms such as LR, QR, RR, LaR, ER, SVM, RP, and RF that are utilized in work and the blockchain processes of the architecture are described. The penultimate section manifests the importance of including BESM for shared mobility practices. The final section provides conclusions and a few insights on the future shared mobility research works based on BESM.

Related Works
Intelligent Transportation System (ITS) for societal improvements [1,5,10,14,19] has emerged in various sectors with a proliferation in topics such as shared mobility [13,21], secured ITS, efficient vehicle utilization [27], and so forth. Officials and government agencies of several countries, including developing countries, have shown a keen interest in promoting the shared mobility practices in smart cities due to the associated economic and environmental benefits.
In the past, researchers and practitioners studied shared mobility in several research perspectives: (i) improving energy consumption of e-vehicles [17,28], reducing traveling costs [39], collaborative or dynamic decision-making processes [43], learning the behavior of travelers by providing tourism tips [11,21,36], and so forth. An array of research works has been carried out to innovate transportation systems by augmenting intelligent mechanisms [31,37,42,44] in shared mobility approaches such as e-bikes, shared dockless, e-scooters, shared taxis, public buses.
Besides, blockchains were incorporated in shared mobility solutions to provide immutable database and transferring route plans across organizations at ease. For instance, authors of Ao et al. [7] have applied blockchains to propagate keys across multi-security domains for an accelerated delivery of management keys. Similarly, the application of blockchains for enabling secured transactions in transportation systems have marked a magnified growth [41]. Authors of [16] have developed a token-based ethereum framework for allocating seats in shared vehicles. Recently, Nishant et al. [35] have studied the application of permissioned blockchains to share a vehicle among travelers by publishing the travel plan on the ledgers.
Although these works relate to the application of blockchains for the shared mobility aspects of transportation systems, the authors have not considered the inclusion of smart city officials considering the pollution or COVID-19 situations in sharing vehicles.
Establishing blockchain-enabled frameworks or providing intelligence to transportation systems considering the environmental aspects recently have attracted a large volume of researchers or environment-cautious practitioners. For instance, Gregorio et al. [22] have developed a solution to optimize road traffics considering air quality values of the city locations; Adriana et al. [2] have predicted the air quality values for a given traffic model of cities. However, these works have not considered the shared mobility aspects of Intelligent Transportation Systems.
In fact, the realization of changing policies in the existing transportation schedules or seat allocations in shared mobility practices expects local decisions from smart city officials [20]. Such decisions are predominantly crucial in situations such as COVID-19 where the shared mobility practices should be diligently dealt with by availing sufficient permissions from the smart city officials or travelers. Additionally, an air quality-aware decision-making process while allocating seats in shareable vehicles is not available in the existing shared mobility architectures/frameworks. This article proposed BESM architecture that involves policymakers, smart city officials, travelers, and hospital authorities to jointly decide on allocating seats in a shareable vehicle for ensuring a robust shared mobility in smart cities.

Blockchain-Enabled Shared Mobility Architecture
This section provides a brief introduction to blockchains and explains the entities and the associated functionalities involved in the BESM architecture.

Blockchains
In short, blockchain is a distributed immutable ledger that is shared and replicated within participants. The ledger registers the information in a time-stamped series fashion. Broadly, blockchains are classified into public and private blockchains [23] depending on the number of participants involved in the process of enrolling information into the ledger-i.e., in public blockchains, any participant could decide to register information into the ledger; whereas, in private blockchains, only known participants are involved in the process of updating the ledger. Besides, hybrid and consortium modes of blockchains are practiced in the past for specific applications.
The important features of blockchains are: 1. There is no central authority to control the registration of data in the ledger; 2. Trust is leveraged by the collective involvement of the participants of blockchain networks as the trust involved in third parties such as governments or banks are no longer valid for the modern communities; 3. Registration of data into the distributed ledger is dynamic or based on programs such as chaincodes; 4. The data is cryptographically stored in the distributed database in a chained fashion-i.e., series of blocks; 5. Tampering of distributed ledger is highly impossible owing to the involvement of multiple parties-i.e., manipulating a single record of a blockchain would modify the entire chain of blocks; 6. The auditing costs of data in blockchains are comparatively low due to high transparency involved in the verification process of the information entered into the ledger; and, so forth.

BESM Entities
BESM adopts private blockchains in the proposed architecture (github.com /shajulin /iiitfabric and github.com/shajulin/shared-mobility). Private blockchains enable a speedy process of consensus during the decision to include data or information into the ledger. This is due to the fact that only a few participants, priorly known participants, are involved in the private blockchains. In addition, due to the involvement of government authorities or smart city officials in the process of blockchains, it is preferred to utilize private blockchains to avoid unnecessary havoc due to the public participants in the blockchains (Fig. 1). The most important entities involved in the BESM architecture include 1. Interface-Shared mobility travelers of smart cities register in the BESM architecture using the Interface. The interface connects not only the shared mobility travelers but also the smart city officials and the other crucial participants to enact policies as per their capacities. 2. Peers-Peers are nodes that include ledgers and represent involving participant organizations of BESM. Peers could be established in a bare-metal system, virtual machines, or in docker container environments. Each organization could include more than one peer. Peers are responsible for executing chaincodes that dynamically decide on validating the information for registering the information into the ledger. One or more peers are designated as Orderer nodes in BESM which finally submits the information into the ledger as blocks in a time-stamped fashion. 3. P2P Networks-Peers of BESM are connected in a P2P fashion-i.e., an overlay network would be laid on the connected network infrastructure. The advantages of establishing P2P networks are: -to quickly transfer files or ledger information directly between nodes instead of having a central node for it; and, -to formulate networks of peers depending on the applications.

4.
Chaincodes-Chaincodes are programs written in golang, nodejs, or python, which include business logic. For instance, Chaincodes in BESM has init and invoke methods that instantiate and process information for entering them into the ledger with specific business logic. Prior to these two mandatory methods, the appropriate golang packages such as shim, protos/peer, and so forth, are imported to the Chaincode and the data structure of BESM needs to be initialized. The invoke methods of Chaincode involve three major methods: -querySeatAlloted()-this method queries the confirmed seats from the ledger; -initLedger()-this method initializes the defined data structures of the ledger into the pre-defined channel; and, -allotSeat()-this piece of code of the chaincode represents/assesses the policies of different peer representations.
The policies of the allotSeat() method of the chaincode varies between organizations. For instance, the policies adopted and approved by smart city officials endeavor to assign the number of travelers based on the COVID-19 situation; the policies that are approved by vehicle owners of the blockchain network corresponds with the seating capacity of vehicles; the hospital authorities confirms

BESM Processes
BESM allocates the number of residents/tourists to travel in a shareable vehicle V i of capacity S c considering air quality parameters AQ j and COVID-19 situations of a province/district/region C s . The air quality parameters AQ j consist of NO 2 , SO 2 , and so forth. The processes involved in BESM while permitting a resident/traveler to travel in a shareable vehicle of capacity S c are listed as follows: 1. Initialization-At first, the seat capacity S c of a shareable vehicle V i is initialized by the vehicle owner; and, a blockchain network B n is initiated by smart city officials or the other permitted participants who are in the admin role of the blockchain network. 2. Details Collection/Verification-Second, the latitude l sc and longitude lo sc of the smart city locations that the traveler would travel using the shareable vehicle V i of capacity S c are collected. This depends on the preference given by the traveler to reach a destination on the vehicle. Similarly, the information of a traveler T sc , namely, the personal identification number is collected from smart city registries; besides, the current COVID-19 situation C s for the given location or traveling locations is collected. 3. AQ j Measurement/Prediction-Third, for the given l sc and lo sc of the smart city and the entire route of the journey, AQ j parameters such as NO 2 , SO 2 are either measured using sensors or predicted using previous values of nearest locations of a region. Typically, air quality monitoring sensors are connected to cloud services or edge services through microcontrollers such as Arduino UNO and gateways. There are no monitoring sensors in some locations due to several reasons such as network or cost issues. In fact, it is not possible to provide monitoring sites in all possible locations of a widely spread region, especially in developing countries. Hence, prediction services need to be adopted for identifying the air quality parameter values. In order to predict the air quality parameter values, BESM utilizes several prediction algorithms such as LR, QR, RR, LaR, ER, RF, SVM, and RP algorithms. A detailed discussion on the prediction algorithms is discussed in Sect. 4. 4. Travel Decision-Fourth, the traveler requests BESM to allot a seat in the shareable vehicle. The request is initiated as a blockchain transaction. This transaction is verified based on the input provided to the blockchain network such as traveler details, air quality values of the entire path of the journey, and the traveler/resident's health concerns. Chaincodes are executed on the peers of the blockchain network, where the policies of smart city officials, tourists/resident willingness, hospital permissions, and vehicle owner consent are collectively approved in order to validate the seat allocation of a shareable vehicle. 5. Anomaly Records-In general, vehicle owners might attempt to increase the number of travelers in their vehicle V i ; smart city officials or governments prefer to vary allocation policies in a dynamic fashion depending on various scenarios; hospital authorities might provide wrong recommendations; and, so forth. Anomalies of variations A v , if noticed, need to be issued as transactions in blockchains. For instance, a smart city official could inspect the over-crowded vehicle and raise an anomaly against the vehicle owner. This transaction would be recorded as an anomaly record in the blockchain database B d similar to the traveler seat allocation transaction. The participants of BESM verify each transaction before they were recorded into the database.

Blockchain Intelligence
This section explains the prediction algorithms utilized in the BESM architecture to predict the air quality values of the traveling locations of residents/tourists. Smart city officials could utilize the prediction results to determine the travel recommendations (Fig. 2).

Modeling and Predictions
Given (i) a dataset consisting of air quality values such as NO 2 and SO 2 of the city locations of a region and (ii) the corresponding latitude l sc and longitude lo sc of the city locations, the air quality values are either predicted or monitored in BESM.
The prediction processes are, in general, undertaken in three phases after the dataset was split into training, validating, and testing data: Modeling happens during the training phase of a prediction algorithm based on the given dataset. Modeling results in a trained model that could validate or test new input data. It is performed based on the knowledge of the independent and dependent variables of data. 2. Validation-During the validation phase, the trained model is fine-tuned based on the input data and the output of the trained model. The validation phase enables a good prediction accuracy for the test dataset. 3. Testing-In the Testing phase, the data, whose output values are unknown, are predicted based on the trained model while expecting an accuracy that is finetuned during the Validation phase.
The three phases are carried out using prediction algorithms such as LR, QR, RR, LaR, ER, RF, SVM, and RP in BESM architecture.

Prediction Algorithms
Depending on the input dataset and the distribution of data available for the independent/dependent variable of the dataset, the learning algorithms' prediction accuracy differs.
Linear Regressions-(LR) and (LRM) LR prepares a trained model by finding the linear relationship between the dependent and independent variables of a given dataset-i.e., it formulates a least square method to calculate the value of the independent variable. If the dependent variable y intercepts properly to the independent variables x 1...n , the quality of prediction accuracy would be predominantly high. However, it is not the reality in most of the dataset, including the prediction of NO 2 or SO 2 of air quality datasets. In such cases, an error term is introduced to deal with the offsets.
In the generalized version of linear regression, i.e., in LRM of BESM, the relationship between dependent and independent variables is enabled using a link function. Accordingly, a few non-linear portions of the dataset could fit well between the dependent and independent variables of BESM.
Quantile Regression (QR) QR is a variant of LR-i.e., instead of finding the median of the least-squares of the independent variable's entire value, QR restricts to a quantile portion of the dataset. In doing so, the quantile portion of the data analysis is quickly possible using QR. In addition, the error percentage is also spread across the quantiles of the dataset. QR is sufficient for a dataset containing outliers that are possible in IoT-enabled measurements that emerge due to faulty sensors or communication protocols, including the air quality dataset.
Ridge Regression (RR) RR is another variant of LR. RR attempts to reduce the overfitting cases of trained models to attain more generalized learning in the trained model. In some cases, however, there is a possibility that the trained model fits very well during the training phase of predicting data. In fact, the prediction accuracy would not be as expected in the validation or the testing phases. This problem is defined as the overfitting problem. The overfitting problem is addressed by introducing loss functions while creating the trained model in RR-i.e., the sum of squares of errors of independent variables is reduced.
Lasso Regression (LaR) LaR is also a variant of LR. In LaR, as specified in LAS-SO's name (Least Absolute Shrinkage and Selection Operator), penalty is added based on the absolute value of the severity of the coefficients-i.e., LaR attempts to set zero for some coefficients. LaR is designed to overcome the overfitting problem as similar to RR. The major difference of LaR compared to RR is the utilization of the absolute value of the coefficients in LaR instead of least squares of the coefficients in RR. LaR performs the variable selection mechanism in addition to solving the overfitting problem of trained models.
Elastic Regression (ER) LaR might specifically restrict the number of variables during the path to solve the overfitting problem. ER is an extension of LaR; it is designed to overcome the challenges of LaR and RR. In ER, shrinking coefficients and setting zero to some coefficients are performed-i.e., a combination of both RR and LaR. ER is therefore considered to be a more effective regression approach when compared to the previous regression approaches.
Support Vector Machine (SVM) SVM is a learning algorithm that applies hyperplanes to separate data with maximum distances. It attempts to plot separation lines in an n-dimensional dataset. Besides, it includes kernels such as linear, polynomial, sigmoid, and so forth, to convert low-dimensional input space to high dimensional data space-i.e., kernels enable quick identification of hyperplanes with a minimal computation cost. The continuity of the line in SVM is utilized for predicting the future data points of the regression problems.
Random Forest (RF) RF is an ensemble-based bagging technique to create models during the training phase. It constructs multiple decision RF trees; it bags data to appropriate trees while building the training model. RF is considered to reduce the overfitting problem during the training phase. It picks up a few samples from the training dataset and starts to create RF trees so that RF could average RF trees' results. It is an attractive algorithm that maintains the prediction accuracy even if a sequence of data is missing while creating the training model from the training dataset.
Recursive Partitioning (RP) RP is more similar to RF-i.e., it establishes decision trees from the dataset. However, RF creates multiple decision trees to accomplish learning forests-a sort of ensemble learning process. In RP, being a single tree, the interpretation of arriving results is comparatively more straightforward, challenging the predictions' accuracy.

Experimental Results
This section explains the experimental results carried out at the IoT cloud research laboratory to manifest the importance of the proposed BESM architecture. Initially, the experimental setup of the architecture was discussed; next, the evaluation of different prediction algorithms was analyzed; and, finally, a few cases, while applying the blockchain intelligence, were discussed.

Experimental Setup
To validate the proposed BESM architecture, the prediction algorithms utilized and their configurational settings are mentioned in Table 1.
Throughout the prediction-related experiments, the independent variables such as NO 2 , Latitude l sc , and Longitude lo sc of city locations were utilized for predicting SO 2 ; and, the independent variables such as SO 2 , Latitude l sc , and Longitude lo sc of specific locations were utilized for predicting NO 2 . While validating the prediction algorithms, 50 percentages of data are utilized for creating a training model and the other 50 percentages of data are utilized for validating the data. The dataset is a mixture of the real-time collected sensor data from air quality monitoring sites and the dataset that is available at the Indian dataset repositories [8].
The dataset utilized in the experiments belongs to the air quality measurements carried out in the Kerala state of India. This is due to the fact that the air quality and COVID-19 aware allocation of seats in a shareable mobility vehicle was demonstrated for the Kerala state of India. The dataset was tidied by removing unspecified values and ordering datasets based on the measurement time. In addition, the values of latitude l sc and longitude lo sc for different city locations were included in the dataset so that the air quality values of specific travel locations of a traveler could be predicted depending on the corresponding independent variables.
The blockchain network of BESM architecture was established using docker containers on a Dell Precision Tower 7810 machine which consists of an Intel Xeon(R) CPU E5-2650 processor with 48 CPUs. The containers represent peer organizations such as smart cities, travelers, hospitals, and vehicle owners in BESM. The permissioned blockchain was executed using a hyperledger fabric v.1.4.1 [24] where the chaincodes represent the logic for deciding whether a traveler could be accommodated in a shareable vehicle or not. The chaincodes of BESM were written, compiled, and executed using golang v1.14.

Prediction Algorithms-Evaluations
For the given dataset, the prediction algorithms of consideration such as LR, LRM, QR, RR, LaR, ER, and RF were evaluated in two aspects: (i) Prediction Accuracy and (ii) Modeling Time.

Prediction Accuracy
The prediction of air quality values such as SO 2 and NO 2 for a given dataset was validated for different prediction algorithms by considering 50 percent of data for training and the other portion for testing. Figure 3 depicts on the training and testing dataset while applying different prediction algorithms. The red points represent the training data and the blue lines depict on the prediction data obtained for the testing data of air quality values while predicting SO 2 and NO 2 values. Figure 4 reveals the R 2 values obtained while predicting the air quality parameters. The following points could be observed from the prediction results due to different algorithms of consideration: 1. The R 2 prediction accuracy values of NO 2 are higher than SO 2 for most of the algorithms-i.e., the lowest R 2 value of NO 2 was 84. 16  The modeling and prediction time for different algorithms were analyzed. Table 2 highlights the values of them due to the prediction algorithms. The last two columns of the table express the time required for conducting the entire validation processes and prediction processes of algorithms. The validation processes, for example, include tidying data, splitting data into training and testing datasets, establishing  models for the training dataset, and predicting data for the testing dataset. The prediction processes avoid splitting processes and testing 50 percent of data as carried out at the validation processes. As observed in Table 2, the time required for creating training models to train SO 2 and NO 2 was comparatively higher than the respective time for predictions. The validation and prediction times of SVM, ER and RF were higher than the other algorithms-notably, SVM had experienced 26.4 seconds for predicting the dependent variables. Succinctly, the prediction accuracy result of RF was better than the other algorithms of consideration as shown in Fig. 4.

Blockchains-Cases
Shared Vehicles (SVs) that travel in four different routes of Kerala, India, were studied with the application of blockchains. The routes of shared vehicles are listed in Table 3. Let us assume that the SVs utilized in the exploratory study consist of a maximum seating capacity of 26-i.e., S c =26, including a driver; the smart city officials have fixed a policy of including half the seating capacity whenever the smart cities experience COVID-19 cases. In fact, the policies are subject to change based on the discretion of the concerning officials.
In this article, four different cases were explored while allotting seats in SVs for travelers/residents of smart cities as discussed below:  The chaincodes of BESM architecture were designed such that smart city officials, vehicle owners, hospital authorities, and travelers/residents would collectively decide on registering the transaction into the ledger.
In Case 1, the preference of traveler/resident is issued as a transaction to allocate seats in the shareable vehicle V 1 . Although seats were available for the traveler in the vehicle for traveling from Malappuram to Trivandrum, the feasibility of accommodating the passenger in the shareable vehicle is cross-checked by other participants in the blockchain network, including smart city officials, vehicle owners, and hospital authorities.
Notably, the chaincode is designed such that the hospital authorities verify whether the traveler has health concerns; the vehicle owner verifies the seat availability concerning the maximum permissible limit of vehicle capacities as advised by smart city authorities; and, the smart city peer of the blockchain network would check if the travel needs to be restricted considering the impact due to COVID-19 for a particular city or similar health-related issues. Only if every stakeholder agrees on the policies in an automated fashion using the chaincode, the seat would be allocated for the traveler/resident-i.e., the transaction would be recorded in the blockchain database. Accordingly, as seen in Table 5, the seat allocation of a traveler is recorded into the blockchain database.
For allocating seats, COVID-19 quarantine information of the Kerala state was collected from the database available in the public repository of cities [12]. The data was collected from March 2020 to June 2020 in order to detect/predict the COVID-19 situation of a particular city while allocating seats. Figure 5 reveals the mobility scenario due to COVID-19 quarantine undertaken in particular cities of Kerala. According to the COVID-19 numbers, smart city policies could be updated in chaincodes to automatically fine-tune the number of seats that might be allocated in shareable vehicles.
In Case 2, it was observed that the traveler wishes to travel from Kottayam to Trivandrum. However, being an asthma patient, the information is specified by hospital authorities suggesting that the patient should be permitted to travel only if the air quality values do not exceed a specific permissible limit. In this case, the permissible limit for asthma patients was fixed as follows by the hospital authorities: (i) SO 2 = 20;SO 2 = 40 . The smart city organization's peer invokes chaincode to For Case 2, the air quality values of the traveling cities of V 2 is predicted as given in Table 4. Case 3 demonstrates a scenario where smart city officials could change the policies depending on the rising number of COVID-19 mobility aspects on cities; and in Case 4, a demonstration to record the anomalies of violators is illustrated. Table 5 illustrates the different cases demonstrated using BESM architecture. It illustrates the scenarios for which the transactions were recorded. As seen, the travel request of a traveler, which is issued as transactions in Case-I, Case-II, and Case-IV, were recorded in the blockchain. In all these cases, the peers representing smart city authorities, vehicle owner, hospital management, and tourists/residents have not objected in issuing seats for the shareable vehicles-i.e., in Case-I, the traveler willing to travel in V 1 does not have any health concerns apart from satisfying all prior requirements for traveling in the vehicle, including the COVID-19 conditions.
In cases Case-II and Case-III, the air quality parameter values of all cities that the vehicles V 2 and V 3 would travel are predicted by RF. This is due to the fact that the traveler is an asthma patient in these cases. However, the hospital management has approved the travelers as the air quality values of traveling locations are in the permissible range. In Case-III, however, the smart city officials of Kozhikode city have restricted the travel permission to the maximum of 5 seats in shareable vehicles. Accordingly, the peer representing smart city representatives has not approved the traveler to travel in V 3 . Consequently, BESM denied registering the traveler in V 3 .
In succinct, BESM architecture promotes a collaborative fashion of quickly allocating seats in a shareable vehicle considering air quality and COVID-19 situation of smart cities.

Conclusion
Shared mobility has proliferated in various dimensions, such as shared bikes, shared taxis, dockless scooters, and so forth, including public transits, for benefiting smart city residents/travelers at large. Air pollution-aware shared mobility or COVID-19aware seat allocations for shareable vehicles could remain an effective approach to improving city residents/travelers' health concerns. This work proposed a novel BESM architecture based on permissioned blockchains. BESM included smart city officials, travelers/residents, hospital management, and vehicle owners while allocating seats for travelers/residents collaboratively; it allocated seats in shareable vehicles based on air quality values and COVID-19 situations of the traveling locations of residents/travelers. The proposed mechanism was experimented at IoT Cloud Research Laboratory and manifested using four demonstration-oriented case studies. In the future, researchers could observe the emotions of travelers based on facial recognitions while allocating seats in a shareable vehicle.