Spatio-Temporal Composition of Crowdsourced Services

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9435)


We propose a new composition approach for crowdsourced services based on dynamic features such as spatio-temporal aspects. The proposed approach is defined based on a formal crowdsourced service model that abstracts the functionality of crowdsourced data on the cloud in terms of spatio-temporal features. We present a new QoS-aware spatio-temporal union composition algorithm to efficiently select the optimal crowdsourced composition plan. Experimental results validate the performance of the proposed algorithm.


Crowdsourced service Spatio-temporal composition   Crowdsourced service composition Spatio-temporal QoS 

1 Introduction

The ubiquity of mobile devices enables to crowdsource sensor data. Storing, processing and managing continuous streams of crowdsourced sensed data pose key challenges [4]. Due to availability, low-cost and fast access to cloud services, the aggregation of crowdsourced sensor data on the cloud (i.e., crowdsourced Sensor-Cloud) provides a unique opportunity to address the above challenges.

We propose to harness the service paradigm as a key mechanism to turn crowdsourced sensor data into useful information. The service paradigm is a powerful abstraction hiding data-specific information which focuses on how data is to be used. In this regard, the functionality of crowdsourced sensor data on the cloud is abstracted as crowdsourced services which are easily accessible irrespective of the distribution of crowdsourced sensor data sources.

Because of the nature of crowdsourced sensors, mobility is an intrinsic part of the functional and non-functional aspects of crowdsourced services. This provides an opportunity to combine individual crowdsourced services to provide value-added services whenever they are available. However, this also presents challenges because of the hiding distributed, volatile and dynamic aspects including spatio-temporal dependencies. In this regard, we focus on spatio-temporal aspects as key parameters to query the crowdsourced Sensor-Cloud. The challenge can be more formally defined as finding the “best” spatio-temporal composition of crowdsourced services.

This paper focuses on providing a framework for spatio-temporal selection and composition of crowdsourced services. We first formally define a new spatio-temporal model for crowdsourced services and composition framework. In addition, we propose a spatio-temporal union composition algorithm. Our case study focuses on the use of WiFi hotspot sharing in a geographical area. Finally, a performance study of the proposed approach is presented.

The remainder of the paper is structured as follows: Sect. 2 formally defines the crowdsourced service model and composition framework. Section 3 illustrates the new QoS model. Section 4 details the proposed composition approach. Section 5 describes the evaluation of the approach. Section 6 concludes and highlights our future work.

Motivating Scenario. Let us assume that Sarah would like to find the best WiFi hotspot-covered path from ‘A’ to ‘B’. The process of finding the best journey is considered as a two-steps composition problem. In the first step as explained in [2], we consider a line segment as a service (e.g., a tram service) with a set of quality parameters. By applying STA* [3], we have a set of optimal travel plans from ‘A’ to ‘B’. In the second step, we take the first step output as an input and then look at WiFi coverages as a key parameter to determine the best travel plan. Our approach considers one path at a time for selecting the best coverage along each and every optimal plan. The novelty of this approach is considering QoS WiFi coverage as a service because of intrinsic complexity of WiFi coverage which usually includes area, signal strength and bandwidth. Therefore, we formulate the problem of selecting the best coverage as a composition of WiFi coverages on a journey from ‘A’ to ‘B’. Each basic WiFi coverage is offered by one hotspot provided by the crowd. Therefore, the entire coverage of a plan will be crowdsourced. We also assume that hotspots are static, i.e., the coverage does not change in time and space. Key to crowdsourcing hotspots are the spatio-temporal attributes which will be used for selecting and composing services. This paper focuses on the second level.

2 Spatio-Temporal Model for Crowdsourced Service

In this section, we propose a new formal spatio-temporal model for an atomic crowdsourced service and crowdsourced service composition framework.

2.1 Spatio-Temporal Model for Atomic Crowdsourced Services

We discuss the key concepts to model a crowdsourced service in terms of spatio-temporal features of crowdsourced sensor data.

Definition 1: Linear Composition Plan P. A linear composition plan P is modelled as a sequence of component line segment services [2] in the form of a trajectory \(\{ < p_i, t_i >, 1\leqslant i \leqslant k \}\), where
  • \(p_i\) is a geospatial coordinate set (\(x_i\),\(y_i\)),

  • \(t_i\) is a time instant.

Definition 2: Linear Plan Set \(\mathbb {P}\). Given a source point \(\varsigma \) and destination point \(\xi \), a linear plan set \(\mathbb {P}\) is a set of all optimal linear composition plans from \(\varsigma \) to \(\xi \) (Fig. 1(a)). We assume that \(\mathbb {P}\) is the output of applying a variation of STA* algorithm in our previous work [3] that return k optimal linear plans.
Definition 3: Sensor sen. A sensor sen is a tuple of \(< sid, loc, sa, tsp >\) where
  • sid is a unique sensor ID,

  • loc is the latest recorded location of sen,

  • sa is the specific sensing area centred at loc with the radius \(R_s\),

  • tsp (timestamp) is the latest time in which sensor data related to a crowdsourced service is collected from sen.

Definition 4: Crowdsourced Service S. A crowdsourced service S is a tuple of \(<\) id, SEN, \(space\text {-}time\), F, Q \(>\) where
  • id is a unique service ID,

  • \(SEN = \{sen_i.sid | 1\leqslant i \leqslant m \}\) represents a finite set of sensors \(sen_i\) collecting sensor data related to S. In this paper, we assume that each crowdsourced service consists of one sensor (i.e., \( \left| SEN \right| =1 \)),

  • \(space\text {-}time\) describes the spatio-temporal domain of S. In this paper, we restrict the space of a service to a surface area. The space is presented by a spatial square area \(A_s\) which is a minimum bounding square containing the sensing area of S (i.e., \(\)). The time is a tuple \(<\,t_s, t_e\,>\), where
    • \(t_s\) is a start-time of S,

    • \(t_e\) is an end-time of S.

    As can be seen in Fig. 1(b), the crowdsourced service is modelled as a Minimum Bounding Box MBB which is represented by (\(x_s\), \(y_s\), \(t_s\)) (i.e., bottom-left) and (\(x_e\), \(y_e\), \(t_e\)) (i.e., top-right),

  • F describes a set of functions offered by S (e.g., providing WiFi hotspot),

  • Q is a tuple \(<\) \(q_1\),\(q_2\), ... , \(q_n\) \(>\), where each \(q_i\) denotes a QoS property of S.

Fig. 1.

Crowdsourced service model

2.2 Spatio-Temporal Model for Composite Crowdsourced Services

It is quite likely that a linear plan cannot be covered by a single crowdsourced service. In such cases, crowdsourced services may need to be composed to cover the linear plan. The following rule, called spatio-temporal composability, checks whether two component services are spatio-temporally composable.

  • Definition 5: Spatio-Temporal Composability. Two component services \(S_k\) and \(S_l\) are spatio-temporally composable with respect to a linear plan P iff
    • \( S_k \cap P \ne \varnothing \; \& \; S_l \cap P \ne \varnothing \) i.e., \(S_k\) and \(S_l\) intersect P.

    • \(S_l\) has overlap with the extended MBB of \(S_k\) (i.e., \(MBB_{Ex}(S_k)\)). The \(MBB_{Ex}\) (i.e., buffer area) is computed by extending each edge of the area of \(S_k\) by a distance d and also extending time edge by time period \(\tau \) (Fig. 2(a)). The values of d and \(\tau \) are assumed to be user-defined. For example, in our scenario d are \(\tau \) are the maximum disconnection tolerant distance and time.

    • Two edge vectors \(V_{p_{s} p_{e}}\) and \(V_{loc_{k} loc_{l}}\) are in the same direction. The vectors \(V_{p_{s} p_{e}}\) and \(V_{loc_{k} loc_{l}}\) connect two vertices (\(p_{s}, p_{e}\)) and (\(loc_{k} loc_{l}\)) respectively. \(p_{s}\) and \(p_{e}\) are the start-point and end-point of P and \(loc_{k}\) and \(loc_{l}\) are the sensed points of \(S_k\) and \(S_l\), respectively (Fig. 2(a)). The vector direction is used as heuristic which is based on the premise that the best neighbours are going to be found in the direction where the traveler is going.

    As can be seen in Fig. 2(a), \(S_k\) and \(S_l\) are spatio-temporal composable. However, although \(S_m\) intersects P, it does not have overlap with \(MBB_{Ex}(S_k)\). As a result, \(S_m\) and \(S_k\) are not spatio-temporal composable.

Given a plan P and a set of crowdsourced services \(\{ S_1, S_2, ... , S_n \}\), we model a composite crowdsourced service as the total union area of component services that covers P (Fig. 2(b)). A composite crowdsourced service CCS is a sequence of component services \(\{\) \(S_{i}\), \(1\leqslant i\leqslant n\) \(\}\) where each pair of (\(S_{i}\), \(S_{i+1}\)) is spatio-temporal composable. In the remainder of the paper, the service and composite service are used to refer to a crowdsourced service and composite crowdsourced service, respectively.
Fig. 2.

Composite crowdsourced service model

2.3 Spatio-Temporal Index Data Structure for Crowdsourced Services

Indexing of services enables the fast discovery of services. We index services considering their spatio-temporal features using a 3D R-tree [5]. The 3D R-tree is a spatio-temporal index data structure which efficiently answers the range queries of the type “report all objects located within a specific area during the given time interval”. The leaf nodes of the 3D R-tree represent actual services which are presented using MBB that encloses the area of a service (Fig. 3). To find composable services, called neighbours, we use Spatio-TemporalSearch algorithm [3] which searches through the 3D R-tree to find neighbours that intersect \(MBB_{Ex}(S)\).
Fig. 3.

Example of a 3D R-tree

Fig. 4.

Coverage QoS model

3 An Extensible Quality Model for Crowdsourced Service

Given the diversity of service offerings, an important challenge for users is to discover the ‘right’ service satisfying their requirements. We introduce novel QoS attributes for services. For the sake of clarity, we use a limited number of QoS attributes.

3.1 Quality Model for Atomic Crowdsourced Service

We propose to use spatio-temporal quality criteria which is part of describing the non-functional aspects of services:
  • Coverage (cov): Signal strength is associated with the coverage area of a service. The closer the user to the center of a service, the stronger WiFi signal is. We model \(q_{cov}(S)\) using exponential attenuation probabilistic coverage model [1]. In this model, each service has a confident radius \(R_c\) (Fig. 4). The coverage \(q_{cov}(S)\) varies from zero to one. Within the distance of \(R_c\), the value of \(q_{cov}(S)\) is 1 which means full signal. In the interval (\(R_s - R_{c}\)), the value of \(q_{cov}(S)\) approaches zero as the distance from the center increases. Beyond \(R_{s}\), the value of \(q_{cov}(S)\) is set to zero.

  • Capacity (cap): Capacity indicates the bandwidth for each user’s request which is important for uploading and downloading. Given an atomic service S, \(q_{cap}\) is computed as follows:
    $$\begin{aligned} \small 0\leqslant \frac{DTR}{N_{cr}(S)} \leqslant 1 \end{aligned}$$
    where DTR is the maximum speed at which the data can be transmitted for S (i.e., total available bandwidth) and \(N_{cr}(S)\) is the number of concurrent requests that S can support. We assume that total available bandwidth is equally allocated.

3.2 Quality Model for Composite Crowdsourced Service

Aggregation functions are used to compute the QoS of composite services.

  • Coverage: The coverage value of a composite service is the product of the coverage of all its component services. For each component service \(S_i, q_{cov}(S_i)\) is computed with respect to the linear plan P as follows:
    $$\begin{aligned} \left\{ \begin{matrix} 1 &{} 0\leqslant dis(P,loc)\leqslant R_c\\ e^{-ka} &{} dis(P,loc)> R_{c}\\ \end{matrix}\right. \end{aligned}$$
    where \(a = dis(P,loc)- R_c\) and dis(Ploc) is the perpendicular distance from the sensed point of the component service loc to the linear plan P (Fig. 4). k is a sensor-technology dependent parameter which varies with the type of sensors and environment. The \(q_{cov}\) of the component service which is within the distance of \(R_c\) is 1. The \(q_{cov}\) value of the service lies within \((R_c, R_{s})\) exponentially decreases as the perpendicular distance increases. Since a component service intersects the linear plan, the value of dis is not beyond \(R_{s}\) (i.e., \(q_{cov} \ne 0\)).
  • Capacity: The capacity value for a composite service is the average of the capacity of all its component services.

4 QoS-Aware Spatio-Temporal Union Composition Algorithm

We propose a new algorithm FindBestPlan to find the best linear plan of \(\mathbb {P}\). The idea of our algorithm is to initially prune the search space with respect to \(\mathbb {P}\) and select a set of filtered services over the whole set of candidate services. We then divide the union composition into two phases: local for an individual component line segment service of the linear plan and global for the whole linear plan. The local phase computes the optimal union composition plan that covers the given line segment service. The global phase combines the optimal union composition plans of all its component line segment services obtained from the local phase. Finally, the best plan in \(\mathbb {P}\) is selected as the optimal solution. Algorithm 1 gives the details of FindBestPlan algorithm. In general, FindBestPlan algorithm works in the following four steps:

4.1 Crowdsourced Service Filtering

To improve the efficiency of the proposed approach, the first step is to reduce the search space of the algorithm. We develop a MBB that encloses a set of services relevant to \(\mathbb {P}\). The services outside this MBB are assumed to have little probability of being involved in the optimal composition plan. The enclosing MBB is represented by the lower-bound \( \left[ x_{min}, y_{min}, t_{min} \right] \) and upper-bound \(\left[ x_{max}, y_{max}, t_{max} \right] \), where \(x_{min}\) (resp. \(x_{max}\)) and \(y_{min}\) (resp. \(y_{max}\)) are the lowest (resp. highest) x-coordinate and y-coordinate among all coordinates of all optimal linear plans (Fig. 5). \(t_{min}\) and \(t_{max}\) are the minimum and maximum time value among all time instants of all optimal linear plans. 3D R-tree retrieves the services which are inside the enclosing MBB and have overlap with boundaries. All retrieved services are indexed by a new 3D R-tree (CRT) (2–3 in Algorithm 1).

4.2 Decomposition

The decomposition step divides each linear composition plan into elementary line segment services ls. Each ls is presented by a line segment of length 1 which consists of two consecutive tuples (\(<p_i,t_i>, <p_{i+1},t_{i+1}>\)) (Fig. 1(a)).

4.3 Local Union Composition

Given a line segment service ls, the local union composition step finds a composite service that covers ls. The spatio-temporal union composition problem can be modeled as a directed graph search problem in which each vertex has an associated space-time attribute of a service and each edge is associated with QoS attributes. If an edge exists, it means that there is a neighbour dependency between vertices. A virtual start-point vertex (\(ls.p_s\), \(ls.t_s\)) and virtual end-point vertex (\(ls.p_e\), \(ls.t_e\)) are added to the graph. The virtual vertices are connected to all neighbour services. Note that if no service is within the distance d of start-point and end-point, the search distance is increased until a service is found. The coverage and capacity of these neighbour services are set to neutral values of one and zero, respectively. We propose UnionComposition algorithm which is a variation of Dijkstra shortest path finding algorithm that minimizes the search cost function to find the optimal union composition plan from the start-point to end-point.

UnionComposition differs on search cost and neighbour functions. The search cost function of a union composition is defined as the following utility function [6]:
$$\begin{aligned} \small union\text {-}u\text {-}score = \sum _{Q_i\, \in \, neg}W_i\dfrac{Q_{i}^{max} - Q_{i} }{Q_{i}^{max} - Q_{i}^{min} } + \sum _{Q_i\, \in \, pos}W_i\dfrac{ Q_{i}- Q_{i}^{min} }{Q_{i}^{max} - Q_{i}^{min} } \end{aligned}$$
To find neighbour services (i.e. candidate services) of a service, we define a new neighbour function based on Spatio-TemporalSearch algorithm [3] which searches through the 3D R-tree to find neighbours. Then neighbours which intersect the line segment and are in the same direction of the segment are added to the candidate list.
The details of UnionComposition is shown in Algorithm 2. The algorithm starts finding neighbour services of the start-point of the line segment. The union-u-score of services in the candidate list are computed (4–6). The algorithm selects the candidate service with the lowest cost as the next candidate to be examined. Because the higher value of union-u-score shows the better QoS, we use (1 - union-u-score). The candidate service with the smallest union-u-score sets as the current service (L.8). For the current service, all of its unvisited neighbours are considered and their tentative u-scores are computed (14–18). If the current service is the neighbour of the destination (i.e., the search is successful) (9–11) or if the candidate list is empty (i.e., there is no composition plan) (L. 7), then stop. Otherwise, the algorithm selects the candidate service with the smallest tentative u-score and sets it as the new current service and continue (19–25).

4.4 Global Union Composition

After performing the local union (L.7 Algorithm 1), each line segment service ends up with an optimal union composition plan that covers the line segment service. The global union step takes the output of all local unions, combines them as a composite service and computes the union utility score of the composite service for each optimal linear plan (L.9 Algorithm 1). The best plan of \(\mathbb {P}\) is the plan with the highest union utility score of the composition process (10–13 Algorithm 1).
Fig. 5.

Example of an enclosing MBB

Fig. 6.

Optimality in terms of computation time

5 Experiments Results

In our experiment, we show the significance of our filtering step in terms of computation time. To the best of our knowledge, there is no usable and relevant real spatio-temporal service test case to evaluate our approach. Therefore, we focus on evaluating the proposed approach using synthetic services. Our evaluation sets a baseline upon which future work will be compared to. We run our experiments on a 3.60 GHZ Intel Xeon processor and 16 GB RAM under Windows 7. In our simulation, services are randomly distributed in a 70 \(\times \) 70 region. The space and time attributes of services are randomly determined within the region range. The \(q_{cov}\) is assigned at runtime based on the distance between the service and the linear plan with respect to \(R_s, R_c\) and k parameters. To obtain a more realistic approach, we use heterogeneous sensors for services by varying the values of these parameters which are set as follows: \(k = 0.5\) and \(R_s \in [4,6]\) and \(R_c \in [1,3]\) are randomly selected. The \(q_{cap} \in [50, 100]\) is also randomly generated. We set the weights as \(W_{cov}=0.5\) and \(W_{cap}=0.5\). The remaining service parameters are also randomly generated using a uniform distribution. All experiments are conducted 100 times and the average results are computed. Each experiment starts from a different source and destination point which are randomly generated. For each experiment we apply a variation of STA* [3] and select top two optimal linear plans. FindtBestPlan algorithm is then executed to find the best plan based on union composition cost.

We study the significance of our filtering stage in terms of the computation time. We define the optimality ratio as follows:
$$\begin{aligned} Optimality \; ratio= \frac{ct_{wf}- ct_{f}}{ct_{wf}} \end{aligned}$$
where \(ct_{wf}\) is the execution time of our algorithm FindtBestPlan without filtering and \( ct_{f} \) is the execution time of FindtBestPlan by applying filtering stage. We measure optimality ratio while fixing the default map size and varying the number of services from 200 to 1000 with an iteration range of 200. Figure 6 illustrates that filtering phase produces a satisfying optimality (i.e., more than 58 %). It means that applying filtering stage significantly reduces the computation time which confirms our expectation about its impact on the computation time. The results also show that the optimality ratio increases slightly along with the number of services.

6 Conclusion

We introduce a new spatio-temporal union composition algorithm to efficiently select the optimal union composition plan considering multiple new QoS criteria. We demonstrate that our algorithm has a satisfying efficiency in terms of optimality. Future work focuses on moving and transient crowdsourced services.



This research was made possible by NPRP 7-481-1-088 grant from the Qatar National Research Fund (a member of The Qatar Foundation). The statements made herein are solely the responsibility of the authors.


  1. 1.
    Altınel, İ.K., Aras, N., Güney, E., Ersoy, C.: Binary integer programming formulation and heuristics for differentiated coverage in heterogeneous sensor networks. Comput. Netw. 52(12), 2419–2431 (2008)CrossRefzbMATHGoogle Scholar
  2. 2.
    Neiat, A.G., Bouguettaya, A., Sellis, T., Dong, H.: Failure-proof spatio-temporal composition of sensor cloud services. In: Franch, X., Ghose, A.K., Lewis, G.A., Bhiri, S. (eds.) ICSOC 2014. LNCS, vol. 8831, pp. 368–377. Springer, Heidelberg (2014) CrossRefGoogle Scholar
  3. 3.
    Neiat, A.G., Bouguettaya, A., Sellis, T., Ye, Z.: Spatio-temporal composition of sensor cloud services. In: 2014 IEEE International Conference on Web Services (ICWS), pp. 241–248. IEEE (2014)Google Scholar
  4. 4.
    Hossain, M.A.: A survey on sensor-cloud: architecture, applications, and approaches. Int. J. Distrib. Sens. Netw. 2013, 1–18 (2013)Google Scholar
  5. 5.
    Theoderidis, Y., Vazirgiannis, M., Sellis, T.: Spatio-temporal indexing for large multimedia applications. In: Proceedings of the Third IEEE International Conference on Multimedia Computing and Systems, pp. 441–448. IEEE (1996)Google Scholar
  6. 6.
    Zeng, L., Benatallah, B., Ngu, A.H.H., Dumas, M., Kalagnanam, J., Chang, H.: Qos-aware middleware for web services composition. IEEE Trans. Softw. Eng. 30(5), 311–327 (2004)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2015

Authors and Affiliations

  1. 1.School of Computer Science and Information TechnologyRMITMelbourneAustralia

Personalised recommendations