IoT Integration with Mobile and Cloud Solutions

IoT Solution started to have a significant impact on many aspects of our lives. Intelligent Chatbots became the most era-defining technology to drive automation through mobile apps and bring never-before results for the enterprises across the niches. How innovative you can incorporate such bots into your mobile app marketing strategy will be the key. In this paper the focus is to discover solutions by analyzing the latest technologies and breakthroughs. The IoT features provide the opportunity to collect and exchange data without a need for human interaction. Cheap mobile phones are nowadays available with equally impressive features, which makes the implementation of a mobile application more facile and legitimate. Security is turning into a major boondocks for mobile application developers due to the increased amount of personal data and confidential information the applications are required to manage. An IoT based infrastructure is proposed in this paper that aims to present a way of integrating Cloud based chatbots in mobile applications.


IoT and Cloud Computing integration
Nowadays the mobile phone has becoming an indispensable device that we carry with us anywhere and anytime.Also, it fills more and more time of our lives because it brings closer to us information, communities, things that we need to sustain our physical and mental health and, moreover, other devices, through Internet of Things (IoT).IoT represents the most successful communication development in the last years.It connects to internet and to each other many objects (health sensors, clothes, vehicles, industrial equipment, etc.).The main components of IoT are a wireless technology such as Radiofrequency (RFID) tags, sensors, mobile phones, but the list can go on with other mobile devices.Using unique addressing schemes, they interact with each other, to obtain common objectives, for example sharing data, interact or act on behalf of their users, autonomously.This is why we can admit that IoT has the potential to enhance the communication sector and to open new opportunities for developing unpredicted applications.The increase of the usage of mobile devices sustains the development of this new technology.Over the last five years, their number became bigger and bigger and specialists expect that this growth will not stop for many years ahead.As we can see in Figure no. 1, by next year, almost 2 billion of units are supposed to enter the market and the trend of this growth is maintained at least until 2024. 1 Fig. 1.IoT connected devices installed base worldwide from 2019 to 2024 (billions of units) [1] Of course, a large portion of these devices is made of mobile phones, which gives the trend mentioned in the figure above.According to bankmycell.com, currently, there are over 3.5 billion smartphone users in the world (1 billion more compared to 2016, as we can see in Figure no.2) and approximately 4.8 billion devices (since there are a lot of us who have more than one smartphone).Also, 45.04% of the world's population uses a mobile phone.Due to this large number of devices and due to numerous interactions between them and objects, other devices and humans, large volumes of data are generated and need to be managed.For the organizations to access this data, first they need to develop the corresponding infrastructure, but this process is very complicated due to different operating systems, connectivity protocols and legacy applications compatibility.[3] 2 IoT and Cloud Computing integration Since IoT applications need leverage to scalability, availability and performance of the cloud, cloud computing represents a complementary condition for using IoT incorporated in the software of the mobiledevices-it has the virtually unlimited storage capacity and processing power and, also, it provides the right platform ( web-based and on-demand) to access the data and resources uniformly.This kind of infrastructure is accessible from everywhere and, also, less expensive than a local one.[4] Cloud computing is considered a revolutionary new approach to how computing services are produced and consumed.Choosing a cloud service provider means to rent or lease a piece of and enormous systems made of datacenters, computers, storage and networking capacity.These data centers, of course, were possible due to huge investments made by the companies which run them.[5] There are many cloud providers worldwide, but there are some companies which have multiple datacenters all over the world, which can be an advantage in choosing the right provider for your business.One of the players on data center market is Amazon which first created its' own data center in order to sustain its' business during sale period.Cloud infrastructure can be delivered by these providers in three ways: Software-as-a-Service (SaaS), Platform-as-a-Service (PaaS) and Infrastructure-as-a-Service (IaaS).[6] SaaS gives the user the capability to access the applications directly from the cloud infrastructure.This means that he can access the application from a web-browser, but he can't control or modify the network, servers, operating systems, storage or application's capabilities, except for some that are accessible from the application's menu.This type of model is not suitable if you want to use an application that require a real-time response, but it's suitable for the ones that have a big input of data from many users (e.g.: sales management, financial management software, social networks, and blogs) PaaS can be used if the user wants to create its' own application using programming languages and tools supported by the provider.He only has control over its products, but not over the infrastructure settings.This type of cloud model is most often used in software development domain, where multiple developers and users are involved and the testing and deployment need to be automated.
IaaS is the best solution for a volatile business or when the resources are distributed and support dynamic scaling.It is also used for the ones that do not want to invest in their own infrastructure, but they need computing resources.All these three models are possible due to a service-oriented architecture involving multiple systems and complex interactions among them.Cloud computing technology provides a uniform service delivery platform for applications which use IoT.All devices are connected to a shared storage for collecting and retrieving data.This storage, part of a platform, enables users to access, collect, process, view, share, archive and search sensor data from different applications.Furthermore, this cloud-storage facilitates the data flow between IoT data collection and components that are in charge of processing, together with simple setup and integration of new things, while keeping the low costs for all the infrastructure and data storage.

Security aspects 3.1 Internet of Things Security
The widespread availability of IoT devices is already a certainty, as IoT is the creator of a new vision of the present times with infinite development possibilities, but the limitations and risks introduced by it must not be ignored.In parallel with the development of technology and its integration into industry and people's everyday life, greater attention should be paid to information security.Being a growing area and implementation, it may be thought that risks will be eliminated over time, and the existing benefits will be expanded and better exploited.An IoT application should have the following capabilities: -Detection and distribution of location information: IoT systems can collect location information from IoT terminals and nodes and then provide services based on the collected information.This information includes the geographical position and the absolute or relative position between the objects; -Detection and collection of physical or chemical parameters of an environment such as temperature, humidity, visibility, light intensity, radiation level, pollution level, various images or indicators of the human body; -Remote Control: IoT systems can control IoT terminals and perform operations based on collected data and commands received through user applications; -Ad-hoc networking: IoT systems are able to quickly organize themselves at the network level so they can interact with the network layer and provide similar services; -Providing secure communications: IoT systems can establish a secure transmission channel between the application and IoT terminals based on initial requirements.Benefits introduced by the emergence of IoT systems have been recognized and exploited by many industry sectors and sectors, some of which have been heavily modified by IoT.In the past few years, the Internet of Things has changed the way we are living and improved our life quality and it will continue to grow and interconnect more devices [7] [8] [9].In [10] the authors pointed out that "The IoT creates an intelligent, invisible network fabric that can be sensed, controlled and programmed.IoT-enabled products employ embedded technology that allows them to communicate, directly or indirectly, with each other or the Internet."[8]

Mobile applications security
Nowadays the technology has evolved and smartphones are rapidly becoming more performant by constantly improve the processing power, display size, and versatility of operating systems.This decade represented the beginning of a new era of attacks against smartphones and mobile security will be an interesting area in the years to come [11].The volume of information and the users in mobile Internet is a ceaselessly expanding number, which builds the requirement for efficient techniques for verifying mobile applications, services, and devices.The understanding of security breaches from user's perspective is different from person to person and it is more related with the characteristics of their type [12].However, mobile users are still are not sufficiently informed about the security issues that can arise through the use of mobile devices, which should make developers more careful when deploying mobile applications.

Cloud security
Since the key of the integration is communication, cloud service providers are constantly concerned about the security and integrity of their systems when sharing them with others.For these providers, the main focus is now to new technologies in terms of data protection, regulations compliance and system integrity.[16] This fear comes also from the fact that the internet was not designed to be secure, and, the greater the number of users for your application, the greater the risk of an attack.Of course, the risk is minimized if your application is held on a local storage system, but, since everyone is depending on customers , you have to be close to them and the internet can help you in this matter like no one else these days.According to the report issued by Jay Heiser and Mark Nicolett from Gartner Group " Assessing the Security Risks of Cloud Computing", there are nine areas that need to be considered when assessing the risk that your system has in front of attackers: privileged user access, regulatory compliance, data location and segregation, availability, data recovery, investigative support, viability and support in reducing the risk.[17] Each cloud service model mentioned at Chapter 2 comes with its' own risk and, so, every choice for one of them must be made after an important analysis which can help calibrate the resources that each application needs.Many cloud service providers offer some back-up procedures in case of attack that gives their clients the possibility to take down the compromised version of the application and put in place a new copy of it.This service is also very important when choosing the best solution for minimizing the risk of using the cloud instead of local storage systems.

Case study: Integration of an IBM Watson Assistant Chatbot in a mobile application
One of the best growing application of this century are chatbots.These small programs can run on any devices and can be trained on cloud, they can speak not just with humans but with all other smart devices around us.In this case study there are presented the steps needed to create a chatbot.This is connected to IoT and fully trained in cloud and it can also be used on web or desktop applications.

IBM Watson Overview
The first computerized system equipped with artificial intelligence, capable of answering questions addressed in natural language, IBM's Watson supercomputer developed by DeepQA has materialized in the core of the cognitive revolution, providing industrial solutions for areas such as public health, IoT, advertising, financial services.Named after IBM's first president, Thoms J. Watson, at the core, Watson is a cognitive computing platform that can get information from its algorithms that process recent data streams.Watson can radically accelerate databased thinking processes and learns constantly from data and interactions with people.Thus, he has the ability to learn from his interactions with domain experts who build and refine the learning algorithms of computerized systems, as well as from anyone using natural language.It is also important that Watson can acquire new knowledge through these methods without the need for explicit programming.The reasons why Watson has imposed itself as the main AI business platform are the use of IBM's secure cloud for storing, engaging and managing company information, the promise of persistence of data privacy policies that belong exclusively to companies, and will not be sold or made public, and the wide range of expertise for various areas that it offers, so that Watson's analyzes and advice are highly informed.To replicate the human ability to understand language full of allusions, ambiguities and idiomatic expressions and extract the exact meaning of a question, the Watson supercomputer processes a rate of 80 teraflops, that is, 80 trillion floating point operations per second, accessing 90 of servers, whose combined data sums up over 200 million pages of information, processed with 6 million logical rules.[13] Watson capabilities have been leveraged by IBM by making them available to customers as well as available to developers on their own cloud service platform, namely Bluemix.This has given potential investors the opportunity to test a minimalist version of Watson without being limited by a particular programming language, as Bluemix supports a multitude of programming languages, from Java to Swift, PHP and even Scala.Besides the variety of programming languages, Bluemix facilitates and accelerates the provision of a cloud infrastructure so developers can ignore the hardware and storage of an applicationbuilding process and focus on the actual development.Also, the cloud platform supports micro service architecture, which has the advantage of greater flexibility and scalability, provides continuous planning, collaborative development, testing, monitoring and optimization, and thus has a DevOps approach, tending the entire application lifecycle and makes available a multitude of reusable services already tested.Currently, the Bluemix catalog contains over 200 IBM, third-party or cloud-based services.The Watson services available on the Bluemix platform are as follows [13] -Watson Personality Insights, predicts a person's personal characteristics, needs and value system through written text.Among these, Watson Assistant will be further described.This service will be used to facilitate conversations between the user and the personal assistant.

Create the IBM Watson Assistant on IBM Cloud
In order to use the IBM Services an IBM Cloud account has to be created, figure 3.

Fig. 3. IBM cloud account creation
After finishing the account creation, the user can start building the IBM Watson Assistant.The user can choose a free plan (Lite plan) with a number of 10000 free messages per month or he can test for 30 days a Plus Trial account with a number of 50000 messages.There are also some paid options.

Fig. 4. Build a chatbot
Of particular interest and complexity are the chatbots integrated with Facebook.The purpose of this study is to create such a chatbot.This has to be capable of communicating with Air ticket booking site in order to buy the best available ticket and with the final user.In order to reach this result the IBM Cloud Assistant has to be trained.Further, the final project will be referred as AirBot.The first step in achieving a dialog with an AirBot is to create the Intents.

Fig. 5. AirBot Intents
Intents are the purpose of a message sent by the user.Each request from the user should have an intent defined, requests that have not defined an intent can not be managed by the application.Defining an intent involves determining the topics that can be supported by the application and giving as many examples of messages as possible for each topic, this step being necessary in the subsequent recognition by the personal assistant of the commands received from the user based on words predefined key.[15] These intents have to be categorized considering the possible users' questions.One of the most import thing that has to be taken into consideration while creating intents is to have unique questions in separate intents.After the Intents were created, they can be use in the further step, building of a dialog.Dialogues are a prototype of a conversation that defines standard responses to Intents defined in previous steps.Thus, the number of Dialogs created is equal to the number of Intents, and for an Intent a set of possible answers of the personal assistant that will be displayed to the user is determined.Choosing the answer of the personal assistant in that series will be random.

Fig. 6. Dialog schema
The dialog defines what the AirBot will be answering to final users.The final step is to made AirBot capable of conversation with users on a specific channel.

Integration of IBM Watson Assistant with Facebook
In order to integrate the AirBot with Facebook IBM Watson Assistant is providing a step by step guide.

Fig. 7. AirBot integration
After the integration is finalized the has to be properly tested.The IBM Assistance will continue to be trained based on all the dialogs that will take place between users and AirBot.

Fig. 8. Sample of AirBot conversation
In the figure 8 it is presented a sample of AirBot interaction with a user.This example shows that the intention was determined correctly and the AirBot started to ask the specific question for a flight reservation.For AirBot, all of these items were defined and are adapted in order to fulfill the user's needs and to offer the best experience while using the application.This functionality can be improved in order to offer more information to the user.

Integration of IBM Watson Assistant with Native Mobile Applications
The previous created AirBot can be integrated in native mobile/web/desktop application.
By outlining purposes or stating the nature of the present case study, the following focus will be on the mobile application integration.In the below figure it is represented a proposed architecture for achieving this integration.Others features can also be integrated in order to increase the chatbot accuracy and usability.

Conclusions
People's preferences for upgrading and even the most common and simple activities in their daily routine is a reality that can no longer be denied, no matter whether this technology is done for scientific purposes to test the human mind's capabilities to "reinvent" or for the purpose of enhancing human convenience.The emergence and expansion of IoT is evidence of the longevity of this trend, which not only benefits the various industries in which it is integrated, but also helps in areas where the empathic ability of man was considered indispensable.

Fig. 2 .
Fig. 2. Number of mobile phone and smartphone users 2016-2020 (billions of units) [2] of mobile phones [billions] Sum of No of Smartphones [billions]

Fig. 9 .
Fig. 9. Mobile application architecture Integration of IoT into Mobile AppDevelopment has multiple benefits as follows: Low Competition IoT and chatbots are the future, these offer an easy installation, easy distribution they are cheaper and easily accessible.Some of other benefits of using chatbots for app business are: user management, 24/7 worker and collecting valuable data and metrics.Business can create chatbots for various messaging apps or native website or app.There were more than 1 Billion monthly active users on Facebook messenger worldwide, hence creating chatbots for other messaging apps such as Facebook messenger is undoubtedly foremost and beneficial, but also it is important to create chatbots for a native website and mobile app.Creating chatbot for own website or app gives a business full freedom to customize the look and feel of the chatbot.Whereas Chatbot on other platforms has limited access to the design as well as other elements such as links, text, images.