The main role of the Contextual Filtering component is to continuously identify and filter events that might affect the optimal results of the decision making task (performed by the Decision Support component). The users need to input their current context such as place of interest, filtering factors, and ranking factors. The Contextual Filtering will subscribe to events only in the place of interest and determine which event is critical to users based on filtering and ranking factors.
Known limitations:
- User Context Ontology: the current ontology about user’s context includes only the activity of the user. The developer can extend this ontology for their specific scenarios.
The following applications have to be installed before using the component:
- Clingo4 (available at: http://potassco.sourceforge.net)
The Contextual Filtering component needs to have access to the following CityPulse components:
- Geospatial Data Infrastructure (GDI)
- Event Detection
The Contextual Filtering component is implemented as a websocket server endpoint (/contextual_events_request) at port 8005. It requies a Contexual Event Request in json format as an input.
The following steps have to be achieved in order to deploy the component
- Step 1: download the following resources provided at https://github.com/CityPulse/DecisionSupport-ContextualFiltering and place them in the same folder:
- jar package in folder /target with title CityPulseWP5-jar-with-dependencies.jar
- folder res
- Step 2: edit the configuration file config.properties in the folder res which includes the following fields:
- hostname: the IP address of the server hosting the User-Centric Decision Support server.
- port: the main port used by the User-Centric Decision Support server
- GDI_URI: the URI of GDI component
- eventRabbitURI: the URI of rabbitMQ to subscribe events from the Event Detection component
- Step 3: run CityPulseWP5-jar-with-dependencies.jar to start the server.
- Place of interest: identifies place to subscribe critical events. Currently, we support three types of place
- Point: one coordinate
- Route: a list of coordinates in which starting coordinate different to ending coordinate.
- Area: a list of coordinates which represent to a polygon
- Filtering Factors: used to filter unrelated (unwanted) events and includes event’s source, event’s category, and user’s activity
- Ranking Factor: identifies which metric is preferred by the user for ranking the criticality of incoming events. We have currently implemented the Ranking Factor based on two metrics: distance, and gravity of the event. In order to combine these two metrics, we use the linear combination approach, where the user can identify weights (or importance) for each metric.
{
"filteringFactors": [
{
"name": "ACTIVITY",
"values": [
{
"value": "CarCommute"
}
]
}
],
"messageType": "ContextualEventRequest",
"place": "{\"route\":[{\"latitude\":56.156399,\"longitude\":10.2138401},{\"latitude\":56.15634,\"longitude\":10.2138534},{\"latitude\":56.1563362,\"longitude\":10.213245},{\"latitude\":56.1563748,\"longitude\":10.2128253},{\"latitude\":56.1563918,\"longitude\":10.2126945},{\"latitude\":56.1564118,\"longitude\":10.212536},{\"latitude\":56.1564327,\"longitude\":10.2123768},{\"latitude\":56.1565177,\"longitude\":10.2119317},{\"latitude\":56.1565617,\"longitude\":10.2115706},{\"latitude\":56.1565614,\"longitude\":10.211488},{\"latitude\":56.1565545,\"longitude\":10.2113544},{\"latitude\":56.1567336,\"longitude\":10.2100302},{\"latitude\":56.1567868,\"longitude\":10.2098974},{\"latitude\":56.1568154,\"longitude\":10.2098261},{\"latitude\":56.156858,\"longitude\":10.2097165},{\"latitude\":56.1574243,\"longitude\":10.2081406},{\"latitude\":56.157453,\"longitude\":10.2081537},{\"latitude\":56.1575063,\"longitude\":10.2080266},{\"latitude\":56.1575171,\"longitude\":10.2079806},{\"latitude\":56.1575512,\"longitude\":10.2078259},{\"latitude\":56.1576084,\"longitude\":10.2075683},{\"latitude\":56.1576479,\"longitude\":10.2076077},{\"latitude\":56.1578465,\"longitude\":10.2070523},{\"latitude\":56.1580631,\"longitude\":10.2070397},{\"latitude\":56.1580983,\"longitude\":10.2070499},{\"latitude\":56.1581829,\"longitude\":10.2067115},{\"latitude\":56.1582932,\"longitude\":10.2065955},{\"latitude\":56.1586254,\"longitude\":10.2057873},{\"latitude\":56.1588432,\"longitude\":10.2058839},{\"latitude\":56.1588377,\"longitude\":10.2057494},{\"latitude\":56.1588326,\"longitude\":10.2056072},{\"latitude\":56.1588183,\"longitude\":10.2052833},{\"latitude\":56.1588392,\"longitude\":10.2046773},{\"latitude\":56.158856,\"longitude\":10.2043227},{\"latitude\":56.1598925,\"longitude\":10.2041303},{\"latitude\":56.1604717,\"longitude\":10.203849},{\"latitude\":56.1610168,\"longitude\":10.2036215},{\"latitude\":56.1613158,\"longitude\":10.203491},{\"latitude\":56.1616331,\"longitude\":10.2033525},{\"latitude\":56.1621053,\"longitude\":10.2030403},{\"latitude\":56.1623841,\"longitude\":10.2028219},{\"latitude\":56.1625122,\"longitude\":10.2027103},{\"latitude\":56.1626964,\"longitude\":10.2025592},{\"latitude\":56.1628792,\"longitude\":10.2023967},{\"latitude\":56.1632132,\"longitude\":10.2020437},{\"latitude\":56.1639994,\"longitude\":10.2012686},{\"latitude\":56.1648281,\"longitude\":10.2004223},{\"latitude\":56.1648783,\"longitude\":10.2003762},{\"latitude\":56.1649309,\"longitude\":10.2003358},{\"latitude\":56.1650306,\"longitude\":10.2001617},{\"latitude\":56.1655192,\"longitude\":10.1995596},{\"latitude\":56.1655597,\"longitude\":10.1995139},{\"latitude\":56.1660496,\"longitude\":10.1989615},{\"latitude\":56.1663768,\"longitude\":10.1985531},{\"latitude\":56.1665834,\"longitude\":10.1983111},{\"latitude\":56.1666353,\"longitude\":10.1982187},{\"latitude\":56.166685,\"longitude\":10.1982755},{\"latitude\":56.167046,\"longitude\":10.1978351},{\"latitude\":56.1671395,\"longitude\":10.1977201},{\"latitude\":56.1679299,\"longitude\":10.1978855},{\"latitude\":56.1680441,\"longitude\":10.1979123},{\"latitude\":56.1690609,\"longitude\":10.1981355},{\"latitude\":56.1694494,\"longitude\":10.1982286},{\"latitude\":56.1699713,\"longitude\":10.1983588},{\"latitude\":56.1705209,\"longitude\":10.1984916},{\"latitude\":56.1707096,\"longitude\":10.1985372},{\"latitude\":56.1712316,\"longitude\":10.1987549},{\"latitude\":56.1719437,\"longitude\":10.1993527},{\"latitude\":56.1723068,\"longitude\":10.1997568},{\"latitude\":56.1723339,\"longitude\":10.1996992},{\"latitude\":56.1726295,\"longitude\":10.1995613},{\"latitude\":56.17265,\"longitude\":10.1995675},{\"latitude\":56.1732618,\"longitude\":10.199766},{\"latitude\":56.173335,\"longitude\":10.1997915},{\"latitude\":56.1740576,\"longitude\":10.2000089},{\"latitude\":56.1746959,\"longitude\":10.2002122},{\"latitude\":56.1747529,\"longitude\":10.200237},{\"latitude\":56.1748186,\"longitude\":10.2002655},{\"latitude\":56.1754552,\"longitude\":10.2005443},{\"latitude\":56.1766362,\"longitude\":10.1998289},{\"latitude\":56.1767297,\"longitude\":10.1998387},{\"latitude\":56.1769232,\"longitude\":10.1998734},{\"latitude\":56.1769869,\"longitude\":10.199895},{\"latitude\":56.1774701,\"longitude\":10.1997941},{\"latitude\":56.1777438,\"longitude\":10.1998466},{\"latitude\":56.1779084,\"longitude\":10.1998623},{\"latitude\":56.1783021,\"longitude\":10.1997759},{\"latitude\":56.1783053,\"longitude\":10.1999791},{\"latitude\":56.178314,\"longitude\":10.2000757},{\"latitude\":56.1783337,\"longitude\":10.2002789},{\"latitude\":56.1783438,\"longitude\":10.2003655},{\"latitude\":56.1794677,\"longitude\":10.1996322},{\"latitude\":56.1799432,\"longitude\":10.1993077},{\"latitude\":56.1799894,\"longitude\":10.1992761},{\"latitude\":56.1800617,\"longitude\":10.1992191},{\"latitude\":56.1805373,\"longitude\":10.1988917},{\"latitude\":56.1809567,\"longitude\":10.1986237},{\"latitude\":56.181048,\"longitude\":10.1985812},{\"latitude\":56.1812222,\"longitude\":10.1983878},{\"latitude\":56.1818518,\"longitude\":10.198047},{\"latitude\":56.1820762,\"longitude\":10.1979061},{\"latitude\":56.182412,\"longitude\":10.1976991},{\"latitude\":56.1824911,\"longitude\":10.1976518},{\"latitude\":56.1826517,\"longitude\":10.1975332},{\"latitude\":56.1827237,\"longitude\":10.1974863},{\"latitude\":56.1830437,\"longitude\":10.1972438},{\"latitude\":56.1866613,\"longitude\":10.1948179},{\"latitude\":56.186769,\"longitude\":10.1947202},{\"latitude\":56.1868427,\"longitude\":10.194659},{\"latitude\":56.1869016,\"longitude\":10.1946099},{\"latitude\":56.1872147,\"longitude\":10.1942935},{\"latitude\":56.1906573,\"longitude\":10.1897376},{\"latitude\":56.1929431,\"longitude\":10.1874953},{\"latitude\":56.1930095,\"longitude\":10.1874473},{\"latitude\":56.1930771,\"longitude\":10.1873985},{\"latitude\":56.1932164,\"longitude\":10.1872939},{\"latitude\":56.2001029,\"longitude\":10.1821443},{\"latitude\":56.200188,\"longitude\":10.1820724},{\"latitude\":56.2002466,\"longitude\":10.1819586},{\"latitude\":56.2002556,\"longitude\":10.1819345},{\"latitude\":56.2007088,\"longitude\":10.1814833},{\"latitude\":56.2021641,\"longitude\":10.1801387},{\"latitude\":56.2040809,\"longitude\":10.1777851},{\"latitude\":56.2043902,\"longitude\":10.1776037},{\"latitude\":56.2045611,\"longitude\":10.1774853},{\"latitude\":56.204686,\"longitude\":10.1774093},{\"latitude\":56.2048607,\"longitude\":10.1773037},{\"latitude\":56.2048915,\"longitude\":10.1772874},{\"latitude\":56.2050991,\"longitude\":10.1771975},{\"latitude\":56.2107223,\"longitude\":10.1738325},{\"latitude\":56.2108079,\"longitude\":10.1737715},{\"latitude\":56.210917,\"longitude\":10.1736937},{\"latitude\":56.2116676,\"longitude\":10.173582},{\"latitude\":56.2118709,\"longitude\":10.1737114},{\"latitude\":56.2120605,\"longitude\":10.1735846},{\"latitude\":56.2122273,\"longitude\":10.1734617},{\"latitude\":56.2121453,\"longitude\":10.1721554},{\"latitude\":56.2126534,\"longitude\":10.1717653},{\"latitude\":56.2129102,\"longitude\":10.1715674},{\"latitude\":56.2132352,\"longitude\":10.1713271},{\"latitude\":56.2136294,\"longitude\":10.1709891},{\"latitude\":56.2141348,\"longitude\":10.1706208},{\"latitude\":56.2141243,\"longitude\":10.1705478},{\"latitude\":56.2141058,\"longitude\":10.1704421},{\"latitude\":56.2140714,\"longitude\":10.170257},{\"latitude\":56.2141203,\"longitude\":10.1702313},{\"latitude\":56.2152105,\"longitude\":10.169502},{\"latitude\":56.2181585,\"longitude\":10.1671354},{\"latitude\":56.2201861,\"longitude\":10.1655583},{\"latitude\":56.2212518,\"longitude\":10.1647114},{\"latitude\":56.2221051,\"longitude\":10.1639978},{\"latitude\":56.2221113,\"longitude\":10.1641622},{\"latitude\":56.2221196,\"longitude\":10.1642921},{\"latitude\":56.2231587,\"longitude\":10.1635355},{\"latitude\":56.2244629,\"longitude\":10.1631107},{\"latitude\":56.2265659,\"longitude\":10.1625412},{\"latitude\":56.2291963,\"longitude\":10.1618581},{\"latitude\":56.233735,\"longitude\":10.160609},{\"latitude\":56.2384985,\"longitude\":10.1593394},{\"latitude\":56.238503,\"longitude\":10.1592065},{\"latitude\":56.2384914,\"longitude\":10.1591056},{\"latitude\":56.2403822,\"longitude\":10.1585937},{\"latitude\":56.2422692,\"longitude\":10.1580403},{\"latitude\":56.2489565,\"longitude\":10.1561247},{\"latitude\":56.249144,\"longitude\":10.1531571},{\"latitude\":56.2503068,\"longitude\":10.1497359},{\"latitude\":56.2504259,\"longitude\":10.1498562},{\"latitude\":56.2504527,\"longitude\":10.1498908},{\"latitude\":56.2519237,\"longitude\":10.1456169},{\"latitude\":56.2520106,\"longitude\":10.1451551},{\"latitude\":56.2520587,\"longitude\":10.1450276},{\"latitude\":56.2521086,\"longitude\":10.1445311},{\"latitude\":56.2517282,\"longitude\":10.1443494},{\"latitude\":56.2514049,\"longitude\":10.1406978},{\"latitude\":56.2514467,\"longitude\":10.1405254},{\"latitude\":56.2513196,\"longitude\":10.1402883},{\"latitude\":56.2505021,\"longitude\":10.1392032},{\"latitude\":56.2493537,\"longitude\":10.1371017},{\"latitude\":56.2488913,\"longitude\":10.1364297},{\"latitude\":56.2483916,\"longitude\":10.1357733},{\"latitude\":56.2481691,\"longitude\":10.1354681},{\"latitude\":56.2480038,\"longitude\":10.1359178},{\"latitude\":56.2471294,\"longitude\":10.1347471},{\"latitude\":56.2456169,\"longitude\":10.1325929},{\"latitude\":56.2453717,\"longitude\":10.1318964},{\"latitude\":56.2450905,\"longitude\":10.1302687},{\"latitude\":56.2449814,\"longitude\":10.129629},{\"latitude\":56.2446727,\"longitude\":10.1272998},{\"latitude\":56.2447356,\"longitude\":10.1245971},{\"latitude\":56.2448443,\"longitude\":10.1239448},{\"latitude\":56.2455244,\"longitude\":10.1211328},{\"latitude\":56.2457956,\"longitude\":10.1193432},{\"latitude\":56.2453847,\"longitude\":10.1151803},{\"latitude\":56.2434974,\"longitude\":10.1110187},{\"latitude\":56.2424405,\"longitude\":10.1078665},{\"latitude\":56.2395514,\"longitude\":10.1076476},{\"latitude\":56.2392371,\"longitude\":10.1076238},{\"latitude\":56.2375059,\"longitude\":10.1074585},{\"latitude\":56.2362385,\"longitude\":10.106818},{\"latitude\":56.2360666,\"longitude\":10.1066354},{\"latitude\":56.2347807,\"longitude\":10.1053608},{\"latitude\":56.2352839,\"longitude\":10.103768},{\"latitude\":56.2357546,\"longitude\":10.0982785},{\"latitude\":56.2358351,\"longitude\":10.097752},{\"latitude\":56.2350833,\"longitude\":10.0966287}],\"length\":16998,\"placeId\":\"0\",\"type\":\"ROUTE\"}",
"rankingFactor": {
"rankingElements": [
{
"name": "EVENT_LEVEL",
"value": {
"value": 30
}
},
{
"name": "DISTANCE",
"value": {
"value": 70
}
}
],
"type": "LINEAR"
}
}
The Contextual Filtering component has been developed as part of the EU project CityPulse. The Unit of Reasoning and Querying of INSIGHT, NUIG has provided the main contributions for this application.
CityPulse: http://www.ict-citypulse.eu/
INSIGHT: https://www.insight-centre.org