# Artificial Intelligence-Based Semantic Internet of Things in a User-Centric Smart City
## 3 AI-SIoT Architecture
### Service Management Layer
#### 3.2.2 AI Module  
The AI module contains five submodules: data analysis, user identification, behavior recognition, service construction and service provision. In the AI module, submodules can leverage the semantic analysis interface to implement semantic analysis. The IoT platform uploads the data to the AI module through AI interface and the data analysis submodule receives and analyzes the collected data from the infrastructure. In the data analysis submodule, the data characteristics are abstracted and the data changing patterns are mined via on time series analysis for behavioral modeling. The data analysis technology is the basis towards AI. In the IoT-based SC scenarios, there is abundant of user data produced every day. The user data represents the user's daily life or a period of life pattern [47]. The data analysis technology can obtain the extended data that represents the model of a user's life pattern. There are four major steps for data analysis, including data collecting,data training, data modeling and data predicting. In the aspects of data training and data modeling, there are many useful algorithms, such as the Hidden Markov Model (HMM) [48], Naive Bayesian (NB) [15], Support Vector Machine (SVM) [3], Decision Tree (DT) [14], Artificial Neural Network (ANN) [47], Deep Learning (DL) [9], and so on. [PERSON] et al. used a HMM based approach for detecting abnormalities in daily activities [48]. In the approach, a statistical model is constructed for understanding irregularities in daily routines, a disease prediction model is described to measure the trends of physiological states and a fuzzy rule-based model is used to discover the true anomaly. [PERSON] et al. constructed a smartphone-centric Ambient Assisted Living platform to monitor patients suffering from physical and mental limitations [3]. An activity recognition method based SVM is proposed to evaluating user behavior though analyzing users' information about audio, localization, and movement. [PERSON] et al. proposed a K-pattern clustering algorithm to acquire fine-grained temporal relations and construct user activity models [47]. The ANN is then used to recognize and predict users' next activities based on the existing activity models, which are based on historical data. [PERSON] et al. suggested to emphasize users' QoE requirements to improve the big data services, such as smart grid, smart healthcare and smart tourism [9]. A deep-learning based greedy algorithm is proposed to acquire users' QoE requirements and enhance intelligent services. In particular, the HMM is usually implemented for sensing the intentions of users according to the known behaviors. For example, a behavior that the user picks up a cup may indicate he/she wants to drink. NB is used for mining the behavior sequence of a user. For example, watching TV may contain a behavioral sequence such as going into the living room, turning on the TV set and sitting on the sofa. SVM, DT, ANN and DL can leverage the collected characteristic data to construct the behavioral prediction model. In addition, there are some hybrid modeling methods for behavioral modeling. [PERSON] et al. presented an activity model based on knowledge-driven and data-driven approaches [5]. The model can be used to recognize users' activities in the initial stage based on the existing ontology-based activity models. With the increasing activity data, the new activity patterns will also be discovered through data mining. [PERSON] et al. proposed a pattern discovery method of complex activity based on predefined activity models [49]. The method considers the relationships between the predefined activity models and unlabeled activity data to construct new activity patterns. Similarity, [PERSON] et al. presented an activity clustering method based on initial simple activity models, which are constructed through knowledge engineering [50]. These knowledge-driven activity models are fine-grained and they will be improved to be complete and specialized activity models through pattern mining.