=Paper= {{Paper |id=None |storemode=property |title=Towards Collaborative Knowledge Engineering for Improving Local Safety in Urban Environment |pdfUrl=https://ceur-ws.org/Vol-949/kese8-09_11.pdf |volume=Vol-949 |dblpUrl=https://dblp.org/rec/conf/ecai/LigezaAC12 }} ==Towards Collaborative Knowledge Engineering for Improving Local Safety in Urban Environment== https://ceur-ws.org/Vol-949/kese8-09_11.pdf
        Towards Collaborative Knowledge Engineering for
          Improving Local Safety in Urban Environment
                         Antoni Lig˛eza and Weronika T. Adrian and Przemysław Ci˛eżkowski1


Abstract. Web systems supporting collaborative knowledge engi-             2   Motivation
neering have attracted much attention recently. By using social soft-
ware techniques and attractive yet simple user interface, the motiva-      The aim of the Task 4.6. of the INDECT project is to develop a
tion of users increases and the process can be significantly improved.     system for distributed knowledge acquisition and management with
The willingness of community to invest their time as well as mutual        GIS [9] integration. The research is motivated by a hypothesis that lo-
encouragement can be achieved when users are convinced that their          cal communities can effectively collaborate to build a useful knowl-
contribution is important and useful. We propose a social platform         edge base about threats in the neighborhood that can be used by both
called Social Threat Monitor (STM) aimed at improving safety of lo-        the citizens and local services or police. A system promoting collab-
cal communities in urban environment. The main assumption of the           orative knowledge acquisition and management should improve the
system is the collaboration of users to build and maintain a knowl-        communication between the citizens and the services, encourage co-
edge base about threats in their neighborhood. Knowledge gathered          operation within the community and thereby improve the local safety.
in the system can be used by the citizens as well as local authorities        A social software platform facilitate collaborative knowledge en-
and police. The system supports collaborative knowledge engineer-          gineering in an unintrusive way. Pieces of information shared by dif-
ing and management using semantic methods and a GIS component.             ferent persons are insignificant alone, but connected make a rich di-
                                                                           versified picture. In popular social software platforms, people build
                                                                           personal knowledge bases half-consciously by acknowledging things
1   Introduction                                                           and events shared by friends or ”followed” people. We want to lever-
                                                                           age this dynamics and develop a system that would provide useful
Web-based information systems are used for gathering, storing and
                                                                           information while seamlessly integrating with daily life.
processing diversified information for various purposes. In Web 2.0.
                                                                              Within the INDECT project, several prototypes have been devel-
era, users can actively participate in building such systems. Projects
                                                                           oped [3, 8], each of which constitute a information silo Web-based
such as Wikipedia have shown that collaborative knowledge acqui-
                                                                           application. We claim that it is necessary to extend the existing pro-
sition (KA) and management (KM) can be successful if people see
                                                                           totypes to be more flexible and better adapted to knowledge inter-
the importance of the project and the KA process is relatively easy.
                                                                           operability. Knowledge gathered in the system should be easily ex-
Mechanisms such as voting, commenting and discussions increase
                                                                           changed with other applications that can use its data to process it in
the possibility of building reliable and useful knowledge bases. Se-
                                                                           an arbitrary way (custom notifications, aggregation, statistics).
mantic technologies enable adding metadata to regular content and
facilitate automatic knowledge extraction and processing [5].
   In this paper, we present a Web-based system for collaborative          3   System Overview
knowledge acquisition and management. It is a thematic portal which
                                                                           The main goal of the system is to serve as a distributed knowledge
aims to gather knowledge about threats of various kinds in local envi-
                                                                           acquisition system for data, information and knowledge provided by
ronment. This information may be used by citizens as warnings and
                                                                           citizens, as well as to enable knowledge management and exchange.
by local police as notifications. The system is being developed within
                                                                           Principles and a conceptual model of the system have been described
the INDECT project: ”Intelligent information system supporting ob-
                                                                           in [4]. The general idea of the system can be observed in Figure 1.
servation, searching and detection for security of citizens in urban
                                                                           The input data, in general, may be composed of: a text description
environment” 2 . The original contribution of this paper consists in
                                                                           of a threat, its spatial location, and multimedia documentation. The
presenting the collaborative knowledge engineering (KE) possibili-
                                                                           data, stored in a relational database equipped with spatial features,
ties including knowledge exchange with external sources with use of
                                                                           should be presented to the audience in a combined visual and textual
a dedicated Application Programming Interface (API).
                                                                           form. The system provides means for searching, filtering, aggrega-
   The paper is organized as follows: In Sect. 2 the motivation for this
                                                                           tion and grouping information for users, according to their preferred
research is given. Sect. 3 provides an overview of the system func-
                                                                           form and level of detail. The threats can be presented in a convenient
tionality, user interface and implementation. Mechanisms applied to
                                                                           and transparent way as icons on the map, in reports or notifications.
facilitate KE with the system are discussed in Sect. 4. The API of the
                                                                              To enhance the automated knowledge processing of the system,
system is presented in Sect. 5. Related work is outlined in Sect. 6,
                                                                           semantic technologies for GIS were analyzed and discussed in [6].
followed by a summary in Sect. 7 and future work in Sect. 8.
                                                                           The semantic research thread led to the development of a prototype
1   AGH University of Science and         Technology,   Poland,   email:   described in [8] which investigates the integration issues of databases
  {ligeza,wta}@agh.edu.pl                                                  and ontologies. In the ontology, the general categories of threats were
2 See http://indect-project.eu.
                                                                           stored, whereas in the database the actual data about selected areas in
                                                                         tive map implemented with use of AJAX technology – Asynchronous
                                                                         JavaScript and XML – provides easy and quick reloading as few
                                                                         times as possible. Because the URL does not change when only par-
                                                                         tial reloading is done, the identification of the state of the map (visi-
                                                                         ble location or threat) is done with hashing (every time map position
                                                                         is changed or other action is performed, the hash changes).
                                                                            The map have two editing modes: for browsing and adding threats.
                                                                         Mouse events are treated adequately to the mode. The map locates
                                                                         the user’s position, but it can be moved (with mouse or keyboard)
                                                                         and zoomed (with mouse scroll or scroll on the left on the map).
                                                                            Users browsing the system can immediately view short threat de-
                                                                         tails (votes, one picture if available, number of comments and quick
                                                                         edit link). Voting is available only for registered users, but anony-
                                                                         mous are able to see how many votes the threat got. Full gallery, list
                                                                         of tags and all comments are available on new page for each threat.
                                                                            Top menu toolbar allows the user to toggle options of the login
                                                                         panel. If a user is already logged in, the login link is replaced with his
                                                                         account name and five options: 1) Profile (where the user can change
            Figure 1. Conceptual model of the system [3].
                                                                         account settings), 2) Logout, 3) Threats (where the user can list all
                                                                         threats, last added threats, top reliability threats and most dangerous
particular time were located. This prototype provided interesting in-
                                                                         threats), 4) Language (which allows user to change site language)
sights and ideas for future investigations. However, for the INDECT
                                                                         and 5) About Indect – which is a link to the INDECT project page3 .
purposes, more lightweight semantics and reasoning has been cho-
                                                                            Most of the functionality is available form the left menu: (1)
sen. Three systems, referenced in [3] use lightweight reasoning and
                                                                         adding threats, including selecting area for a new threat, (2) browsing
metadata annotations of threat such as simple tags. In the newest
                                                                         map by location, and (3) searching for threats using various filters.
prototype [2], codenamed Social Threat Monitor (STM), only basic
                                                                         Each section of the left menu can be shown or hide.
semantics is added with use of tags and categories (see Section 4).
                                                                            The system has been implemented using widely-accepted, cost-
Summary of improvements with respect to the previous implementa-
                                                                         free Web technologies: HTML, CSS, JavaScript, jQuery, Google
tions can be found in [1].
                                                                         Maps API version 3 and the Django framework (for details see [2]).
   The following groups of users are defined in the system:
                                                                         It has been deployed on a dedicated server and is available at:
Guest is a user with the anonymous web account. He is able to use        http://vigil.ia.agh.edu.pl. In the wiki system there is
  basic features of the application. In order to gain more privileges,   a short description of the system, as well as user and admin manual.
  a guest need to register and log in into the system.
Member is a user with registered account in the system. With this
                                                                         4   Towards Collaborative Knowledge Engineering
  account user can add threats, manage his own threats, comment
  and vote threats of other users and edit his profile.                   Semantic annotations for the threats The basic piece of knowl-
Services User is a special account with features helping threats         edge in the system represents a single threat. Each threat may be
  monitoring.                                                            described using a set of attributes, such as: geometry – the informa-
Moderator is a user with full access to threat records, able to ban      tion about the shape and the location of the danger, name, category
  users.                                                                 – each danger is assigned to one category, comments – all logged in
Administrator is a user with full access to the application.             users may post their comment on the danger info, severity – a num-
                                                                         ber telling how severe the danger is, reliability – a number telling to
  Main part of application is the map (see Fig. 2) that covers all
                                                                         what degree the information is reliable, photo gallery – a relation to
space user have and resize immediately when needed. The interac-
                                                                         an object being a set of pictures illustrating the threat, date added –
                                                                         when the information has been added into the system, modification
                                                                         date – when the information has been last modified, and tags – in
                                                                         order to search for interesting information.

                                                                          Tags Tags are non-hierarchical keyword or terms that describe an
                                                                         object, specifically a threat. One threat can be assigned several tags.
                                                                         They help searching and categorizing threats. Threats are tagged
                                                                         while adding by user. Well tagged threats are more reliable for other
                                                                         users and usually get more votes.

                                                                          Categories Categories constitute a hierarchical way of describing
                                                                         threats. One threat has one category, but categories can contain many
                                                                         threats. Categories are organized into a tree structure. The root of
                                                                         the categories is not visible on site. There is no children limit for

         Figure 2. User Interface of the Social Threat Monitor.          3 http://www.indect-project.eu/
categories. As relational databases are not designed for storing hi-              – *password:string – user’s password.
erarchical data, retrieving category and its all parents with use of         2. Method add:
procedural SQL is complicated. Also, fetching the whole tree re-
                                                                                Description: A method allowing to add a threat.
quires additional operations after database query execution. To solve
this problems in STM, Nested Set Model was implemented through                  Parameters:
django-mptt module. It provides an efficient way to retrieve cat-                • POST
egories from database. Modifying the tree is more complicated, thus               – *title:string
slower, but it is only possible for admin user and rarely executed.               – *description:string
                                                                                  – *latitude:float
 User Groups Except for categories for threats, the users can also                – *longitude:float
be grouped. Groups allows to publish threats for specified users.                 – *category:int
When adding a threat, a user (who is at least in Services group) can              – *scale:int from range [1, 10] (severity of the threat)
decide if the threat will be public or visible only for selected groups.          – *date_end:int from range [1, 3] (the number indicates how
This solution allows special groups have their own threats that will                many months a threat is active)
never be published for all system users.                                          – *tags:string – tags separated with comma
   An exemplary use-case has been presented in [1]. In this use-case,             – groups:array(int) – group ids for whom danger will be
three police departments cooperate on an investigation. However,                    shown (empty for ”all groups”)
each group has their own sub-investigation and landmarks impor-                  • COOKIES
tant to these investigations can be marked on map and visible only to             – *sessionid:string – session id returned in login method
selected users.
                                                                             3. Method threats:
                                                                                Description: A method allowing to get filtered list of threats.
5    Towards Interoperability: the System API
                                                                                Parameters:
Parts or the system data can be imported and exported to JSON,                   • POST
XML and YAML formats. In order to enable export of knowl-                         – *polygon:     string        –    string    of     coordinates
edge for further custom processing and import from another knowl-                    that define the area of interest, for example:
edge base, a simple Application Programming Interface (API)                          lng1 lat1, lng1 lat2, lng2 lat2,
has been developed. Standarized knowledge representation using                       lng2 lat1, lng1 lat1
attribute-value pairs describing threats allows for using the sys-                – votes: int – minimal votes number.
tem knowledge in various semantic applications (where triples                     – images: int from set {0, 1} where 1 selectes threats only
of the form: object-attribute-value or subject-predicate-object are                  with photos.
used). External systems can communicate with STM and use it                       – category: int – category id.
as a web service. The API is available over HTTP protocol:                        – tags: string – tags separated by commas.
http://application.url/api/method_name/.                                          – scale: int from set {1, 4, 7, 10} indicating threats scale.
                                                                                  – date: string from set {12h, 24h, week}.
 API access and exchange format Part of the functionality of the                  – date_start: datetime – threats added after date.
Social Threat Monitor is available for external applications without              – date_stop: datetime – threats ending before date.
authorization. For instance, by preparing an appropriate request con-             – groups: array(int) – threats for groups.
forming to the system API one can get all the threats defined for a             An example response:
given location or filter. In order to use the whole functionality, includ-
ing adding threats to the system, the application must be authorized.                  Listing 1. Response to threats method on success.
Its user must be defined in the STM and assigned to the API group.                {"threats" : [
   The API uses POST requests and HTTP cookies. All responses are                   {"category" : 2 ,
in JSON format. Each successful request returns HTTP 200 header                        "user__username" : "admin" ,
and the 400 header is returned, if a method does not exist. Moreover,                  "votes" : 6 ,
if an anonymous user wants to access a method that requires autho-                     "scale" : 5 ,
rization, a HTTP 200 header with appropriate content is returned.                      "description" : "Threat description" ,
                                                                                       "point" : {"latitude" : 5 0 . 0 8 7 3 8 9 ,
 Methods The system API provides three basic methods: 1) log-                                            "longitude" : 1 9 . 8 9 1 6 0 6 } ,
ging in, 2) adding a new threat, and 3) retrieving existing threats.                   "title" : "Crime" ,
Each method accepts arguments that must be sent using POST or                          "category__img" : "http://url/remont.png" ,
COOKIES. Below, the methods with required (marked with an aster-                       "comments" : 5 ,
isk "*") and optional parameters are presented:                                        "date_add" : "3 kwietnia 2011 22:57:34" ,
                                                                                       "points" : 2 ,
1. Method login:                                                                       "category__title" : "Crimes" ,
                                                                                       "images" : 7 ,
    Description: A method allowing to log into the API.                                "image__img" : "http://url/name.jpg" ,
    Parameters:                                                                        "id" : 1 } ,
     • POST:                                                                        { another_threat } ,
                                                                                    { a n o t h e r _ t h r e a t }]}
      – *username:string – user’s name.
 Demo implementation An example system using API has been                  8    Future Work
developed and is available for testing at: http://home.agh.
edu.pl/kk/stm. It has been implemented in PHP and uses cURL                The approach to semantics representation now used in the STM can
library. The library allows for connecting to and communicating with       be extended. Currently, only basic semantics is represented with use
various types of servers and different protocols. An example screen-       of tags and categories. They are closer to the model of folksonomies,
shot showing STM response is presented in Figure 3.                        where users provide custom tags that can be a foundation for a sim-
                                                                           ple hierarchy of categories. A possible direction of future work is to
                                                                           refactor the hierarchy currently existing in STM with the use of a
                                                                           selected OWL 2.0 profile. All of the important relations should be
                                                                           identified and formalized. This will allow for having a complete for-
                                                                           mal model of the threat ontology. It is also planned to work on the
                                                                           rule-based engine [7] to manage and customize output channels.
                                                                              Although the system works in a regular Web browser and thus can
                                                                           be accessed from any mobile device that has a browser, further adap-
                                                                           tation for smartphones is planned. In particular, the system should
                                                                           use the GPS embedded in mobile devices to facilitate adding threats.


                                                                           ACKNOWLEDGEMENTS
                                                                           The research presented in this paper is carried out within the EU FP7
                                                                           INDECT Project: ”Intelligent information system supporting obser-
                                                                           vation, searching and detection for security of citizens in urban envi-
                                                                           ronment” (http://indect-project.eu).


                                                                           References
                                                                            [1] Weronika T. Adrian, Ci˛eżkowski, Krzysztof Kaczor, Antoni Lig˛eza,
                                                                                and Grzegorz J. Nalepa, ‘Web-based knowledge acquisition and man-
                                                                                agement system supporting collaboration for improving safety in urban
                                                                                environment’, in Multimedia Communications, Services and Security,
                                                                                eds., Andrzej Dziech and Andrzej Czyżewski, volume 287 of Commu-
                                                                                nications in Computer and Information Science, 1–12, Springer Berlin
                                                                                Heidelberg, (2012).
                                                                            [2] Przemysław Ci˛eżkowski, Functionality Analysis and Design and Im-
        Figure 3. API demo: A threat list returned upon request.                plementation of User Interface for Threats Enregistration in Internet
                                                                                System, Master’s thesis, AGH University of Science and Technology,
                                                                                2011.
                                                                            [3] Antoni Lig˛eza, Weronika T. Adrian, Sebastian Ernst, Grzegorz J.
                                                                                Nalepa, Marcin Szpyrka, Michał Czapko, Paweł Grzesiak, and Marcin
                                                                                Krzych, ‘Prototypes of a web system for citizen provided information,
6   Related Work                                                                automatic knowledge extraction, knowledge management and gis inte-
                                                                                gration’, in Multimedia Communications, Services and Security, eds.,
Crime Mapping systems were originally a class of systems that map,              Andrzej Dziech and Andrzej Czyżewski, volume 149 of Communica-
visualize and analyze crime incident patterns using Geographic In-              tions in Computer and Information Science, 268–276, Springer Berlin
formation Systems (GIS). However, the name has been later extended              Heidelberg, (2011).
to incorporate all applications that aid in improving the public safety.    [4] Antoni Lig˛eza, Sebastian Ernst, Grzegorz J. Nalepa, and Marcin
                                                                                Szpyrka, ‘A conceptual model for web knowledge acquisition system
This include natural disasters monitoring systems, often designed for
                                                                                with GIS component’, Automatyka: półrocznik Akademii Górniczo-
specific regions, which scope of functionalities is limited to the spe-         Hutniczej im. Stanisława Staszica w Krakowie, 13(2), 421–428, (2009).
cific types of disasters that are most common and dangerous in those        [5] Grzegorz J. Nalepa, ‘Collective knowledge engineering with seman-
regions, systems monitoring threats on the roads and crime monitor-             tic wikis’, Journal of Universal Computer Science, 16(7), 1006–1023,
ing systems. A detailed survey of existing crime mapping systems is             (2010).
                                                                            [6] Grzegorz J. Nalepa and Weronika T. Furmańska, ‘Review of se-
given in [10]. To the best of our knowledge, none of existing system            mantic web technologies for GIS’, Automatyka: półrocznik Akademii
works as a social platform supporting collaboration (voting, com-               Górniczo-Hutniczej im. Stanisława Staszica w Krakowie, 13(2), 485–
ments and collaborative evaluation of information).                             492, (2009).
                                                                            [7] Grzegorz J. Nalepa and Antoni Lig˛eza, ‘HeKatE methodology, hybrid
                                                                                engineering of intelligent systems’, International Journal of Applied
7   Summary                                                                     Mathematics and Computer Science, 20(1), 35–53, (2010).
                                                                            [8] Jarosław Waliszko, Weronika T. Adrian, and Antoni Lig˛eza, ‘Traffic
One of the tasks within the INDECT Project is the development of                danger ontology for citizen safety web system’, in Multimedia Com-
a Web-based system for knowledge acquisition and management.                    munications, Services and Security, eds., Andrzej Dziech and Andrzej
                                                                                Czyżewski, volume 149 of Communications in Computer and Informa-
Once the main assumptions and requirements were defined, the de-                tion Science, 165–173, Springer Berlin Heidelberg, (2011).
velopment has been done iteratively. Semantic description, cate-            [9] The Handbook of Geographic Information Science, eds., John P. Wilson
gories and tags constitute the basis for further development of intel-          and A. Stewart Fotheringham, Blackwell Publishin Ltd, 2008.
ligent information processing and knowledge management. System             [10] Maciej Żywioł, Analysis and Evaluation of Crime Mapping Systems,
API allows for easy integration with other applications and facilitate          Bachelor’s thesis, AGH University of Science and Technology, 2012.
knowledge exchange and integration from various sources.