Location-aware deep learning-based framework for optimizing cloud consumer quality of service-based service composition

The expanding propensity of organization users to utilize cloud services urges to deliver services in a service pool with a variety of functional and non-functional attributes from online service providers. brokers of cloud services must intense rivalry competing with one another to provide quality of service (QoS) enhancements. Such rivalry prompts a troublesome and muddled providing composite services on the cloud using a simple service selection and composition approach. Therefore, cloud composition is considered a non-deterministic polynomial (NP-hard) and economically motivated problem. Hence, developing a reliable economic model for composition is of tremendous interest and to have importance for the cloud consumer. This paper provides “A location-aware deep learning framework for improving the QoS-based service composition for cloud consumers”. The proposed framework is firstly reducing the dimensions of data. Secondly, it applies a combination of the deep learning long short-term memory network and particle swarm optimization algorithm additionally to considering the location parameter to correctly forecast the QoS provisioned values. Finally, it composes the ideal services need to reduce the customer cost function. The suggested framework's performance has been demonstrated using a real dataset, proving that it superior the current models in terms of prediction and composition accuracy.

timeframe. So compared to regular online services, The cloud service composition is thought of as an economic strategy based on the long term. Typically, the economic model of a cloud consumer seeks to achieve things like increased throughput, decreased reaction times, and low capital costs. We presume that QoS features are expressed as a time sequence in this research. The correlation between the QoS characteristic and one or more other QoS attributes is possible. In study [17], when the correlation operator between QoS attributes is put to the test, it is found that throughput and response time attributes have a very significant negative correlation. By taking into account all of the connected time series, the correlation factor between QoS characteristics can be used to forecast the time series of certain QoS qualities. The majority of QoS-aware prediction models that are currently available do not take the correlations between QoS variables into account. Then again, because of economic considerations, enormous companies and organizations generally are more able to construct a long-term business relationship with cloud service providers. On the other hand, the end user's requests (i.e., QoS requirements) and the selected services' performance (i.e., QoS attributes) are both fluctuant in practice. Accordingly, the composite service with the best current QoS performance is not necessarily the best after a while or is not awesome sometimes. Thus, cloud service composition systems provide a value-added service.
To tackle the problem of composing the best cloud services that cut down on the function of consumer costs, this paper's work provides a location-aware framework based on deep learning for improving cloud consumer QoS-based service composition location-aware deep learning-based service composition (L-DLSC). This framework is an enhanced framework based on our earlier work [1]. It addresses the problem as a multivariate time series analysis. The proposed L-DLSC framework comprises three phases. As per the primary phase, the filtration phase is acquainted and applied to select the bestcontributed attributes to reduce the total execution time of learning and composition. In the subsequent phase, the long short-term memory (LSTM) network is used to accurately predict future behavior. In the third phase, the composition of the service is handled as a multi-objective problem using the particle swarm optimization algorithm (PSO) with considering the location between services and the consumer.
Therefore, this paper's contribution can be summed up as: i) by combining the deep learning network LSTM and the PSO algorithm, a framework to compose services using deep learning-based service composition (DLSC) has been improved; ii) to speed up execution, the number of existing characteristics has been decreased utilizing an autoencoder (AE) network. When choosing the best composite service to reduce latency, the location parameter is taken into account.
The remaining portions of the essay are structured; the fundamentals of cloud service composition are introduced in section 2. The related work is presented in section 3. Section 4 introduces the proposed location-aware deep learning-based cloud service composition architecture. Section 5 presents the experimental findings. Section 6 presents conclusions and ideas for additional research.

METHOD
Utilizing a combination of cloud services is intended to provide value-added services can complete demanding tasks for customers. The consumer's QoS limitations and preferences must be met as one of the service composition's requirements [1]. The choice of the best individual services that must be combined to provide value-added composed services is one of the main issues with the service composition challenge [18]. Mathematically, the multi-dimensional, multichoice knapsack problem (MMKP), an NP-hard problem, can be used to represent the composition of a QoS aware service. As a result, the composite service (CS) problem, which was mentioned in our earlier work, may be characterized as being the make-up classifications of the essential services (SC), which are depicted by (1) [1].
With C stands for a particular a solitary service class, n stands for the necessary quantity classifications of individual services, the (2) defines a single service class called .
Where, the single service class contains f (f>1) functionally equivalent services with different QoS values.
So, the quality of SC can be determined using (3).

641
Finding the best composited services with the best QoS characteristics to satisfy the needs of cloud consumers is a clear objective in the selection process. Cost, throughput, and reaction time are taken into account as QoS features in this study. For the cloud service composition, which regularly changes in accordance with the complex job specification and its needs, there have been a number of necessary workflows. Sequential pattern, conditional pattern, loop pattern, and parallel pattern are the four fundamental composition patterns (e.g., workflow patterns) that can be used to construct a composite service. The aggregation functions of various QoS parameters vary often for each composition pattern. Therefore, as stated in our earlier work, Table 1 displays the composition pattern and its accompanying aggregated functions. Ought to be taken into consideration to specify and assess the general level of the cloud composite service quality as shown in Figure 1 [1], [14], [15]. Table 1. Aggregation functions, where k is the number of loop times, p is a probabilistic variable, and n is the total number of composing services [19] Cost Figure 1. Basic composition pattern [20] The best way to solve the composite service problem is to maximize or minimize the vector's component values while maximizing the ( ) vector. The composing system is unaware of how the final composited service will be delivered. will behave over an extended period of time because it has chosen the concrete service providers for the composited service. As a result, it is crucial to foresee the long-term desires of cloud users, which are illustrated by the economic framework. As opposed to that, economic frameworks are described as "theoretical constructs that characterize economic processes by a collection of variables and a set of logical and quantitative linkages between them". The composition of cloud services challenge is seen as an optimization issue with multiple objectives to boost reaction times, cut costs, and increase throughput [12].
The customer's actualized QoS values within a specific time period t, together with their corresponding weights, a scoring feature S indicated using the common weighted score function [4]: As a result, for the purpose of creating a composite plan, the score function, which is established using, the (5) is the total contains all QoS ratings for the full time T. Since there are numerous cloud infrastructure and software suppliers offering various combinations. These mixtures result in different plans. Finding the composing services that maximize S(plan) is the primary goal of the cloud service composition. The research presented in this essay suggests a location-aware framework based on deep learning to effectively forecast recommended services that optimize the consumer objective function in order to increase composition accuracy.

RELATED WORK
Problems with the composition of cloud services is split into two groups: both functional and non-functional characteristics, or QoS. Consumers can differ in their preferences, requirements, and actions. As a result, approaches to composition that are QoS-based, long-term, and location-aware are necessary.

QoS cloud service composition
Asghari et al. [16] have offered an approach for internet of things (IoT) environments for providing composite cloud services. This approach classifies the candidate services into four categories based on their QoS fitness value and privacy-preserving level. To determine the QoS fitness value for each candidate service, an SFLA-GA hybrid algorithm is proposed of genetic algorithm (GA) and shuffled frog leaping algorithm (SFLA) based on nine QoS parameters (i.e., availability, response time, reliability, throughput, latency, compliance, success ability, documentation, and best practice). These nine parameters are normalized and aggregated together to determine the fitness value for each candidate service. On the other hand, the privacy level is determined by considering three factors (i.e., sensitivity, delegation depth, and retention time). Finally, the candidate service is belonging to one of four categories: low fitness/low privacy level, low fitness/high privacy level, high fitness/low privacy level, and high fitness/high privacy level. Finally, the authors have supposed that the last category contains the most proper services for the consumers' request.
In study [13] uses an eagle strategy to develop a QoS-aware cloud service composition. In this approach, exploration and exploitation are balanced in order to address problems like poor convergence rate. The interdependencies and correlations between cloud services as well as QoS parameters are not taken into account by this approach. The authors presumptively used a single repository for all services. As a result, it also ignores the necessity to compose services from a variety of service repositories while limiting connectivity across the various clouds. An algorithm for QoS-aware cloud service composition based on discrete immune fruit fly optimization algorithm (DIFOA) is proposed in [12]. According to this algorithm, the initial population is generated which consider as the initial optimal weights for the resultant services from Pareto applied on initial candidate services. At that point, it finds an optimal composed service based on user preferences attains good fitness value, execution time, and error rate. Since the workflow and concrete services were similar in terms of range, the effect of larger variations in the request-workflow pairs is not considered in this algorithm. Additionally, it does not consider the different selection matching functions.
The composition problem is addressed using integer linear programming (ILP) in [21]. It converts the restrictions and objectives of the issue into linear equations, which are then solved by modifying a special software solver like LPSolve. Surprisingly, as the size of the problem grows, the integer program technique requires exponential time. In order to address the time cost shortage issue, the service composition problem is solved using a GA, in which each chromosomal gene represents a composite service's abstract service and value denotes an applicant services [22]. A strategy based on GA conducts quick seeks to discover almost ideal answers. Nevertheless, because it takes into account static levels of QoS at the moment of construction, not at all well suited for cloud service composition.
The matrix factorization of the user-service matrix is used to leverage the predicted future QoS for planning the composite service in [23]. The grid of user services is then divided into the sum of the user and service matrices using the singular value decomposition method. However, this paradigm has relied on quick QoS values. To maximize resource consumption, the network of deep recurrent neurons is how to predict future QoS for cloud service providers [15]. It is regarded as having just one QoS feature. As a result, it is unable to take into account the relationships among various QoS parameters.

Long-term service composition
The study [15] proposes a deep learning strategy for long-term QoS-based service composition. It uses deep recurrent long short-term memories (LSTMs) to predict long-term QoS trends. It provides a composition middleware that sends two types of recommendation requests to the long-term QoS compliance checker (LQCC); composition and substitution requests. A composition recommendation request includes the ID of a potential component along with QoS requirements to LQCC. LQCC requests the QoS prediction trend for the component from the QoS predictor. Then, it checks compatibility between the QoS prediction and QoS requirement intervals and returns a composition recommendation to the middleware. A substitution recommendation request includes IDs of the services to substitute and potential substitutes to LQCC. LQCC obtains the QoS prediction trends for the component to substitute and potential substitute from the QoS predictor. Then, it checks whether the two trends are close enough to each other and returns a substitution recommendation to LQCC. A framework for DLSC was put out in [1]. This framework works by combining both the PSO technique and the deep learning LSTM network to forecast the QoS values. The long-term based QoS service composition has been formulated in another model as an optimization issue employing meta-heuristic methods such as genetic algorithms, annealing, and tabu search [24]. This model shows that only the most effective services with the typical long-term QoS are chosen. The relationships among the QoS measures, however, have not been taken into account.
In [25], ARIMA or the auto-regressive integrated moving average model to forecast how service requests will behave going forward. It is not appropriate for long-term composition designing because it has not collected stochastic request arrivals. In [26] defines a sustained qualitative approach that cloud service providers must compile customer requests. It saw the IaaS composition as an optimization problem including preferences.

Location-aware service composition
The presentation of a unique location-aware collaborative filtering approach for QoS-based web service recommendation in [27]. First, it considers the individual QoS traits of both services and consumers to calculate the likeness between them based on using Pearson's correlation coefficient (PCC). Then, it obtains location information of a user including the network and the country according to the users and services and finds the similarity between them. Finally, according to the QoS and location similarities, the required service is recommended.
A location-aware service recommendations with privacy-preservation for the internet of things (IoT) environment is proposed in [28]. First, the QoS matrix is divided for recommendation decision-making into multiple QoS sub-matrices based on service location information. Second, the neighbors of a target user are found through a less-sensitive manner according to the QoS sub-matrices and the locality-sensitive hashing (LSH) technique. Finally, the appropriate candidate services to the target user are recommended with the help of derived neighbors.

PROPOSED LOCATION-AWARE DEEP LEARNING-BASED SERVICE COMPOSITION FRAMEWORK
Building precise future economic strategies is key to the cloud business' success. The work in this paper describes the introduction of a location-aware framework for the composition of services using deep learning L-DLSC based on reducing the space dimensions of the multiple time series and combining the PSO and LSTM networks are used to create an economic framework and choose the best service providers for the clients. Three phases make up the suggested model's flowchart as shown in Figure 2. In the sections that follow, the phases of the proposed L-DLSC framework will be thoroughly covered.

Data preprocess and reduction phase
In this phase, the QoS data will be preprocessed and normalized. Then, their dimensions are reduced using an autoencoder network. The main goal of this phase is to reduce the execution time required for predicting the long-term QoS data.

Data preprocess
As described in our previous work [1], there are three data preprocessing stages used to increase the forecasting accuracy. In accordance with the first step, noise is removed from the QoS time series by using the wavelet transform. Data normalization is necessary in the second stage and is done by applying (6) to scale converting information from the original space to actual numbers between 0 and 1.
Where the observation's initial value (x) and its new scaled value (y) are represented, respectively, and min and max represent the low and high points of the series. At stage three, in order to transform QoS information into supervised machine learning form (X, Y), where X represents patterns for input and Y represents patterns for output/label, it must first be converted using time-series format, which is a list of observational metrics beginning with x1, x2, ..., xn. The shift function in this phase is used to advance and regress the observations using the anticipated/next observations and the planned duration of lagged observations (X), (Y).

Dimensionality reduction
Many dimensionality reduction methods, including the discrete Fourier transform (DFT) and singular value decomposition (SVD), have been proposed for the transformation of time series data [29], principal component analysis (PCA) [30], discrete wavelet transform (DWT) [31] and piecewise aggregate approximation (PAA) [29]. Time series segmentation is a different method for dimensionality reduction [32]. These methods now in use automatically select the amount of hidden variables to be used while also identifying hidden variables among n input streams. According to their distributions and correlations, the observed values of the hidden variables display the general pattern of various input series. Due to the lack of a well-defined similarity measure, these current methods cannot be easily expanded for the tags similarity search problem. Most crucially, the relationships between the various time series cannot be handled by present techniques.
Recently, the autoencoder network is widely used for dimension reduction. Autoencoders are simple learning networks that aim to transform inputs into outputs with the least possible amount of distortion [33], [34]. As shown in Figures 3 and 4, Autoencoders are artificial neural networks (ANN) with symmetric structure, where the middle layer represents an encoding of the input data [35]. They are trained to reconstruct their input onto the output layer while verifying certain restrictions which prevent them from simply copying the data along with the network [36]. Starting with a short code that ignores noise, Autoencoders condense the original data. The code is then uncompressed to create an image that is as near to the original input as feasible. According to the work in this paper, the Autoencoder network has been constructed to reduce the search dimensions.

Long term prediction
In our earlier work [1], we showed how extended sequences may be learned and predicted using LSTM. The forget gate, input gate, update gate, and output gate are the four components that make up an LSTM memory cell [26]. These gates regulate the interactions between memory cells that are close to one another as well as the memory cell itself. The status of the cell is compared to a conveyor. The unrolled LSTM network and the method for updating each gate value are shown in Figure 5. Where, at time t, the memory cell's input vector (xt) and output result (ht) are, respectively, the input vector and result. The input gate's it, forget gate's ft, and output gate's ot values, respectively, are those at time t. it, ft and ot are the values of the input gate, the forget gate, and the output gate at time t, respectively. The memory cell's potential state at time t is denoted by Ct.
According to our experiments, the layer LSTM, the layer's density and dropout procedure make up the majority of the prediction model architecture as shown in Figure 6. First, input matrices comprised of four lagged the LSTM layer receives four next values/look ahead values in addition to values for each QoS attribute (X) (Y). The dropout technique is then used on the output of the LSTM layer to avoid over-fitting the DLSC prediction model. The dense layer, a neural network (NN) that is fully linked and has a linear activation function, is where the output from the dropout process passes after that. MSE is then determined as the loss function. The "Adam" optimizer is used to optimize the model parameters in order to minimize the loss function. The dropout parameter is adjusted to 0.2 following extensive studies to determine the optimal way to train the network and obtain the best generalization scenario. The network will not exist without the dropout.

Location-aware service composition
Location is a crucial factor for recommendation of decision making where the QoS often depends heavily on the user locations or service locations. For example, a user in Australia may access a web service hosted in Australia very quickly, but it is very slow to access a web service hosted in China [27]. Therefore, location is a crucial factor that impacts the accuracy of composition results and the satisfaction of the user.
In this paper, the Haversine formula has been used to calculate the location factor [38]. The haversine formula determines the great-circle distance between two points on a sphere given their longitudes and latitudes. The law of haversines is important in navigation; it is a special case of a more general formula in spherical trigonometry, which relates the sides and angles of spherical triangles. Therefore, the haversine formula is considered an accurate way of computing distances between two points on the surface of a sphere using the latitude and longitude of the two points. The haversine formula is a re-formulation of the spherical law of cosines, but the formulation in terms of haversines is more useful for small angles and distances.
Where, θ is the central angle between any two points on a sphere, such that, θ=d/r, d is the distance between the two points along a great circle of the sphere, r is the radius of the sphere. Therefore, during the composition process using the PSO algorithm, the distance of the candidate services is determined using the haversine formula as illustrated in the following algorithm [39].
(1 − )) distance=R*c Return distance The services with a high distance value from the client are penalized under our methodology. The following is a possible way to represent a penalty on service x in a certain candidate plan.
Therefore, the objective function of this candidate plan is determined over the entire anticipated period T, written as (9).
In a candidate constructed service plan, n denotes the total number of cloud services that are engaged.

RESULTS AND DISCUSSION
Several tests are conducted and contrasted with the existing framework in [16] and the earlier framework provided in [1]. These tests are using the same environment setting in order to evaluate the performance of the proposed service composition (L-DLSC) framework. The tests are being conducted on a PC with a 2.80 GHz processor, 8.0 GB of RAM, and Windows 10 and Python 3.7 installed.

Data description
During our experiments, we adopted a popular real-world web service dataset, the web services (WS-Dream) dataset [40]. This data set includes 339 users (from 31 countries) and 5825 services (hosted in 74 countries), as well as a historical time series QoS data for 100 cloud service providers, response time, throughput, and cost metrics were gathered over the course of six months as 28 time slots [41]. The WS-Dream dataset is used to conduct the IoT-existing framework while the later QoS dataset is used in our previous framework. Here, all experiments are conducted using WS-Dream after adding cost attribute using the same strategy as in [41]. Figure 7 shows the comparison results among the proposed service composition L-DLSC framework, the existing IoT framework in [16], and the previous DLSC framework given in [1] concerning the execution time parameter. To conduct the cost-time analysis, Figure 7 highlights the value of time is growing by increasing the quantity of composing services. Nevertheless, the current IoT framework [16]  647 whose execution duration is the longest in comparison to our proposed L-DLSC framework due to the exhaustive task of decomposing the QoS-matrix into sub-matrices based on the user location then building user indices based on the similarity measures between the user and the candidates' services. Concerning the proposed L-DLSC framework, a suitable penalty on the long distances between the candidate services and the user is needed to locate the top writing services at a fair price. The typical time required to discover the ideal composition plan using the proposed L-DLSC framework 50% more is added in comparison to our previous DLSC framework, while the time cost of the IoT Composition framework is increased by 96% relative to our previous DLSC framework. Therefore, according to the output of these experiments, the proposed L-DLSC framework achieves significantly improved results for the time cost.

Optimality
In Figure 8, the values of the objective function in relation to the number of iterations are shown. According to the results given in Figure 8, it is clear that our proposed L-DLSC framework converges faster than the others, after which the current IoT framework [16]. Comparing our suggested L-DLSC framework to the prior DLSC framework presented in [1], the average best objective F score is raised by 44%. Although the average optimal objective F value utilizing the current IoT framework is higher than the proposed L-DLSC framework by 32%. This is due to the proposed L-DLSC framework lessens the services' weight which with a high distance from the customer, while increases the weight for the services which have a low distance from the customer. On the other hand, the existing IoT framework searches about the most similar ones to find the excellent services came from the decomposed matrices that are considered a pricey procedure. Besides, this proposed L-DLSC framework converges faster with higher composition values than the previous DLSC framework presented in [1].

Effect of dimensional reduction
According to the proposed L-DLSC framework, the first aim is to reduce the dimensions of the composition problem. Therefore, the autoencoder network is added to perform this task. Figure 9 shows the effect of adding the autoencoder network. According to Figure 9, the accuracy of the long-term prediction process is compared after and before adding the autoencoder process in terms of the root mean squared error (RMSE) where smaller RMSE means better performance. According to the results in Figure 9, it is found that adding the autoencoder network significantly affects both the accuracy and the time required. Also, the prediction error has been reduced to 17% after adding the autoencoder due to capturing the most important features. Figure 10 shows the comparison between our proposed L-DLSC framework and the previous DLSC framework in [1]. The comparison is done after adding the location parameter to pick the best service. As stated by findings in Figure 10, which demonstrate that the typical best objective F value using the new proposed L-DLSC framework is increased by 44% relative to the previous DLSC framework in [1].

Composition output
The output of the suggested L-DLSC framework, or the best composition services, is shown in Figure 11, where each number in the matrix corresponds to a service ID. Additionally, based on their functional requirements, the impact for the average whole dataset using the DLSC framework is divided into

CONCLUSION AND FUTURE WORK
To reliably recommend cloud services based on QoS features, the location-aware framework for service composition based on deep learning (L-DLSC) is presented in this work. First, by lowering the dimensionality of the data, the Autoencoder network has been employed to narrow the search space. Then, a combination of the deep learning LSTM network and PSO algorithm is used to solve multi-objective problems while also leveraging the strength of the LSTM network when keeping track of time series' multivariate QoS characteristics dependencies. Last but not least, the location factor has been taken into account when choosing the best composite services. We may infer from the trials that have been done that our suggested L-DLSC architecture significantly improves the outcomes in the cloud service composition environment. Our proposed framework will be enhanced in the future by the inclusion of new elements like security and privacy in the cloud composition issue.

Samar Shaaban Abdelfattah Haytamy
is an assistant lecturer in the department of computer science, faculty of computers and information, Fayoum university, Egypt. Samar received her MSc in computer science in 2020. Her research interests are machine learning, federation learning, service-oriented computing, open-source software, cloud computing, parallel programming, and big data. She can be contacted at email: Ssa10@fayoum.com.

Fatma A. Omara
is a Professor in the Computer Science Department, Faculty of Computers and Information, Cairo University. She has published over 120 research papers in prestigious international journals, and conference proceedings. She has served as Chairman and member of Steering Committees and Program Committees of several national and International Conferences. She has supervised over 50 Ph.D. and M. Sc thesis. Prof. Omara is a member of the IEEE and the IEEE Computer Society. Prof. Omara interests are parallel and distributed computing, distributed operating systems, high performance computing, grid computing, cloud computing, big data, IoT. She can be contacted at email: f.omara@fcicu.edu.eg.