0% found this document useful (0 votes)
27 views7 pages

Smart Ticketing Systemfor Railwaysin Smart Citiesusing Softwareasa Service Architecture

This document summarizes a research paper about developing a smart ticketing system for railways in India using cloud-based software as a service (SaaS) architecture. The proposed system aims to address issues with existing paper-based and electronic ticketing systems by developing a contactless ticketless system hosted on AWS cloud services. This would allow for features like flexible seasonal passes, detecting non-paying passengers, and analyzing travel patterns and crowds to optimize services. The system would leverage AWS IoT, Lambda, DynamoDB and other services to securely collect device data, process events in real-time using serverless code, and store data in a scalable database.

Uploaded by

Hasan Hafiz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views7 pages

Smart Ticketing Systemfor Railwaysin Smart Citiesusing Softwareasa Service Architecture

This document summarizes a research paper about developing a smart ticketing system for railways in India using cloud-based software as a service (SaaS) architecture. The proposed system aims to address issues with existing paper-based and electronic ticketing systems by developing a contactless ticketless system hosted on AWS cloud services. This would allow for features like flexible seasonal passes, detecting non-paying passengers, and analyzing travel patterns and crowds to optimize services. The system would leverage AWS IoT, Lambda, DynamoDB and other services to securely collect device data, process events in real-time using serverless code, and store data in a scalable database.

Uploaded by

Hasan Hafiz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/320252621

Smart ticketing system for railways in smart cities using software as a service
architecture

Conference Paper · February 2017


DOI: 10.1109/I-SMAC.2017.8058295

CITATIONS READS

8 3,941

4 authors, including:

Godson D'silva Anoop Kunjumon Scariah


SJCEM University of Texas at Arlington
10 PUBLICATIONS 119 CITATIONS 2 PUBLICATIONS 8 CITATIONS

SEE PROFILE SEE PROFILE

Lukose Roy Pannapara


Dublin Business School
2 PUBLICATIONS 8 CITATIONS

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Content Based Image Reterival on Public cloud View project

Online Signature Recognition using Software as a Service (SaaS) Model on Public Cloud View project

All content following this page was uploaded by Godson D'silva on 09 May 2018.

The user has requested enhancement of the downloaded file.


Smart Ticketing System for Railways in Smart Cities
using Software as a Service Architecture
Mr. Godson Michael D’silva, Mr. Anoop Kunjumon, Mr. Lukose Roy, Ms. Jessica John

Information Technology Department


St. John College of Engineering and Technology, Palghar, India
[email protected], [email protected], [email protected], [email protected]

Abstract— Ticketing system for railways in Mumbai suburbs pass from manually set-up counters are time consuming for the
was introduced in order to authenticate and authorize valid commuters since they have to wait in a queue. Paper tickets also
commuters to suit ones comfort, purpose or needs while travelling. generates a lot of paper waste on a daily basis from millions of
Due to very high job prospects in Mumbai city, the population commuters travelling from various source to destination. The
which started travelling through this train increased immensely, introduction of technologies has only paved way for quick &
which resulted in various issues such in never ending queues, fast computing and also information gathering which are
wastage of paper, lots of resource and staff utilization. The directly or indirectly beneficial for the authorities. There were
alternatives techniques introduced to resolve this issues failed also alternative machines being introduced to stay clear from
drastically. Moreover in spite of having such a massive amount of
never ending queues with the introduction of CVM coupons.
data generated of the commuters, no analysis was ever done ever
to improve the railway service and the commuter’s experiences.
The consumers had to line themselves in a queue in order to
To overcome the above pitfalls this paper proposes a smart avail these coupon booklets from manually set up counters.
ticketing system architecture for railways which completely scraps These coupons had separate digital machines which printed the
the idea of paper tickets and completely harness the amount of Date & Time before travelling commenced. The major
money commuters has invested for their travelling. If the disadvantage of using these coupons is that it could not restrict
commuter intends to travel from a source to destination with no the reuse of same coupons by reprinting the new dates over old
intention to return on the very same day, then only half ticket ones. It also failed to record and print the commuter’s source
costing will be taken into consideration. The commuters will be and destination.
benefited with the provision of using the seasonal tickets as per The Automatic Ticket vending Machine was introduced to
there requirements depending on the number of days they has scrap CVM coupons and avoid long queues. The consumers had
subscribed. This model also enables the authorities to detect those to maintain a balance amount in their respective Smart cards in
commuters who never pay and buy or fail to carry their tickets or order to avail services from the ATVM machines. This system
pass while travelling. The proposed system will also have features overcomes the drawback to record and print source and
like crowd analysis and suggesting cost effective offers to the destination on the tickets of the commuters as compared to
railway commuters. Coupon vending Machines. But ATVM machines still does not
scrap the idea of paper ticketing. Mobile application were
Keywords— Smart Ticketing; AWS; Lambda; IoT;
further introduced to make it more feasible and convenient for
Raspberry Pi; Dynamo DB; Simple Notification Service; ML
the consumers to book tickets online. But this type of
technology requires Internet provisions and Smart phones to
I. INTRODUCTION
avail these services. All these existing systems fails to
A train ticket is a ticket issued by a railway operator that authenticate commuters with valid tickets or pass and there are
enables the commuters to travel on the railway network. Tickets no provisions to catch hold of such peculating commuters.
can authorize the commuters to travel a set itinerary at a specific To overcome the above drawbacks this paper proposes a
time. The introduction of manual ticketing has always made it smart ticketing system architecture for mumbai suburb railways
easier for the authorities to keep a track on various events which completely violates the concept of paper tickets .If the
involving financial matters and the travelling patterns of the user intends to travel from a source to destination with no
people. However, these activities had to be carried out manually intention to return on the very same day, then only half ticket
with the help of a huge man power and resources. The use of costing will be taken into consideration. The users will be
electronic equipment’s like computers, printing machines, benefited with the provision of using the seasonal tickets as per
paper & ink are the major and most important resources his/her requirements depending on the number of days he/she
required for paper ticketing systems. Besides, the use of has subscribed. This model also enables the authorities to detect
electrical equipment’s like ceiling fans, tube lights and air those commuters who never pay and buy or fail to carry their
conditioners have proved to be a costly affair. Besides time tickets or pass while travelling. The proposed system will also
consumption and cost, these systems seek a lot of maintenance have features like crowd analysis and suggesting cost effective
and repairs on a regular basis. Banking transactions also needs offers to the railway commuters. This proposed system is
to be carried out manually from place to place on a consistent implemented on AWS public cloud which makes this system a
basis. In the present-day, availing railway tickets or seasonal highly robust, scalable, pluggable and faster architecture.
II. RELATED THEORY milliseconds, required to run it. amazon S3, dynamodb, kinesis,
In this proposed architecture the railway ticketing system is SNS and other AWS services can trigger lambda to run code to
implemented on AWS public cloud using services, such as AWS process data in real time. The code runs in response to every
IoT, Lambda and Dynamo DB. Even supervised machine trigger within milliseconds scaling automatically and precisely
learning is done in lambda to get some useful insights. Taking with the size of the workload.
into consideration the huge amount of event data generated, auto The lambda makes it easy to create mobile and IoT
scalability and performances is taken care by AWS public cloud. backbends as well as web applications. Just write the code in
This AWS services are elaborated in detail in this section below. lambda and it takes care off running it. One can just write his
code and upload it to Aws lambda. Among many benefits there
A. AWS IoT are no servers to manage or maintain and never pay for idle
The AWS IoT allows us to securely connect and manage servers. The service scales automatically to match the incoming
devices, at any scale beta available today and build IoT load and sub second metering. The developer can use AWS
applications. AWS IoT platform allows us to much more easily lambda to execute code in response to triggers such as changes
connect devices into the cloud. It allows organization to easily in data, shifts in system state, or actions by users. AWS lambda
collect, store, analyze and take action against large volumes of can be directly triggered by AWS services such as Amazon S3,
data that are streaming from connected devices. It provides us Amazon dynamodb, Amazon kinesis, Amazon simple
SDKs that developer can use on our devices and connect them notification service (SNS) and Amazon cloud watch allowing us
into the cloud. It also provides Lightweight communication to build a variety of real time data processing systems.
protocol network capabilities with MQTT. The Device gateway AWS lambda automatically scales the application by
allows connected devices to talk over the MQTT message running code in response to each triggers within milliseconds.
protocol. It is highly fault tolerant protocol which is perfect for Performance remains consistently high regardless of the
intermittent connectivity. It is very much efficient in terms of frequency of triggers. This is because the code runs in parallel
network bandwidth requirement which makes it perfect for and processes each trigger individually, scaling precisely within
connecting devices. the size of the workload. There is no requirement of new
These devices talk over TLS (Transport Layer security) languages, tools or frameworks to learn with AWS lambda. The
which is the successor of SSL and makes it very easy to create developer can use any third party library, even native libraries.
manage and deploy X509 certificates for authentication. X509 AWS lambda supports Java and Node.js code respectively with
certificates are used to uniquely identify devices. It also makes support for other languages coming in the future.
it possible to map the roles and policies for access to each of D. Machine Learning in lambda
these individual certificates and authorize devices to have access
to AWS IoT and associate those roles and policies with AWS Machine Learning algorithms discover patterns and data and
IAM roles which allows access not just to the IoT but also to the construct mathematical models using these patterns. Then, the
rest of AWS and this makes it really easy to authorize new developer can use these models to make prediction on new data.
devices but also revoke access to devices without having to ML is something the developer can use for lots of applications
touch them. The device gateway uses publication and subscribe but learning and implementing complex algorithm required to
programming model and this allows one to many connectivity build models is difficult and time consuming and then deploying
between different devices. and managing infrastructure to analyze the large data sets
required to build accurate models and generate predictions at
B. AWS Dynamodb high scale is expensive and requires continual maintenance to
The dynamodb is a fully managed NoSQL database service. keep it all running. When Machine learning in done in lambda,
A relational database stores items across a set of related tables that allows developers to quickly and easily build smart
to minimize duplicate values. However those table relationships applications that can perform important functions like fire
make scaling more resource-intensive. The NoSQL Database detection, Demand forecasting, Predictive customer support and
typically store each item as a single document for high click prediction. In machine learning, the developer can use
scalability. The NoSQL databases trade some of the query and powerful algorithms to create machine learning models by
transaction capabilities of relational databases in favor of finding patterns in existing data and using these patterns to make
performance and scalability. With dynamodb, the developer predictions from new data as it becomes available.
need not have to worry about database maintenance There are common types of machine learning problems:
administration. The developer can download the local version of Classification, Regression and clustering. In the proposed
dynamodb and then use dynamodb service to scale globally. It’s system, carries out Supervised Learning. Classification problem
applicable to attach with, big data, gaming, mobile and other involves predicting whether given observation belongs to a
applications that needs fast response times and the ability to certain category. However based on earlier observations of how
easily scale with demand. Dynamodb is reliable and to input maps to the output, classification tries to estimate a
automatically backs up data in three separate facilities. classifier that can generate an output for arbitrary input. A
classifier can then label an unseen data with the class. A
C. AWS Lambda regression problem is a kind of machine learning problem that
The AWS lambda lets the developer run code without tries to predict a continuous accredited value for input based on
provisioning or managing servers. There is no charge when the previous information. The input variables are called the
code is not running. The developer pay only for the number of predictors and output the response. Therefore, Regression is
times the code is triggered and the time in units of 100 pretty similar to classification where aim is to estimate a
function that maps input to output based on early observations
that is this time when the actual values are estimated rather than lambda. The computation of whether the user has completed
a class of an observation. This type of machine learning is his/her journey and the costing is done in the next stage where
termed as Supervised Learning. the data from the dynamodb is analyzed by lambda according
the analysis parameters. For the Seasonal ticket, the user pays
III. CONCEPTUAL FRAMEWORK
the amount in advance on basis of source and destination. If the
The proposed system architecture consists of main commuter commences the journey in both ways, then a day is
components such as Raspberry Pi, AWS IoT, AWS lambda, deducted from the 30 days allotted to him. If commuter extends
dynamodb, SNS (Simple Notification Service) as illustrated in the journey beyond the destination, then the amount will be
Figure1. The RFID reader captures the user's’ RFID tag which deducted from commuter bank account whose cost will be
consist of unique identification information which is then send similar to that of the regular ticket. However, if commuter
to Raspberry Pi. This event data information will be forwarded commences from source to destination and does not return,
to AWS IoT form Raspberry Pi in JSON format through MQTT which is a halfway journey, then only half day would be
protocol along with the information such as name, time, deducted instead of the one whole day which can be
location etc. Aws IOT will send this event data to AWS lambda compensated later. For Regular Ticket, the source and
for doing the further processing. AWS Lambda is used for destination is not predefined but is dynamic. Hence, on basis of
computation purposes. In AWS Lambda, it determines and the travel journey, be it a direct source to destination type or
persist how the event information should be stored in different with ‘n’ number of breaks, the relevant cost is computed and
tables according to its type of ticketing namely seasonal the amount is deducted from the bank account directly. The
ticketing or regular ticketing in dynamodb. lambda then stores the results in dynamodb as well as sends the
The dynamodb is a NoSQL database service, which stores message to SNS (i.e. Simple Notification Service). Simple
huge amount of data as well as provide the ease of scalability Notification Service is used to notify the end user.
of the information when needed. In this proposed system
dynamodb is used for persisting values coming from the AWS

Figure 1: Generalized Smart Ticketing Architecture

A. Capturing and Persisting the IoT Events


IV. IMPLEMENTATION
In this operation, the events are captured by the RFID
This smart ticketing proposed architecture is divided into reader which is forwarded to the AWS IoT via Raspberry Pi and
three main section first is capturing the RFID Sensors data then forwarded to Capturing Lambda so as to persist the data in
through a raspberry pi device, second is publishing the event dynamodb with respect to the ticket type. The event capturing
data from raspberry pi to AWS IoT and last one is performing and data persisting is showed in the Figure 2, which consists of
processing on the IoT Events. The processing of the IoT events the following steps:
consists of various operations such as capturing and persisting
the IoT Events, performing costing operations for seasonal and 1. The event data is captured by the RFID reader on
regular ticketing and performing some machine learning either Start door or Train or End door and sent to the
operations to predicts useful parameters. Raspberry Pi.
2. The Raspberry Pi accumulates the event data and 4. The computed cost with the user id and other
sends to AWS IoT in JSON format through MQTT parameters is sent to the SNS.
protocol. 5. The SNS notifies about the payment details to the
3. The event data from AWS IoT is then forwarded to the respective end-user.
Capturing Lambda.
4. The capturing lambda checks if the event data is of the
Seasonal Ticketing or regular Ticketing. If it is a
Seasonal ticket, the data is persisted in the Seasonal
Ticket table of the dynamodb, while to the Ticket table
if it is a regular Ticket.

Figure 3:Ticketing Costing Operation

C. Suggesting Cost-effective offers based on Commuters


Travelling Patterns
In this operation, a particular commuters travelling pattern is
analyzed and based on this pattern a cost effective offer can be
suggested to the commuter. This data analysis part can be
performed both regular ticketing and seasonal ticketing
Figure 2: Capturing and Persisting the IoT Events Operation commuters data. The input can be past three or more years
commuters traveling data, on which analysis can be done and a
more cost effective offer can be notified to the commuters.
B. Regular Ticket and Seasonal Ticket Costing Operation
In this operation, the cost calculation is done for regular
ticketing on basis of the travel commenced, whose costing
analysis is different for Seasonal Ticket and regular Ticket. For
regular ticket, costing is done on the basis of travel journey and
for seasonal ticket, costing is done on the basis of days travelled.
When performing costing for regular ticketing, the regular ticket
table data is fetched from dynamodb by the costing lambda,
costing computations is done and the computed cost is notified
to end-user, either mobile phone and email. When performing
costing for seasonal ticketing, the seasonal ticket table data is
fetched from dynamodb by the costing lambda, costing
computations is done in term of number of days travelled and
the computed days are deducted from the total number of days
allocated to that commuter which is notified to end-user, either
mobile phone and email. The data fetching and cost estimation
process is shown in Figure 3 consisting of the following steps:
1. The Costing Lambda triggers a computational task on
dynamodb based on date and time.
2. The dynamodb returns the relevant event data to Figure 4: Suggesting cost-effective offers operation
Costing Lambda.
3. The cost is computed in Costing Lambda on basis of The Figure 4 illustrated the how commuters will be suggested
parameters such as source, destination, time, etc. and with best offer for them with the help of this following steps.
the amount is deducted from the user’s bank account. 1. The ML lambda triggers dynamodb to give travelling
data of a particular commuter.
2. Dynamodb returns the relevant travelling data to ML 1. The compute lambda triggers the dynamodb for the
lambda. count of the commuters present in each coach of the
3. The ML lambda is trained with the travelling pattern of particular train.
the commuter. 2. The dynamodb returns the relevant count to the
4. The Triggering lambda triggers the validity of the compute lambda.
tickets. 3. The compute lambda performs computation by
5. Dynamodb returns the relevant result data to the comparing present count of the commuters with actual
Triggering Lambda capacity of the coach.
6. The Triggering Lambda triggers the ML lambda with 4. The computed result of the crowd analysis is further
the commuter Id to get best offers on this Id. sent to the SNS.
7. The ML lambda computes the best offers for that 5. The SNS notifies this result to the upcoming station’s
commuters Id. indicators to be displayed in graphical percentile
8. ML lambda returns this computed best offers to the representation.
triggering lambda.
9. The triggering lambda send this offers details to the V. RESULTS
SNS. In this paper a highly robust, scalable, pluggable and faster
10. The SNS will notifies the commuters about the best architecture is proposed which tries to solve the issues of
offers on the mobile phone and email. traditional ticketing approach by integration of amazon web
services technologies.
D. Crowd Analysis of a train coach
In the proposed system, data processing is done, wherein the A. Commuters Registration
system checks for the number of commuters present in a coach The train commuters have to do registration process to get a
so as to analyze the crowd on basis of total capacity of the coach seasonal or regular Ticket smart card, which is only a one time
compared to the current count and display the net result on the process. The commuters have to give the details of their aadhar
upcoming station’s indicators in percentile graphical card, pan card and bank account while registering as illustrated
representation. The whole process will be completed before the in Figure 6. One successfully completion of the registration
train reaches the next station. As the commuters board the train, process, the commuter will be provided with the relevant smart
the RFID reader reads the RFID tag of each user and as soon as card either regular ticket or sessional ticket, which has a RFID
the train departs from the station, the count of the commuters tag embedded in it.
present in the coach is persisted in the dynamodb and then sent If the smart card is a seasonal ticketing card, the commuter
to compute lambda for the analysis purpose. The analysis result have to provide a source and destination stations while
is sent using Simple Notification Service (SNS) to the next registration process which will be constant unless and until the
station’s indicators. commuter wants to change it. The credits will be in the form of
days either 30 days, 90 days or 180 days. The costing is done on
the basis of days, if the commuter has complete return journey,
then one day will be deducted from the commuters account or if
the commuter has done only single journey, than only half day
will be deducted from the commuters account
.

Figure 6: Commuters registration table


If the smart card is a regular ticketing card, the commuter
does not provide any source to destination stations during
Figure 5: Crowd analysis of train coach operation registration process. The credits will be in the form of money,
where the commuters total travelling pattern will be analyzed
and then costing will be calculated, which will be deducted from
The crowd analysis process is shown in the Figure 5, which has the commuters bank account.
the following steps:
B. Connecting Raspberry pi to AWS IoT D. AWS IoT rule to call Lambda Function to persist event
To connect a raspberry pi device to AWS IoT, a device need data in Dynamodb:
to be created in the thing registry. This registry allows to keep a AWS IoT define a rule that calls a Lambda function, passing
record of all of the devices that are connected to AWS IoT in data from the MQTT message that triggered the rule. This
account. Communication between raspberry pi devices and allows to process the incoming message and then persist the
AWS IoT is protected through the use of X.509 certificates. messages in dynamodb. In this proposed system architecture a
AWS IoT generate a certificate, which are to be downloaded and AWS IoT defines a rule that calls the lambda function, which
copied inside the raspberry pi device. So now while publishing check the type of event incoming event data. If the event data is
any event data to AWS IoT, the raspberry pi will embed this a seasonal ticket event then the lambda persists the event data in
certificate information with this event data and send to AWS a seasonal ticket table of dynamodb or if the event data is a
IoT, so that the AWS IoT understand that the event data is regular ticket event then the lambda persists the event data in a
coming from a Authenticated device. regular ticket table of dynamodb as illustrated in Figure 9.
C. Capturing RFID Sensors events on Raspberry Pi and
Publishing to AWS IoT:
The RFID readers are connected to Raspberry Pi, so
whenever a RFID tag passes through this reader it detects it and
notifies it to raspberry pi device as illustrated in Figure 7.

Figure 9: Seasonal ticket event data persisted in Dynamodb

VI. CONCLUSION
Smart Ticketing system is a total express railway ticketing
solution architecture that will change everything in railways
business. Smart Ticketing system offers a wide variety of
benefits build for commuters and Railway authorities. For
Figure 7: Captured RFID tag by raspberry pi commuters travel is unified, simplified, cost-effective and
comfortable. Even they are notified with attractive offers based
In the proposed system there are three RFID reader installed
on their travelling patterns and details of less crowded coaches
and connected to a raspberry pi devices. The first RFID sensor
is installed on the entry door barricade, so when the commuters in a train, which make their journey safe, happy and comfortable.
passes through this door the RFID identifies the tag and send this For Railway authorities, only authorize commuters travel, no
event data raspberry pi which send it to AWS IoT, from which wastage of paper, security of commuters is ensured, No cash
the source information can estimated as illustrated in Figure 8. money transaction needs to be done and less staff and resources
The second RFID sensor are installed at the door of the train required. With this Smart Ticketing architecture implemented on
coach, so whenever a commuters entry the train coach, the train cloud, give an added benefit of scalability and performances at
coach door RFID reader will record this event data and send it any point of time.
to raspberry pi which then send to AWS IoT, from which the
system will know which train the commuter has boarded and VII. REFERENCE
how many commuter are present in the train coach. And lastly [1] Train ticket: https://en.wikipedia.org/wiki/Train_ticket/, Accessed on
the third sensor will be installed on the exit door barricades at 08.08.2016, 9:07 AM.
[2] AWS Documentation, https://aws.amazon.com/documentation , Accessed
the station. so when the commuters moves out from this exit
on 09.04.2016, 7:09 AM.
door barricades the RFID reader will record this event data and [3] Md. Foisal Mahedi Hasan, Golam Tangim, Md. Kafiul Islam, Md.
send it to raspberry pi which send it to AWS IoT, from which Rezwanul Haque Khandokar, Arif Ul Alam “RFID-based ticketing for public
the commuter's destination can be estimated. The raspberry pi is transport system: Perspective megacity Dhaka”, Computer Science and
connected to AWS IoT through MQTT protocol. Information Technology (ICCSIT), 2010 3rd IEEE International Conference,
07 September 2010.
[4] Shao Xiwen “RFID technology-based museum ticketing and visitor
management systems”, Information Management, Innovation Management and
Industrial Engineering (ICIII), 09 January 2014.
[5] Prasun Chowdhury, Poulami Bala, Diptadeep Addy “RFID and Android
based smart ticketing and destination announcement system”, Advances in
Computing, Communications and Informatics (ICACCI), 03 November 2016.
[6] V. A. Bharadi and G. M. DSilva, “Online Signature Recognition Using
Software as a Service (SaaS) Model on Public Cloud,” in 2015 IEEE
International Conference on Computing Communication Control and
Automation, pp. 65–72, Feb. 2015.
[7] G. M. DSilva and V. A. Bharadi, “Modified Online Signature Recognition
Using Software as a Service (SaaS) Model on Public Cloud,” IEEE
International Conference on Information Processing, December 16-19, 2015.
Figure 8: Event data published on AWS IoT

View publication stats

You might also like