1 Introduction

Recent advances in the fields of wireless technology, multimedia communications and intelligent systems have exhibited a strong potential and tendency on improving human life in every facet, including entertainment, socialization, business, healthcare, education, and transportation. The typical example shown in Fig. 1 reveals the design rationales behind smart city [8]. The technology advances should make the city, the planet and the society a healthy, happy place for people to live to learn and to grow. They will not only enhance the quality of life, but will also influence the way we live, work and socialize in a green and elegant fashion, which implies our communication systems tend to be low cost, free or relieved from human interaction, and intelligent enough to enable ubiquitous computing environment for bringing smart services to a much wider audience.

Fig. 1
figure 1

Typical example of reinventing the automobile [8] to illustrate the design rationales for smart city: green, elegant, personalized and human-centric

Suggested by Internet of Things (IoT) [1], a new kind of “networks” will become pervasive in future that connect not only networked terminals like mobile phones, computers, smart devices, but also daily life objects that until now have been to us just “un-networked things” or “inert objects”. With the exponentially increasing number of ubiquitous communication devices, the traditional human to human (H2H) communications with the intrinsic need of human operations are gradually falling behind the scale of necessity, which makes machine to machine (M2M) communications [4] obtain much momentum in the industry and research community recently. To approach the ultimate goal of building an advanced society, M2M communications system over heterogeneous networks needs to be designed for offering different services anytime and anywhere while satisfying the quality requirements of end-users’ experience in various smart services. Yet, the real structure of IoT and the adaptable ubiquitous computing model are still in clouds.

In this article, we address this challenging issue through combining novel evolving technologies and networking frameworks, such as the ones of ubiquitous networking, ambient intelligence and smart environments, as well as some of our ongoing development of various technologies. In particular, we will employ the second generation RFID (2G-RFID) technology [2] to propose a novel intelligent system for M2M communications (2G-RFID-IMS). We first propose an architecture for IoT, which has four layers, such as object sensing and information gathering, information delivering, information handling, and application and smart services layers. Based on the proposed architecture, the 2G-RFID-based M2M communications are service-oriented, and triggered by a mobile code delivered from one machine to another. Thus, the complete communications loop includes five parts, i.e., mobile code delivering, object sensing and information gathering, information delivering, information handling, and service response. Then, the middleware design for 2G-RFID-IMS is discussed. Finally, we describe the representative applications, and conclude the article.

2 Proposed architecture for IoT

We first describe the four-layer based architecture for M2M communications. The proposed architecture is shown in Fig. 2.

  • Object sensing and information gathering: The first step of enabling smart services is to collect contextual information about environment, “things” and objects of interest. For example, sensors can be used to continuously monitor human’s physiological activities and actions such as health status and motion patterns; RFID techniques can be utilized for collecting crucial personal information and storing them in a low-cost chip that is attached to an individual at all times.

  • Information delivering: Various wireless technologies can be used for delivering the information, such as wireless sensor networks (WSNs), body area networks (BANs), WiFi, Bluetooth, Zigbee, GPRS, GSM, cellular and 3G, etc. Such diverse communication techniques can accommodate more applications into the system.

  • Information processing: Ubiquitous machines must process information in both “autonomic” and “smart” way in order to provide pervasive and autonomic services. For example, the meaningless information could be filtered out according to the users’ interests in social networks.

  • Application and smart services: According to different users’ requirements, application-specific design should be developed to improve heterogenous network performance in terms of bandwidth utilization, computing capability and energy efficiency.

Fig. 2
figure 2

The proposed architecture for internet of things

2.1 Object sensing and information gathering

The lowest layer of the four layer architecture is called object sensing and information gathering layer. With the rapid advancing in electronics, electromechanics, and nanotechnologies, ubiquitous devices (called as u-objects ) are getting more and more in number, smaller and smaller in size [9]. In the context of IoT, such objects are also called “things”, such as computers, sensors, people, actuators, refrigerators, TVs, vehicles, mobile phones, clothes, food, medicines, books, passports and luggage. They are expected to become active participants in business, information and social processes. These participants can react autonomously to the “real/physical world” events and influence it by triggering actions and creating services either with or without direct human intervention. In the proposed system, lots of WSNs and surveillance systems will be deployed to collect information. People also can carry tiny RFID tag to identify their ID. Typically, three major techniques incuding WSN, BAN, and RFID will be used for object sensing and information gathering.

We can always acquire a very plenty of information from physical world. However, we may only be interested in parts of them. Through this layer, the physical world can be represented by a personalized information system which is called P-system in Fig. 3. The combinations of sensing, communications and information processing enable objects to interact with the environment and communicate among themselves. In P-system, two categories of information are mainly collected, i.e., personalized environmental information and user profile. The user profile contains ID, vital information, capability, location, interest, behavior and P-score.

Fig. 3
figure 3

Illustration of Personalized Information System

2.2 Information delivering

IoT will create the possibility of merging of different telecommunication technologies and offer new services. One example is the integration of GSM, NFC (Near Field Communication), low power Bluetooth, WLAN, multi hop networks, GPS and sensor networks together with SIMcard technology. In these applications, the Reader/tag is part of the mobile phone, and different applications share the SIM-card. NFC enables communications among objects in a simple and secure way just by having them close to each other. The mobile phone can therefore be used as a NFC-reader and transmit the reading data to a central server. The SIM-card in a mobile phone plays an important role as storage for the NFC data and authentication credentials (like ticket numbers, credit card accounts, ID information, and etc.).

Connectivity will become a kind of commodity in the IoT, which is available to all at a very low cost and not owned by any private entity. In this context, there will be the need to create the right situation-aware and service-oriented development environment, invent a proper intelligent middleware to understand and interpret the information, ensure protection from fraud and malicious attacks and guarantee privacy.

P2P technology can assist users in processing and delivering information efficiently. Depending on application requirements, multiple delivery approaches can be chosen to save the bandwidth and resource cost as follows.

  • Distance-based delivering: Among those nodes having information, the system intends to select the one closest to current location.

  • Profile-matching-based delivering: If there are no nodes nearby that have required information, the profile matching process is used to find some nodes that have the least difference between any two of them.

  • Flooding: If neither distance-based delivering nor profile-matching-based delivering fail, the high cost flooding can be utilized, which needs much more resources.

2.3 Information processing

An application usually has probability requirements that determine whether the information is handled in central server or just by the personal devices. Information processing can be performed on intelligent terminals such as smartphone. However, if the terminal device has limited computational power or storage capacity, this task can be completed through cloud computing platform.

The use of devices should be driven by application requirements. Each user’s activity is determined according to the personalized service requirements via decision making techniques. with the personal profile, the IoT can filter out meaningless information and identify personalized requirements. For the plenty of information collected, communication technology needs to be utilized to transfer the required information to some desired places.

In the IoT architecture, intelligent middleware can create a temporal-spatial domain dynamic map of the real/physical world within the digital/virtual space by ultilizing the characteristics of ubiquitous sensor networks and other identifiable “things”.

2.4 Application and services

Application and service layer should provide user with very fast service responses. The IoT implies a symbiotic interaction among the real/physical, the digital/virtual worlds: physical entities have digital counterparts and virtual representation; things become context-aware and they can sense, communicate, interact, exchange data, information and knowledge. Through the use of intelligent decision-making algorithms in software applications, appropriate rapid responses can be given to physical phenomena, based on the very latest information collected about physical entities and consideration of patterns in the historical data, either for the same entity or for similar entities. These create new opportunities to meet business requirements, create new services based on real time physical world data, gain insights into complex processes and relationships, handle incidents, address environmental degradation (pollution, disaster, global warming, etc), monitor human activities (health, movements, etc.), improve infrastructure integrity (energy, transport, etc.), and address energy efficiency issues (smart energy metering in buildings, efficient consumption by vehicles, etc.).

2.5 Security and privacy

Due to the co-existence of a large number of ubiquitous devices competing for shared resources, lots of challenging issues still remain for designing smart and flexible applications. Yet, one of major issues is about security and privacy. In order to enable smart services and minimize resources usage, it’s important for nodes to cooperate and share information with each other, which may let malicious nodes destroy the network performance. To alleviate this issue, some existing incentive mechanisms are used to tell the nodes if they behave well by a utility function. In the utility function, the more help users give to others, the more utility users would obtain. They encourage the nodes to cooperate and forward packets for others such that the individual selfish behavior can be alleviated by using reputation-based [6], credit-based [7], or game theoretic [10] approaches. Similarly, we utilize a principle of causes and effects and possibly generate a great amount of power of group force, which can be specified as an attribute of the node profile, e.g. credits and/or status. The contextual interests can be location, temperature, hobbies, some common nature of things and matter, and etc.. The causal process can be represented by a set of rules that can be specified using an ontology language and built into the proposed M2M system. Each node will benefit from interacting with other nodes according to the causal process specified, as its credits gets increased and status gets promoted when it takes actions or engages in activities towards the right direction, and its credits and status decreases and demoted, respectively, otherwise. Through the mechanism, the individual selfishness is replaced with “social selfishness”, which decrease the number of individual malicious nodes extensively.

3 M2M communications with software agent intelligence

In this section, we incorporate 2G-RFID technology into the proposed IoT architecture to produce a novel intelligent system for M2M communications (2G-RFID-IMS). RFID technology could play a vital role in future smart-environment applications. RFID (and 2G-RFID) tag will be utilized to identify and to convey vital information and agent intelligence of any communicating object. The 2G-RFID-IMS uses software-agent-based intelligence to achieve faster service responses. The mobile agents specifying up-to-date service directives that can be operated by intelligently handling various network dynamics are encoded in the RFID tags, enabling machines to “talk” with each other to execute certain actions in corresponding to different situations.

3.1 2G-RFID based M2M communications

Our goal is to enable smart services by utilizing agent technology. You can not talk with system directly. You need to find a way for backend system to understand the user’s requirement. The user carries mobile phone/PDA attached by RFID tag. We put mobile code in the RFID tag, enabling machine to talk with each other to perform intelligent task.

The complete communication loop includes five phases, i.e., mobile code delivering, object sensing and information gathering, information delivering, information handling, and service response. Then, the joint authentication-based and role-analysis based secure middleware design is discussed.

As shown in Fig. 4, the information stored in the tag in traditional RFID system mainly contains ID information, as well as some description information, such as the shape, color and/or weight of the object. Such passive information is forwarded to processing module by RFID reader to perform a rule-searching process. The successful return of the rule-searching process contains a certain service code. Thus, one ID number corresponds to only one service, i.e., one situation, in a traditional RFID system. However, as time goes on, situation changes due to the changes of application-specific requirements and/or environments. Thus, the service code, which is fixed in the rulebase, will be out-of-date and can not be adaptive to the situation change.

Fig. 4
figure 4

Architecture of 2G-RFID-based M2M Communications System

In order to shorten the critical gaps existing between object’s up-to-date requirements on the services and the timely realization of the expected services, the mobile code is introduced in smart RFID system to adapt to the changing situation. In the next sections, we will introduce the situation-aware code delivery, interpretation and update in smart RFID system.

3.2 Code delivering

Since RFID tag has no processing power, it only works as a carrier for mobile code. Once an object moves to the proximity of a RFID reader, the information stored in the tag will be delivered to the reader. The communication process of code delivery is simple. However, the main challenging issue during code delivery is to guarantee security and privacy.

A malicious person could write the code through an illegal method while impersonating the identity of the legal user. The malicious can obtain the service by undermining the privilege of the legal user. As a consequence, the credit of legal user will be endangered. For example, if the counterfeited emergency statement is found, legal user would be hard to be approved in his future request for an emergency code. Therefore, the code delivery should not be simply the forwarding of code information. Efficient authentication algorithm is needed to ensure the security for smart RFID system. On the other hand, the privacy issue is also important. For example, another malicious person may activate the RFID tag attached to Tom’s wife, access her electrical medical record, and do something adverse to her. Thus, the code should only be delivered to trusted RFID readers. We will discuss the detailed security enhancement mechanisms later.

3.3 Code interpretation

Due to the limited capacity of RFID tag, the mobile code only contains a small size of abstract code, such as “emergence: on”, “accident: car crash”, “operation: yes”, “transfusion: yes”, etc. The abstract code needs to be interpreted into a detailed message which can be recognized by an inference engine. As shown in Fig. 4, the context-aware decision making system is an intelligent processing system to produce a solution to a real world situation. While the mobile codes are dynamically written in depending upon the changing situation, the intelligent processing system which is hidden behind the backend system can be exploited for adaptation to the changing situations.

As shown in Fig. 4, each mobile code is explained into a detailed code expression by the code interpreter. If some condition is contained in the interpreted result, situation-aware contexts querying system will be triggered to collect the related situation-aware parameters. For example, in order to get the environmental temperature and humidity, a notification can be sent to the associated sensor network to sense the environment. The interpreted code along with the associated environmental parameters will be input to inference engine to determine the situation and which action(s) should be performed to provide the required service for the object. In order to facilitate inference engine to make a decision intelligently, an intelligence entity (IE) can be retrieved locally or requested from the remote intelligence entity pool system [5]. If the situation is firstly encountered and there is no IE ready for the situation, the intelligence entity pool can dynamically generate an IE to coping with the situation. To sum up, this approach makes system flexible and scalable to be able to cope with the changing situations although RFID has only limited capacity.

3.4 Service response

In order to provide on-demand quality of service, it should be possible to change or re-write the mobile code in an on-demand fashion. We propose two basic code updating modes, i.e., passive mode and active:

  • Active code update: Users can update the codes actively by themselves through portable RFID readers. It hints that people can finish code updating process before the arrival of the location of service provider. Thus, a better service is provided in terms of convenience and timeliness.

  • Passive code update: In RFID systems, the tag can be generally attached to human and non-human objects (e.g., product, animal, etc.). Non-human objects cannot actively update code by themselves. Thus, code-updating can only be performed passively by the infrastructure (e.g., RFID reader in some fixed location). For example, in an automatic assembly line application, the operations on the product are performed step-by-step. If the current operation associated with the code information of the tag is finished, then a new code is written into the tag, which means that the object will accept the corresponding operation in the next step, and so on. If the tag’s memory size is large enough, then all of the action codes can be written into it at the beginning in the assembly line. Then, the code size will progressively shrink as different machine tools progressively complete the corresponding operations for the product. When multiple assembly lines are employed for some product, the RFID tag will be filled with a new set of code for performing a new series of operations in another assembly line. This implies that the size of RFID message is variable according to the different stages of object’s processing.

4 Applications for 2G-RFID-IMS

Based on the active information stored in the tag, the “idea” of the object in different applications can be expressed. With the incorporation with other systems, many interesting applications can be found, for example the video blogging application, the location-aware smart multimedia services for healthcare, etc.

4.1 Video blogging

In the video blogging application, Tom is a smart person and he owns a smart house. As shown in Fig. 5, there are three RFID readers deployed at the proximity of the three entrances to his house. Four video cameras in different locations cover different rooms. To save energy, the cameras are powered off if no tasks are detected. The mobile code in the Tom’s tag allows the interaction between different machines in the separated subsystems:

Fig. 5
figure 5

Illustrative applications for 2G-RFID-IMS

Once Tom enters his house through one of the entrances equipped with the readers, his ID information and mobile code information in the tag will be transmitted to the nearby RFID reader. With Tom’s ID information, function InBuilding(Tom) can verify whether Tom is at home. If InBuilding(Tom) is true, the execution of function RFID-Locating() will trigger other subsystem to collect the three RSSI values from the three RFID readers (i.e., RFID reader 1, RFID reader 1, and RFID reader 3 in Fig. 5) to obtain the location of Tom. Assume the return value of function RFID-Locating() is study room, “StartVideoTrack(position, resolution)” will activate camera 2 with a certain pre-determined resolution. The video streaming is forwarded to the local video server through the access point. These video images are time-stamped and stored in Tom’s file directory, while his video blog is automatically updated in a timely fashion. When Tom moves from study room to living room, the code will be executed again. The return value of function RFID-Locating() is changed to living room, and thus shutting down camera 2 while activating camera 3. In addition, the condition of “If position = LivingRoom then StartAirConditioning(temperature)” is satisfied and the air-conditioner works with the temperature assigned by Tom.

4.2 Location-aware smart multimedia services for healthcare

In this example, we propose a 2G-RFID-IMS based location-aware smart multimedia services for healthcare. In this system, the vital signals of the patient are collected by body sensors [3]. These body signals are subsequently updated into the database by means of a cell phone, a Wi-Fi connection, etc., Any abnormalities that do not require immediate treatment may be logged into the database, and registered by the patient’s RFID tag for future reference. Based on these body signals, a diagnosis might indicate more complicated multimedia information is needed to further ensure the accuracy of the diagnosis.

Similar with the example shown in Section 4.1, function RFID-Locating() detects the patient’s location. Function BodySignal() collects the medical conditions of the patient for monitoring in the backend system. Then, function Diagnosis( BodySignal()) further diagnose a problem by relying on the body signals. If the result of diagnosis shows that the patient needs care, video camera at the proximity of the patient will be activated. The resolution of the video streaming is determined by the severity of diagnosis result. The resolution of the camera can also be adaptively adjusted according to contextual information (e.g. patient’s profile, patient’s behavior pattern, etc.) As shown in Fig. 5, it might be possible for the doctor to remotely diagnose the patient immediately through the real-time video communications with the patient and the patient’s physiological data information retrieved by a wireless body area network (WBAN) hosted by the patient.

5 Conclusion

In a mobile and ubiquitous environment, the design with user-centric, adaptable, fast, secure and seamless features is a high demand, yet a challenging issue. In order to enable smart services and provide better quality of service in future networks, we present a novel 2G-RFID-based machine to machine communications system, where the mobile code can cope with context-aware situations. With the encoded rule as mobile code stored in the RFID tag, the system extendibility and practicability can be effectively improved. The active infrastructure gives the capability of self-explanation to the object. The action directive guides the system to interact with the delegated ambient devices through various M2M communications. So the event processing for the object can be carried out in a distributed manner, which makes the infrastructure more robust and easier to maintain, and many benefits such as improved scalability and automated monitoring can be provided in our proposed system.