Introduction

Ambient Assisted Living (AAL) facilitates the independent living of elderly and disabled individuals1,2. The researchers have utilized the establishment of AAL platforms to combine a variety of heterogeneous devices and services, along with human–machine interaction1,3,4. Likewise, AAL is a highly interconnected area, including a wide range of Information and Communication Technology (ICT) domains. Many technological aids, particularly smart home technologies, rely on AAL’s activity recognition5. The AAL attempts to assist persons with disease in maintaining their independence6. Human activity detection is required for several AAL applications, including monitoring systems, supportive human–computer interaction technologies, and caretaking robots7,8. Older people are the main users of AAL systems, but people of all ages seeking personal fitness tracking, obesity, and mental and physical impairments can benefit from this concept9. Recent research in the field of movement recognition has focused on sensor-based real-time monitoring systems to enhance independent living at home10. With the advent of artificial intelligence, particularly machine learning, the quality of life domain is improved, for example in healthcare, it has been applied in disease detection11,12, treatment13, prediction14,15, data analysis16,17,18, etc.

Activity recognition is the process of classifying a series of human activities by analyzing sensor data. The field of movement recognition research is rapidly increasing, yielding substantial insights into fitness, health, and wellness19. Wearable devices for daily activity recognition are vital in the field of pervasive healthcare20. The emergence of affordable and minimally invasive mobile sensor devices, such as smartphones, has increased the interest in Human Action Recognition (HAR)21. Mobile devices serve as advanced platforms for HAR22. Owing to their diverse wireless interfaces, ease of use, substantial data processing and storage capabilities, and the availability of sensors such as accelerometers and gyroscopes that meet the practical and technical demands for activity detection. Moreover, in AAL, the need for unnoticeable sensing of human behaviors and actions has significantly grown in recent years23. Another vital requirement for AAL applications is the extremely low power spectral density, which avoids problems with other radio systems by utilizing the same frequency range24.

The relationship between the qualitative and quantitative aspects and interpretability issues cause a lot of complexities in the AAL25. Several researchers have focused on vision-based or non-invasive methods for detecting single-person activities26,27. Invasive methods utilizing body-attached sensors are impractical for multi-person activity detection due to their high expense and technological complexity28. Connecting sensors to multiple individuals renders these AAL systems impractical29. This procedure’s laborious, intrusive, and uncomfortable nature may impede its application in practical contexts. Moreover, processing and analyzing the collected data from different devices and sensors is an intricate task. The field of AAL has greatly benefited from the development of Deep Neural Networks (DNNs) for activity recognition30. However, recognizing multi-person activities with optimum accuracy, efficacy, and reduced computational and economic costs is still challenging. Conventional approaches may not be able to handle large datasets to detect movement in the AAL. Further, the traditional approaches have failed to accurately determine the subtle movements caused by elderly individuals. In addition, the traditional model requires high computation resources for detecting the movement of elderly individuals31. To rectify the complexities of the conventional models, the weighted deep model is developed which predicts the movement in AAL more accurately. The developed deep model can accurately detect the movement caused by the elderly person to provide proper treatment and care. In addition, the developed model is also suited to provide timely intervention by detecting abnormal movement. The major contributions of the deep model-based movement recognition model are specified as follows:

  • To develop an intelligent deep learning-assisted movement recognition approach in AAL for monitoring the movement of older persons or disabled persons that provides better care and required medical assistance. It is also used to find any abnormal movement of the aged people for enhancing the well-being and health of the elderly population by providing timely intervention.

  • To recommend a Convolutional Autoencoder (CAE) for retrieving the required features from the garnered data that helps to minimize the total dimension of the data and attain accurate results in the movement recognition process. Removing the unwanted data by using the CAE approach helps to reduce the total time needed for the movement recognition operation.

  • To develop a Hybrid Rat Swarm with Coati Optimization Algorithm (HRS-COA) by integrating the RSO and COA to optimally select the weight value in the deep model that enhances the accuracy, precision, and Mathews Correlation Coefficient (MCC). The integration of HRS-COA helps to enhance the balancing capability and also to get the optimal solution.

  • To design a Weighted Residual Recurrent Neural Network (WRRNN) for recognizing the movement of humans in the ambient environment. In the WRRNN, the residual connections are used to learn the intricate features from the input and provide accurate outcomes in the movement recognition process.

The structure of the research paper for intelligent deep learning-assisted movement recognition approach in AAL is described here. In "Literature survey" section, the existing literature works of the movement recognition model in AAL is presented. The implementation of a heuristic-assisted deep learning model for movement recognition in AAL is given in "An implementation of heuristic assisted deep learning model for movement recognition in ambient assisted living" section. In "Description of feature extraction process and weight optimization process" section, the descriptions of the feature extraction process and weight optimization process are presented. The hyperparameter-optimized neural network for movement recognition in AAL is discussed in "Hyperparameter optimized neural networks for movement recognition in ambient assisted living" section. The results and discussion of the intelligent deep learning approach are presented in "Results and discussion" section. The conclusions derived from the research work are summarized in "Conclusions" section.

Literature survey

This section illustrates the literature review in the related sector.

Related works

Passias et al.32 suggested an Asynchronous Cellular Automaton based Neurons (ACANS) to determine the intricate neuronal activities of the elderly person. By employing the remote supervised method, the efficiency of the ACAN was greatly increased. Utilizing motion-capturing data, the movements of older people were recognized. The findings showed that the developed model attained excellent classification accuracy, which proved its effectiveness in classifying movement activities. Shah et al.33 proposed a lightweight, deep model for multi-person activity identification in a group of senior citizens. The results showed that the suggested technique was suited for real-time activity identification. In order to implement the suggested method in social robots, this work also created a program for the Robot Operating System (ROS). Yadav et al.34 have proposed an Internet of Medical Things (IoMT)-AAL that aimed to enable decision-making based on the data. The IoMT sensors were employed to identify the patient and transmit the gathered data to edge computation. The findings were attained from the empirical investigations from a variety of perspectives. It has been concluded that the IoMT-AAL employed DNN to predict the movement of people effectively based on several parameters. The outcomes of the simulation illustrated the advantages of the IoMT-AAL model over the alternative methods.

Jain et al.35 presented aRandom Forest classification along with Bi-Convolutional Recurrent Neural Network (Bi-CRNN)-based feature extraction to perform HAR for automated robots. The auto-fusion technology enhanced the data from different sensors. The present study tried to offer an efficient and beneficial hybrid deep learning-based method for HAR with a high accuracy. The comparisons with already existing approaches confirmed the effectiveness of the recommended model. Pandya et al.36 have designed a Librosa machine-learning framework to detect, analyze, and assess resident acoustic events. An efficient acoustic event identification and classification approach was also implemented to improve smart living concepts. The findings of the investigation confirmed that the designed mechanism was more successful than the other techniques. De et al.37 presented a novel Multiple Cluster Pursuit (MCP) algorithm named as a modified MCP algorithm for solving the person detection problem. Comprehensive evaluations of the developed model were conducted to show that the modified MCP algorithms were appropriate for the task of the movement detection process. Recent advances in deep learning and bio-inspired algorithms is making way into the field of movement prediction, object recognition, etc. with better accuracy38,39,40,41,42.

Zhang et al.43 have suggested the DBN-based neural and the fuzzy representation model that immediately constructed the matching fuzzy rules by applying the Least Learning Machine (LLM) to detect the movement of elderly people. From the perspective of fuzzy rules, DBN-TSK-FC was potentially suited to predict the movement of the person in AAL. The findings from experiments demonstrated the efficacy of the suggested classifier DBN-TSK-FC, which outperformed the existing approaches with high accuracy. Guerra et al.44 proposed an Artificial Intelligence (AI)-based method that identified human postures to detect unsafe situations. To determine the position within each recorded frame, the implemented algorithm analyzed a set of features derived from the data. Here, this work examined the functionality of Long-Short Term Memory (LSTM) sequence networks with Multi-Layer Perceptron (MLP) networks. This work utilized a genetic approach to select the features for the LSTM sequence approach to perform additional feature selection.

Problem statement

The AAL comes under the ICT trend that concentrates to enhance people’s life quality by enabling new products, and services, and it also helps individuals to live in their preferred living environment. Recognition of movement based on sensory recordings has gained a lot of attention in AAL studies for several reasons. Apart, the complexities of the conventional techniques are as follows:

  • In the beginning, elder care becomes more and more important for preserving their health and promoting their independence. The healthcare industry is under a lot of pressure as a result of this situation, which causes the necessity of adopting the AAL system.

  • The AAL systems not only identify activities, gestures, and emotions but also keep an eye on movement and identify falls. This usually results in an activity recognition model that works well.

  • The primary objective is to provide a comprehensive and efficient assisted living solution for elderly people. It uses wearable technology, such as wristbands, for action recognition and motion capture to record background noise while engaging in daily tasks.

  • The conventional techniques face several primary limitations, such as computational burdens, overfitting, and demand for more computational resources and time. In an effort to lighten these cases, this task presented an effective approach with the support of deep learning.

Based on the challenges, an innovative model is proposed for the movement recognition process.

Table 1 illustrates the features and complexities presented in the existing literature about conventional movement recognition in AAL.

Table 1 Features and challenges of conventional movement recognition models in AAL.

An implementation of heuristic assisted deep learning model for movement recognition in ambient assisted living

Significance of movement recognition in ambient-assisted living

Monitoring the health condition of older people has been a worldwide concern in recent years. The ambient assisted facilities offer support and care for elderly people and are also used to ensure their safety. It is not necessary to provide input to the AAL since it automatically conducts various activities based on the demands of users. For example, if the user is sitting in front of a television, the AAL makes the room darker by automatically changing the lighting condition. In this way, the AAL learns the needs of the user. The recognition of movement in the AAL is significant in promoting the individual’s independence. Movement recognition is also used to identify the patient’s physical activities and manage different kinds of diseases in humans. The AAL determines the movement of the elderly person and disabled person for providing healthcare assistance. Moreover, a human’s daily routine can be determined by the prediction of movement via the AAL. The patient care and quality of life of the individual are also enhanced by the application of movement prediction through the AAL. Changes in the moving pattern determine the health issues in humans thus, the movement recognition in AAL is significant.

Architectural view of implemented movement recognition framework

Assistance at home, rehabilitation, and physical support are essential for elderly people. The AAL monitors the movement of individuals. The researcher employs various methodologies for movement recognition in AAL. However, these methodologies do not yield accurate outcomes as they inadequately manage the large dataset. Traditional methods necessitate extensive training duration for movement prediction. Conventional methods are ineffective in achieving accurate predictions due to their inability to manage inconsistent data, and these methods also demand excessive processing resources and time for complex movement prediction. Hence in this research work, an intelligent deep-learning approach is constructed to achieve accurate results in movement prediction. Figure 1 illustrates the architectural representation of movement prediction based on deep learning in AAL.

Fig. 1
figure 1

Architectural representation of the implemented deep learning-aided movement prediction process in AAL.

In this work, a weighted deep learning model is implemented to recognize the movement of humans in the AAL and improve the quality of life. The suggested model provides remarkable success in the movement recognition process since it mainly focuses on the elderly person and predicts any abnormal movement of the human to provide effective healthcare assistance for the elderly population. In order to initiate the human movement recognition process, the essential data are garnered from online resources. Further, the garnered data is used in the feature extraction process. Feature extraction plays a vital role in the movement recognition task. The feature extraction process grasps relevant and meaningful information from the collected data that helps to attain higher accuracy in the movement recognition process. Here, the feature extraction process is done via the CAE, which takes the garnered data as the input. The CAE is mainly utilized in feature extraction because of its automatic learning capability, and it does not require more time to extract the features from the collected data. The CAE can easily remove the unwanted features thus reducing the overall dimension of the data to get accurate results in the movement recognition task. Finally, the features attained from the CAE are passed to the WRRNN to recognize the movement of the human. The WRRNN is a more effective approach for movement recognition in the AAL. The WRRNN effectively captures the temporal pattern and dependencies. The residual connection in the WRRNN enhances the examination of the input information and greatly minimizes the gradient issues that simplify the training process. In the WRRNN, the weight is optimally selected via the HRS-COA. The optimal selection of weight enhances the accuracy, precision, and MCC of the movement recognition process. Further, the generalization capacity of the WRRNN is enhanced by weight optimization. Additionally, the weight optimization greatly reduces the parameter requirement of the WRRNN and produces accurate outcomes in the movement recognition task. The WRRNN is the more efficient, precise, and automatic structure that automatically detects the movement caused by the human. Based on the predicted movement using the WRRNN, the healthcare experts monitor the condition of the patient/ elder/ disabled person to provide necessary medical support for enhancing the quality of life. Lastly, the proposed approach is compared with the conventional techniques to prove its efficacy in the movement recognition process.

Dataset collection

The Human Action Recognition (HAR) Dataset is downloaded from an open-source database45. Here, 15 diverse classes of human activities are available in this dataset. Moreover, this dataset consists of labeled as well as validation images for the research process. The labeled classes in the dataset are stored in individual folders for security purposes. Here, the labels are assigned for each human action. Here, 2 directories and two files are available in this dataset.

The data collected from the above resource is denoted by the term \(y_{g}^{l}\) and \(g = 1,2...G\). Here, the total quantity of the collected data is denoted as \(G\).

Description of feature extraction process and weight optimization process

Feature extraction using CAE

Features extraction is an important process that is used to retrieve the relevant feature from the input data to get accurate results in the movement recognition task. The CAE model can extract the prominent features from the input that are invariant to noise and variations. The CAE can preserve the significant features while eliminating the irrelevant details. Moreover, the learning capability of the CAE is higher than that of the other model, so it is leveraged for the feature extraction task. The CAE automatically learns the hierarchical representation of the input data without requiring manual operation. Further, the CAE preserves the significant features in the input data while reducing the dimension of the collected input data, which makes it more effective for the feature retrieval operation. Moreover, the convolutional layer of the CAE captures the spatial hierarchy of the input data. Therefore, the CAE technique is considered in this work for extracting the deep features from the input data. The CNN and the autoencoder are combined together to form the CAE29. The encoder and decoder network are the main components of the autoencoder. When passing the input y to the fully connected layers in the encoder, the nonlinear form of the encoder vector a is attained. The reconstruction vector y is attained from the obtained encoded vector \(y\). The encoded data a for the given input y is indicated in Eq. (1).

$$a = \Re \left( {X_{encoding} y + c_{encoding} } \right)$$
(1)

The nonlinear activation function is represented as \(\Re :S^{e^{\prime}} \to S^{e^{\prime}}\), the hidden layer’s weight is denoted as \(X_{encoding}\), and the bias of the hidden layer is expressed as \(c_{encoding}\). The CAE adopts the backpropagation to reduce reconstruction errors by upgrading the weight value. The CNN in the CAE helps to attain the nonlinear transformation. The convolutional and pooling layers are the predominant layers in the CNN. The convolution task is carried out between the learnable filter and the input to attain a feature map. The convolution operation \(*\) is performed between the matrices B and C. The features attained from the CAE are represented as \(r_{l}^{CAE}\).

Process of CAE-based feature extraction

In the developed work, the CAE plays a significant part in the feature extraction for movement identification. The CAE includes an encoder and decoder, where the encoder maps the input data to lower-dimensional representations, and the decoder reproduces the source data from this representation. In the training time, the CAE learns to compress the input data into a compact feature representation, capturing the highly salient patterns and features. The convolutional layers present in the encoder module employ the filters to the input data’s tiny regions, scanning the data in both temporal and spatial dimensions for extracting the local features. The subsequent pooling layers down sample the feature maps, minimizing the spatial dimensions and retrieving the highly important context. As an outcome, the CAE extracts the feature’s hierarchical representation, ranging from low-level temporal and spatial patterns to high-level abstract representations of movements. These extracted features are further subjected to the WRRNN for movement identification, allowing the technique to capture the complex patterns and relationships in the data. By employing the feature extraction capabilities of CAE, the suggested approach can efficiently recognize and categorize distinct movement patterns.

Description of RSO and COA

The conventional RSO and COA are used in this work to optimally select the weight of WRRNN. The descriptions of the RSO and COA are mathematically elaborated in upcoming sections.

Rat Swarm Optimizer (RSO)46 In the RSO, the rat’s fighting and chasing characteristics are considered to solve the optimization issues.

Chase The rats engage in chasing activities to catch their food. Here, the best search agent is selected, which can identify the prey’s location in the search space. The chasing operation is mathematically expressed in Eq. (2).

$$\vec{Q} = B * \vec{Q}_{j} \left( y \right) + D\left( {\vec{Q}_{s} \left( y \right) - \vec{Q}_{j} \left( y \right)} \right)$$
(2)

The location of the rat is denoted as \(\vec{Q}_{j} \left( y \right)\) and the excellent optimal solution is delineated by the term \(\vec{Q}_{s} \left( y \right)\). The arbitrary number ranges between1,5 and [0, 2] is expressed as B, and D, respectively.

Fighting: The fighting process of the rat is mathematically denoted in Eq. (3).

$$\vec{Q}_{j} \left( {y + 1} \right) = \left| {\vec{Q}_{j} (y) - \vec{Q}} \right|$$
(3)

The next position of the rat is defined as \(\vec{Q}_{j} \left( {y + 1} \right)\), concerning the best search agent, and the position of the best solution stored.

Coati Optimization Algorithm (COA)47 The behavior of the coati is considered when designing the COA. The coati’s two activities are taken to upgrade the location of the coati. The attacking process of the coati and the escaping strategy of the coati from the predator are the major phases of the COA.

Attacking process of the coati: This is the first phase of the position upgrading process. The strategy involves a group of coatis climbing on the tree to get close to an alligator, which causes scary effects. After the alligator hits the ground, several coatis wait underneath a tree. Coatis migrate to various locations in the search due to this consequence. The location of the coati when mounting on the tree is given in Eq. (4).

$$\begin{aligned} & Q_{j}^{R1} :q_{j,k}^{R1} = q_{j,k}^{{}} + t\left( {alligator_{k} - J * q_{j,k}^{{}} } \right), \\ & for\,\,j = 1,2....\left\lfloor \frac{P}{2} \right\rfloor ,\,\,k = 1,2...o \\ \end{aligned}$$
(4)

The coati is arbitrarily placed in the search space after the alligator falls into the ground. The coati is moved to the search space based on the arbitrary place, which is given in Eq. (5) and Eq. (6).

$$\begin{gathered} alligator^{I} :alligator_{k}^{I} = nd{}_{k} + t\left( {wd{}_{k} - nd{}_{k}} \right),\,\,k = 1,2....l \hfill \\ Q_{j}^{R1} :q_{j,k}^{R1} = \left\{ \begin{gathered} q_{j,k}^{{}} + t\left( {alligator_{k}^{I} - J * q_{j,k}^{{}} } \right),\,\,H_{{alligator_{{}}^{I} }} < H_{j} \hfill \\ q_{j,k}^{{}} + t\left( {q_{j,k}^{{}} - alligator_{k}^{I} } \right),\,\,\,\,\,\,\,\,otherwise \hfill \\ \end{gathered} \right. \hfill \\ \end{gathered}$$
(5)
$$j = \left\lfloor \frac{P}{2} \right\rfloor + 1,\left\lfloor \frac{P}{2} \right\rfloor + 2......P\,\,and\,\,k = 1,2....o$$
(6)

The new position of the coati is acceptable if the objective function value is greatly increased. If the objective function is not satisfied, the previous position of the coati is maintained. This condition is signified in Eq. (7).

$$Q_{j} = \left\{ {\begin{array}{*{20}l} {Q_{j}^{R1} ,\,\,H_{j}^{R1} < H_{j}^{{}} } \hfill \\ {Q_{j} \,\,\,\,\,\,otherwise} \hfill \\ \end{array} } \right.$$
(7)

For the coati j, the identified position is represented as \(Q_{j}^{R1}\), the position of the \(j^{th}\) coati at the dimension k is signified as \(q_{j,k}^{R1}\), the objective function is specified as \(H_{j}^{R1}\), the real random number is expressed as t in [0, 1], the place of the alligator at the search space is denoted as alligator and at the dimension k, the position of the alligator is expressed as \(alligator_{k},\) and the integer is delineated as J. At the ground I, the position of the alligator is expressed as \(alligator_{{}}^{I},\) and at dimension k, the position of the alligator is expressed as \(alligator_{k}^{I}.\) The floor function is specified as \(\left\lfloor * \right\rfloor\) and the objective function is expressed as \(H_{{alligator_{{}}^{I} }}\). The existing place of the \(j^{th}\) coati at the dimension \(k\) is specified as \(q_{j,k}^{{}}\) and its corresponding fitness function is \(H_{j}^{{}}\). The upper and the lower limits are denoted as \(wd{}_{k},nd{}_{k}\).

Escaping activity: The coati animal escapes from the predator if the predator starts attacking. Here, the coati is displaced to the new position to save its life, and it is expressed in Eq. (8).

$$\begin{aligned} & alligator^{I} :alligator_{k}^{I} = nd{}_{k} + t\left( {wd{}_{k} - nd{}_{k}} \right),\,\,k = 1,2....l \\ & Q_{j}^{R2} :q_{j,k}^{R2} = q_{j,k}^{{}} + (1 - 2t)(nd_{k}^{local} (wd_{k}^{local} - nd_{k}^{local} )) \\ & j = 1,2....M,\,\,\,k = 1,2...o \\ \end{aligned}$$
(8)

If the objective function value is greatly increased, the calculated new position of the coati is acceptable. If the objective function is not satisfied, the previous place of the coati is maintained. This condition is signified in Eq. (9).

$$Q_{j} = \left\{ {\begin{array}{*{20}l} {Q_{j}^{R2} ,\,\,H_{j}^{R2} < H_{j}^{{}} } \hfill \\ {Q_{j} \,\,\,\,\,\,otherwise} \hfill \\ \end{array} } \right.$$
(9)

For coati j, the identified position is represented as \(Q_{j}^{R2}\), the position of the coati at dimension k is expressed as \(q_{j,k}^{R2}\), and the upper and the lower limits are denoted as \(wd{}_{k},nd{}_{k}\). The objective function is specified as \(H_{j}^{R2}\), and the real random number is expressed as t in [0, 1]. The local upper and the lower bound are denoted as \(wd_{k}^{local} ,nd_{k}^{local}\).

Developed HRS-COA

The HRS-COA is a new and effective algorithm implemented in the developed work.

Purpose The HRS-COA is designed with the integration of conventional RSO and COA to optimize the weight parameter in the WRRNN to get accurate results in movement recognition on AAL. The weight optimization in WRRNN based on the HRS-COA increases the accuracy, precision, and MCC values in the movement recognition process.

Reason for selecting RSO and COA The developed HRS-COA includes the two existing algorithms such as RSO and COA. Though there are multiple heuristic algorithms exploited for the recognition tasks, these algorithms face a lot of problems including poor convergence, and local optima. Therefore, selecting effective algorithms for performing the optimization process is significant. The RSO and COA have diverse strengths, and the combination of RSO and COA potentially leads to excellent performance in weight optimization instead of the single optimization algorithm. Further, the convergence capability of the HRS-COA is high, and it mitigates the local optimal issues. The RSO is a bio-inspired algorithm that solves different kinds of optimization issues. The RSO’s adaptability, exploration, and exploitation capacity are very high. Likewise, the COA is an optimization approach that mimics the activity of the coati to solve the optimal issues. Moreover, the design optimization issues are effectively solved by the COA. Due to these merits, the RSO and COA algorithms are considered for the developed work.

Novelty Though these existing RSO and COA algorithms are effective, these algorithms can’t individually provide highly satisfactory solutions for the optimization problems since the RSO utilizes more time for the entire iteration process and the COA’s exploration ability is weak. To resolve these algorithm’s drawbacks, these two algorithms are integrated. By integrating these two algorithms, the suggested HRS-COA is developed, which efficiently resolves these algorithm’s problems. The strength of RSO and COA is included in the HRS-COA so it effectively balances the search space exploration process. The enhanced balancing capability assists the HRS-COA in producing the optimal solution for the optimization issues. The designed HRS-COA also prevents stagnation in the local optimal region, leading to excellent performance. Instead of using a single optimization, the combination of the RSO and COA quickly provides the optimal solutions. In the HRS-COA, the best solution is upgraded based on the random number. If the random number is less than 0.5, the position in the RSO is upgraded or else the position in the COA is upgraded to find the optimal solution. The mathematical expression for the position upgrading process is given in Eq. (10).

$$t = \frac{cft}{{wft + bft}}$$
(10)

Here, the random number is delineated ast, the term cft expresses the current fitness, the worst fitness is stated by the term wft, and the best fitness is expressed as bft. The position \(\vec{Q}_{j} \left( {y + 1} \right)\) in the RSO is updated if the t < 0.5, otherwise, the position \(Q_{j}^{R2}\) in the COA is upgraded in order to attain the optimal solution.

Advantages The developed HRS-COA is a novel optimization algorithm that integrates the merits of RSO and COA for optimizing the weights in the RNN model. By integrating the RSO and COA, the suggested HRS-COA employs the high exploration and exploitation capabilities of these algorithms resulting in a highly effective and robust optimization model. The merits of HRS-COA include its capacity to prevent the local optima, adapt to varying issue regions, and converge to the optimal solutions rapidly. In addition, the developed HRS-COA’s hybrid nature enables it to balance the exploitation and exploration; making is applicable for tuning the complex problems such as weight optimization in RNNs. By employing the suggested HRS-COA, the developed approach can effectively tune the weights in the RNN; resulting is highly enhanced movement recognition robustness and accuracy.

The pseudocode of the HRS-COA is given in Algorithm 1 and the flowchart of the HRS-COA is mentioned in Fig. 2.

Algorithm 1
figure a

Proposed HRS-COA.

Fig. 2
figure 2

Flowchart of the developed HRS-COA.

Hyperparameter optimized neural networks for movement recognition in ambient assisted living

Residual recurrent neural network description

The movement recognition is carried out using the RRNN. The RRNN is used to recognize the movement of the human in the AAL48. The RRNN consists of RNN along with the residual connection. The RRNN effectively learns the long-term dependencies in the data, and the residual connection eliminates the explosion of the gradient by effectively maintaining the data flow. The RRNN is deeper due to the residual connection, which can be used to improve the accuracy of the movement recognition process. The rich features from the input data are learned by the RRNN structure, which accurately predicts the movement of humans in the AAL. The RRNN is formed by including the residual error in the RNN layer. The final state and input are used to find the current state \(t_{u}\) at the given time step u and it is specified in Eq. (11).

$$t_{u} = g\left( {y_{u} ,t_{u - 1} ,\theta } \right) = g\left( {i + Vt_{u} } \right)$$
(11)

For the given input y, the hypothesis is expressed by the term i, the weight matrix state is specified as V, and the activation function is expressed as g. Equation (12) gives the hypothesis i of the RRNN.

$$i = \aleph \left( y \right) = Xy + c$$
(12)

The weight matrix’s input state is represented as X and the bias is denoted as c. The future state is predicted based on the output of the RNN. The residual connection is further employed to perform the mapping, expressed in Eq. (13).

$$\Im \left( {y_{u} ,t_{u - 1} ,\theta } \right) = \Im \left( {y_{u} ,t_{u - 1} ,\theta } \right) - t_{u - 1}$$
(13)

Equation (14) presents the state value.

$$t_{u} = \Im \left( {y_{u} ,t_{u - 1} ,\theta } \right) + t_{u - 1}$$
(14)

In above Eq. (15), the element-wise addition and short connection are available. The short connection does not enhance the computational complexity of the RRNN in the movement recognition process. The error in the training task also decreases with the support of recurrent connections in the RRNN. The structural representation of the RRNN is provided in Fig. 3.

Fig. 3
figure 3

Structural representation of the RRNN.

Movement recognition using WRRNN

The movement recognition is an important process in the AAL. The suggested WRRNN effectively identifies the movement of elder and disabled persons and provides solutions to improve the quality of life of the elderly or disabled person. As compared to the conventional RNN, the RRNN structure effectively prevents gradient issues with the help of residual connections. In the task of movement prediction, the WRRNN provided accurate results in the movement recognition process. The WRNN does not apply a complex gating structure that simplifies the movement recognition process. The extracted feature \(r_{l}^{CAE}\) is provided to the WRRNN to predict the movement of the human. The WRRNN technique achieves highly accurate solutions in the movement recognition process and it minimizes the gradient issues, which is a common problem in the existing RNN techniques. The WRRNN also provides highly interpretable solutions and it has a high capacity to manage missing or noisy data. The developed WRRNN technique incorporates the enhanced HRS-COA for optimizing the weights in the network, thus the network’s effectiveness is more highly increasing than the existing approaches. Initially, the input layer of the WRRNN processes the extracted features from the collected data using the CAE. After that, the temporal dependencies in the feature are captured by the recurrent layer of the WRRNN. Further, the complex pattern of features is attained from the residual connection and it is also used to prevent the gradient issues in the movement recognition process. Finally, the output layer predicts the movement of the human based on the output from the prior layers. Finally, the recognized movements from the developed WRRNN are analyzed and can be used to automatically satisfy the user’s requirements. Further, the developed model is applied to AAL for disabled and elderly people to automatically determine their health condition, thus ensuring the life quality of the elderly individual.

Integration and impact of residual mechanism in WRNN

The WRNN approach combines the residual mechanism for improving movement identification in AAL environments. The residual approach is incorporated by including the skip connections among the layers, enabling the technique to understand the residual functions that capture the subtle changes in the movement patterns. This residual learning mechanism allows the technique to concentrate on the variation among the consecutive time sequences, rather than estimating the overall movement patterns from scratch. As an outcome, the WRRNN approach can capture the subtle variations and the long-term dependencies in the movement data, resulting in enhanced recognition accuracy as well as robustness. In addition, the weighted aspect of this technique enables for adaptively deemphasizing or emphasizing particular residual connections, allowing the technique to dynamically optimize its concentration on distinct movement contexts and patterns. This hybridization of the residual mechanisms highly improves the ability of the model in identifying complex movement patterns, highly contributing to effective and accurate movement recognition in AAL environments.

The pictorial representation of the WRRNN-based movement recognition in AAL is given in Fig. 4.

Fig. 4
figure 4

Pictorial representation of the WRRNN-based movement recognition model.

Objective function

The suggested RRNN technique is relatively effective in the movement recognition task in AAL. This technique can resolve the gradient issues and also this technique is capable of processing a large amount of data. The recurrent and residual connections in this network help to capture the complex and significant features from the input thus improving the recognition. However, the weights in the RRNN technique may create dimensionality problems when the depth of this network becomes greater. To prevent this issue, the weights of the RRNN technique are optimized thus the network is named WRRNN. For optimizing the weights of RRNN, the suggested HRS-COA is employed. The suggested HRS-COA achieves high convergence and explores suitable solutions to the optimization problems. Therefore, the HRS-COA is considered for tuning the weights of the RRNN technique. While predicting the movement of the human using the WRRNN, the HRS-COA is applied to optimize the weight value that greatly augments the accuracy, MCC, and precision value in the WRRNN. Thus, the recommended model accurately predicts the behavior of humans based on the movement to offer proactive assistance to people. Initially, the weight of the RRNN technique is encoded with each population of HRS-COA. During the iteration process, the suitable weights are stored and at the end of the iteration, the highly optimal weights are returned as outcome. The objective function of the HRS-COA-based weight optimization of the WRRNN technique in movement recognition is signified in Eq. (15)

$$h = \mathop {\arg \,\min }\limits_{{\left\{ {w_{z} } \right\}}} \left( {\frac{1}{A} + \frac{1}{MCC} + \frac{1}{P}} \right)$$
(15)

Here, the objective function is denoted by the term h, the optimal weight obtained using the HRS-COA is indicated as \(w_{z}\), and it lies in the region of [0, 0.99]. The accuracy A, precision P, and MCC are estimated using Eqs. (16), (17), and (18).

$$A = \frac{d + l}{{d + l + q + p}}$$
(16)
$$P = \frac{d}{d + q}$$
(17)
$$MCC = \frac{d \cdot l - q \cdot p}{{\sqrt {\left( {d + q} \right)\left( {d + p} \right)\left( {l + q} \right)\left( {l + p} \right)} }}$$
(18)

In this, the attributes d, and q indicate the true and false positive, accordingly, and l and p denote the true and false negative, accordingly. The solution encoding diagram of HRS-COA -based weight optimization of the WRRNN technique in the movement recognition is shown in Fig. 5.

Fig. 5
figure 5

Solution encoding diagram of HRS-COA-based weight optimization of WRRNN technique.

Results and discussion

Simulation setup

Python was adopted to implement the developed HRS-COA-WRRNN-based movement recognition model. The population count was 10, and the maximum iteration was 50 for evaluating the recommended movement recognition model. The conventional algorithms like the Golf Optimization Algorithm (GOA)49, Crayfish Optimization Algorithm (CFOA)50, RSO46, COA47, and the existing techniques like MLSTM33, BiLSTM36, and DBN43 were considered to compare the performance of the suggested model in the movement recognition on AAL.

Measures for performance comparison

The performance indices like “sensitivity, specificity, False Positive Rate (FPR), False Negative Rate (FNR), Negative Predictive Value (NPV), False Discovery Rate (FDR), F1-Score, and MCC” are taken to find the performance of the recommended model. Moreover, some other performance measures such as “False Omission Rate (FOR), Prevalence Threshold (PT), Critical Success Index (CSI), and Balanced Accuracy (BA)” are considered in the performance validation.

$$sensitivity = \frac{q}{q + p}$$
(19)
$$FPR = \frac{q}{l + p}$$
(20)
$$FNR = \frac{q}{d + q}$$
(21)
$$NPV = \frac{l}{l + q}$$
(22)
$$FDR = \frac{q}{q + d}$$
(23)
$$F1\,\,measure = \frac{d + l}{{d + l + q + p}}$$
(24)
$$FOR = 1 - \frac{d}{{\left( {d + p} \right)}}$$
(25)
$$PT = \frac{{\sqrt {d \times q} - q}}{d - q}$$
(26)
$$CSI = \frac{d}{{\left( {d + q} \right)}}$$
(27)
$$BA = \frac{p + l}{2}$$
(28)

Receiver operating characteristic (ROC) curve analysis

The ROC curve of the HRS-COA-WRRNN-based movement recognition system is illustrated in Fig. 6. Here, the proposed HRS-COA-WRRNN is indicated in a dark blue line. The area of the ROC curve is superior to the conventional approaches such as MLSTM, BiLSTM, DBN, and WRRNN, which proved that the designed model accurately identifies the movement and helps to take the effective therapies based on the abnormal movement of the human to enhance their quality of life. Additionally, the HRS-COA-WRRNN also determines the behavioral profiles of the human via their movement. Further, the HRS-COA-WRRNN also helps to provide better living conditions for the disabled and aged people. Furthermore, the designed HRS-COA-WRRNN aims to analyze the movement of people to monitor their health condition.

Fig. 6
figure 6

ROC curve analysis of the designed movement recognition in AAL.

Confusion matrix analysis

Figure 7 visualizes the confusion matrix analysis of the HRS-COA-WRRNN-based movement recognition approach. The confusion matrix measures the number of correct and incorrect movements predicted by the recommended HRS-COA-WRRNN. The confusion matrix showed that the developed HRS-COA-WRRNN achieved an overall accuracy of 94.08%, which indicates the developed model provides efficient results in movement recognition in the field of AAL. Further, the recommended HRS-COA-WRRNN mainly focuses on the elderly individual to enhance their quality of life by continuously monitoring their movement. Due to the continuous monitoring of human movement, the safety of humans, especially elderly and disabled persons, is ensured. If any abnormal movement is recognized by the developed HRS-COA-WRRNN model on the elderly person, timely assistance is provided to ensure the safety of the human.

Fig. 7
figure 7

Confusion matrix analysis of the designed movement recognition in AAL.

Precision analysis

Figure 8 represents the precision examination of the HRS-COA-WRRNN-based movement recognition in AAL. The precision value is compared with the existing model against the K fold value and is taken in the range of 1–5. The developed HRS-COA-WRRNN maintains the same precision value at the 1st and 2nd K fold values. Regarding the comparison, the proposed HRS-COA-WRRNN attain ultimate precision values, which indicates that the precision value of the conventional approaches, including GOA-WRRNN, RSO-WRRNN, CFOA-WRRNN, and COA-WRRNN does not exceed the proposed HRS-COA-WRRNN in the movement recognition process. So, the designed HRS-COA-WRRNN effectively performs movement recognition in the AAL to enhance medical services. The designed HRS-COA-WRRNN is also used to reduce hospitalization expenses by detecting abnormal movement for providing adequate medical facilities to the elderly and disabled persons.

Fig. 8
figure 8

Precision analysis of the designed movement recognition in AAL over numerous conventional (a) techniques, (b) algorithms.

Convergence analysis

Figure 9 presents the convergence validation of the proposed HRS-COA-WRRNN-based movement recognition model over the existing algorithms. The convergence analysis is mainly conducted to determine the recommended HRS-COA-WRRNN cost function in the AAL. From the graphical illustration, it appears that the convergence of the HRS-COA-WRRNN is constantly maintained till the 20th iteration values. Furthermore, the convergence of the HRS-COA-WRRNN abruptly declined at the 20th iteration and subsequently remained constant until the 30th iteration. As mentioned above, the convergence of the HRS-COA-WRRNN falls at the 30th iteration, and it maintains the same line until the end of the iteration. The frequent variation in the convergence of the proposed HRS-COA-WRRNN proved that it is not stuck in the local optimal condition and helps to get the optimal solution within a minimal convergence rate. The results verified that the suggested HRS-COA-WRRNN model helps to detect the elderly citizen’s abnormal movement and provides proper medical assistance for enhancing the quality of life. Based on the movement predicted by the developed HRS-COA-WRRNN, the health condition of elderly people is also determined.

Fig. 9
figure 9

Convergence analysis of the designed movement recognition in AAL over existing algorithms.

Analysis by varying the K fold values

The performance of the HRS-COA-WRRNN is determined in terms of various performance indices and is presented in Fig. 10. Here, the recommended HRS-COA-WRRNN is validated with the existing approaches via numerous performance indices. When considering the accuracy metrics, the proposed HRS-COA-WRRNN outperformed the conventional methods like M-LSTM, BiLSTM, DBN, and WRRNN with an accuracy of 97%, 95%, 94%, and 93.5% at the 1st K fold value. Here, the WRRNN also attained good accuracy in the movement recognition process. However, the MLSTM model attained lower accuracy as compared to the proposed HRS-COA-WRRNN. The recommended HRS-COA-WRRNN apparently attained the same sensitivity throughout the K fold values. Thus, the results proved that the developed HRS-COA-WRRNN is beneficial for detecting the movement of humans, especially elderly and disabled persons, to make the proper interaction. The HRS-COA-WRRNN is helpful in taking timely interventions based on abnormal human activity.

Fig. 10
figure 10figure 10

Comparison of the developed movement recognition model over existing models for (a) accuracy, (b) F1Score, (c) FDR, (d) FNR, (e) FPR, (f) MCC, (g) NPV, (h) sensitivity, (i) specificity.

The performance of the HRS-COA-WRRNN is compared against other existing algorithms, as depicted in Fig. 11.

Fig. 11
figure 11figure 11

Comparison of the developed algorithm over existing algorithms in terms of (a) Accuracy, (b) F1Score, (c) FDR, (d) FNR, (e) FPR, (f) MCC, (g) NPV, (h) sensitivity, (i) specificity.

Numerical analysis based on the activation function

Tables 2 and 3 demonstrate the numerical examination of the designed HRS-COA-WRRNN in the movement recognition process. It is evident from the table result that there is some fall in the accuracy value caused by changing the activation function. At the softmax activation function, a certain increase in accuracy value occurred for the proposed HRS-COA-WRRNN. Further, the precision value of the suggested HRS-COA-WRRNN is 53.44%, which is significantly higher than the 37.90%, 40.5%, 43.40%, and 45.91% attained by the GOA-WRRNN, CFOA-WRRNN, RSO-WRRNN, and COA-WRRNN. So, the performance of the HRS-COA-WRRNN is better than that of the traditional models. Based on the results, the developed HRS-COA-WRRNN affords medical services for elderly people according to their abnormal movement. To the best of our knowledge, the designed HRS-COA-WRRNN helps recognize the individual’s movement in the home environment more accurately.

Table 2 Numerical evaluation of the suggested movement recognition model over numerous algorithms.
Table 3 Numerical evaluation of the suggested movement recognition model over numerous techniques.

Statistical analysis

The statistical analysis of the HRS-COA-WRRNN-based movement recognition model is given in Table 4. Here, the suggested HRS-COA-WRRNN attained mean values of 3.1%, 4.65%, 5.42%, and 0.77%, enhanced than the GOA-WRRNN, CFOA-WRRNN, RSO-WRRNN, and COA-WRRNN. Thus, the results showed that the proposed HRS-COA-WRRNN is superior to the conventional algorithms. The suggested HRS-COA-WRRNN is used to predict the day-to-day movement of humans and helps satisfy users’ needs. Further, the developed model is used to provide proper medical assistance based on abnormal human movements. It sequentially maintains a high accuracy value in the movement recognition in the ambient assistive environment.

Table 4 Statistical analysis of the designed movement recognition model over various algorithms.

Accuracy analysis of proposed model with data pre-processing and augmentation techniques during training

The suggested HRS-COA-WRRNN-based movement recognition model uses data pre-processing and data augmentation models such as contrast enhancement, median filtering, CLAHE, and image smoothing during the training process. These models help to enhance the accuracy of the HRS-COA-WRRNN-based movement recognition model. Table 5 elucidates the accuracy analysis of the developed HRS-COA-WRRNN-based movement recognition model when utilizing the data pre-processing and data augmentation approaches. Table 5 analyzes each model with the developed HRS-COA-WRRNN technique. From the table analysis, it has been shown that the accuracy of the HRS-COA-WRRNN technique is relatively high (93.9%) when combining all the mentioned data pre-processing and data augmentation approaches. Thus, it is proved that the accuracy of the HRS-COA-WRRNN technique is high.

Table 5 Accuracy analysis of the designed movement recognition model with data pre-processing and data augmentation models during training.

State-of-the-art analysis

The developed work employs the WRRNN technique for recognizing the movements in an AAL environment. Here, the weights of the RNN technique are optimized by the HRS-COA. This optimally weighted network’s performance is analyzed with the existing models in movement recognition using some significant performance measures performed in this section. The implemented HRS-COA-WRRNN-based movement recognition model is validated with the state-of-the-art models and the findings are shown in Table 6. By employing the softmax activation function, this experiment is carried out. The effectiveness of the HRS-COA-WRRNN technique is verified by this experiment. The specificity of the implemented HRS-COA-WRRNN-based movement recognition model is improved by 8.48% of SNN, 10.02% of Bi-conventional RNN, 4.33% of DBN, and 3.01% of LSTM accordingly. The experiments based on other metrics such as accuracy, FNR, F1-score, sensitivity, and so on also show that the recommended HRS-COA-WRRNN technique is outperformed the state-of-the-art models. Additionally, the FOR of the developed HRS-COA-WRRNN-based movement recognition model is relatively minimized by 95.47% of SNN, 82.91% of Bi-conventional RNN, 61.3% of DBN, and 36.01% of LSTM respectively. Hence, these efficient performance measures display that the implemented HRS-COA-WRRNN can provide promising solutions in movement recognition with very less false negatives thus this model ensuring its supremacy in this sector.

Table 6 Performance analysis of the designed movement recognition model over state-of-the-art models.

Computational complexity analysis

The computational complexity analysis of the suggested HRS-COA is shown in Table 7 over traditional algorithms. This validation helps to analyze the HRS-COA’s effectiveness over the conventional algorithms. Here, the chromosome length is indicated as \(C_{len}\), and the number of population is specified as \(N_{pop}\). Moreover, the maximum iteration is indicated as \(M_{itr}\). The developed HRS-COA has been implemented with 50 iterations and 10 populations. Moreover, based on the hidden neuron count of the WRRNN, the chromosome length is specified. From the experiment, it has been displayed that the HRS-COA attained very little computational complexity than the existing algorithms. Therefore, the HRS-COA-WRRNN-based movement recognition process is relatively effective.

Table 7 Computational complexity analysis of the designed movement recognition model over existing algorithms.

Time complexity analysis

The time complexity analysis of the implemented HRS-COA-WRRNN-based movement recognition model over traditional algorithms and the models is shown in Table 8. The developed model utilizes much less amount of time while performing the movement recognition process than the existing models. From the table experiment, it is displayed that the suggested HRS-COA-WRRNN utilizes 17.31 min for recognizing the movements, which is lower than the conventional models. Therefore, the implemented HRS-COA-WRRNN-based movement recognition model attains more effectiveness than the previous models and algorithms.

Table 8 Time complexity analysis of the designed movement recognition model over existing algorithms and models.

Robustness analysis

The developed model, which combines the CAE with the WRRNN model optimized with HRS-COA, demonstrates the robustness to noise and real-world data variations. The CAE’s capacity to learn the robust and compact feature representations allows the technique to efficiently filter out the noise and irrelevant data. In addition, the WRRNN model’s ability to capture the long-term dependencies and the subtle variations in the movement patterns enables the technique to adapt to changes in real-world data. The suggested HRS-COA further improves the robustness of the model by effectively exploring the solution space and eliminating the local optima. As an outcome, the suggested model provides enhanced robustness and generalizability to the noise and varying real-world data, making it an effective and reliable solution for movement recognition in AAL environments. The robustness analysis of the implemented HRS-COA-WRRNN-based movement recognition model is shown in Fig. 12 compared against existing models. By varying the correlation values, the noise coefficient is validated. When the noise coefficient value is 15, the correlation is decreased by 14.5% of M-LSTM, 15% of Bi-LSTM, 6.25% of DBN, and 14.3% of WRRNN accordingly. Thus, the outcomes proved that the suggested HRS-COA-WRRNN-based movement recognition model achieved high robustness over existing models.

Fig. 12
figure 12

Robust analysis of the designed movement recognition in AAL over existing models.

Conclusions

An intelligent deep-learning model for predicting the movement of humans in the ambient environment has proposed in this research work. The proposed model attained higher accuracy in movement recognition by retrieving the required features from the input data. The extracted features were further given to the WRRNN to predict the movement of the human in the AAL. Here, the weight was optimally selected using the HRS-COA to enhance the accuracy and precision values in the movement recognition process. Finally, the evaluation was carried out on the proposed HRS-COA-WRRNN to ensure the efficacy of the movement recognition process. The precision value of the suggested HRS-COA-WRRNN achieved a precision value of 53.44%, which was significantly higher than the GOA-WRRNN, CFOA-WRRNN, RSO-WRRNN, and COA-WRRNN. Thus, the results showed that the suggested HRS-COA-WRRNN is more effective for the movement recognition process. However, when the WRRNN technique processes a large amount of data, the model may face an overfitting issue. The overfitting issues of the WRRNN affect the accuracy of the movement. In order to prevent this issue, a hybrid or ensemble deep learning network will be suggested in future work for the movement recognition process that will improve the accuracy in the movement recognition process.