# Contextual Awareness Service of Internet of Things User Interaction Mode in Intelligent Environment

Authors: Lingling Song
Journal: Advances in Multimedia
 (2022)

---

## Abstract

In order to reduce the difficulty of the Internet of Things intelligent environment system to provide users with layout services and optimize the system structure, this paper proposes to design a context-aware service system based on the user interaction mode of the Internet of Things. This article first collected a large amount of data through the literature survey method, which laid a sufficient theoretical foundation for the subsequent research; then, using smart sensors, smart interaction technology, and context awareness methods is employed to design and build a context-aware service system based on the user interaction modality of the Internet of Things; in order to test the performance and effect of the situational awareness system, take the elderly home care behavior as the research object, collect the 28-day home behavior of the elderly as sample data, and divide it into 7-day data, 14-day data, 21-day data, and 28-day data, by adopting rule pruning demand reasoning algorithm and evidence theory algorithm to reason about the service demand of the elderly. Finally, the experimental results show that the rule-pruning-based service demand reasoning algorithm combined with the evidence theory algorithm optimizes the system, which can better perceive the situation of the elderly living alone and can well reason about the elderly’s service demand, which is of great significance for solving the life and safety problems of the elderly.


---

## Body

## 1. Introduction

### 1.1. Background and Significance

With the advent of the Internet of Things era, everything in the world has gradually become perceivable and interconnected. Through the Internet of Things system, people can understand and control the real world, which greatly changes the way people interact with the real world and lays a solid foundation for machines and systems to provide services to people autonomously according to changes in the real world. Context-aware services emerged in this context.Context-aware service is a form of service provided by a computer system. Experienced service providers can understand the operation of the program and the user’s computer account and can choose the selection method to compare with the preferred behavior of some users and select the machine tool when the user provides services. Due to the complexity of the IoT intelligent environment system and the huge information data, it is often difficult to provide and layout services for users. Researching the human-computer interaction modalities in the intelligent environment and analyzing the situational awareness provided by the IoT system for users’ service are of great significance. Therefore, in order to optimize the system structure and provide users with faster and more comprehensive services, this paper proposes a context-aware service model based on the user interaction mode of the Internet of Things.


### 1.2. Related Work

The tremendous convenience brought to mankind by the Internet of Things technology is obvious to all. In recent years, with the rapid development of Internet of Things technology, its applications in all aspects and fields of society have become more and more extensive. Experts from all walks of life are increasingly studying the Internet of Things technology and its applications. Sim and Choi have pointed out that due to the development of information and communication technology and the need for organic connections in the industry, the fourth industrial revolution is developing rapidly. The Internet of Things (IoT) is the core technology of the fourth industrial revolution. There is an active relationship between objects and objects, such as sensing, networks, and objects that cooperate with each other without manual intervention, so they can be associated with various industrial fields. With the proliferation of the Internet of Things environment, the Internet of Things devices are growing in various industries. IoT devices connected to the Internet are different from each application environment. A lot of information is obtained from the interactions between IoT devices or between people and IOT devices and between devices that provide simple data (e.g., sensing). They proposed a support method that enables extended service search when users use information search services generated in an IoT environment. Existing service discovery methods focus on the method in which users select services based on simple service information disclosed by service providers. In order to solve the problems of existing service discovery methods, they proposed a support method to support users [1]. In addition, Wang analyzed the new requirements brought by the intelligent interaction and context-aware technology of the Internet of Things (IoT) in view of the limitations of traditional intelligent interaction. He proposed a context-aware and IoT-oriented intelligent interaction architecture and constructed an intelligent interaction and contextual expression model in the IoT environment. His research shows that the proposed architecture and method can realize the intelligent interaction between people and things in the IoT environment. The architecture method he proposed can improve the flexibility of the intelligent interactive system [2]. To sum up, although people’s research on the Internet of Things has been fruitful, so far, there are few studies on context-aware services based on user interaction modalities, and the public on the market is increasingly connected with the Internet of Things technology and mobile networks. The more frequent it is, the more important it is to study and analyze the situational awareness services provided by the interactive modal IOT system in the intelligent environment. By optimizing the system, it can help it provide better services to users, which is of great significance for improving people’s quality of life.


### 1.3. Innovations in This Article

The innovations of this paper are mainly reflected in the following aspects: (1) This paper proposes a context-aware service based on the user interaction modality of the Internet of Things, which can provide help for better user experience. (2) By building context-aware services model, analyze the interaction capabilities of Internet of Things users and their behavior preferences in the interactive context, according to user preferences, through the information feedback of the system to push users’ more service requirements. (3) This article first analyzes the Internet of Things using the up-and-down perception method; user’s intelligent interaction problem is then constructed based on the situational awareness service system, and its reasoning process and application methods are introduced in detail.


## 1.1. Background and Significance

With the advent of the Internet of Things era, everything in the world has gradually become perceivable and interconnected. Through the Internet of Things system, people can understand and control the real world, which greatly changes the way people interact with the real world and lays a solid foundation for machines and systems to provide services to people autonomously according to changes in the real world. Context-aware services emerged in this context.Context-aware service is a form of service provided by a computer system. Experienced service providers can understand the operation of the program and the user’s computer account and can choose the selection method to compare with the preferred behavior of some users and select the machine tool when the user provides services. Due to the complexity of the IoT intelligent environment system and the huge information data, it is often difficult to provide and layout services for users. Researching the human-computer interaction modalities in the intelligent environment and analyzing the situational awareness provided by the IoT system for users’ service are of great significance. Therefore, in order to optimize the system structure and provide users with faster and more comprehensive services, this paper proposes a context-aware service model based on the user interaction mode of the Internet of Things.


## 1.2. Related Work

The tremendous convenience brought to mankind by the Internet of Things technology is obvious to all. In recent years, with the rapid development of Internet of Things technology, its applications in all aspects and fields of society have become more and more extensive. Experts from all walks of life are increasingly studying the Internet of Things technology and its applications. Sim and Choi have pointed out that due to the development of information and communication technology and the need for organic connections in the industry, the fourth industrial revolution is developing rapidly. The Internet of Things (IoT) is the core technology of the fourth industrial revolution. There is an active relationship between objects and objects, such as sensing, networks, and objects that cooperate with each other without manual intervention, so they can be associated with various industrial fields. With the proliferation of the Internet of Things environment, the Internet of Things devices are growing in various industries. IoT devices connected to the Internet are different from each application environment. A lot of information is obtained from the interactions between IoT devices or between people and IOT devices and between devices that provide simple data (e.g., sensing). They proposed a support method that enables extended service search when users use information search services generated in an IoT environment. Existing service discovery methods focus on the method in which users select services based on simple service information disclosed by service providers. In order to solve the problems of existing service discovery methods, they proposed a support method to support users [1]. In addition, Wang analyzed the new requirements brought by the intelligent interaction and context-aware technology of the Internet of Things (IoT) in view of the limitations of traditional intelligent interaction. He proposed a context-aware and IoT-oriented intelligent interaction architecture and constructed an intelligent interaction and contextual expression model in the IoT environment. His research shows that the proposed architecture and method can realize the intelligent interaction between people and things in the IoT environment. The architecture method he proposed can improve the flexibility of the intelligent interactive system [2]. To sum up, although people’s research on the Internet of Things has been fruitful, so far, there are few studies on context-aware services based on user interaction modalities, and the public on the market is increasingly connected with the Internet of Things technology and mobile networks. The more frequent it is, the more important it is to study and analyze the situational awareness services provided by the interactive modal IOT system in the intelligent environment. By optimizing the system, it can help it provide better services to users, which is of great significance for improving people’s quality of life.


## 1.3. Innovations in This Article

The innovations of this paper are mainly reflected in the following aspects: (1) This paper proposes a context-aware service based on the user interaction modality of the Internet of Things, which can provide help for better user experience. (2) By building context-aware services model, analyze the interaction capabilities of Internet of Things users and their behavior preferences in the interactive context, according to user preferences, through the information feedback of the system to push users’ more service requirements. (3) This article first analyzes the Internet of Things using the up-and-down perception method; user’s intelligent interaction problem is then constructed based on the situational awareness service system, and its reasoning process and application methods are introduced in detail.


## 2. Human-Computer Interaction Model and Context-Aware Services Based on the Intelligent Environment of the Internet of Things

### 2.1. IoT Smart Environment

Following the Internet, the Internet of Things has emerged. The Internet of Things is a new type of science and technology based on the Internet. It can realize the interconnection between “things and things” through the use of various physical devices. The connection process is completely composed of computer networks and objects are completed separately, without manual participation and operation. All data uploads rely on equipment. Data processing is also handled automatically by the IOT cloud platform, and the final instructions are also executed by the hardware. The advancement of IOT technology unites Earth as a whole, truly realizes global intelligence, and puts people in an intelligent environment [3, 4].


#### 2.1.1. Internet of Things Equipment

Due to the complexity of the Internet of Things system, it is associated with a number of technical disciplines, so its equipment types are also diverse, including sensors, routers, smart terminals, and various components, which are specifically divided into the following types.First, sensing equipment: the initial end of the IOT system is the sensing device that can collect relevant data information, including smart objects, smart sensors, new sensors, and wireless sensors; second, identifying the equipment: for example, intelligent mobile tags, ultra-low-energy RFID tags, RFID tags that support privacy data protection, and so on; third, storage devices, such as computers, controllers, memory, and ultra-low-power chips, etc.; fourth, terminal equipment, such as smartphones, tablets, computers, and so on; and fifth, network equipment, for example, adaptive chips, network devices with adaptive and self-organizing capabilities, and so on [5, 6].


#### 2.1.2. Basic Characteristics of the Internet of Things

(1) Fully automatic and intelligent: The Internet of Things system can mine and analyze massive amounts of data by using various intelligent computing technologies, data mining technologies, and other computing methods to realize intelligent control of objects.(2) Not limited by time and space: after the Internet of Things connects objects and networks, comprehensive interconnection and control can be realized. By using various communication networks, reliable information interaction and sharing of objects and objects can be realized anytime and anywhere [7, 8].(3) All-round perception of information: The Internet of Things system has a powerful information perception function and can effectively capture and collect various information of objects by using various perception devices [9, 10].


#### 2.1.3. The Network Architecture of the Internet of Things

The network architecture of the Internet of Things is mainly divided into three levels: perception layer, network layer, and application layer. First, the object data information is sensed and collected through the sensing device and then transmitted from the sensing layer to the gateway. The gateway analyzes and organizes the data and uploads it to the computer network. The user obtains the information feedback from the network and can be applied [11, 12]. The network architecture diagram of the Internet of Things is shown in Figure 1.Figure 1
Network architecture model of the Internet of Things.(1) The Perception Layer. The perception layer is also called the information collection layer, including various sensors and routers and other perception devices, which mainly complete data collection and short-distance transmission.(2) The Network Layer. The network layer is also called the network upload layer, including the gateway and the network. The gateway is responsible for receiving the collected data and information, sorting and analyzing it, and then transmitting it to the computer network, which uploads the information to the resource pool of the cloud platform for sharing.(3) The Application Layer. The application layer connects the network and users, combines perception information with requirements and application characteristics, analyzes and processes sensor information, and provides services according to user needs [13, 14].


### 2.2. Intelligent Interactive Technology

#### 2.2.1. Intelligent Interaction

Intelligent interaction is generated on the basis of the development of the Internet of Things. The effective connection between things and things and between people and things is realized through the Internet of Things system. The computer network system can obtain some behavioral preferences of people through data analysis and calculation. This independence provides users with personalized services and realizes the dynamic communication process between man and machine. This is the intelligent interaction between man and machine. With the further development and popularization of the Internet of Things, this kind of intelligent interaction will spread throughout the entire human space. It breaks the boundaries between virtual and reality, turning data into timely and useful information, allowing users to fully enjoy the virtual and real-world various resources [15, 16].


#### 2.2.2. Interactive Mode

Recently, the popular Internet of Things technology has made the phenomenon of human-computer interaction more and more common. Multiple small and cheap Internet of Things devices are widely distributed in people’s daily life. These physical machines and devices serve users through interconnection. This interactive mode makes computer equipment no longer rely on command lines or graphical interfaces for human-computer interaction. It can interact with users in a more natural and invisible way [17, 18]. Multimodal interaction is that people communicate with computers through voice, body language, and various information carriers, including text, pictures, and video and audio, fully simulating the way of interaction between people [19, 20].


#### 2.2.3. Intelligent Interactive System

Human-computer interaction technology is a form of technology that realizes dialogue between humans and computers in an effective manner through computer input and output devices. It includes machines providing information to people through output or display devices, and people inputting information to machines through input devices. It is an important part of computer and Internet of Things technology. Virtual reality technology is a typical human-machine intelligent interaction. Through the connection of the network, direct dialogue between machines and humans can be realized, which greatly enhances the user’s experience [3, 21]. However, in the traditional human-machine system, people are regarded as the operators of the system, and they only operate the machines without real interaction. Only today with the advanced Internet of Things technology can human-machine interaction be truly realized. The human-computer intelligent interaction system is shown in Figure 2. In this system, people and things are the two main application subjects, interacting with computer machines. In view of the shortcomings of traditional human-computer interaction systems, the intelligent interaction system constructed in this paper is an interaction system based on context awareness [22].Figure 2
Intelligent interactive system architecture.


### 2.3. Context Awareness Service

#### 2.3.1. Situation

In Chinese, according to the modern Chinese dictionary, “situation” is translated as “situation, situation,” and English to Chinese is literally translated as “context, environment.” From the two, the specific connotation of the word situation can be extracted, that is, with the specified thing subjective and objective environment are closely related. Context can be used to reflect any information of the environment. It includes any person, time, and location related to human-computer interaction including humans and machines and equipment and mainly reflects the actual situation of the environment [23].


#### 2.3.2. Situational Factors

Context is a collection of multiple pieces of information and contains a lot of information. Therefore, its influencing factors are also various. According to different information content, the types of context factors are also different. The classification of context factors ultimately determines the value range of its functions realization. We divide the situational factors into the following categories:(1) The user context: the user context is based on the Internet of Things users, including the attributes, living habits, and behavior habits of the users. The users here include both individual users and group users. (2) The environmental situation: environmental context refers to the natural or social environment formed by subjective and objective conditions. It includes all physical environments such as time, place, wind, light, and water, as well as social and cultural environments such as humanities, history, ethnic religions, and customs. (3) The task context: the task context is specific to the human-computer interaction process, which refers to the task conditions generated by equipment or technical services in the human-computer interaction process [24, 25].


#### 2.3.3. Situational Awareness

Contextual awareness is an intelligent service provided by intelligent computer systems for the Internet of Things users. It can collect and analyze users’ behavior preferences through the system and independently push information that may be of interest to users. It is a personalized service method. Today, with the rapid development of mobile computing and big data computing, contextual awareness is being applied to the details of every human-computer interaction, using contextual awareness to provide devices with as accurate and effective contextual information as possible, and to provide timely and accurate task feedback. At present, people’s research on situational perception has changed from a simple device implantation to a process that emphasizes the perception, response, and feedback of computer software systems to the user’s environment [26, 27]. The situational awareness system is based on the user’s task and uses various computing methods to realize the system that the machine can autonomously perceive the user’s environment and can provide the user with relevant information and services [28].


#### 2.3.4. Context-Aware Methods

Context awareness is a common pervasive computing method. In the Internet of Things environment, humans and machines are constantly interacting transparently. In the connection, the machine can meet the needs of users to process data. The information that informs the user of the type of service used is identification, which is the process by which the machine collects and analyzes the user’s preferences through the abovementioned methods. Context awareness is an important technology of pervasive computing, which mainly involves the acquisition of context information, the fusion of context information, and the processing of context information [29, 30]. According to the process of context-aware computing, we draw it into a frame diagram as shown in Figure 3.Figure 3
Context-aware computing framework diagram.The key to context-aware computing lies in a process of fusion of contextual information. A common context fusion method is Bayesian estimation. The algorithm steps are as follows:Step 1. Set A1,A2……,An to represent n mutually incompatible exhaustive hypotheses, M to represent an event; then, the Bayesian formula is(1)PAiM=PM/AiPAi∑j=1nPM/AjPAj,∑i=1nPAi=1,∑i=1nPMAiPAi=∑i=1nPM,Ai=PM.Among them,PAi represents the occurrence of the event, and A1,A2,……,An represent the possibility of the occurrence of the event.Step 2. In the intelligent interactive environment of the Internet of Things, the contextual data is fused. Assuming there are n sensors, there are m targets to be identified; that is, there are mofAii=1,2,……,m. First classify the collected data information to obtain each target attribute M1,M2,……,Mn; then calculate the likelihood function of each sensor’s description under the condition that the hypothesis is true, and then use the Bayes formula to calculate the posterior probability of each hypothesis, and finally get data integration. The likelihood function of the context data is(2)PM1,M2,……,MnAj=PM1AjPM2Aj……PMnAj.Then, use the Bayes formula to get the posterior probability of the hypothesis under the evidence condition(3)PAjM1,M2,……,Mn=PM1,M2,……,Mn/AjPAjPM1,M2,……,Mn.Step 3. Set(4)AjM1,M2,……,Mn=max1≤j≤mPAjM1,M2,……,Mn.Step 4. The final judgment result, the data fusion, if formula (5) is satisfied, the judgment is accepted; otherwise, the judgment is rejected.(5)PAjM1,M2,……,Mn≥P0.


## 2.1. IoT Smart Environment

Following the Internet, the Internet of Things has emerged. The Internet of Things is a new type of science and technology based on the Internet. It can realize the interconnection between “things and things” through the use of various physical devices. The connection process is completely composed of computer networks and objects are completed separately, without manual participation and operation. All data uploads rely on equipment. Data processing is also handled automatically by the IOT cloud platform, and the final instructions are also executed by the hardware. The advancement of IOT technology unites Earth as a whole, truly realizes global intelligence, and puts people in an intelligent environment [3, 4].


### 2.1.1. Internet of Things Equipment

Due to the complexity of the Internet of Things system, it is associated with a number of technical disciplines, so its equipment types are also diverse, including sensors, routers, smart terminals, and various components, which are specifically divided into the following types.First, sensing equipment: the initial end of the IOT system is the sensing device that can collect relevant data information, including smart objects, smart sensors, new sensors, and wireless sensors; second, identifying the equipment: for example, intelligent mobile tags, ultra-low-energy RFID tags, RFID tags that support privacy data protection, and so on; third, storage devices, such as computers, controllers, memory, and ultra-low-power chips, etc.; fourth, terminal equipment, such as smartphones, tablets, computers, and so on; and fifth, network equipment, for example, adaptive chips, network devices with adaptive and self-organizing capabilities, and so on [5, 6].


### 2.1.2. Basic Characteristics of the Internet of Things

(1) Fully automatic and intelligent: The Internet of Things system can mine and analyze massive amounts of data by using various intelligent computing technologies, data mining technologies, and other computing methods to realize intelligent control of objects.(2) Not limited by time and space: after the Internet of Things connects objects and networks, comprehensive interconnection and control can be realized. By using various communication networks, reliable information interaction and sharing of objects and objects can be realized anytime and anywhere [7, 8].(3) All-round perception of information: The Internet of Things system has a powerful information perception function and can effectively capture and collect various information of objects by using various perception devices [9, 10].


### 2.1.3. The Network Architecture of the Internet of Things

The network architecture of the Internet of Things is mainly divided into three levels: perception layer, network layer, and application layer. First, the object data information is sensed and collected through the sensing device and then transmitted from the sensing layer to the gateway. The gateway analyzes and organizes the data and uploads it to the computer network. The user obtains the information feedback from the network and can be applied [11, 12]. The network architecture diagram of the Internet of Things is shown in Figure 1.Figure 1
Network architecture model of the Internet of Things.(1) The Perception Layer. The perception layer is also called the information collection layer, including various sensors and routers and other perception devices, which mainly complete data collection and short-distance transmission.(2) The Network Layer. The network layer is also called the network upload layer, including the gateway and the network. The gateway is responsible for receiving the collected data and information, sorting and analyzing it, and then transmitting it to the computer network, which uploads the information to the resource pool of the cloud platform for sharing.(3) The Application Layer. The application layer connects the network and users, combines perception information with requirements and application characteristics, analyzes and processes sensor information, and provides services according to user needs [13, 14].


## 2.1.1. Internet of Things Equipment

Due to the complexity of the Internet of Things system, it is associated with a number of technical disciplines, so its equipment types are also diverse, including sensors, routers, smart terminals, and various components, which are specifically divided into the following types.First, sensing equipment: the initial end of the IOT system is the sensing device that can collect relevant data information, including smart objects, smart sensors, new sensors, and wireless sensors; second, identifying the equipment: for example, intelligent mobile tags, ultra-low-energy RFID tags, RFID tags that support privacy data protection, and so on; third, storage devices, such as computers, controllers, memory, and ultra-low-power chips, etc.; fourth, terminal equipment, such as smartphones, tablets, computers, and so on; and fifth, network equipment, for example, adaptive chips, network devices with adaptive and self-organizing capabilities, and so on [5, 6].


## 2.1.2. Basic Characteristics of the Internet of Things

(1) Fully automatic and intelligent: The Internet of Things system can mine and analyze massive amounts of data by using various intelligent computing technologies, data mining technologies, and other computing methods to realize intelligent control of objects.(2) Not limited by time and space: after the Internet of Things connects objects and networks, comprehensive interconnection and control can be realized. By using various communication networks, reliable information interaction and sharing of objects and objects can be realized anytime and anywhere [7, 8].(3) All-round perception of information: The Internet of Things system has a powerful information perception function and can effectively capture and collect various information of objects by using various perception devices [9, 10].


## 2.1.3. The Network Architecture of the Internet of Things

The network architecture of the Internet of Things is mainly divided into three levels: perception layer, network layer, and application layer. First, the object data information is sensed and collected through the sensing device and then transmitted from the sensing layer to the gateway. The gateway analyzes and organizes the data and uploads it to the computer network. The user obtains the information feedback from the network and can be applied [11, 12]. The network architecture diagram of the Internet of Things is shown in Figure 1.Figure 1
Network architecture model of the Internet of Things.(1) The Perception Layer. The perception layer is also called the information collection layer, including various sensors and routers and other perception devices, which mainly complete data collection and short-distance transmission.(2) The Network Layer. The network layer is also called the network upload layer, including the gateway and the network. The gateway is responsible for receiving the collected data and information, sorting and analyzing it, and then transmitting it to the computer network, which uploads the information to the resource pool of the cloud platform for sharing.(3) The Application Layer. The application layer connects the network and users, combines perception information with requirements and application characteristics, analyzes and processes sensor information, and provides services according to user needs [13, 14].


## 2.2. Intelligent Interactive Technology

### 2.2.1. Intelligent Interaction

Intelligent interaction is generated on the basis of the development of the Internet of Things. The effective connection between things and things and between people and things is realized through the Internet of Things system. The computer network system can obtain some behavioral preferences of people through data analysis and calculation. This independence provides users with personalized services and realizes the dynamic communication process between man and machine. This is the intelligent interaction between man and machine. With the further development and popularization of the Internet of Things, this kind of intelligent interaction will spread throughout the entire human space. It breaks the boundaries between virtual and reality, turning data into timely and useful information, allowing users to fully enjoy the virtual and real-world various resources [15, 16].


### 2.2.2. Interactive Mode

Recently, the popular Internet of Things technology has made the phenomenon of human-computer interaction more and more common. Multiple small and cheap Internet of Things devices are widely distributed in people’s daily life. These physical machines and devices serve users through interconnection. This interactive mode makes computer equipment no longer rely on command lines or graphical interfaces for human-computer interaction. It can interact with users in a more natural and invisible way [17, 18]. Multimodal interaction is that people communicate with computers through voice, body language, and various information carriers, including text, pictures, and video and audio, fully simulating the way of interaction between people [19, 20].


### 2.2.3. Intelligent Interactive System

Human-computer interaction technology is a form of technology that realizes dialogue between humans and computers in an effective manner through computer input and output devices. It includes machines providing information to people through output or display devices, and people inputting information to machines through input devices. It is an important part of computer and Internet of Things technology. Virtual reality technology is a typical human-machine intelligent interaction. Through the connection of the network, direct dialogue between machines and humans can be realized, which greatly enhances the user’s experience [3, 21]. However, in the traditional human-machine system, people are regarded as the operators of the system, and they only operate the machines without real interaction. Only today with the advanced Internet of Things technology can human-machine interaction be truly realized. The human-computer intelligent interaction system is shown in Figure 2. In this system, people and things are the two main application subjects, interacting with computer machines. In view of the shortcomings of traditional human-computer interaction systems, the intelligent interaction system constructed in this paper is an interaction system based on context awareness [22].Figure 2
Intelligent interactive system architecture.


## 2.2.1. Intelligent Interaction

Intelligent interaction is generated on the basis of the development of the Internet of Things. The effective connection between things and things and between people and things is realized through the Internet of Things system. The computer network system can obtain some behavioral preferences of people through data analysis and calculation. This independence provides users with personalized services and realizes the dynamic communication process between man and machine. This is the intelligent interaction between man and machine. With the further development and popularization of the Internet of Things, this kind of intelligent interaction will spread throughout the entire human space. It breaks the boundaries between virtual and reality, turning data into timely and useful information, allowing users to fully enjoy the virtual and real-world various resources [15, 16].


## 2.2.2. Interactive Mode

Recently, the popular Internet of Things technology has made the phenomenon of human-computer interaction more and more common. Multiple small and cheap Internet of Things devices are widely distributed in people’s daily life. These physical machines and devices serve users through interconnection. This interactive mode makes computer equipment no longer rely on command lines or graphical interfaces for human-computer interaction. It can interact with users in a more natural and invisible way [17, 18]. Multimodal interaction is that people communicate with computers through voice, body language, and various information carriers, including text, pictures, and video and audio, fully simulating the way of interaction between people [19, 20].


## 2.2.3. Intelligent Interactive System

Human-computer interaction technology is a form of technology that realizes dialogue between humans and computers in an effective manner through computer input and output devices. It includes machines providing information to people through output or display devices, and people inputting information to machines through input devices. It is an important part of computer and Internet of Things technology. Virtual reality technology is a typical human-machine intelligent interaction. Through the connection of the network, direct dialogue between machines and humans can be realized, which greatly enhances the user’s experience [3, 21]. However, in the traditional human-machine system, people are regarded as the operators of the system, and they only operate the machines without real interaction. Only today with the advanced Internet of Things technology can human-machine interaction be truly realized. The human-computer intelligent interaction system is shown in Figure 2. In this system, people and things are the two main application subjects, interacting with computer machines. In view of the shortcomings of traditional human-computer interaction systems, the intelligent interaction system constructed in this paper is an interaction system based on context awareness [22].Figure 2
Intelligent interactive system architecture.


## 2.3. Context Awareness Service

### 2.3.1. Situation

In Chinese, according to the modern Chinese dictionary, “situation” is translated as “situation, situation,” and English to Chinese is literally translated as “context, environment.” From the two, the specific connotation of the word situation can be extracted, that is, with the specified thing subjective and objective environment are closely related. Context can be used to reflect any information of the environment. It includes any person, time, and location related to human-computer interaction including humans and machines and equipment and mainly reflects the actual situation of the environment [23].


### 2.3.2. Situational Factors

Context is a collection of multiple pieces of information and contains a lot of information. Therefore, its influencing factors are also various. According to different information content, the types of context factors are also different. The classification of context factors ultimately determines the value range of its functions realization. We divide the situational factors into the following categories:(1) The user context: the user context is based on the Internet of Things users, including the attributes, living habits, and behavior habits of the users. The users here include both individual users and group users. (2) The environmental situation: environmental context refers to the natural or social environment formed by subjective and objective conditions. It includes all physical environments such as time, place, wind, light, and water, as well as social and cultural environments such as humanities, history, ethnic religions, and customs. (3) The task context: the task context is specific to the human-computer interaction process, which refers to the task conditions generated by equipment or technical services in the human-computer interaction process [24, 25].


### 2.3.3. Situational Awareness

Contextual awareness is an intelligent service provided by intelligent computer systems for the Internet of Things users. It can collect and analyze users’ behavior preferences through the system and independently push information that may be of interest to users. It is a personalized service method. Today, with the rapid development of mobile computing and big data computing, contextual awareness is being applied to the details of every human-computer interaction, using contextual awareness to provide devices with as accurate and effective contextual information as possible, and to provide timely and accurate task feedback. At present, people’s research on situational perception has changed from a simple device implantation to a process that emphasizes the perception, response, and feedback of computer software systems to the user’s environment [26, 27]. The situational awareness system is based on the user’s task and uses various computing methods to realize the system that the machine can autonomously perceive the user’s environment and can provide the user with relevant information and services [28].


### 2.3.4. Context-Aware Methods

Context awareness is a common pervasive computing method. In the Internet of Things environment, humans and machines are constantly interacting transparently. In the connection, the machine can meet the needs of users to process data. The information that informs the user of the type of service used is identification, which is the process by which the machine collects and analyzes the user’s preferences through the abovementioned methods. Context awareness is an important technology of pervasive computing, which mainly involves the acquisition of context information, the fusion of context information, and the processing of context information [29, 30]. According to the process of context-aware computing, we draw it into a frame diagram as shown in Figure 3.Figure 3
Context-aware computing framework diagram.The key to context-aware computing lies in a process of fusion of contextual information. A common context fusion method is Bayesian estimation. The algorithm steps are as follows:Step 1. Set A1,A2……,An to represent n mutually incompatible exhaustive hypotheses, M to represent an event; then, the Bayesian formula is(1)PAiM=PM/AiPAi∑j=1nPM/AjPAj,∑i=1nPAi=1,∑i=1nPMAiPAi=∑i=1nPM,Ai=PM.Among them,PAi represents the occurrence of the event, and A1,A2,……,An represent the possibility of the occurrence of the event.Step 2. In the intelligent interactive environment of the Internet of Things, the contextual data is fused. Assuming there are n sensors, there are m targets to be identified; that is, there are mofAii=1,2,……,m. First classify the collected data information to obtain each target attribute M1,M2,……,Mn; then calculate the likelihood function of each sensor’s description under the condition that the hypothesis is true, and then use the Bayes formula to calculate the posterior probability of each hypothesis, and finally get data integration. The likelihood function of the context data is(2)PM1,M2,……,MnAj=PM1AjPM2Aj……PMnAj.Then, use the Bayes formula to get the posterior probability of the hypothesis under the evidence condition(3)PAjM1,M2,……,Mn=PM1,M2,……,Mn/AjPAjPM1,M2,……,Mn.Step 3. Set(4)AjM1,M2,……,Mn=max1≤j≤mPAjM1,M2,……,Mn.Step 4. The final judgment result, the data fusion, if formula (5) is satisfied, the judgment is accepted; otherwise, the judgment is rejected.(5)PAjM1,M2,……,Mn≥P0.


## 2.3.1. Situation

In Chinese, according to the modern Chinese dictionary, “situation” is translated as “situation, situation,” and English to Chinese is literally translated as “context, environment.” From the two, the specific connotation of the word situation can be extracted, that is, with the specified thing subjective and objective environment are closely related. Context can be used to reflect any information of the environment. It includes any person, time, and location related to human-computer interaction including humans and machines and equipment and mainly reflects the actual situation of the environment [23].


## 2.3.2. Situational Factors

Context is a collection of multiple pieces of information and contains a lot of information. Therefore, its influencing factors are also various. According to different information content, the types of context factors are also different. The classification of context factors ultimately determines the value range of its functions realization. We divide the situational factors into the following categories:(1) The user context: the user context is based on the Internet of Things users, including the attributes, living habits, and behavior habits of the users. The users here include both individual users and group users. (2) The environmental situation: environmental context refers to the natural or social environment formed by subjective and objective conditions. It includes all physical environments such as time, place, wind, light, and water, as well as social and cultural environments such as humanities, history, ethnic religions, and customs. (3) The task context: the task context is specific to the human-computer interaction process, which refers to the task conditions generated by equipment or technical services in the human-computer interaction process [24, 25].


## 2.3.3. Situational Awareness

Contextual awareness is an intelligent service provided by intelligent computer systems for the Internet of Things users. It can collect and analyze users’ behavior preferences through the system and independently push information that may be of interest to users. It is a personalized service method. Today, with the rapid development of mobile computing and big data computing, contextual awareness is being applied to the details of every human-computer interaction, using contextual awareness to provide devices with as accurate and effective contextual information as possible, and to provide timely and accurate task feedback. At present, people’s research on situational perception has changed from a simple device implantation to a process that emphasizes the perception, response, and feedback of computer software systems to the user’s environment [26, 27]. The situational awareness system is based on the user’s task and uses various computing methods to realize the system that the machine can autonomously perceive the user’s environment and can provide the user with relevant information and services [28].


## 2.3.4. Context-Aware Methods

Context awareness is a common pervasive computing method. In the Internet of Things environment, humans and machines are constantly interacting transparently. In the connection, the machine can meet the needs of users to process data. The information that informs the user of the type of service used is identification, which is the process by which the machine collects and analyzes the user’s preferences through the abovementioned methods. Context awareness is an important technology of pervasive computing, which mainly involves the acquisition of context information, the fusion of context information, and the processing of context information [29, 30]. According to the process of context-aware computing, we draw it into a frame diagram as shown in Figure 3.Figure 3
Context-aware computing framework diagram.The key to context-aware computing lies in a process of fusion of contextual information. A common context fusion method is Bayesian estimation. The algorithm steps are as follows:Step 1. Set A1,A2……,An to represent n mutually incompatible exhaustive hypotheses, M to represent an event; then, the Bayesian formula is(1)PAiM=PM/AiPAi∑j=1nPM/AjPAj,∑i=1nPAi=1,∑i=1nPMAiPAi=∑i=1nPM,Ai=PM.Among them,PAi represents the occurrence of the event, and A1,A2,……,An represent the possibility of the occurrence of the event.Step 2. In the intelligent interactive environment of the Internet of Things, the contextual data is fused. Assuming there are n sensors, there are m targets to be identified; that is, there are mofAii=1,2,……,m. First classify the collected data information to obtain each target attribute M1,M2,……,Mn; then calculate the likelihood function of each sensor’s description under the condition that the hypothesis is true, and then use the Bayes formula to calculate the posterior probability of each hypothesis, and finally get data integration. The likelihood function of the context data is(2)PM1,M2,……,MnAj=PM1AjPM2Aj……PMnAj.Then, use the Bayes formula to get the posterior probability of the hypothesis under the evidence condition(3)PAjM1,M2,……,Mn=PM1,M2,……,Mn/AjPAjPM1,M2,……,Mn.Step 3. Set(4)AjM1,M2,……,Mn=max1≤j≤mPAjM1,M2,……,Mn.Step 4. The final judgment result, the data fusion, if formula (5) is satisfied, the judgment is accepted; otherwise, the judgment is rejected.(5)PAjM1,M2,……,Mn≥P0.


## 3. Construction of Context-Aware Service System Based on User Interaction Modalities of the Internet of Things

The context-aware service system proposed in this paper is mainly used for various auxiliary services in various intelligent environments. The relevant information provided through the computer network, such as user identity, software to be used, service request, etc., can be based on the user’s interactive characteristics and the device resources at the location provide the user with the services they need. According to the foregoing, we consider three factors that affect the context when constructing the context-aware service system, namely, user context, environmental context, and task context.


### 3.1. Selected Context-Aware Service Model

The design and construction of the service system according to the situation cannot be separated from the logical structure model of good service. The latter can actively provide services suitable for the system according to the current status of the system. In this article, we propose a logical modeling method for Petri net services to build a service system suitable for higher-performance situations. In the ubiquitous computing environment, the context-aware service system will be in a dynamically changing operating environment, and the context will also be constantly changing. It will be very effective to use Petri nets to describe and simulate the operation of the system.


### 3.2. Model Calculation Method

Step 1. Express the device context resource where the user is in a vector as Ci=Pi1,Pi2,……,Pin, which means it is the attribute value of the n context resources of the i user, and use the cosine similarity method to calculate the similarity between vectors Ci an Cj. The formula is as follows:(6)simCi,Cj=∑k=1nPkCi∗PkCj∑k=1nPk2Ci∑k=1nPk2Cj.Mapping formula (6) into matrix style, we get(7)Similarity=S11S12…S1nS21S22…S2n…………Sn1Sn2…Snn.Step 2. Create the fuzzy equivalence relation of the situational information, according to the formula (8), perform the fuzzy conversion of the formula (7), and finally obtain the fuzzy equivalence relation matrix.(8)rij=maxkminsimilarity1ik,similarity2ik,(9)R=r11r12…r1nr21r22…r2n…………rn1rn2…rnn.In the formula,R is fuzzy equivalence relation, RCi,Cj=rij.


### 3.3. Construction of Context-Aware Service System

According to the above calculation method, the modeling process of the system is as follows.


#### 3.3.1. Split User Needs

Divide the context-aware service process into several service scenarios, complete the modeling of the service scenarios, transform the relationship between the various service scenarios, determine the services that may be required by each service scenario, perform preliminary service modeling, and complete the scenarios mapping conversion.


#### 3.3.2. Perception and Collection of Contextual Information

By interacting with the operating equipment where the user is located, the user’s situational awareness service needs are obtained.


#### 3.3.3. Identify Each Service Scenario

According to the collected context information, each service scene is split, appropriate context information values are set, different scenes are identified, and context information modeling is completed. After that, according to the conditions of the context conversion, the context and the event are mapped to each other to complete the modeling of the context event. Select the appropriate sensor for each situational event to collect data information of different situational scenarios, and complete the conversion from language to data.


#### 3.3.4. Discover the Connection between Context and Service

The context-aware service system is to use intelligent computers to infer the behavior and purpose of users, analyze users’ behavior preferences, and actively provide users with relevant information and services based on the analysis results. This is based on the services required by unknown users. The user clearly points out the services that need to be provided for each scenario in the context-aware service, and then the connection between the context and the service can be directly established to complete the user’s perception service.


#### 3.3.5. Service Module Settings

According to the user’s service needs, set up various service modules that may be needed in the system interface, including the way the user receives services from the service system. In the context-aware service, the system can automatically mobilize the interface form of the service, and the user needs to select or set the display mode of the network service output information.


#### 3.3.6. Realization of Context-Aware Service System

The situational awareness service system completes the realization of the service platform through a series of layouts. The platform is directly associated with users. First, the system’s sensor equipment collects IoT environmental data, and then the collected data information is converted into situational information and changes according to constraints as a situational event, the situational awareness service system platform judges the user’s service scene based on the situational event and independently discovers and provides the service required by the user according to the characteristics of the service scene. Finally, this service is presented to the user in the form of platform service display.


## 3.1. Selected Context-Aware Service Model

The design and construction of the service system according to the situation cannot be separated from the logical structure model of good service. The latter can actively provide services suitable for the system according to the current status of the system. In this article, we propose a logical modeling method for Petri net services to build a service system suitable for higher-performance situations. In the ubiquitous computing environment, the context-aware service system will be in a dynamically changing operating environment, and the context will also be constantly changing. It will be very effective to use Petri nets to describe and simulate the operation of the system.


## 3.2. Model Calculation Method

Step 1. Express the device context resource where the user is in a vector as Ci=Pi1,Pi2,……,Pin, which means it is the attribute value of the n context resources of the i user, and use the cosine similarity method to calculate the similarity between vectors Ci an Cj. The formula is as follows:(6)simCi,Cj=∑k=1nPkCi∗PkCj∑k=1nPk2Ci∑k=1nPk2Cj.Mapping formula (6) into matrix style, we get(7)Similarity=S11S12…S1nS21S22…S2n…………Sn1Sn2…Snn.Step 2. Create the fuzzy equivalence relation of the situational information, according to the formula (8), perform the fuzzy conversion of the formula (7), and finally obtain the fuzzy equivalence relation matrix.(8)rij=maxkminsimilarity1ik,similarity2ik,(9)R=r11r12…r1nr21r22…r2n…………rn1rn2…rnn.In the formula,R is fuzzy equivalence relation, RCi,Cj=rij.


## 3.3. Construction of Context-Aware Service System

According to the above calculation method, the modeling process of the system is as follows.


### 3.3.1. Split User Needs

Divide the context-aware service process into several service scenarios, complete the modeling of the service scenarios, transform the relationship between the various service scenarios, determine the services that may be required by each service scenario, perform preliminary service modeling, and complete the scenarios mapping conversion.


### 3.3.2. Perception and Collection of Contextual Information

By interacting with the operating equipment where the user is located, the user’s situational awareness service needs are obtained.


### 3.3.3. Identify Each Service Scenario

According to the collected context information, each service scene is split, appropriate context information values are set, different scenes are identified, and context information modeling is completed. After that, according to the conditions of the context conversion, the context and the event are mapped to each other to complete the modeling of the context event. Select the appropriate sensor for each situational event to collect data information of different situational scenarios, and complete the conversion from language to data.


### 3.3.4. Discover the Connection between Context and Service

The context-aware service system is to use intelligent computers to infer the behavior and purpose of users, analyze users’ behavior preferences, and actively provide users with relevant information and services based on the analysis results. This is based on the services required by unknown users. The user clearly points out the services that need to be provided for each scenario in the context-aware service, and then the connection between the context and the service can be directly established to complete the user’s perception service.


### 3.3.5. Service Module Settings

According to the user’s service needs, set up various service modules that may be needed in the system interface, including the way the user receives services from the service system. In the context-aware service, the system can automatically mobilize the interface form of the service, and the user needs to select or set the display mode of the network service output information.


### 3.3.6. Realization of Context-Aware Service System

The situational awareness service system completes the realization of the service platform through a series of layouts. The platform is directly associated with users. First, the system’s sensor equipment collects IoT environmental data, and then the collected data information is converted into situational information and changes according to constraints as a situational event, the situational awareness service system platform judges the user’s service scene based on the situational event and independently discovers and provides the service required by the user according to the characteristics of the service scene. Finally, this service is presented to the user in the form of platform service display.


## 3.3.1. Split User Needs

Divide the context-aware service process into several service scenarios, complete the modeling of the service scenarios, transform the relationship between the various service scenarios, determine the services that may be required by each service scenario, perform preliminary service modeling, and complete the scenarios mapping conversion.


## 3.3.2. Perception and Collection of Contextual Information

By interacting with the operating equipment where the user is located, the user’s situational awareness service needs are obtained.


## 3.3.3. Identify Each Service Scenario

According to the collected context information, each service scene is split, appropriate context information values are set, different scenes are identified, and context information modeling is completed. After that, according to the conditions of the context conversion, the context and the event are mapped to each other to complete the modeling of the context event. Select the appropriate sensor for each situational event to collect data information of different situational scenarios, and complete the conversion from language to data.


## 3.3.4. Discover the Connection between Context and Service

The context-aware service system is to use intelligent computers to infer the behavior and purpose of users, analyze users’ behavior preferences, and actively provide users with relevant information and services based on the analysis results. This is based on the services required by unknown users. The user clearly points out the services that need to be provided for each scenario in the context-aware service, and then the connection between the context and the service can be directly established to complete the user’s perception service.


## 3.3.5. Service Module Settings

According to the user’s service needs, set up various service modules that may be needed in the system interface, including the way the user receives services from the service system. In the context-aware service, the system can automatically mobilize the interface form of the service, and the user needs to select or set the display mode of the network service output information.


## 3.3.6. Realization of Context-Aware Service System

The situational awareness service system completes the realization of the service platform through a series of layouts. The platform is directly associated with users. First, the system’s sensor equipment collects IoT environmental data, and then the collected data information is converted into situational information and changes according to constraints as a situational event, the situational awareness service system platform judges the user’s service scene based on the situational event and independently discovers and provides the service required by the user according to the characteristics of the service scene. Finally, this service is presented to the user in the form of platform service display.


## 4. Application and Realization of Context-Aware Service System Based on User Interaction Modalities of the Internet of Things

In order to test the performance effects of the context-aware service system based on the Internet of Things user interaction modalities designed in this paper, we take the home services of the elderly as an example and obtain various services of the elderly by placing monitoring sensors in the home environment demand. Sensors include temperature and humidity sensors, light sensors, water sensors, and smart bracelets. Combine the Internet of Things equipment with the situational awareness service system to complete the collection and processing of related data. Extract the needed situational information from the home care situation model, including the behavior of the elderly, their location, time, and the temperature and humidity of the environment, to obtain the needs of the elderly in the situation.


### 4.1. Home Behavior of the Elderly

In the process of home care for the elderly, their behaviors and activities are various, such as general daily activities such as brushing their teeth, washing their faces, combing their hair, and so on. According to the basic activities of the elderly at home, we summarize them into several types as shown in Table1.Table 1
Basic behaviors of the elderly at home.
Basic types of activities for the elderlyBehavioral characteristics of the elderlyWashBrush teeth, wash face, and comb hairCookWash vegetables, stir-fry, serve dishes, serve riceEatPick up vegetables, eat with chopsticks, drink soup with a spoon, drink waterMobileTake a walk, practice Tai Chi, sit down, lie down, get upCallTake and call phoneIt can be seen from Table1 that the daily home behaviors and activities of the elderly cannot be directly sensed by sensors. Therefore, we need to reason about them based on the data collected by the sensor equipment. In the recognition of the behavior of the elderly at home, it is possible to obtain a more accurate recognition by choosing an appropriate calculation method. Here we use the random forest algorithm and the two-layer behavior recognition algorithm to calculate and identify the elderly’s home care behavior so that the situational awareness service system can provide more accurate demand services for the elderly.


### 4.2. Comparative Analysis of Performance of Elderly Service Demand Reasoning Algorithms

After using the random forest algorithm and the two-layer behavior recognition algorithm to perform preliminary calculations on the data, we need to further perform inference calculations on the data. Taking 28-day behavioral data of elderly care for the elderly at home as sample data, the behavior characteristics of the elderly are simulated and the service needs of the elderly may be inferred. For the 28-day behavior data of the elderly in this simulation, after preliminary calculations, we get about 50,000 data results, including 178 getting up scenes, 169 washing scenes, 157 grocery shopping scenes, and cooking scenes. The number is 164, the number of eating scenes is 187, the number of drinking scenes is 185, the number of walking scenes is 124, the number of sleeping scenes is 164, the number of resting scenes is 136, and the number of falling scenes is 61. Divide all the scenes into four categories, record 7-day data as data set 1, 14-day data as data set 2, 21-day data as data set 3, and 28-day data as data set 4. Here we use rule pruning and enhanced evidence theory service demand reasoning algorithms to reason about data and compare the performance effects of different algorithms.


#### 4.2.1. Performance Analysis of Service Demand Reasoning Algorithm Based on Rule Pruning

The service requirement reasoning algorithm based on rule pruning can greatly reduce the calculation time of the algorithm and improve the operating efficiency of the algorithm. We will use the service requirement reasoning algorithm based on rule pruning and the order matching algorithm without rule pruning to perform the algorithm performance comparison; comparing the running time and accuracy of the two algorithms, the results are shown in Figures4 and 5, where A1–A10 represent the calculation accuracy of each scene number.Figure 4
Performance of service demand reasoning algorithm based on rule pruning.Figure 5
Sequence matching algorithm performance without rule pruning.It can be seen from Figures4 and 5 that the calculation time and accuracy of the service demand reasoning algorithm based on rule pruning and the order matching algorithm without pruning are basically the same, but because the calculation accuracy is easily affected by the number of rules. The more the number of rules, the higher the accuracy of the algorithm’s reasoning. Therefore, we conclude that the service demand reasoning algorithm based on rule pruning has better computational performance. The algorithm can quickly infer the service demand of the elderly. On the one hand, it can provide better services to the elderly. On the other hand, if an emergency occurs, the algorithm can also detect in time, which can better protect the health and safety of the elderly.


#### 4.2.2. Performance Analysis of Service Demand Reasoning Algorithm Based on Enhanced Evidence Theory

To prove the impact of different numbers of evidence on the performance of the evidence theory demand reasoning algorithm, we first combine different data sets into different models. According to the above, there are four models, namely, data set 1, data set 2, data set 3 and data set 4. Carry on algorithmic reasoning according to different combinations, and the results are shown in Figures6 and 7.Figure 6
Calculation accuracy of evidence theory.Figure 7
Calculation time of evidence theory.It can be seen from Figure6 that when a single piece of evidence is used for reasoning, the highest accuracy rate of the behavior inferred by the algorithm is only 0.73, most of which can infer the needs of the elderly, but when the elderly sit or lie down, it is impossible to accurately reason out its needs when inferring the position and time of the elderly; the accuracy rate of reasoning about the location and time of the elderly is basically the same but less than half of the rate; when two or more pieces of evidence are used for reasoning, the accuracy of each type of reasoning is higher, and the accuracy of behavior and location, behavior and time, location and time, and behavior and location and time are all above 0.8; the accuracy rate of behavior, location, and time is the highest; in the 4 rule categories, they reached 0.98, 0.97, 0.98, and 0.97; when using enhanced evidence theory for reasoning, the accuracy rate was further improved, reaching a maximum of 0.99. It can be seen from Figure 7 that as the number of calculation evidence increases, the calculation time also increases. On the basis of evidence theory, using the method of evidence selection to reason about the elderly’s home behavior can better judge the service needs of the elderly, which proves the accuracy and timeliness of the algorithm.


## 4.1. Home Behavior of the Elderly

In the process of home care for the elderly, their behaviors and activities are various, such as general daily activities such as brushing their teeth, washing their faces, combing their hair, and so on. According to the basic activities of the elderly at home, we summarize them into several types as shown in Table1.Table 1
Basic behaviors of the elderly at home.
Basic types of activities for the elderlyBehavioral characteristics of the elderlyWashBrush teeth, wash face, and comb hairCookWash vegetables, stir-fry, serve dishes, serve riceEatPick up vegetables, eat with chopsticks, drink soup with a spoon, drink waterMobileTake a walk, practice Tai Chi, sit down, lie down, get upCallTake and call phoneIt can be seen from Table1 that the daily home behaviors and activities of the elderly cannot be directly sensed by sensors. Therefore, we need to reason about them based on the data collected by the sensor equipment. In the recognition of the behavior of the elderly at home, it is possible to obtain a more accurate recognition by choosing an appropriate calculation method. Here we use the random forest algorithm and the two-layer behavior recognition algorithm to calculate and identify the elderly’s home care behavior so that the situational awareness service system can provide more accurate demand services for the elderly.


## 4.2. Comparative Analysis of Performance of Elderly Service Demand Reasoning Algorithms

After using the random forest algorithm and the two-layer behavior recognition algorithm to perform preliminary calculations on the data, we need to further perform inference calculations on the data. Taking 28-day behavioral data of elderly care for the elderly at home as sample data, the behavior characteristics of the elderly are simulated and the service needs of the elderly may be inferred. For the 28-day behavior data of the elderly in this simulation, after preliminary calculations, we get about 50,000 data results, including 178 getting up scenes, 169 washing scenes, 157 grocery shopping scenes, and cooking scenes. The number is 164, the number of eating scenes is 187, the number of drinking scenes is 185, the number of walking scenes is 124, the number of sleeping scenes is 164, the number of resting scenes is 136, and the number of falling scenes is 61. Divide all the scenes into four categories, record 7-day data as data set 1, 14-day data as data set 2, 21-day data as data set 3, and 28-day data as data set 4. Here we use rule pruning and enhanced evidence theory service demand reasoning algorithms to reason about data and compare the performance effects of different algorithms.


### 4.2.1. Performance Analysis of Service Demand Reasoning Algorithm Based on Rule Pruning

The service requirement reasoning algorithm based on rule pruning can greatly reduce the calculation time of the algorithm and improve the operating efficiency of the algorithm. We will use the service requirement reasoning algorithm based on rule pruning and the order matching algorithm without rule pruning to perform the algorithm performance comparison; comparing the running time and accuracy of the two algorithms, the results are shown in Figures4 and 5, where A1–A10 represent the calculation accuracy of each scene number.Figure 4
Performance of service demand reasoning algorithm based on rule pruning.Figure 5
Sequence matching algorithm performance without rule pruning.It can be seen from Figures4 and 5 that the calculation time and accuracy of the service demand reasoning algorithm based on rule pruning and the order matching algorithm without pruning are basically the same, but because the calculation accuracy is easily affected by the number of rules. The more the number of rules, the higher the accuracy of the algorithm’s reasoning. Therefore, we conclude that the service demand reasoning algorithm based on rule pruning has better computational performance. The algorithm can quickly infer the service demand of the elderly. On the one hand, it can provide better services to the elderly. On the other hand, if an emergency occurs, the algorithm can also detect in time, which can better protect the health and safety of the elderly.


### 4.2.2. Performance Analysis of Service Demand Reasoning Algorithm Based on Enhanced Evidence Theory

To prove the impact of different numbers of evidence on the performance of the evidence theory demand reasoning algorithm, we first combine different data sets into different models. According to the above, there are four models, namely, data set 1, data set 2, data set 3 and data set 4. Carry on algorithmic reasoning according to different combinations, and the results are shown in Figures6 and 7.Figure 6
Calculation accuracy of evidence theory.Figure 7
Calculation time of evidence theory.It can be seen from Figure6 that when a single piece of evidence is used for reasoning, the highest accuracy rate of the behavior inferred by the algorithm is only 0.73, most of which can infer the needs of the elderly, but when the elderly sit or lie down, it is impossible to accurately reason out its needs when inferring the position and time of the elderly; the accuracy rate of reasoning about the location and time of the elderly is basically the same but less than half of the rate; when two or more pieces of evidence are used for reasoning, the accuracy of each type of reasoning is higher, and the accuracy of behavior and location, behavior and time, location and time, and behavior and location and time are all above 0.8; the accuracy rate of behavior, location, and time is the highest; in the 4 rule categories, they reached 0.98, 0.97, 0.98, and 0.97; when using enhanced evidence theory for reasoning, the accuracy rate was further improved, reaching a maximum of 0.99. It can be seen from Figure 7 that as the number of calculation evidence increases, the calculation time also increases. On the basis of evidence theory, using the method of evidence selection to reason about the elderly’s home behavior can better judge the service needs of the elderly, which proves the accuracy and timeliness of the algorithm.


## 4.2.1. Performance Analysis of Service Demand Reasoning Algorithm Based on Rule Pruning

The service requirement reasoning algorithm based on rule pruning can greatly reduce the calculation time of the algorithm and improve the operating efficiency of the algorithm. We will use the service requirement reasoning algorithm based on rule pruning and the order matching algorithm without rule pruning to perform the algorithm performance comparison; comparing the running time and accuracy of the two algorithms, the results are shown in Figures4 and 5, where A1–A10 represent the calculation accuracy of each scene number.Figure 4
Performance of service demand reasoning algorithm based on rule pruning.Figure 5
Sequence matching algorithm performance without rule pruning.It can be seen from Figures4 and 5 that the calculation time and accuracy of the service demand reasoning algorithm based on rule pruning and the order matching algorithm without pruning are basically the same, but because the calculation accuracy is easily affected by the number of rules. The more the number of rules, the higher the accuracy of the algorithm’s reasoning. Therefore, we conclude that the service demand reasoning algorithm based on rule pruning has better computational performance. The algorithm can quickly infer the service demand of the elderly. On the one hand, it can provide better services to the elderly. On the other hand, if an emergency occurs, the algorithm can also detect in time, which can better protect the health and safety of the elderly.


## 4.2.2. Performance Analysis of Service Demand Reasoning Algorithm Based on Enhanced Evidence Theory

To prove the impact of different numbers of evidence on the performance of the evidence theory demand reasoning algorithm, we first combine different data sets into different models. According to the above, there are four models, namely, data set 1, data set 2, data set 3 and data set 4. Carry on algorithmic reasoning according to different combinations, and the results are shown in Figures6 and 7.Figure 6
Calculation accuracy of evidence theory.Figure 7
Calculation time of evidence theory.It can be seen from Figure6 that when a single piece of evidence is used for reasoning, the highest accuracy rate of the behavior inferred by the algorithm is only 0.73, most of which can infer the needs of the elderly, but when the elderly sit or lie down, it is impossible to accurately reason out its needs when inferring the position and time of the elderly; the accuracy rate of reasoning about the location and time of the elderly is basically the same but less than half of the rate; when two or more pieces of evidence are used for reasoning, the accuracy of each type of reasoning is higher, and the accuracy of behavior and location, behavior and time, location and time, and behavior and location and time are all above 0.8; the accuracy rate of behavior, location, and time is the highest; in the 4 rule categories, they reached 0.98, 0.97, 0.98, and 0.97; when using enhanced evidence theory for reasoning, the accuracy rate was further improved, reaching a maximum of 0.99. It can be seen from Figure 7 that as the number of calculation evidence increases, the calculation time also increases. On the basis of evidence theory, using the method of evidence selection to reason about the elderly’s home behavior can better judge the service needs of the elderly, which proves the accuracy and timeliness of the algorithm.


## 5. Conclusions

In the current era, all kinds of problems in society can be effectively solved through advanced science and technology. The development of the Internet of Things technology allows people to communicate between humans and machines. Through human-computer interaction, people can handle things and solve problems more conveniently.The Internet of Things platform not only satisfies the interaction between humans and machines, but also recognizes the user environment through system functions and uses a number of computational methods to analyze and implement the state of the user device. We respond to user requests and provide appropriate services.This research uses smart sensor technology, smart interaction technology, and context awareness methods to design a situational awareness service system based on the user interaction modality of the Internet of Things. By taking the elderly’s home care behavior as the research object, the performance effect of the system is tested. Finally, it is concluded that after optimizing the system structure using rule pruning demand reasoning algorithm and evidence theory algorithm, the service demand of the elderly can be better inferred. Since the situational awareness system designed in this study is a performance test based solely on the elderly’s home behavior data as sample data, it has certain limitations. Further research is needed to apply the system to other fields.



---

*Source: 2466032-2022-03-09.xml*