Genetic Algorithm-Based Human Mental Stress Detection and Alerting in Internet of Things

Healthcare is one of the emerging application fields in the Internet of Things (IoT). Stress is a heightened psycho-physiological condition of the human that occurs in response to major objects or events. Stress factors are environmental elements that lead to stress. A person's emotional well-being can be negatively impacted by long-term exposure to several stresses affecting at the same time, which can cause chronic health issues. To avoid strain problems, it is vital to recognize them in their early stages, which can only be done through regular stress monitoring. Wearable gadgets offer constant and real information collecting, which aids in experiencing an increase. An investigation of stress discovery using detecting devices and deep learning-based is implemented in this work. This proposed work investigates stress detection techniques that are utilized with detecting hardware, for example, electroencephalography (EEG), photoplethysmography (PPG), and the Galvanic skin reaction (GSR) as well as in various conditions including traveling and learning. A genetic algorithm is utilized to separate the features, and the ECNN-LSTM is utilized to classify the given information by utilizing the DEAP dataset. Before that, preprocessing strategies are proposed for eliminating artifacts in the signal. Then, the stress that is beyond the threshold value is reached the emergency/alert state; in that case, an expert who predicts the mental stress sends the report to the patient/doctor through the Internet. Finally, the performance is evaluated and compared with the traditional approaches in terms of accuracy, f1-score, precision, and recall.


Introduction
Mental stress is one of the most dangerous diseases nowadays, it is caused by many psychological problems, general stress is common for all types of the human being, and it occurs in the routine life of human beings, but prolonged stress causes more affection in the human body; sometimes, it causes the chronic diseases, and sometimes, it may occur in the genetic disorder. e stress level in a human being has been detected by using EEG, ERP, EDA, and the HR device, and this is all above the sensor device which is used to evaluate the mental stress in the human body. e multilevel hybrid model is used to diagnose the multiple signals of mental stress such as sad, fear, and the angry [1]. e Arduino microcontroller is one of the devices that are used to measure the heart rate value instead of human stress and the normal stage of the body conditions. us, it gives better accuracy of stress level when compared to the other technique [2].
In many cases, the mental stress leads to the most vulnerable diseases in human beings; thus, the identification of the diseases is might more important, the researchers move on the side of the Internet of ings basis sensor device, and this type of device provides better accuracy in both the machine learning and the deep learning algorithm [3]. e early detection and the prevention of mental stress may be more crucial.

Contribution.
e main contribution of this work is to detect human mental stress using the genetic-featured algorithm on the basis of the Internet of things, and mostly, artificial intelligence is utilized in the Internet of things which helps to identify the accuracy and the classification results of the mental stress.

Objective.
e proposed work uses a convolutional neural network for classifying the given input image since CNN is one of the most important techniques in image recognition because it evaluated each and every pixel in the given data. e genetic algorithm is used to extract the feature in the evaluation of the brain tumor.

Review of Literature
Parab et al. [4] implemented the stress and the emotion analysis using IoTand deep learning, the identification of the electro-dermal activity, and emotional and sentimental analysis using the amalgamation concept. Mainly, this concept identified the stress level on the basis of the various state of mind and introduced various identifications such as emotional sensation and speech recognition using advanced technology using IoT and the deep neural network.
Mozafari et al. [5] implemented the IoT-enabled multimodal mental stress monitoring, the detection of the human stress level using artificial intelligence (AI), and the SVM algorithm, the feature is extracted by using the fisher method, and the classification technique handles with/ without PCA method. By using this method, it detected the multimodal emotions and their classification based on the accuracy level.
Verma and Sood [6] implemented a comprehensive framework for tracking student stress in an IoT environment of fog clouds. e Bayesian belief network classifies the input data into normal and abnormal categories based on their analysis, then inserts the student data into two stages of a temporal dynamic Bayesian network (TDBN). is predictive model contains four parameters for further analysis such as leaf node evidence, context, student health trait, and the workload context; it helped to analyze the accurate level of emotions in the human being. Padmaja et al. [7] implemented the IoT-based stress detection and health monitoring system, the detection of the human stress level wherever it can detect by using many types of equipment, but the accurate predictions are more challenging one in now a day; sometimes, the patient looks healthier, but they are also suffered from stress, and this problem should be considered as the chronic illness. erefore, the IoT things introduced many sensor devices helped to detect the accurate value of the stress level.
Rachakonda et al. [8] implemented the deep neural network with dataset collection of three waveforms such as 2000, 4000, and 6000 and conducting the specific samples. It provides the testing and the training dataset evaluation. e DNN-integrated edge device was implemented for stress level detection in the IoMT for Stress-Lysis. erefore, the final results showed the enhanced accuracy and the better classification results.
Uday et al. [9] implemented the detection of stress using wearable sensors in the IoT platform, the sensor devices such as HRV, galvanic skin response, and the electro-dermal activity help to detect the various form of the stress evaluation in the human body, and this paper introduced the MATLAB visualization for further setup of the specification in the Internet of things. is helped to detect the better accuracy and the perfect detection of the emotional and the stress calculation for the human being.
Raval [10] implemented stress detection using a convolutional neural network and the Internet of things. Earlier, artificial intelligence in the Internet of things helps to identify the better accuracy and the classification of emotional classification and stress identification. us, it implemented the CNN for better image classification that CNN produces better classification results when compared to the other technique.
Shon et al. [11] implemented the emotional stress state detection using genetic algorithm-based feature selection on EEG signals, the genetic algorithm for the feature extraction, and the K-nearest neighbor used to classify the given dataset by using the DEAP dataset with a public collection of EEG signals.
Das Chakladar et al. [12] implemented the EEG-based mental workload estimation using a deep BLSTM-LSTM network and evolutionary algorithm. e ERP and the EEG are the levels of signal measurement which are used to calculate the mental stress; thus, this paper implements the multilevel alignment to detect the accuracy value in the given input data. is paper implements the STEW dataset, this paper implements the grey wolf optimized technique, and it provides better optimization when compared to the GA and the PSO feature extraction technique. e bidirectional long short-term memory and the long short-term memory are used to evaluate the mental stress using a multilevel hybrid algorithm.

2
Computational Intelligence and Neuroscience Santhosh Kumar et al. [13] implemented the fast time scale genetic algorithm-based image segmentation using a cellular neural network (CNN), and the genetic algorithm and the CNN technique are considered the advanced technology in brain stress evaluation. e main advantage of the genetic algorithm is to predict and covert the image into a binary value, and the CNN is used to detect the image recognition using pixel value.

Overview of the Proposed Approach
e overview of the proposed approach implies that input image, preprocessing technique, segmentation, and feature extraction, and finally, the classification process takes place. Figure 1 implies the overview of the proposed approach, and in the very first stage, the collected dataset is inserted into the input image.
is image goes through the preprocessing technique, and this technique helps to reduce the noise in the filter and improve the image quality. e main function of the preprocessing technique helps to convert the image into RGB to grey scale image. e segmentation technique is nothing, but the large amounts of data are split up into the small amount of data, to further classify the accuracy process. e feature extraction is the part of the dimensional reduction and smoothening of the images and also helps to sharpen the edges. e main function of feature extraction is to divide the input data into more useable groups, and it helps to provide better classification in image processing.
en, the classification technique is used to classify the image on the basis of the stress level in the human body. is research uses three sensors to classify the different types of sensor devices using different classification schemes. In some cases, the comparison of the algorithms is better to detect the accuracy. Figure 2 implements the proposed approach for the mental stress detection and the classification technique using a deep learning network and the preprocessing technique are gathered by using the filter and the denoising technique. e segmentation technique is used to split up the huge amount of input data into further organized groups; after the completion of the segmentation technique, the feature extraction technique is handled by using the genetic algorithm. e genetic algorithm provides better accuracy for reducing the dimensionality reduction in the image when compared to the PCA or any other existing technique [1][2][3]14].

Datasets.
In our paper, the DEAP dataset is implemented [14][15][16][17][18][19]. For collecting the various types of physiological signals using EEG, PPG, and GSR sensor devices, the public dataset is used for the function of detection of mental stress using EEG, PPG, and GSR devices. us, the 32 healthy participate samples are given as the input for our mental stress detection. ey are all hearing 40 types of video songs at this time. e level of mental stress and the calm level can be detected by using three types of sensors that are implemented in this paper namely EEG, PPG, and the GSR [14,[20][21][22][23][24][25][26][27][28][29].
e EEG is nothing but the brain activity that can be detected by using cost-effective methods that are considered such types of the EEG signal device; otherwise, it is called one of the brain-activity-detecting electrodes. e PPG is considered one of the emotional recognition signal devices which are used to evaluate the human present and past state comparison in the form of human biological activities. e Galvanic skin response is nothing, but the GSR is considered as the epidermis conductance that helps to the evaluation stress level of the human body.

Preprocessing Technique.
e preprocessing technique is used to detect the error in the image by adding some filter, and in this paper, the high pass filter is implemented to remove the error or attack effect in the form of the power line interference in the sensor devices such as EEG, PPG, and the GSR. Also, the low pass filter is used to remove the Gaussian noise in the given input image. e high pass filter is used at the frequency of 0.5 Hz, and the low pass filter is used at the frequency of 500 Hz. e butter-worth filter is used to remove the reverse forwarding action in the given data samples.
e high pass filter is used to detect the sharpening of and smoothening of the edges in the given data sample. It gives the brightness for the connection area of the images. e low pass filter also helps to increase the smoothening in the given image and also enhances the image equality by enhancing the adjacent pixel values. e main function of the low pass filter helps to reduce the spatial noise in the  Computational Intelligence and Neuroscience image. Denoise is nothing but removing the noise in the image or any other signal. is is one of the major challenges in the dataset. e arousal and the valence space are one of the important techniques to predict the signal alignments in the EEG, PPG, and the GSR.

Segmentation.
One of the most important techniques is image segmentation, which divides an image's pixels into numerous groups that have significance and facilitates classification and easy extraction. e main function of the segmentation process helps to reduce the complexity of the image [17]. is paper implements that windows 1s and 4s are used to segment the arithmetic task for the mental stress image.

Genetic Algorithm.
e genetic algorithm in the mental stress plays a vital role, and in some cases, the prolonged mental stress is caused by genetic disorders, and the normally genetic algorithm provides a better extraction of the given data and reduces the dimensional quality of the image. Figure 3 represents the genetic algorithm. It represents the basic concepts of the genetic algorithm [18]. e GA consists of the major operations namely selection crossover and the mutations technique. e input dataset is considerable with this algorithm with the help of the sensor devices namely EEG, PPG, and the GSR that show the exact dimensional reduction value to the classifier. us, it provides a better-enhanced result of extraction when compared to the other technique [14].

Enhanced Convolutional Neural Network-LSTM.
e enhanced convolutional neural network with an LSTM classifier was used to classify the given mental stress image based on the dataset. e EEG, PPG, and the GSK are used to collect the data from the human being. Figure 4 compared to the current method, the ECNN-LSTM classifier provides greater accuracy, specificity, and sensitivity when used to classify the input. e given input data are convolute to remove noise, and then, this image goes through the max pooling. e max pooling helps to reduce the over-fitting in the image. e long short-term memory network is considered as the noise removal technique, and it helps to remove the spatial noise in the given dataset [19].     (2) e above equation shows the accuracy, sensitivity, precision, and the negative predictive value based on the ECNN-LSTM classifier.

Comparison Analysis
When compared to the current method, the method in our study offers 99.9% accuracy. e existing technique contains a support vector machine, random forest method, KNN, cubic SVM, and the CNN. e graph illustrates an overall comparison of the results based on classification accuracy, sensitivity, and precision values [14]. When compared to the current technique, the implementation in our research produces improved output. Figure 5 shows the results for the comparison analysis based on the classification accuracy.

Conclusion and Future Work
A detailed study of stress detection utilizing sensing devices and associated deep learning-based is offered in this paper.
is research looks into stress detection methods that are used with sensing equipment such as electroencephalography (EEG), photoplethysmography (PPG), and the Galvanic skin response (GSR) as well as in different environments including traveling and learning. A genetic algorithm is used to extract the features, and this paper implements the ECNN-LSTM classifications technique results that show the perfect accuracy of the given input data, which helps to predict the calm and the stress stage of the human being based on their emotion, and it was calculated by using EEG, GSR, and the PPG sensor devices.
Our future work is based on the comparison of the enhanced technique in the SVM and the ECNN-LSTM with MTH feature extraction, to predict the classification accuracy.
Data Availability e datasets used and/or analyzed during the current study are available from the corresponding author on reasonable request.   Computational Intelligence and Neuroscience