Distributed Multimodal Journey Planner based on Mashup of individual planners’ APIs

In this research work we describe the creation of the concept of a distributed journey planning system that links as many journey planning services as are available in public transportation operators and willing to participate in one or more networks of journey planners across Europe. This is integrated on European project MASAI and it is part of a development of mobile solutions that allows journey plans in Europe based on public transportation availability, with the possibility of buying tickets in a mobile device with a multi-operator scenario. A semantic context was created in order to identify which Application-Programming Interfaces (APIs) from different public transport operators to use and set start\end trip points.


Introduction
Consumers regularly search for, purchase and share travel information online. According to the Google Travel Study 2014, about 80% of business travellers and 78% of leisure travellers are using online sources in their travel planning and for their eventual purchases [1], where 25% of total global travel sales are done online, and this percentage is rapidly increasing [1]. Air transportation comprises 46% of total online travel sales, while online travel accommodation sales comprise 23%. The US and Europe are the regions accounting for most of these sales, while the Asia Pacific region is expected to double its online travel sales by 2017 [1]. In Europe, online hotel sales are experiencing a rapid growth. By 2017, Western Europe is expected to reach a share of 40% of total online travel sales, while Eastern Europe will reach 24%. Online Travel Agents (OTAs) (e.g. Expedia, Priceline and Sabre) are increasingly consolidating the traveller market, leading to stiff competition with direct suppliers. OTAs from emerging markets are expected to expand in advanced markets in the near future [2]. According to the World Travel Monitor, about 70% of international travellers are active social media users [2]. Social media is now influencing the decision making process of approximately 25% of all international trips, with destination choices (about 40%) and accommodation choices (about 30%) being the most common. Nearly 50% of travellers are posting their experiences on review sites (e.g. TripAdvisor) and travel blogs / forums [3]. The trend in sharing travel related reviews and content on social media in recent times is expanding into a second level where the sharing of travel services (e.g. Airbnb, BlaBlaCar and Vayable) merge with active consumers providing apartments, cars, meals and tours. Shared usage platforms are changing the travel economy, giving people new options on where to stay, what to do and how to get around. Adapting to this new reality, by monitoring user-generated content and cooperating with social media, is of great importance for the tourism market and its destination management. Big Data, which is increasingly gathered from cities and public organisation by digital sensing devices and networks, allows Concierge and Service Providers to supply customers with targeted options and personalised offers for a more tailored travel experience. The customer's demand for real-time services is rising with services required to be easily accessible via multiple devices (desktop/tablet, smartphone) with a 24/7 availability. Since poor site experiences often lead to negative impacts on companies and brands, a flexible technological architecture is required to reach consumers on all screens. Concierge and Service Providers need to adopt a holistic approach capable of following customers through all stages of their travel process (dreaming, planning, booking, anticipating, en route, destination) [4].
The creation of seamless travel requires a closer cooperation between large range of industry and policy makers to design services involving integrated ticketing/pricing and infrastructures responding to all travellers' needs. Multi-stakeholders governance models require the alignment in a multi-stakeholder environment (authorities, citizens, and private sector) as well as supported implementation based on a suitable standard that can perform as a major driver of innovation for making travel more comfortable, efficient and sustainable [4].

Context of MASAI H2020 Project
Implemented under the EC funded EU HORIZON 2020 Programme, MASAI is primarily supporting the idea of a Smart, Green and Integrated Transport area, addressing fragmentation in Intelligent Transportation Systems (ITS) deployment in Europe creating a digital environment of 'seamless travel'. For detail see [http://masai.solutions]. The vision of MASAI is to satisfy the overall service needs demanded by mobile citizens: a tailor-made aggregation of features -a digital concierge in everyone's pocket. MASAI will achieve this goal by building up a community of stakeholders that contribute continuously toward the development of the core elements of a digital concierge. This allows constant improvements and sustains future technical developments, as illustrated in Fig. 1. The MASAI mission is to empower key stakeholders in the travel and tourism industry (Travellers, Concierges, Service Providers) and to enable a seamless travel experience. This means that MASAI aims to serve: 1) All stages of the travel process, including changes in travellers' mobility patterns; 2) Long-distance travel as well as local travel including all related services (transportation and accommodation); 3) Customers travelling for business as well as for leisure purposes. The MASAI mission is made possible by creating an open ecosystem ("MASAI Mobility Community") characterized by: 1) Its openness for innovations that serves customer needs; 2) Its adaptability and scalability that foster cooperation in a competitive environment; 3) Its potential for direct discovery and connection between all MASAI Community; 4) Stakeholders, while putting travellers in full control of their personal data. The travel and tourism industry is changing due to consumer demands and new possibilities brought advances in technology. This is providing new business opportunities at a fraction of the cost that they involved years ago. The future of travel is based on an open ecosystem providing a seamless multimodal door-to-door travel experience.

Multimodal Journey Planners
Taking into account recent advancements of computing, geographic information system (GIS), mobile devices, communication and storage technologies, automatic transit trip planners have been implemented in recent years. Transit trip planners accept the origin, destination and expected departure/arrival time inputted by users and find proper routes using available transit services. Transit trip planners are generally web based. Most of the existing trip planners are based on static schedule data, due to the problem of public transportation data access and integration. However, transit vehicles are often delayed by traffic congestion and accidents, especially transit buses that are often late during the peak hours in metropolitan areas. The trips based on the static schedule data may make planned transfers infeasible if some transit vehicles are late. In the multimodal routing context, many works have studied the multimodal shortest viable path problem [5], [6]. Three main problems are considered: (1) the set of transit modes used to accomplish the desired path; (2) the number of modal transfers performed in the desired path; and (3) the computational time to find the best solution in real time. Apart from these problems, the major issue has to do with the diversity of public transportation information available and its integration among transport providers in a multimodal network easily understood by the customer [7].
In parallel, a growing API economy is making our world more connected than ever. Highly complex technical products are developed based on information sharing and enabling transactions to be processed by APIs, which are able to close the gap between business and IT and are supported by the trend of integration in sophisticated ecosystems -elevated to become business model drivers [8]. Some related work already exists in and JourneyWeb [https://www.gov.uk/government/publications/journeyweb] in the form of distributed journey planning systems. It is possible that short/medium distance journeys might be better handled through a Delfi or JourneyWeb style of protocol, whilst long-distance travel might be better handled through an EU-Spirit style of approach. However, if a collation of Europe-wide trunk timetable information can be made available for implementation on all local journey planners, then each local planner will be able to plan "local + trunk" parts of a journey, and the distributed journey planning task would be simplified to integrate only the "distant local" element of any journey.

Proposal
This approach is based on other successful approaches of web mashup application development [9]. A mashup process uses content from more than one source to create a single new service displayed in a single graphical interface. One success example of this approach is the Google Maps where there is a combination of different information sources. The term implies easy, fast integration, frequently using open application programming interfaces (open API) and data sources to produce enriched results that were not necessarily the original reason for producing the raw source data. Therefore, this approach could solve the problem of integration of different data schemes of public transportation, but its main contribution is to overcome the problem of public transportation data access. Most of the times public operators do not provide data access.
Our work goal is to use this approach for the multimodal journey planner based on the information integration and manipulation of different journey planners of different operators that can offer services between user's start point A and final point B. The user's requested journey is split into component parts which can be planned by individual local journey planners, in a way that will allow the separate parts of the journey to be linked together into a seamless itinerary. This approach allows an incremental development of journey planning capabilities across Europe as each nation or region creates local journey planning systems that can integrate such a network or networks. It aims to make the user's experience familiar for residents in all countries by enabling existing journey planning systems to seek information about journeys to, from or wholly beyond their own boundaries and to present that information to users, in their own languages and in familiar ways, on the systems that they use for local journey planning.

Fig. 2. Proposed system architecture
The journey planning process is based on the following process, as seen in Fig. 2: 1. an interface to receive the user's query about transportation needs, by the indication of start and end points of a journey (along with the required time and date of departure or arrival). This can be complemented by a process to resolve any ambiguities in the possible matches; 2. a handle context of local public transportation infrastructure, which is solved by the introduction of Public Transportation Ontology; 3. an interface to different public transportation operators' systems; 4. an aggregator, which based on public transportation space ontology creates the context for multiple operator queries through their available API. The aggregator system sends elements of the journey request to one or more relevant "distant" journey planners and receives a response from each of those planners; 5. an organized output of process 4 to the routing algorithm; 6. the application of routing algorithm and present solution to the user in a map. Linked Data provides structured information like the information found on data tables on web pages and it is described according with a specific vocabulary. On MASAI this area is mainly present on Service Providers towards providing them with tools able to describe their services. RDFa [w3.org/TR/xhtml-rdfa-primer/], MicroData [https://www.w3.org/TR/microdata] and JSON-LD [json-ld.org] are examples of Linked Data formats allowing applications to start at one piece of Linked Data, and follow embedded links to other pieces of Linked Data. The designed descriptors that are embedded in Service Providers, can be generated into different formats (such as RDFa, MicroData and JSON-LD), allowing the compatibility with different applications that only support a single format, having solely as requirement the vocabulary supported by MASAI.
The proposed approach allows classifying expressions that are used in a particular application, characterize possible relationships, and define possible constraints based on the use of those same expressions. Their role is to split ambiguities that may exist on specific expressions when used in different data sets. Moreover, the same expression may have different meanings based on the current context. Due to this limitation, they are linked to an Uniform Resource Identifier (URI), which references to the path of a known concept in a specific vocabulary. By the use of vocabulary/ontology modelling tools (e.g. Open Travel Alliance (OTA) [www.opentravel.org/]), or Public Transportation Ontology (PTO) [10], it is possible to extend the current ontology to something able to answer to any requirements wrapping different concepts to a standard vocabulary. With this model, generic descriptors can be generated towards minimizing the replication of the same concept on multiple vocabularies. Some examples, not exclusive, have been considered, towards: 1) using and improving the specific model; and 2) push MASAI to be able to cope with these heterogeneous realities in the MASAI model (i.e. being able to offer mechanisms to provide access to different schemas in the same solution): Schema.org is a generic vocabulary used with many different formats, including RDFa, Microdata and JSON-LD. These vocabularies cover entities, relationships between entities and actions, and can be easily extended through a well-documented extension model. These were created for search engines with the purpose to link contents to structured information, improving the ability of search engines to understand and categorize it, and be more precise on their results. OTA and PTO, despite not being a standard Vocabulary, provide specifications to develop an e-business language intended to encourage development of systems to create new collections of services to better meet the demands and expectations of travellers and the travel industry.
The web is known as a place to share contents, which still does not answer all the requirements. While the initial purpose was to provide information to users, other services were added to provide information to machines, namely the web services [https://www.w3.org/standards/webofservices/], providing a message-based design frequently found on the Web, and developing specialized contents using standardized specifications that other machines can understand. The usual examples are REST or SOAP services that are usually used to provide structured information to objects.
In MASAI, this area is present as a Web Application that offers a Wizard, able to generate descriptors (Linked Data) and specifications able to generate SDKs, where APPs are used to integrate, discover and dynamically interpret services and API's attributes, minimizing the need to develop custom tools to access those same services. Internally, the Wizard is mainly an aggregation of different operations based on the output format (RDFa, MicroData, JSON-LD or APIs.json), supporting mechanisms for publishing at Service Provider's website (crawlable by search engines) or API Publishers (e.g. APIs.io). An example of an external existing concierge could be, for example, SDI4Apps [11], which search POIs over multiple vocabularies in RDFa format, which using MASAI descriptors would not change their behaviour since the format is supported. This standard is present in most components: 1) Service Discovery, are REST services that provide a search engine of Service Providers, discovered in Linked Data that is detected on Service Providers web pages; 2) Service Provider, also has SOAP services that they made available, where is possible to reserve their flights, hotels, REST service available to manage the information of travellers.

Discussion and Conclusion
There is a need of standardized API that will make it easier for third parties to develop links with journey planning systems for the use on nomadic devices, on third party web sites or elsewhere. PTO can play an important role in this exchange process.
With the proposed approach, it is possible to incrementally develop network of local journey planners, to provide distributed journey planning across Europe. By adopting this approach, the central overheads are kept to a minimum, whilst an initial network could be operationalized very quick, thereby creating immediate impact and providing the foundations for extension to achieve complete coverage of Europe, as and when more local journey planning systems are available to support this.
This multimodal journey planner provide essential services for mobility process in smart cities, where the sharing of resources is a fundamental approach for savings and fulfil users' requirements.