QUERY ENGINE FOR CONNECTED ENVIRONMENT MANAGEMENT [TRAINING PROPOSAL] 16/07/2019 PRESENTATION 1. Overall Project Description Recent technological advances in the fields of Internet & Communication Technologies (ICT), sensor networks, data processing have fueled the rise of smart connected environments (e.g., smart cities, buildings, grids). These environments typically host sensor networks that provide valuable data for various high level applications (e.g., energy management in buildings, pollution monitoring in cities). We are interested in developing a global platform for data management for such connected environments. The aforementioned platform should be capable of creating and simulating connected environments and all their related entities. User should be capable of interrogating the platform for various purposes (e.g., managing connected environment data, detecting events, performing simulations, predicting future states of the environment). To illustrate such environments, we provide the Smart Mall example in Figure 1. Figure 1: Smart Mall Example In this example, the user (i.e., the mall manager) wants to manage the connected environment (i.e., the Smart Mall) using queries. For instance, he/she wants to retrieve temperature readings from each shop in the mall to adjust the air conditioning, or monitor the indoor air quality to manage the ventilation. The user interrogates the environment using the graphical user interface, where he/she specifies his/her requirements/needs. These needs will be automatically written/expressed in the form of queries. Then, each query will be parsed and executed. Finally, results 1 will be visible on the GUI. This is a simple example, in other cases the user might need to define the environment, deploy sensors, manage sensed data, and configure the environment, and so on. Specific queries exist for each user-requested task. 2. Scope of the Project This project focuses on the interaction between users and the platform. This is done using a query language that offers users the ability to compose and execute queries that translate their needs/objectives. An Event Query Language, denoted EQL-CE, was already defined in a previous work. It offers a generic, extensible and re-usable language that considers various elements of the connected environment: 1. 2. 3. 4. Environment components (e.g., infrastructures, location maps, individual locations, spatial ties, devices deployed in the environment, their hardware, software, and services). Sensor Network components (e.g., static/mobile sensors, their properties, locations, coverage areas, observable properties, produced observations, scalar/multimedia data produced by the sensor network). Event components (e.g., event patterns, definitions, constraints). Application domain components (e.g., additional descriptions, entities/relations, configurations related to a specific application domain). EQL-CE is organized into two layers (cf. Figure 2). In the logical layer queries are written in Extended Backus-Naur Form (EBNF) syntax. EBNF is a meta-language that allows the definition of queries using an extensible, generic, and easy to parse syntax. Various query types are proposed: 1. 2. 3. Component Definition Queries: That define the structure of various connected environment components (e.g., CREATE, ALTER, RENAME, DROP) Component Manipulation Queries: That handle instances of each component and manage the data (e.g., SELECT, INSERT, UPDATE, DELETE). Component Access Control Queries: That handle data access control, security, and privacy related issues (e.g., Grant or Revoke access to data). Once a query is composed in the logical layer, it is then parsed to a specific language and sent to the Physical layer where it is executed. Figure 2: EQL-CE Overview Last but not least, after saving the generated data in knowledge database, it will be analyzed by machine/deep learning in order to get a predictable estimation of the future statistics and results. However, nowadays, smart mobile devices and the internet of things IoT are extremely popular. For example, a normal person can use a smart application on his smartphone to gather data about energy consumption at his house. This collected data can be later used to provide useful knowledge to this user and help him to predict the amount of consumed energy in the future. Having this in mind, machine and deep learning (ML/DL) have been enjoying an unprecedented surge in applications that solve problems and enable automation in diverse domains. Primarily, this is due to the explosion in the availability of data, signicant improvements in ML/DL techniques, and advancement in computing capabilities. To this end, in this project we aim also to propose a user-friendly language that help and guide the non-expert users to specify there needs/requirements, so, they can take profit of statistics prediction techniques using machine/deep learning. 2 3. Query Engine The aim is to integrate and implement EQL-CE within the platform. EQL-CE currently provides the syntax for each component written in EBNF. Also, it specifies the skeleton for each query type. However, users (such as the mall manager cf. Figure 1) are not EBNF experts. Therefore, they are unable to correctly compose the queries that reflect their needs. We need to provide simple forms that users can fill and submit from the GUI. Then, the data found in the forms can be used to automatically compose the EBNF queries (Need 1). Moreover, once the EBNF query is written, we need to parse it into a specific language compatible with MongoDB and later execute the parsed query (Need 2). 4. Task Distribution: Project 1: Environment Manager Web Interface: This project focuses on the web development of an interface where users can: 1. Creating a new map of the connected environment from scratch (cf. Figure 3). 2. Designing of a map from a cartographic server (e.g., geoserver, google maps and openStreetMap). 3. Drag & drop components into the connected environment map (e.g., sensors, devices, locations) a. For each added component a pop up window containing a JavaScript-based form appears. b. After Submit Click, data is sent to an EBNF writer which writes the adequate query (cf. Figure 4). Required Tasks: 1. Creating a web interface where one could import/create maps. 2. Creating a toolbar panel, where various components/tools exist. 3. Develop drag & drop functionality for components. 4. Develop a pop up window for each drag & drop, with a JavaScript form that complies with the structure of the selected component. 5. Developing the function that inserts form data into EBNF while respecting the skeleton of the chosen query. Other functionality includes converting spatial to GIS data, importing,exporting, and sharing the data. Figure 3: A retrieved map of a Smart City Figure 3, depicts an example of a retrieved map from a real smart city. This map is composed of the devices represented by the markers. For each marker we have a popup window that contains a HTML forum. 3 Figure 4: Form to EBNF Query Example Figure 4, depicts an example of a popup forum that will generate the EBNF Query. Project 2: Query Parser/Executer: This project focuses on the parsing of EBNF queries into a data model specific language, and thereafter the execution of the parsed queries. The project is two-fold: 1. Parsing EBNF queries into files in a file system (e.g., that could be saved on DropBox). 2. Parsing EBNF queries to MongoDB database (cf. Figure 5). 3. Executing the parsed queries in both cases. A comparative study is required to test the performance (i.e., the run time) of the parsing algorithm. The aforementioned tasks should be developed in both Java and Python in order to compare for the parsing and execution tasks which infrastructure is most beneficial and least costly. Figure 5: Query Parser/Executer 4 Project 3: Data Fetching and Display: This project focuses on data retrieval and visualization. From a database (e.g., MongoDB), or from a filesystem (e.g., DropBox): 1. 2. 3. Retrieve all data related to a specific map. Reverse parse all the required queries in order to get the set of EBNF queries related to the map. Visualize the data related to the set of EBNF queries in the web interface (cf. Figure 6). For the part related to the file system a data index is required in order to optimize the performance of task 1 (data retrieval). Figure 6: Data Fetching and Display from an existing EBNF queries file Project 4: Language for Predictions in Connected Environments: The aim of this project is to provide a generic user-friendly interface that permits a non-expert user to use existing libraries for machine/deep learning, making predictions, and overall management of the connected environment data. To this, a student must: 1. Prepare a comparative study of existing techniques of machine/deep learning techniques. 2. Identify the requirements (input/output) of each algorithm. 3. An experimental comparative study between different existing ML/DL algorithms using open sources ML/DL platforms to compare the efficiency/effectiveness of comprehensive based experimentation results (e.g., precision, execution time, algorithm complexity). 4. Design and develop a user-friendly interface that make easy to non-expert user the use existing library of machine/deep learning. 5. The developed interfaces and algorithms should be compatible with Java and Python. 5 5. Project Organization This project management and organization method will be the following: Start date : 01/08/2019 Project management methodology : Agile Project meetings : Brief meeting each monday Technical meeting at the end of the week Group meeting each month Contact and support : Sabri Allani ([email protected]) The project management tool and calendar will be shared later 6. Project Supervisors This project will be supervised by the following researchers: Researcher Richard Chbeir (Full Professor) Sabri Allani (Post-Doctoral Fellow) Role Project Coordinator Project Team Leader Contact Mail [email protected] [email protected] Joe Tekli (Associate Professor) Project collaborator [email protected] Elio Mansour (PhD Candidate) Project collaborator [email protected] 6