Impact of the Internet of Things on Psychology: A Survey

: The Internet of things (IoT) continues to “smartify” human life while inﬂuencing areas such as industry, education, economy, business, medicine, and psychology. The introduction of the IoT in psychology has resulted in various intelligent systems that aim to help people—particularly those with special needs, such as the elderly, disabled, and children. This paper proposes a framework to investigate the role and impact of the IoT in psychology from two perspectives: (1) the goals of using the IoT in this area, and (2) the computational technologies used towards this purpose. To this end, existing studies are reviewed from these viewpoints. The results show that the goals of using the IoT can be identiﬁed as morale improvement, diagnosis, and monitoring. Moreover, the main technical contributions of the related papers are system design, data mining, or hardware invention and signal processing. Subsequently, unique features of state-of-the-art research in this area are discussed, including the type and diversity of sensors, crowdsourcing, context awareness, fog and cloud platforms, and inference. Our concluding remarks indicate that this area is in its infancy and, consequently, the next steps of this research are discussed.


Introduction
With developments and advances in sensors, communication technologies, and embedded computers, smart objects (e.g., smartphones and smart devices) have become popular [1].There has been an increase in the interactions between smart objects and humans, which has resulted in the emergence of the Internet of things (IoT) [2].The Internet of things (IoT) is a network of smart things that can interact without human intervention [3].
Psychology is an important area of human life affected by the IoT.Inner peace has always been a human concern, for which the principles of psychology must be analyzed and practiced [42].Since there is a direct correlation between physical and mental health, many mental problems-such as depression, neurological disorders, and stress-negatively affect people's physical health [43].These problems also increase the chance of experiencing heart disease, strokes, and cancers."Psychology is the scientific study of behavior, experience, and mental processes in all living creatures" [44].According to statistics, people spend a considerable time on smart devices such as smartphones; hence, numerous IoT-related studies have been conducted in psychology.Indeed, IoT technology has come to the aid of psychologists in analyzing and resolving prominent psychological problems.A few review studies have addressed the IoT and psychology by focusing on equipment [45] and applications [2].To further investigate this interdisciplinary area, the goals of using the IoT in psychology, as well as the specific computing techniques used in the existing studies, must be taken into account.Hence, this paper investigates and classifies research on the IoT in psychology, with a focus on goals and computing methods.This review addresses the following questions: -What is the purpose of using the IoT in psychology-related papers?-What is the technical computing contribution of the papers?
For this purpose, "psychology + IoT", "mental + IoT", "emotion + IoT", and "psychiatry + IoT" were used as keywords to search for papers in the Web of Science, Scopus, and IEEE databases.The retrieved articles were then refined semantically, and each paper was assessed by two reviewers.Since the keyword search could result in non-relevant papers, the articles were reviewed semantically, and those not relevant to the topic were rejected.Figure 1 shows the procedure of selecting and reviewing the papers.After that, the confirmed papers were investigated from two perspectives: the goals of using the IoT, and the technical computing methods used.Regarding the first aspect, previous studies were classified as focused on morale improvement, diagnosis, and monitoring.The computing contributions included system design, data mining, and hardware design and signal processing.Subsequently, the key features of papers were investigated and discussed, including the diversity of sensors, crowdsourcing, context awareness, fog and cloud platforms, and inference.Finally, concluding remarks as well as the next steps for this research are provided.Although the use of the IoT to resolve common issues in psychology is in infancy, it could be valuable in addressing many traditional and new problems in this area.The contributions and novelties of the paper can be summarized as follows: -This is the first paper to investigate IoT-based systems in the domain of psychology from the perspectives of goals and technical computing methods.-It proposes and discusses the key features and challenging issues of using the IoT in psychology.
The rest of this paper consists of the following sections: Section 2 discusses the goals of exploiting IoT technologies in the existing papers.Technical and computing methods are investigated in Section 3, whereas Section 4 addresses new features of these studies.Finally, Section 5 presents the conclusions and next steps of this research.

Purpose
The introduction of the IoT in psychology can help promote mental health by providing certain advantages such as accelerating treatment procedures, reducing healthcare expenditure, and improving quality of life [46].Previous studies have sought to use the IoT for different purposes, such as morale improvement, diagnosis, and mental healthcare.Each of these goals plays a key role in ensuring a healthy society that is free of all forms of stress and mental-emotional disorders.In the following text, the goals are discussed in detail, and a summary is provided in Table 1.

Morale improvement:
The modern world has caused many stressors in people's lives.If individuals fail to manage stress and anxiety, they will soon lose the necessary concentration and energy for their daily routines, and will experience long-term difficulties in terms of both mental and physical health [47].The pressure from education [48], work [49], and even driving [50] can deprive humans of peace.Different studies have been conducted to improve people's moods through IoT mechanisms in order to help them to cope with mental tensions.
Homework assignments and exams can stress students out, which might result in academic failure.Conversely, studying and doing homework regularly can increase their peace of mind.Virtual Tutor [51] is a mobile application developed to alleviate students' stress and anxiety during exams and homework.Planning a curriculum, this application regularizes the academic affairs of students.It also makes some suggestions to prepare students to follow the planned curriculum, encourages them to continue on the path, and applauds them after they achieve specific goals.
In commuting by car, tardiness and the inability to inform others can stress passengers out.Traeddy [52] is a service that informs those waiting for a driver about possible delays on routes in order to relieve the driver's anxiety.This approach can increase the driver's peace of mind because those waiting will not be worried anymore.The Pen-Pen [53] project sends some notifications to passengers a few minutes before their arrival at a destination to prevent them from passing it for various reasons (e.g., oversleeping or distraction).This approach is useful and relaxing for passengers with low consciousness and who are susceptible to mental pressure.
Smart green space has now gained importance as a component of smart homes.In this regard, Smart Home 2 [54] aims to turn people's houses into relaxing environments by growing plants.The necessary care for the green space with respect to environmental factors (e.g., temperature, humidity, and illumination) is provided automatically and remotely.As a result, there is no worry about taking care of plants when the residents are resting or staying outside.
In today's complicated world, the majority of people neglect happiness and life satisfaction.The IAMHAPPY [55] project identifies people's current feelings and recommends a plan for their happiness and satisfaction.These recommendations are made in relation to people's feelings (for instance, if they are unhappy, they are advised to listen to music or eat chocolate).This can help people to live happily by boosting their happiness.
Autism spectrum disorder (ASD) is among the mental disorders with no definitive treatments [56].People with ASD are usually susceptible to sensory overload [57].In other words, one or more of their senses are overstimulated by the environment.The ACHI [58] project was developed to identify and control sensory overload stimulants, pacify patients with ASD, and guide caregivers and physicians.Special sensors (such as smelling sensors, cameras, and microphones) are used in a smart toy bag to collect data on a patient's environment.These data can help caregivers to become aware of a patient's environmental conditions.In the event of uncontrollable conditions or the absence of caregivers, automated pacification measures (such as playing music and showing videos) are carried out by the smart devices.The data can also be analyzed to help physicians make decisions on dedicated treatment procedures.
Diagnosis: The IoT has become significant in psychology through the use of various physiological and environmental devices and sensors to identify different parameters, such as feelings, personality traits, and mental disorders."Emotion is the name used to comprehend all that is understood by feelings, states of feeling, pleasures, pains, passions, sentiments, and affections" [59].The Web of Objects (WoO) [60] collects data on users' emotions-including physiological feelings (e.g., different kinds of gestures), textual feelings (e.g., Facebook posts, tweets, and messages), and social media messages (e.g., voices, images, and videos)-to detect emotions.After these data elements are analyzed, users' emotions are detected, and relevant services are activated.For instance, the TV plays family movies for a person away from their family.
Music is a universal language that positively affects stress alleviation, pacification, pain management, and cardiac function [61].While listening to music via the Smoodsically app [62], users' physiological responses such as muscular tension, skin temperature, and cardiorespiratory acceleration are recorded by biosensors (i.e., devices that measure users' physiological parameters) such as electrodermal activity (EDA) sensors and skin temperature sensors.These data elements are then stored and processed to determine the effects of music on the users' feelings.
"Personality is the set of psychological traits and mechanisms within the individual that are organized and relatively enduring and that influence his or her interactions with, and adaptations to, the intrapsychic, physical, and social environments" [63].Personality psychology [64] uses the messages and stickers sent by people on social networks (e.g., Facebook) and their online activities to detect their personality type.According to the results of the analysis, a person's character remains the same over time.In other words, an introvert will still be an introvert after 10 years.
Depression is prevalent and dangerous in the elderly, and can cause other diseases such as cancer if it is not treated promptly.In this regard, the authors of [65] proposed a depression monitoring system to diagnose depression in the elderly.Recording the daily activity patterns of the elderly, this system measures their depression level changes and identifies those in danger.This system has been able to identify more than 80% of cases correctly.Postpartum depression is also a prevalent mental disorder that can negatively affect mothers' and their children's behavioral, emotional, and cognitive development [66].The authors of [67] diagnosed postpartum depression by analyzing biomedical and sociodemographic data.
Evidently, mental health has significant effects on all aspects of work, education, and life.According to the World Health Organization, "Mental health is defined as a state of well-being in which every individual realizes his or her potential, can cope with the normal stresses of life, can work productively and fruitfully, and can contribute to her or his community" (https://www.who.int/mental_health/who_urges_investment/en/)(accessed date 15 February 2021).In this regard, the Social Sensing [68] project uses a wearable bracelet to evaluate users' mental health by collecting auditory, behavioral, and environmental data from morning to night over the course of a month.According to the results of the data analysis, there is a significant correlation between a person's physical state and their mental state.For instance, heart rate, tone of voice, and body temperature increase at times of anger.Data analysis can also help determine people's autism-spectrum quotient (AQ), referring to a person's intelligence in dealing with difficulties and problems, and producing positive outputs from negative inputs.
Autism spectrum disorder (ASD) is a neurological-developmental disorder affecting people's behavior and relationships.This condition is characterized by symptoms such as learning disability, bipolar disorder, anxiety disorder, and sensory problems.The IoT-BRB system [69] diagnoses the severity of ASD in children by analyzing the data collected from heart rate, electromyography (EMG), and microphone sensors.
Monitoring: It has always been important to monitor and take care of human health, on which various studies have been conducted, such as looking after patients [70], the elderly [71], and children [72].Given the effects of mental health on physical health, monitoring is important in psychology [73,74].Due to their daily hardships, people might not have the time to continuously attend to those who need mental health care.As a result, the IoT has been used to monitor and care for those in need.
In many educational institutions, senior students bully and harass junior ones, which can sometimes discourage newly admitted students.The term "ragging" refers to a series of coercive acts, including abusing, humiliating, or harassing the new students, on the part of the senior students [75].Anti-Ragging The mobile app [76] protects new and younger students from being bullied.When a student feels in danger, they can press the volume button.An online message containing the victim's position and identity will then be sent to the committee members.The victim's phone will also start recording audio.After that, the application identifies and asks the nearest committee member to come to the scene and save the victim.
Although many of the elderly suffer from mental and physical disorders, they often live alone [77].The SAHHc (Smart Architecture for In-Home Health Care) [78] monitors the elderly through cameras installed in different spots at their homes.Image processing is employed to detect different facial expressions, which are then used along with data collected from heart rate sensors and body temperature sensors to detect an individual's status.If the system determines that the individual is experiencing severe pain, their nurses or relatives will be notified.
Obstructive sleep apnea syndrome (OSAS) is one of the most dangerous and prevalent respiratory disorders, which can stop a person from breathing or reduce their breathing levels during sleep [79].This obstruction can emerge at any age; however, it is much more concerning for the elderly, who often have breathing complications at night [80].SA-IoTBigSys [81] was developed to monitor and help treat OSAS.For this purpose, data on the elderly's physical activities (i.e., daily routines such as walking duration or trips), sleep environment (i.e., bedroom temperature and humidity), sleep status (i.e., snoring and heart rate during sleep), and contextual information (e.g., weight, height, and body mass index (BMI)) are collected.After data processing, emergency conditions are identified.If these conditions (lack of oxygen, heart attack, etc.) are met, the patient's status information is sent to emergency wards, their family, and their physician.

SA-IoTBigSys
[81] LoRa [82,83] People with mental disorders often fail to recognize their surrounding conditions in public places.This can increase their chances of having accidents in the street or cause them to lose themselves [82,83].Using a tracking device attached to a patient with a mental disorder, LoRa [82,83] monitors and records their accurate positions.Moreover, when the patient leaves the monitored area, a notification is sent to their physician or caregiver so that the patient can be guided to a safe place.

IoT Technologies Used
Technically, the IoT includes a wide range of computational methods, such as data sensing, acquisition, and processing, system design, service provision, and network management.After reviewing the IoT-based studies in psychology, their technical contributions were classified into system design, data mining, and hardware categories.In this section, these technologies are reviewed in detail, and a summary is provided in Table 2.

IoT-BRB [69] Traeddy
[52] ACHI [58] Social Sensing [68] System design: "A system is a set of interconnected components that has an expected behavior observed at the interface with its environment [84]".A system design is intended to propose an architectural model for the system."Architectural models describe a system in terms of the computational and communication tasks performed by its computational elements; the computational elements are individual computers or aggregates of them supported by appropriate network interconnections [85]".
To analyze the system architecture, we should determine the system components, their relationships and interaction patterns, and their mapping to physical infrastructure.Technically, most of the previous IoT-based studies in psychology are classified in this category.In this regard, Virtual Tutor [51] and Pen-Pen [53] present standalone applications.IAMHAPPY [55] and WoO [60] have designed knowledge bases to identify and improve users' moods, respectively, through knowledge engineering.Other studies have designed systems with more than one tier.
In the Anti-Ragging app [76], a client-server system with a shared data architecture is proposed with two tiers (mobile and server) to help the victim student.The mobile tier includes an Android application installed on students' smartphones.The students enter their identity and other information when registering with the application.The data are then sent to the server and stored in the database.When a student pushes the volume button on their smartphone, their current location is tracked via GPS.Then, a message containing the victim's current location and identity information is sent to the server.Finally, the server sends a message to the cellphones of all committee members via the Firebase Cloud Messaging (FCM) (https://www.javatpoint.com/firebase-cloud-messaging)(accessed on 15 February 2021) service.The committee members will then be able to see the route to the victim on Google Maps [86].
Smoodsically [62] proposes a model-view-controller architecture consisting of sensors, a web application, and a server to detect people's feelings while listening to music.When the music is played, physiological parameters such as muscular tension, electrodermal activity, and skin temperature are recorded through sensors.Muscular tension is measured to record the contraction and expansion activities of muscles through an EMG sensor, whereas electrodermal activity is measured to record the body's perspiration through an EDA sensor.The collected data are then sent to the server for storage via the MQTT (http://mqtt.org/)protocol over a Wi-Fi connection.Users can then see their information in graphs via the web application.
Designed with a modular model, the LoRa [82,83] system proposes an architecture consisting of the tracking device, gateway, server, and application to track and monitor patients with mental disorders.The wearable tracking device uses an embedded GPS sensor to track the patient.The gateway is installed at hospitals and public places to cover a nearby monitoring area, where the data generated by the tracking device are sent to the server via gateways.The server is responsible for storing, processing, and visualizing information.Finally, the server sends the information to a physician's application in real time.There is also a map that shows the patient's last location.If the patient moves to a hazardous area or escapes, the physician can inform the authorities, such as the police.The physician can also access the patient's identity information and medical records via the application.
Using a layered model, SAHHc [78] proposes an architecture consisting of sensors, a local server, and a cloud to monitor and take care of the elderly at home.The sensor layer includes a camera, presence sensor, incident-aware sensors (INCASs), and some other sensors embedded in the elderly's smartwatches, including an accelerometer, gyroscope, and body temperature and heart rate sensors.A FaceTracker (https: //keentools.io/products/facetracker(accessed on 28 July 2022)) sensor is also employed to detect the elderly's faces.After the patient is identified, the resultant information is given to the local server, which processes the data according to the elderly healthcare protocol.If the server decides that the elderly require help, it sends relevant information on their health status to the smartphone of a nurse or a relative.The local server also monitors the house via motion, gas, humidity, and temperature sensors to detect potential accidents (e.g., fires).Finally, the cloud server is used to support the local server.
SA-IoTBigSys [81] was designed by leveraging a layered model to treat obstructive sleep apnea syndrome (OSAS).This system consists of data collection, fog, and cloud layers.In the data collection layer, data are collected from four different sources to monitor the patient's status.These sources are physical activity sensors (i.e., a gyroscope, accelerometer, GPS, actinometrical sensor, and step-counter sensor embedded in a wearable bracelet for measuring the elderly's physical activity), bedroom sensors (temperature and humidity), sleep status sensors (embedded in the bracelet to measure heart rate in sleep), and contextual information (i.e., weight, height, and BMI).In the fog computing layer, heterogeneous devices can cooperate (receiving data from sensors, exchanging data, and processing information).The fog is used for data processing to detect emergency conditions (e.g., lack of oxygen) with the shortest delay.In emergency conditions, the MQTT protocol is used to inform emergency wards and family members of the emergency.After that, the processed data are encrypted and sent to the cloud.In the cloud layer, the received data can be recorded and distributed between the authorized users.There is also a web application on the physician's side to access the patient's information in the cloud.
Smart Home 2 [54] proposes a multitier architecture consisting of smart home infrastructure and a cloud to manage the green spaces inside smart homes.The Smart Home 2 [54] infrastructure includes different sensors (e.g., temperature, humidity, soil moisture, and illumination sensors), equipment (e.g., illumination intensity modifier), and a microprocessor that records all of the information about sensors and equipment in the cloud.Finally, users register on the cloud via their smartphones or the web interface to manually or automatically control and manage the equipment in their smart homes.
Data mining: The field of data mining-also known as knowledge discovery via databases, machine learning, and advanced data analysis [87]-has been extensively used in different branches of science, including psychology.With the expansion of the IoT, a plethora of data is generated today, and data mining techniques are widely employed to extract information.The resultant information is used to make predictions, make decisions, and smartify systems [88].In the following paragraphs, the IoT-based studies in psychology that have leveraged data mining are investigated.
Using data mining, Personality Psychology [64] predicts and identifies users' personalities on social media (e.g., introverted, extroverted, nervous, and calm).This is achieved using users' Facebook information, including messages, stickers, and activities in different groups.
Depression is a highly prevalent disorder that causes considerable complications and has a substantial mortality rate [89].In the Depression [65] project, the elderly's daily activities and behavior are collected via sensors to diagnose depression.The changes in depression levels are then extracted to analyze the effects of different behavior features on depression and identify the individuals prone to depression.For this purpose, machine learning algorithms (e.g., k-nearest neighbor, random forests, and logistic regression) are used.Finally, the elderly are divided into two groups: those who are prone to depression, and those who are not prone to depression.Likewise, pregnancy depression and postpartum depression can cause some problems for mothers and children.In the Postpartum Depression (PPD) [67] project, the pregnancy data are analyzed through decision tree, support-vector machine, nearest neighbor, and ensemble classifier algorithms to predict the risk of postpartum depression in women with hypertension.The individuals are then classified into two categories: those with a high risk of depression, and those with a low risk of depression.
Autism spectrum disorder (ASD) is a mental disorder in which patients have difficulty establishing social relationships and interactions, and might have limited or repeated behavioral patterns and activities.IoT-BRB [69] collects physiological and behavioral data from patients via ear-clip heartbeat, electromyography (EMG), and microphone sensors.Finally, the severity of ASD is determined by analyzing data through data mining techniques.
Hardware and signaling: Hardware advances have now resulted in the invention and improvement of various sensors installed on different systems.A hardware system includes electronic components such as boards on which other hardware pieces are installed and interconnected for a particular purpose [90].Most of the investigated studies of this category used Raspberry Pi and Arduino Uno boards.The Raspberry Pi is a mini-computer with a processor, memory, and a graphical accelerator, and supports different operating systems and various programming languages, such as Python, C, and C++.The Arduino Uno is a microcontroller used to fetch and control sensor signals.
In the Traeddy [52] project, a hardware solution is offered to decrease the negative outcomes of using communication devices such as cellphones while driving.For this purpose, a Raspberry Pi board is connected to a speaker, buttons, and batteries, and embedded in a toy.For user interaction, the input information is received via two buttons (yes/no) embedded in the toy's feet, and the output information is broadcasted as audio via the speaker.The toy interacts with the mobile application via Bluetooth.
Since patients with autism spectrum disorder (ASD) are very much interested in toys [91][92][93], the ACHI [58] project proposes a toy bag consisting of electronic and hardware components, including an Arduino Uno board to fetch and control signals of sensors (e.g., attached gas and three-axis accelerometer sensors) and a Raspberry Pi board (equipped with a microphone, a VGA camera, and a TFT display speaker) for data processing.The Raspberry Pi board processes and sends the data to the server via a Wi-Fi connection for storing, further processing, and monitoring the patient's status.The status of each patient with ASD can be observed and analyzed via a graphical interface dedicated to caregivers.If an emergency condition arises, the system sends a notification to caregivers or to the doctor.If there is no response, an auditory or visual response is delivered automatically to calm the patient down.
The Social Sensing [68] project employs an electronic bracelet to collect auditory, behavioral, and environmental information from users.This electronic bracelet consists of an STM32F405 microcontroller with an ARM-Cortex4 core equipped with an integrated digital signal processor (DSP) module.The STM32F405 microcontroller uses accelerometer and gyroscope sensors to collect the human bodily motion information, as well as temperature, humidity, and illumination sensors to collect environmental contextual information.The outputs of the sensors are then processed by the DSP to obtain the audio social features.An OLED monitor is used to show data as well as battery voltage values to users.An SD card module is also employed for local data storage, and data are transferred to the mobile via Bluetooth.

Unique Features
IoT-based psychology systems are based on a variety of features and technologies.After investigating the reviewed papers, the following features were recognized: as the variety of sensors, crowdsourcing, context awareness, fog and cloud infrastructure, and inference and intelligence.Furthermore, challenging questions emerge around each feature that is discussed.In this section, these features and technologies are described.
Type and variety of sensors: Sensors are responsible for collecting information from users and the environment.A wide range of sensors have now been invented in general and specialized areas.Most of the reviewed papers were based on sensors for data acquisition.Indeed, a wide range of sensors have been used in IoT-based psychological studies.In this regard, GPS is the most common sensor employed in many projects for tracking users' locations for different purposes.In the Depression project [65] and SAHHc [78], a presence sensor is used for tracking users.Moreover, accelerometer and gyroscope sensors are utilized to collect information on users' movements in Social Sensing [68], SAHHc [78], and SA-IoTBigSys [81].
Environmental sensors include temperature, noise, soil moisture, and illumination sensors, which have been used in such projects as Smart Home 2 [54], SA-IoTBigSys [81], and Social Sensing [68] to determine the environmental status.For instance, Smart Home 2 [54] benefits from the above sensors to control the plants' environment.Finally, WoO [60], SAHHc [78], Smoodsically [62], IoT-BRB [69], Social Sensing [68], Postpartum Depression (PPD) [67], and SA-IoTBigSys [81] utilize specialized medical sensors such as body temperature and heart rate sensors to collect physiological information.It should be noted that almost none of the used sensors are specific to psychology, but are general, environmental, or medical sensors.As sensors are a prominent enabling technology for the IoT, we face the question of what types of psychology-specific sensors might be invented and used in the future.
Crowdsourcing: With the development of smart mobile devices (e.g., smartphones, tablets, and smartwatches) equipped with a collection of sensors (e.g., camera, GPS, accelerometer, and heart rate sensors), along with the prevalence of Internet Wi-Fi connections, there is now the opportunity for crowdsourcing (also known as crowdsensing) [94].By employing these devices, users can sense and share a variety of necessary information about a population or an environment with minimal infrastructure investment.In psychology, crowdsourcing can be employed to collect and analyze cumulative data on the personalities, mental states, and mental disorders of people in a society.For instance, Personality Psychology [64] benefits from a user's texts, stickers, and activities in different Facebook groups to detect their personality type.Additionally, crowdsourcing could be leveraged to analyze and predict personality types of different communities.Assessing and comparing different genders' personalities in a community is also possible.Likewise, crowdsourcing can be added to the WoO [60] (detecting people's emotions) to determine and analyze the emotions of people of different ages in various communities.It is also possible to investigate the effects of environmental and geographical parameters on the personality types and emotions of community members.This paradigm can also be employed in the IoT-BRB system [69] to evaluate the severity of autism in different communities based on genetic factors, environmental conditions, and social parameters.Nevertheless, before using this paradigm, we should solve the privacy issue for people to participate in this process.Otherwise, as psychological information is confidential, people would not be able to contribute to this process.
Context Awareness: In new computing models (e.g., pervasive computing), smart applications collect information about users and the environment through different sources, such as sensors and smart infrastructure [95].By being aware of this information, called context, applications can provide users with smart and context-aware services [96].Amongst the reviewed papers, WoO [60] and SA-IoTBigSys [81] use context-aware systems for different purposes.Indeed, WoO [60] benefits from users' contextual information-including physiological data (e.g., body temperature, GPS, and electrocardiography sensors), textual data (e.g., weblog data, Facebook posts, and tweets), and multimedia data (e.g., data of audio, video, and image recording devices)-to accurately perceive a person's current emotional state.As a result of this in-depth perception, more intelligent services can be provided for users.For instance, if a person's emotions show that they intend to commit suicide, the system activates social care services.SA-IoTBigSys [81] uses the contextual information collected from the elderly and smart cities to better perceive user status to provide OSAS treatment services.For instance, data on the urban environment, including levels of pollutants and weather conditions, can help select an appropriate location with lower pollution levels for the activities of the elderly.In addition, health specialists can formulate OSAS treatment plans for recovering elderly patients based on their BMI and heart rate variability.Generally, contextual information helps to better perceive current events in relation to an individual and their surrounding environment.This can increase the system's efficiency, intelligence, and user satisfaction.However, to realize the full potential of context awareness, two scientific issues should be resolved: (a) the contextual information should be obtained implicitly (without users' intervention), and (b) the system should be able to explain the reason for its action upon a user's request (explainability).
Fog and cloud platforms: As a huge computational and storage resource, the cloud is able to support applications and systems.In general, the cloud is employed to execute massive computing applications (which are impossible to run on users' mobile phones), store big data, and share data.Among the reviewed papers, SAHHc [78] has a massive image processing component (to identify the faces of the elderly), which is hard to run on smartphones.As a result, it is offloaded and executed on the cloud.Moreover, in the Postpartum Depression (PPD) project [67], hospitals and medical centers use a private cloud to store pregnant women's medical records.Therefore, gynecologists can access the files of their patients if necessary.In Smart Home 2 [54], the cloud platform is employed to store information on the equipment and sensors of smart homes.Users and applications can access the cloud to meet their needs through smartphones and web browsers.
Security and privacy should be considered when a cloud is used for storing users' data.Many solutions have been provided for this problem [97,98].For instance, images are transferred from a local server to the cloud via the SSH file transfer protocol (SFTP) in SAHHc [78].This protocol allows for the safe transfer of information.At the same time, since the clouds are far from users in a network view, they are not appropriate for supporting real-time and interactive applications.The solution is to use fog computing, which extends the cloud computing model to the network edge.In this regard, since SA-IoTBigSys [81] needs to quickly access the elderly's information and analyze it to support the decisions made by medical specialists, the fog infrastructure is used to store their data.In general, fog and cloud benefit from the same resources (e.g., network, processing, and memory), and many of their mechanisms (such as virtualization and multi-tenancy) are common.Using cloud or fog for processing and storage requires partitioning the system into sensitive and non-sensitive parts.Only secure fog and cloud platforms should be used for hosting the sensitive part.Finding the optimal ridge for this partitioning may be challenging in many scenarios.
Inference: Inference is an artificial-intelligence-based approach to data analysis for acquiring high-level information.Sensors can only measure simple data [94], and are unable to measure high-level information directly.Under such conditions, an inference component is used to extract high-level information from low-level elements.For instance, the daily behavior of the elderly is collected through sensors in the Depression project [65].Using these data elements, the changes in depression levels are inferred to identify the individuals who are prone to depression.In SAHHc [78], the recorded images of the elderly are processed to infer their emotions and provide appropriate services accordingly.For instance, when a feeling of pain is inferred from an old person's face, the system informs their physician or caregiver.Finally, IoT-BRB [69] evaluates the severity of autism by collecting physiological and behavioral data from patients via microphone, heart rate, and EMG sensors, and analyzing the data.

Conclusions
This paper investigated the role of the IoT in psychology from two perspectives: In the first perspective, the goals of using the IoT in psychology were identified as morale improvement, diagnosing diseases and mental states, and monitoring and taking care of patients with mental disorders.In the second perspective, the computing technologies used were identified as designing modern systems, data mining, and hardware and signal processing.Afterwards, the unique features of the state-of-the-art research in this area were investigated, and several features were identified, including the variety of sensors, crowdsourcing, context awareness, fog and cloud platforms, and inference.Although by exploiting the IoT, several intelligent systems have been proposed to resolve psychologyrelated issues, this subject is in its infancy.In fact, in spite of the maturity of services provided by these papers compared with conventional methods, their number is not satisfactory with respect to the wider area of psychology.Furthermore, privacy protection and avoiding the misuse of sensitive information have not been noticeably discussed.
As the outbreak of COVID-19 in 2020 and 2021 has caused many psychology-related issues, IoT technology can be used to tackle them.In this regard, we investigated and analyzed millions of tweets from users worldwide regarding COVID-19 to extract implicit information regarding several parameters of psychology (e.g., hope, depression, fear, etc.) per country.In the future, these information features can be exploited in designing IoT-based systems for resolving mental issues caused by the outbreak of COVID-19 and improving people's morale in similar situations.

Figure 1 .
Figure 1.Procedure for selecting the papers.

Table 1 .
Summary of IoT-based psychological projects from the perspective of purpose.

Table 2 .
Summary of IoT-based psychological projects from the perspective of technology.