Abstract
Context-aware applications are required to be aware of user context and ambient intelligent to support nonintrusive human-computer interaction. However, the uncertain real-world environments make it difficult for a system to perceive enough environmental contexts and achieve user's goal. Therefore, this study proposes a framework for developing an NFC-enabled intelligent agent, which combines the NFC technique with context-acquisition, ontology-knowledgebase, and semantic-adaptation modules to be aware of location, time, device, and activity contexts with respect to personal and social profiles. To cope with the uncertain environment, a credit-based incentive scheme is also proposed to encourage social cooperation and thereby enlarge the value of personal perceptions. By developing a complete ontology knowledgebase, the proposed framework can incorporate with social-cooperation schemes to recommend relevant services for supporting reactive action, proactive achievement, and social cooperation. The resultant social-advertising system shows that this framework can support a wide-range of different functionalities and is indispensable to an NFC-based intelligent agent for social Internet of things.
1. Introduction
Advances in ubiquitous computing realize data access anywhere and anytime. The ambient intelligence (AmI) is a new investigation area that facilitates accessing virtual information of real artefacts, such as objects, location, time, people, and sensors. The near-field communication (NFC) combines the radio frequency identification (RFID) and interconnection technologies to support short-range wireless communication among mobile devices and augmented objects [1]. Thus, NFC is an important enabler for Internet of things (IoT) applications, where people can use an intuitive way to contact visual tags of augmented objects and invoke the associated services [2].
Recently, social Internet of things (SIoT) integrating the IoT and social networks have been studied by researchers to support novel applications in more effective and efficient ways. The advantages of connecting augmented objects with social networks are as follows [3]: (1) the relationship of SIoT objects/services is performed effectively like the human social networks; (2) a level of trustworthiness in social networks might be utilized to leverage the degree of IoT experiences; (3) ubiquitous objects interaction could support new social cooperation.
In this paper, an ontology-based framework is proposed to realize an NFC-based intelligent agent (NIA) in which the NFC technique is considered as an enabler for interacting with cyber-physical systems in dynamic SIoT scenarios [4]. This paper comprehensively presents the schemes for service providers to augment semantic information on physical objects. The information can be perceived by NFC devices in order to trigger associated services automatically. Users can also share the information with their friends to enlarge the information value. For example, we can use NFC smartphones to read the geographic location of a theatre in a map, register the time schedule of a concert from a Smart Poster, access the augmented reality of an interesting drama, exchange experiences with friends, and identify users. The purpose of this study is to realize an intelligent agent in which the system can trace the behavior of user's percepts to infer context-aware situation and semantically respond to relevant information/services to the user.
The most important kernel of the proposed NIA is a sharable knowledgebase in which domain and context ontologies are used to infer context-aware situations [5]. That is, this system perceives the AmI and social relationship of a user in order to respond to relevant actions according to the system's belief of the user's situation, ambient environments, and available services. The proposed ontology framework is a formal knowledge representation approach for modeling different kinds of real-world contexts to support location-aware, time-aware, device-aware, social-aware, and activity-aware functionalities according to personal preference and social cooperation. In this paper, these context-awareness and social-incentive capabilities are applied to develop a social advertising system to support comprehensive intelligent-recommendation and social-cooperation functionalities with appropriate adaptation operators for SIoT environments.
The remainder of this paper is organized as follows. Section 2 specifies the application scenarios and discloses system functionalities. Section 3 describes the system architecture, which consists of three modules: context acquisition, ontology knowledgebase, and semantic adaptation. Section 4 reports the details of context-aware schemes and demonstrates some applications in SIoT environment. In Section 5, a credit-based incentive scheme is proposed to incorporate with a social advertising system to encourage social cooperation. Several ontology models are proposed for the system. Conclusions are drawn in Section 6 along with the contribution of this NIA framework for SIoT applications.
2. System Specification
The proposed NIA is a computer system that is situated in a challenging environment, which is typically dynamic, unpredictable, and unreliable. More specifically, these environments often change rapidly which causes difficulties for a software to have complete information for adapting to the states of its environment.
The NFC technique offers an intuitive way for a smartphone to interact with the physical environment by touching smart objects to access augmented information. The NFC-enabled “touch computing” is a kind of “physical browsing [6]” that can assist the NIA in catching up user's intention more precise than other context-aware techniques [7]. Thereby, the NIA can apply ontology knowledge to infer user's implication from touching behavior and then trigger some activities for achieving a proactive goal in a specific application field [1, 4].
2.1. Scenario Description
The NIA should take a sequence of steps to adapt to its circumstance, such as obtaining percepts, selecting a goal, performing actions, and sharing with others. An illustration for a smart-life scenario is depicted in Figure 1. In the smart-life environment, users interact with smart objects by using

Illustration of NFC-based applications in a smart-life scenario.
Each NFC-enabled smartphone has three kinds of interfaces to interact with its environment: (1)
Secondly, because of NFC's short-range contactless characteristic, NFC is suitable for realizing
Finally, NFC smartphones not only can assist people in physically browsing smart objects, but also can exchange data with other NFC devices. In the applications of social networks, NFC is really useful to exchange business cards, contacts, schedule, word-of-mouth, photos, and files with proximal friends. Furthermore, NFC can also assist people in setting up other communications, such as Wi-Fi or Bluetooth, for workforce fields like security personnel, facility management, and home-care applications to improve the quality of workflows with respect to certain place, interaction time, exact object, and associated person.
2.2. Context-Aware Functionalities
Context awareness provides a cyber system with a capability to have AmI. A generalized cyber-physical system can sense some context information from physical environment by its own sensors or enquire other systems via communications. Thus, this study further enhances the capability of NFC-based technique to develop a context-aware system.
Several researchers proposed their definition for context. Schilit et al. proposed three important aspects of context: where you are, whom you are with, and what resources are nearby [9]. Schilit and Theimer suggested that context should include user's location, identity, nearby objects, and devices' states [10]. Dr. Poslad focused on ubiquitous computing and suggested that context awareness should consist of mobile context, location, and time awareness [11]. Therefore, context-aware system should carefully discriminate context characteristics and automatically filter out irrelevant context data for users in a specific domain.
This study classifies context sources into two classes: environmental and personal factors. These two factors with some examples are illustrated in Figure 2. The environmental factors of context awareness consist of location, time, environment, and device awareness. The personal factors are the key characteristics of customization concept, which is aware of personal profile, social relationship, and activity schedule.

Context awareness.
The most difficult challenge in realizing the context awareness is the nondeterminism and uncertainty of dynamic environments, such as ambient percepts, personal situations, and application domains. An agent receives environmental percepts from its NFC smartphone. These percepts can be seen as raw data of sensed events that represent the AmI of the environment. Percepts often require some investigations and experiments on the raw data to interpret significant situation changes [12]. We define the agent's knowledge about the environment or its own situation with respect to some aspects of context percepts as a belief. Therefore, the intelligent agent should compare the raw data to either existing beliefs or previous data in order to determine whether there is something of interest for the agent.
2.3. Intelligent Functionalities
The NIA is required to have two indispensable abilities: reactive actions and proactive achievements [13]. A reactive agent must respond in a timely manner to significant changes of its environment. Furthermore, an agent should be proactive to pursue goals over time persistently even though the goal performed by the agent may fail.
Agents in realistic scenarios usually have limited ability to sense their dynamic environment. Thus, the NIA records user's NFC-touching chronology, user profile, and service history to build a chronological ontology knowledgebase for inferring users' intention [14]. An intelligent agent deduces user's situation by combining user profile with geographic information system (GIS), temporal databases, action plan, and context database to support personalized services with respect to location-aware, time-aware, activity-aware, and environment-aware properties, respectively.
The agent will try to select some effective activities from a collection of predefined plans to persevere at the designed goal. However, each task in a real-world scenario may consist of multiple concurrent activities, which may require different services across multiple systems. Even if the interface has been well designed, the complexity of the involved activities also overwhelms users. Therefore, the NIA filters out irrelevant explicit human-computer interactions (eHCI) and only provides the most relevant implicit human-computer interaction (iHCI) for users [15].
The collection of predefined plans can be developed according to the preconditions and effects of each activity in the knowledgebase. Otherwise, if the plan did not achieve the goal, the agent will continue to try other plans to achieve the goal [16]. The purpose of the intelligent functionalities is to combine the NFC perceptions, context adaptation, and domain ontology for supporting context-aware responses and service recommendation.
2.4. Social Functionalities
Because it is not possible for a software agent to have complete information about the uncertain environment, an intelligent agent should be able to exchange data with other agents to capture as much context information as possible like human's social cooperation. The key concept of the SIoT is to enlarge the value of the NFC perceptions, especially, when more people join in a positive feedback loop to share their beliefs about the challenge environment [17].
However, this social reciprocity cannot always be naively assumed workable because some nodes may be concerned with their own interests above the interests of others in a selfish manner. Due to the necessary energy consumption on both participants in an interdevice interaction, a selfish individual only tries to maximize its own utilities and stingily shares its experiences with others. Hence, incentive schemes for social cooperation are indispensable to induce cooperation between individuals. In a local community, trust is realized by the remuneration mechanisms in which consumers reward their providers by increasing their reputation accordingly [17]. The local reputation is used as an incentive motivation or a prerequisite criterion for enhancing the positive network effect of the social cooperation [18].
3. Architectural Design
The information processing of the proposed NIA consists of (1) perceptual stage, (2) cognitive stage, and (3) responsive stage. That is, the NIA should be able to perceive physical environment by touching smart objects, to cognize the semantic meaning of these perceptions, and to respond to suggestions for achieving predefined goal. For example, physical browsing on an interesting object can be roughly implied as personal preference. A natural behavior for sharing electronic business card with friends can help to construct a social connection with respect to encounter location, time, and activity relationship. By using NFC devices as an identifier for entering a conference room, the NIA can obtain the conference schedule and trigger a meeting mode automatically without interrupting user's activity.
3.1. System Architecture
The proposed architecture with software modules is depicted in Figure 3. The goal of the perceptual stage is to analyze the primitive percepts. The raw data of sensed percepts is a collection of environmental information such as interesting things with e-tags, current location with NFC readers, and contacting people with NFC-enabled devices in an NFC-enhanced physical perception, which connects physical objects with cyberspaces by touching behavior. However, these percepts often contain quantities of noise, which requires the use of a context-acquisition module to collect sensed data and cleanse the data.

Architecture of the NFC-based intelligent agent.
In the cognitive stage, an ontology-knowledgebase module records the chronology of system's situation beliefs, such as the timelines of location movement, time schedule, physical browsing, social interaction, personal profile, and service feedback in order to suggest appropriate activities with minimum intrusion. The ontology-knowledgebase module keeps track of context situation and domain-specific expertise in chronological order in order to accumulate user's experiences and preferences, respectively. User profiles incorporating with social relationship are originally meaningful information for a system to filter out unsuitable information with respect to his interests or preferences.
In the responsive stage, a semantic-adaptation module combines the NFC percepts and situation beliefs to implicate suitable goals for context awareness. By tracing the time-aggregated physical browsing, the semantic-adaptation module deduces the user's implication and analyzes the geographic relationship, time limitation, environment state, and device dependence. As a result, these context-aware services can automatically respond to the user with respect to his touching behavior.
In this paper, the design concept of the NIA can be treated as pervasive mediators for people to easily interact with physical environment by context-acquisition module. Then, these perceptions can be interpreted as logical contexts, which is managed and analyzed in the ontology-knowledgebase module. More important, the semantic-adaptation module infers meaningful situation based on different levels of contexts for developing adaptive and personalized mobile applications. Finally, the system executes the selected plan and monitors the goal achievement for further deduction. If the selected plan fails to achieve the goal, the system will try other effort to reach the target [13].
3.2. Context Acquisition
According to different usage scenarios, context information can be divided into three layers: sensed data, context information, and user situation. Sensed data is a collection of environmental percepts that should be compared with current beliefs and interpreted as meaningful context information like geographic relationship, time limitation, environment state, and device dependence. User situation incorporating with social relationship is important meaningful information for a system to filter out unsuitable information with respect to his interests or preferences.
The context-acquisition module (in Figure 4) focuses on directly connecting users, mobile devices, and smart objects with the real world. The general architecture of the context-acquisition module acquires two types of eHCI contexts: (1) user-mediated selection and (2) NFC-touching context.

Architecture of context-acquisition module.
The user-mediated selection interface supports people to input their requests and commands into the system. Although the disadvantage of this interaction method is its high complexity, it is the most relevant evidence of user's exact intention. In addition, this user-mediated selection can significantly assist the NIA to record users' preference into a user profile. A semantic-adaptation module determines user's context by considering preference-and-polices from the context-acquisition module.
To obtain the
3.3. Ontology Knowledgebase
Knowledge representation is concerned about how to recognize real-world knowledge and organize them as artificial intelligence. Dr. Gruber in 1993 [19] defined ontology as an explicit specification of a conceptualization with formal definition. Therefore, we develop an ontology-knowledgebase module in this paper to represent domain knowhow for systems to realize context situations. The system architecture of the ontology knowledgebase is depicted in Figure 5. This module consists of three ontologies: (1) user profile, (2) percept chronology, and (3) domain action plan. This study uses ontology-based method to model domain knowhow and achieves four characteristics: formalization, conceptualization, explicitness, and sharing. The ontology model describes the domain concepts by using symbolic and mathematical models. The relations between different meaningful semantics can not only be described as conceptual ontology models, but also be defined as explicit inference rules. Thus, these formally defined ontologies enable knowledge sharing and seamless interoperability between different distributed systems.

Architecture of ontology-knowledgebase module.
3.4. Semantic Adaptation
Situation is a summary of user's contexts that affect user's decision and preference. Bravo et al. defined context as any information that can characterize the situation of entities [20]. Situation analysis looks at both the environmental factors and personal factors because people in different context environments may have different preferences. In this paper, a general architecture of the semantic adaptation is depicted in Figure 6. The semantic-adaptation module analyzes the NFC-percept chronology, constructs user situation, and then responds with context-aware activities according to user's preference and percept chronology.

Architecture of semantic-adaptation module.
In the architecture, an NFC-percept reasoner accesses the ontology of the NFC percepts and analyzes the touching chronology to determine the implication of this touching behavior. A user situation adaptation receives the user context from the context-acquisition module and retrieves the personal preferences from the ontology-knowledgebase module to decide the current situation. This component is the key factor for realizing customization to abstract user's goal contexts.
A semantic reasoner determines the type of intelligent responses like passive, active, or control modes. A passive response only uses the environmental context as a constraint to filter information out of irrelevant applications according to user's situation. Candidate applications can simply support manual selection function to the user or adapting an action to current context. For example, the responses may be pure information, advertisement, billing transaction, leisure activities, management task, and emergency fields to support active responses. An active response automatically adapts to the application status and pushes/pulls appropriate activities to the user. The NFC percepts may be used to control the internal parameter of the NIA system according to the deduction of ontology knowledgebase.
4. Context-Aware Schemes
This section provides detailed guidelines and examples to break down the high-level modules into smaller steps for developing context-aware schemes in NFC-based applications.
4.1. System Implementation
In this paper, the NIA system is developed on the platform of the NetBeans IDE on Nokia 6212 NFC smartphone. The NFC-based software is implemented in the J2ME environment with Java MIDlet scripts for secure elements and context filters. The Nokia 6212 NFC SDK includes contactless communication API (JSR257), which allows devices to access information on contactless targets with NFC Data Exchange Format (NDEF) tags, radio frequency identification (RFID) tags, or external smartcards. The communication distance between NFC readers is usually less than 10 centimeters in 13.56 MHZ radio frequency. Thus, the NFC system facilitates the perception ability of physical smart objects and the information sharing ability between two NFC-enabled devices.
The NFC percepts are filtered by the context-acquisition module, which considers events within a reasonable range that adheres to defined context constraints in ontology knowledgebase. This study uses the Protégé system as an ontology-editing tool to generate web ontology language (OWL) documents [21]. Then, the ontology-knowledgebase module harmonizes heterogeneous context values into a common representation to support semantic adaptation. In the SIoT environment, all objects/people in smart life are equipped with radio e-tags/devices in order to be identified by computers as a cyber-physical integration. Therefore, we apply the NFC techniques to realize several context-aware schemes in the following sections.
4.2. Location and Device Awareness
Dr. Steiniger et al. suggested that LBSs should cooperate with high-precise positioning techniques in order to adapt to semidynamic environment, especially for indoor localization [22]. Outdoor position information is typically obtained from global positioning system (GPS) but often fails at indoor environment. In most of the indoor cases, indoor positioning system (IPS) can only roughly estimate location information. Precise indoor position information becomes a crucial factor for supporting sophisticated indoor LBSs.
NFC-enhanced smart life can easily improve the precision of original positioning services, such as GPS-based or Wi-Fi-based techniques, by appropriately deploying e-tags with location information. Two kinds of location representation can be used in this paper: (1) geometric and (2) symbolic models. The geometric model represents a location by its exact degrees of longitude and latitude, like the GPS. The proposed method can suitably deploy spatial NFC-tags to cooperate with other positioning techniques as an integration platform in order to improve the precision of IPS.
Furthermore, NFC-tags can also denote a location by its symbolic identifier that is predefined in a location-aware server. This symbolic model can further represent the semantic meaning of geographical relationship. Service providers can manipulate spatial areas that may be application-oriented for a specific purpose that may not be necessarily interoperable with other applications. For illustration, we identify location relationship in a CYCU campus by containment hierarchy, such as region, section, level, area, room, and object levels with their semantic meaning in Figure 7. In this example, when we touch a printer in the department office, the system can infer that this device is located in the IM205 room on the second floor of the IM building in the CYCU campus. Thus, the NIA system can obtain both the device ID and spatial relationship. The system can also cognize that the user is accessing a printer, which locates on the department of information management in the college of business.

Illustration of symbolic location hierarchy with semantic meaning.
4.3. Time Awareness
Traditionally, people used to manually input their schedule into electronic devices. By using the proposed NFC-enhanced approach, people can easily touch e-tags to record the schedule of the interesting events into their NFC devices and then the NIA system will automatically alert the user for the events.
Figure 8 is an illustration of a shopping reminder for the time-aware applications. Shopping centers advertise their sales events by their smart flyers/posters. Customers can easily use their NFC smartphones to touch the flyers/posters for scheduling the sales events. At the same time, the context-acquisition module automatically obtains the augmented information and records detailed information, such as promotion policy, sales products, promotion period, department store's address, floor, and GPS location. The information is delivered to the semantic-adaptation module for further inferring users' preference. The deduced results will be well organized in the ontology-knowledgebase module as users' current preference. Thus, the smartphones not only can automatically remind customers to attend the sales event, but also can intelligently compare between different promotions if the customers have touched the same product from several flyers.

Illustration of time-aware advertising with touching behavior.
4.4. Activity Awareness
To obtain virtual services, people can use their NFC-enabled devices to touch augmented information on smart objects to trigger the associated activities, such as to send an email, make a phone call, open a website, send a short message, and invoke an application. Different activities should be described by different data formats with the uniform resource identifiers (URIs). We depict an interaction example for downloading associated services from a smart object in Figure 9. The semantic-adaptation module analyzes users' behavior and invokes the touch-and-serve activities.

An interaction diagram for downloading associated services from a smart object.
For example, the user uses his NFC smartphone to touch an e-tag on a movie poster (in Figure 10(a)). The NIA can assist the user in downloading the associated application (in Figure 10(b)). And then, the smartphone can access the introduction (in Figure 10(c)), download the movie trailer, and display the movie showtime (in Figure 10(d)) for the user. The movie-related responses could be implemented as activity-aware information (in Figure 11) for e-wallet balance, theatre list, ticket buying, and ticket consumption.

An example of an activity-aware application for touching a movie poster.

An example of ticket purchase activity by using NFC smartphone.
4.5. Social Relationship Awareness
To perceive social relationship, the NIA system considers the data-sharing behaviors as a strong evidence about user's social relationship, which enables the NIA system to collect social-aware recommendations. A scenario of the social-aware application is depicted in Figure 12(a), where people easily use NFC smartphones to exchange business cards and synchronize their address books by a touching behavior. Thus, the NIA system can not only record this personal information in its address book, but also derive the relationship between these two friends by analyzing their similar properties.

An illustration of a social-aware application for sharing a business card.
For the example in Figure 12(b), two devices share their business cards with each other and realize that the friend is a student of CYCU. The location, time, task, and sharing documents with respect to this contact can assist to construct multiple-dimensional social relationship by the semantic-adaptation module. Subsequently, if the user touches a smart map for an attraction, the system could infer that the user may want to visit the location with this friend. Thus, our system can calculate a traveling route and notify the users to schedule their trip.
In a mobile environment, we demonstrate an example of point-to-point communication between two NFC devices in Figure 13 for sharing bookmarks with each other. The pseudocode of NFCIPConnection function (in Pseudocode 1) can connect two mobile devices to exchange data.
String INITIATOR_URL = “nfc:rf;type=nfcip;mode=initiator”; String TARGET_URL = “nfc:rf;type=nfcip;mode=target”; NFCIPConnection conn = (NFCIPConnection) Connector.open(url); byte[ ] message = conn.send(message); byte[ ] response = conn.receive( ); byte[ ] message = conn.receive( ); byte[ ] response = conn.send(response); conn.close( );

Illustration of point-to-point communication.
5. Social Advertising System
In this paper, the proposed technologies aim to create a novel social-marketing paradigm for electronic advertising (e-Ad) by applying the NIA service to encourage e-Ad sharing between proximity friends. Although there are several e-Ads in the market, the usages of current e-Ads are almost the same with that of traditional paper-based ads. The lack of social-incentive schemes causes less stimulus for an e-Ad holder to share with his confidants for a win-win situation. And thus, companies could not effectively deliver their product information to target markets. This section presents a social-advertising system for e-Ads to be shared between proximity mobile devices via NFC communications.
5.1. Credit-Based Promotion Scheme
To cope with the uncertain real-world markets, the reputation in a local community is an incentive or a prerequisite for convincing friends of the e-Ads. Trust is realized by the remuneration mechanisms in which information receivers reward their providers by increasing their reputation accordingly [17]. The incentive scheme adds on a user's credit after a successful information-sharing action, which means that user's sharing action increases his own reputation.
The emphasis of the incentive scheme in the social-advertising system is that we treat the incentive credit as a promotion evidence. As a result, once a user holds an interesting e-Ad, he cannot wait to share this e-Ad with his friends via NFC data exchange. Then, the credit-based promotion scheme will copy the e-Ad to his friend and reward his credit automatically. The flow diagram in Figure 14 presents the procedure about e-Ad sharing, recording, and rewarding at an NFC-based mobile device. The procedure fulfills the whole distribution cycle of each e-Ad by identifying the e-Ad, validating credit, generating e-Ad content, sharing with others, receiving feedback, recording sharing action, and rewarding credit according to the promotion policy.

The flow diagram for e-Ad sharing, recording, and rewarding process between two smartphones.
5.2. Chronology Ontology
From the touching chronology of user's behavior, the NIA system collects chronological perceptions to infer periodic preference by developing a time ontology, which is sketched as a unified modelling language (UML) diagram in Figure 15. We use rectangular boxes to denote entity types or classes. The solid line connecting two entities represents relations. The triangle symbolizes the “is-a” or “kind-of” relationship, which is a generalization-and-specialization relationship. The diamond symbol denotes the “part-of” relationship, which is an aggregation relationship. The dotted line is used to indicate reference on/between other ontology models.

Time ontology.
Time ontology consists of two subconcepts: temporal entity and periodic interval. Temporal entity may be instant time point or interval between starting time and end time to reflect a concrete interval of time duration. A user-defined entity allows people to customize their own specific interval requirement, such as breakfast time, lunchtime, and dinnertime which may be different for everybody.
Periodic interval may be a kind of yearly, seasonally, monthly, weekly, or daily event. For example, people can use periodic interval classes to define their own anniversaries, seasonal vacation, monthly promotion, weekend party, or regular lunch meeting. In particular, this ontology also supports a user-defined period for people to customize a special period, such as a biweekly meeting or three-monthly exam.
5.3. User-Profile Ontology

User-profile ontology.
Profile is a subconcept of user ontology for personalization, which contains user's interest, health condition, social relationship, and personal preference. Interest class denotes personal hobbies, culture background, and schedule for recommendation. Relationships with other users are stored in social relationship as a kind of address book. Health condition and preference profiles are used to suggest suitable services and filter out unsuitable ones.
5.4. Domain Ontology for Service Recommendation
By analyzing the touching chronology and user's profile, the NIA system can perceive user's preference in order to recommend the most relevant objects or effective activities for the user. A service ontology in a social-advertising scenario is represented as a UML diagram in Figure 17. Each service should describe its name, description, service product, and subject domain in detail. People can select services based on their product classification. Contact information of a service provider consists of subconcepts such as organization name, contact person name, phone number, fax number, and website.

Service ontology.
Especially, we also construct service profiles for advertising and recommendation purposes. Service profiles of a service entity include its availability conditions (i.e., covered region, opening hours, and environmental condition) and filtering criteria (i.e., customer, cost, quality, device, and security profiles). With respect to spatial availability, the covered region denotes its service delivery capability to serve customers within a geographic region. For temporal property, opening hours record its regular uptime and periodic vacations. Environmental condition indicates suitable and unsuitable conditions, such as weather, temperature, tide, and wind velocity conditions. This concept is important for outdoor activities. The filtering criteria based on customer's classification, cost level, quality guarantee, device requirement, and security qualification are used to match services to appropriate users. Service profile cooperates with its cost, quality, device, and security profiles for service-selection purpose.
5.5. Social Cooperation
This NIA framework can facilitate the lifecycle of e-Ads generation, distribution, promotion, redemption, and validation. The relationship of all the involved systems, apparatuses, and roles including their message flows, e-Ad delivery, and payment is illustrated in Figure 18. The e-Ad owner is a product/service provider who authorizes a credit manager to promote his product/service by distributing his e-Ads effectively to target market. The credit manager is a centralized system, which is responsible for credit initiation, policy management, credit validation, distribution analysis, and privacy protection to accomplish the authorized task. The task can also cooperate with some e-Ad kiosks located in physical stores/shopping centres to enlarge the advertisement visibility and e-Ad usage in the market. Thus, customers can preview e-Ad content on the website of e-Ad kiosks and then download any e-Ad into their mobile devices via NFC interface. Therefore, the e-Ad can be effectively distributed to target market and achieve better benefit then before.

An illustration of e-Ad generation, distribution, promotion, redemption, and indemnification.
In the social advertising system, the rewarded credit accumulated after social reciprocity behavior can be used for redemption according to the promotion policy. A redemption action should be executed across user's smartphone, e-Ad kiosk, credit manager, and e-Ad owner. Figure 19 depicts the life cycle of an e-Ad from its creation and validation to redemption. The NFC kiosk is a specific apparatus which can be located in physical stores (such as retailers, convenient stores, and shopping centres) to serve for e-Ad preview, generation, downloading, and consumption. To protect customers' privacy, all of the sharing history should be well encoded. These records are only used to verify user's credit and calculate e-Ad rewards.

A messaging diagram for redeeming a rewarded credit in accordance with e-Ad promotion policy.
In summary, the social-advertising system addresses this innovative marketing opportunity and increases the e-Ad distribution performance by rewarding a credit-based incentive to each customer. This NIA system enables a tap-and-go sharing mechanism and creates a novel customer-driven marketing channel to assist e-Ad owners (such as manufacturer, retailer, and service provider) to distribute their product information efficiently. That is, this novel marketing method is the most powerful “word of mouth” marketing method to achieve a real win-win situation.
6. Related Works
Schwinger et al. proposed an evaluation framework for comparing the customization capabilities of context-aware frameworks [23]. Context characteristics are associated with the management of context data, which comprise context properties, extensibility of unforeseen context, availability of context data, history of context records, and context validity. In this section, we adopt this evaluation framework to discuss related works.
In 2013, Dr. Elgazzar et al. proposed a context-aware system, named Appaas (i.e., applications as a service), to provision the best relevant application with respect to various context information [24]. The Appaas matches the characteristics of mobile applications with user's context, such as the location, user profile, mobile devices, and time. However, the lack of knowledgebase analysis limits the extensibility, availability, and validity of the system.
Borrego-Jaraba et al. proposed an NFC-based context-aware solution, called Pinakes, for students to access bibliographic sources recommended by teachers in university environments [1]. By using existing ontological standards of learning, the system can improve the understanding of the subjects and the development of expected skills. However, this Pinakes is only concerned about user profile, augmented objects, and learning activities. The lack of social incentive limits the teamwork capability of the learning system.
To generate context awareness, Dr. Nava-Díaz et al. proposed a MARCado framework for considering important aspects, which are known as the five W's: who, where, when, what, and why, to better understand the elements involved in a context-aware environment [25]. The authors have tagged the required information into smart objects for users to easily obtain context situation, such as information about relevant elements, interaction capacity, contextual actions, available communications, and system capacity. However, these context-aware services belong to eHCI that cannot support knowledge level services. Because the MARCado framework is short of social relationship, it cannot satisfy the SIoT criteria.
Dr. Chen proposed a four-layer architecture for machine-to-machine communications in IoT environment [26]. The architecture consists of information gathering, delivering, processing, and services layers to support video blogging and location-aware multimedia services. However, the system can only support reactive actions without considering knowledgebase, semantic reasoning, and social networks. Thus, the architecture lacks the extensibility and validity capability to support full functionality of SIoT applications.
Our proposed framework retrieves information about environmental context and user profile. Location context is the crucial criterion to suggest relevant services in the near surroundings of the user. Time context is the filtering criterion to screen out unavailable services/objects. Device and application properties are realized by service ontology, respectively. User ontology sketches the properties of user context that consist of user's profile and social relationship to customized service recommendations.
Furthermore, the proposed ontology models use formally symbolic and mathematical models to describe concepts and inference rules with respect to context information. Thus, our framework can satisfy the availability and validity requirements. With respect to context extensibility, unforeseen contexts like traffic and network information can be easily appended to our ontology-based framework. In conclusion, our framework comprises abundant context properties, extensibility of unforeseen context, availability of context data, history of context records, and context validity. That is, the NIA framework satisfies all the context criteria of the evaluation framework proposed by Schwinger et al. in 2002 [23].
7. Conclusions and Future Works
As the mobile application market is booming, there is a demand for a framework that can perceive various context situations in SIoT scenario. This study proposes an NIA framework to support context awareness in SIoT environments. The purpose of this study is to realize an intelligent agent and thereby a cyber-system can trace the behavior of NFC-enabled perceptions to adapt with physical-context changes and respond to the appropriate services. To accommodate to the uncertain real-world environments, this study also defines intelligent and social functionalities for the proposed NIA to achieve three indispensable abilities: reactive actions, proactive achievements, and social cooperation. The system framework incorporates the context-acquisition, ontology-knowledgebase, and semantic-adaptation modules to perceive context environment, to cognize semantic implication, and to respond with relevant activity, respectively.
In order to support context-aware computing, this study develops several mechanisms to support the abilities of location, time, activity, and social awareness. We also define three ontologies to organize the concept of touching chronology, user's profile, and service recommendation in order to receive context-aware information, reactive activities, and proactive goals. To develop a complete SIoT framework, the NIA system also proposes a credit-based incentive scheme to encourage social cooperation, in which a credit represents a kind of stimulus assigned to user's smartphone after a successful information sharing. To design the context and adaptation abilities, the proposed framework is implemented by a set of system modules and applied to a social advertising system. The results show that this framework supports a wide-range of different functionalities and satisfies almost all the context-awareness criteria. Therefore, the proposed framework can support comprehensive context-aware models with appropriate intelligent agents and social cooperation mechanism.
This paper focuses on the development of the NIA framework with ontology models and social advertising mechanism. In the future, we will conduct empirical studies to trace the time-aggregated contacts between pairs of nodes and expose that physical social networks contain repeated contact patterns between small groups of nodes. Identifying the inherent cluster structures in social networks narrows down the exploration work to extract information in a more efficient way. The set of contact clusters in a connectivity trace will give us an insight into the kernel of the social community.
Footnotes
Conflict of Interests
The authors declare that there is no conflict of interests regarding the publication of this paper.
