Skip to content

Commit

Permalink
Update additional files for DIVIDE paper submitted to the Semantic We…
Browse files Browse the repository at this point in the history
…b Journal
  • Loading branch information
mrdbrouw committed May 1, 2022
1 parent 8e11b5a commit 3c2fbcd
Show file tree
Hide file tree
Showing 114 changed files with 64,517 additions and 2 deletions.
10 changes: 8 additions & 2 deletions swj2022/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ This folder contains all supportive material related to the paper "Context-aware

## Contents

The material related to the evaluations in this publication will be added soon.
In the paper, DIVIDE is explained through a running homecare monitoring example. This example is also used for the paper's evaluations.

This folder contains three subfolders:

* [`ontology`](ontology): This folder contains all files of the Activity Recognition ontology, used for the running homecare monitoring example, that is discussed in the paper. This is a snapshot of the [DAHCC ontology](https://github.com/predict-idlab/DAHCC-Sources), complemented with an ontology file [`KBActivityRecognition.ttl`](ontology/KBActivityRecognition.ttl) that represents all extra definitions related to the knowledge-driven activity recognition. All files in this folder together represent the Activity Recognition ontology. This ontology is also used for the paper's evaluations.
* [`evaluations`](evaluations): This folder contains supportive material related to the evaluations performed in the paper.
* [`eye-implementation`](eye-implementation): This folder contains some more details concerning the implementation of the initialization and query derivation of DIVIDE with the EYE reasoner.

## Contact

The main contact person directly involved with this research is [Mathias De Brouwer](https://www.linkedin.com/in/mathiasdebrouwer/). In case of any remarks or questions, you can send an email to [[email protected]](mailto:[email protected]) or [create a GitHub issue](../../../issues/new).
The main contact person directly involved with this research is [Mathias De Brouwer](https://www.linkedin.com/in/mathiasdebrouwer/). In case of any remarks or questions, you can email [[email protected]](mailto:[email protected]) or [create a GitHub issue](../../../issues/new).
16 changes: 16 additions & 0 deletions swj2022/evaluations/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Context-aware & privacy-preserving homecare monitoring through adaptive query derivation for IoT data streams with DIVIDE

This folder contains supportive material for the evaluations in the paper "Context-aware & privacy-preserving homecare monitoring through adaptive query derivation for IoT data streams with DIVIDE", which is submitted to the Special Issue on Semantic Web Meets Health Data Management of the Semantic Web Journal.

## Contents

The folder contains supportive material for the following evaluations:

* [`divide-performance`](divide-performance): The material in this folder is related to the performance evaluation of DIVIDE. It corresponds to the evaluation set-up and results in the Sections 8.1 and 9.1 of the paper ("Performance evaluation of DIVIDE").
* [`real-time-comparison`](real-time-comparison): The material in this folder is related to the real-time evaluation of the DIVIDE approach, compared to other alternative approaches that use real-time semantic reasoning. It corresponds to the evaluation set-up and results in the Sections 8.3 and 9.2-3 of the paper ("Real-time evaluation of derived DIVIDE queries").

The context used for the evaluations is represented by the [`context.ttl`](context.ttl) file. This file contains all context triples in RDF/Turtle syntax.

## Contact

The main contact person directly involved with this research is [Mathias De Brouwer](https://www.linkedin.com/in/mathiasdebrouwer/). In case of any remarks or questions, you can email [[email protected]](mailto:[email protected]) or [create a GitHub issue](../../../../issues/new).
3,639 changes: 3,639 additions & 0 deletions swj2022/evaluations/context.ttl

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions swj2022/evaluations/divide-performance/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Context-aware & privacy-preserving homecare monitoring through adaptive query derivation for IoT data streams with DIVIDE

This folder contains supportive material for the evaluations in the paper "Context-aware & privacy-preserving homecare monitoring through adaptive query derivation for IoT data streams with DIVIDE", which is submitted to the Special Issue on Semantic Web Meets Health Data Management of the Semantic Web Journal.

## Contents

The material in this folder is related to the performance evaluation of the DIVIDE system itself. It corresponds to the evaluation set-up and results in the Sections 8.1 and 9.1 of the paper ("Performance evaluation of DIVIDE").

The [`divide-queries`](divide-queries) subfolder contains the configuration details of the DIVIDE query definitions that are being used in this evaluation. These include the DIVIDE queries corresponding to the toileting and brushing teeth activity rules. For both activities, the root folder of the corresponding DIVIDE query contains the internal representation of this DIVIDE query. For the toileting query, the end-user definition (as a series of SPARQL queries) is also included in the `sparql` subfolder.

## Contact

The main contact person directly involved with this research is [Mathias De Brouwer](https://www.linkedin.com/in/mathiasdebrouwer/). In case of any remarks or questions, you can email [[email protected]](mailto:[email protected]) or [create a GitHub issue](../../../../../issues/new).
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"goal": "goal.n3",
"sensorQueryRule": "sensor-query.n3",
"queryPattern": "query-pattern.n3"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
@prefix sd: <http://idlab.ugent.be/sensdesc#> .
@prefix sd-query: <http://idlab.ugent.be/sensdesc/query#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .

@prefix ActivityRecognition: <https://dahcc.idlab.ugent.be/Ontology/ActivityRecognition/> .
@prefix MonitoredPerson: <https://dahcc.idlab.ugent.be/Ontology/MonitoredPerson/> .
@prefix Sensors: <https://dahcc.idlab.ugent.be/Ontology/Sensors/> .
@prefix SensorsAndActuators: <https://dahcc.idlab.ugent.be/Ontology/SensorsAndActuators/> .
@prefix SensorsAndWearables: <https://dahcc.idlab.ugent.be/Ontology/SensorsAndWearables/> .
@prefix Homelab: <https://dahcc.idlab.ugent.be/Homelab/SensorsAndActuators/> .
@prefix HomelabWearable: <https://dahcc.idlab.ugent.be/Homelab/SensorsAndWearables/> .
@prefix KBActivityRecognition: <https://dahcc.idlab.ugent.be/Ontology/ActivityRecognition/KBActivityRecognition/> .

@prefix saref-core: <https://saref.etsi.org/core/> .
@prefix saref4ehaw: <https://saref.etsi.org/saref4ehaw/> .
@prefix saref4bldg: <https://saref.etsi.org/saref4bldg/> .
@prefix saref4wear: <https://saref.etsi.org/saref4wear/> .

@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix time: <http://www.w3.org/2006/time#> .
@prefix ssn: <http://www.w3.org/ns/ssn/> .
@prefix sosa: <http://www.w3.org/ns/sosa/> .

{
?p rdf:type KBActivityRecognition:RoutineActivityPrediction ;
ActivityRecognition:forActivity [ rdf:type ?activityType ] ;
ActivityRecognition:activityPredictionMadeFor ?patient ;
ActivityRecognition:predictedBy ?model ;
saref-core:hasTimestamp ?t .
?activityType rdfs:subClassOf KBActivityRecognition:DetectableActivity .
}
=>
{
_:p rdf:type KBActivityRecognition:RoutineActivityPrediction ;
ActivityRecognition:forActivity [ rdf:type ?activityType ] ;
ActivityRecognition:activityPredictionMadeFor ?patient ;
ActivityRecognition:predictedBy ?model ;
saref-core:hasTimestamp ?t .
} .
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
@prefix sd: <http://idlab.ugent.be/sensdesc#> .
@prefix sd-query: <http://idlab.ugent.be/sensdesc/query#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .

@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

sd-query:prefixes-activity-brushing-teeth
rdf:type owl:Ontology ;
sh:declare [ sh:prefix "xsd" ; sh:namespace "http://www.w3.org/2001/XMLSchema#"^^xsd:anyURI ] ;
sh:declare [ sh:prefix "saref-core" ; sh:namespace "https://saref.etsi.org/core/"^^xsd:anyURI ] ;
sh:declare [ sh:prefix "ActivityRecognition" ; sh:namespace "https://dahcc.idlab.ugent.be/Ontology/ActivityRecognition/"^^xsd:anyURI ] ;
sh:declare [ sh:prefix "KBActivityRecognition" ; sh:namespace "https://dahcc.idlab.ugent.be/Ontology/ActivityRecognition/KBActivityRecognition/"^^xsd:anyURI ] .

sd-query:pattern
rdf:type sd:QueryPattern ;
sh:prefixes sd-query:prefixes-activity-brushing-teeth ;
sh:construct """
CONSTRUCT {
_:p a KBActivityRecognition:RoutineActivityPrediction ;
ActivityRecognition:forActivity [ a ?activityType ] ;
ActivityRecognition:activityPredictionMadeFor ?patient ;
ActivityRecognition:predictedBy ?model ;
saref-core:hasTimestamp ?now ;
KBActivityRecognition:detectedBySensor ?sensor .
}
FROM NAMED WINDOW :win ON <http://protego.ilabt.imec.be/idlab.homelab> [RANGE PT60S SLIDE PT10S]
WHERE {
WINDOW :win {
BIND (NOW() AS ?now)

?sensor1 saref-core:makesMeasurement [
saref-core:hasValue ?v1
] .
FILTER (xsd:float(?v1) >= xsd:float(?c1_threshold))

{
SELECT ?sensor2 (AVG(?var) AS ?ai)
{
SELECT ?sensor2 ?p (IF(?count=1, -1, (?sx / ?count)) AS ?var)
WHERE {
SELECT ?sensor2 ?p (SUM(?x) AS ?sx) ?count
WHERE {
SELECT ?sensor2 ?p ?v (xsd:float(?v) AS ?ni) ?mean (xsd:float(?ni - ?mean) AS ?nmean)
(((?nmean) * (?nmean)) AS ?x) ?count
WHERE {
?sensor2 saref-core:makesMeasurement [
saref-core:hasValue ?v ;
saref-core:relatesToProperty ?p
] .
{
SELECT (?newSensor2 AS ?sensor2) ?p (AVG(?v2) AS ?mean) (COUNT(?v2) as ?count)
WHERE {
?newSensor2 saref-core:makesMeasurement [
saref-core:hasValue ?v2 ;
saref-core:relatesToProperty ?p
] .
}
GROUP BY (?newSensor2 AS ?sensor2) ?p
}
}
} GROUP BY ?sensor2 ?p ?count
}
}
GROUP BY ?sensor2
}
FILTER (xsd:float(?ai) >= xsd:float(?c2_threshold))
}
}
LIMIT 1
""" .
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
@prefix sd: <http://idlab.ugent.be/sensdesc#> .
@prefix sd-query: <http://idlab.ugent.be/sensdesc/query#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .

@prefix ActivityRecognition: <https://dahcc.idlab.ugent.be/Ontology/ActivityRecognition/> .
@prefix MonitoredPerson: <https://dahcc.idlab.ugent.be/Ontology/MonitoredPerson/> .
@prefix Sensors: <https://dahcc.idlab.ugent.be/Ontology/Sensors/> .
@prefix SensorsAndActuators: <https://dahcc.idlab.ugent.be/Ontology/SensorsAndActuators/> .
@prefix SensorsAndWearables: <https://dahcc.idlab.ugent.be/Ontology/SensorsAndWearables/> .
@prefix Homelab: <https://dahcc.idlab.ugent.be/Homelab/SensorsAndActuators/> .
@prefix HomelabWearable: <https://dahcc.idlab.ugent.be/Homelab/SensorsAndWearables/> .
@prefix KBActivityRecognition: <https://dahcc.idlab.ugent.be/Ontology/ActivityRecognition/KBActivityRecognition/> .

@prefix saref-core: <https://saref.etsi.org/core/> .
@prefix saref4ehaw: <https://saref.etsi.org/saref4ehaw/> .
@prefix saref4bldg: <https://saref.etsi.org/saref4bldg/> .
@prefix saref4wear: <https://saref.etsi.org/saref4wear/> .

@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix time: <http://www.w3.org/2006/time#> .
@prefix ssn: <http://www.w3.org/ns/ssn/> .
@prefix sosa: <http://www.w3.org/ns/sosa/> .

{
?model rdf:type ActivityRecognition:ActivityRecognitionModel ;
<https://w3id.org/eep#implements> [
rdf:type ActivityRecognition:Configuration ;
KBActivityRecognition:containsRule ?a
] .
?a rdf:type KBActivityRecognition:ActivityRule ;
ActivityRecognition:forActivity [ rdf:type ?activityType ] ;
KBActivityRecognition:hasCondition [
rdf:type KBActivityRecognition:AndCondition ;
KBActivityRecognition:firstCondition ?c1 ;
KBActivityRecognition:secondCondition ?c2
] .

?activityType rdfs:subClassOf KBActivityRecognition:DetectableActivity .

?patient MonitoredPerson:hasIndoorLocation ?room .

?c1 rdf:type KBActivityRecognition:RegularThreshold ;
KBActivityRecognition:isMinimumThreshold "true"^^xsd:boolean ;
saref-core:hasValue ?c1_threshold ;
Sensors:analyseStateOf [ rdf:type ?c1_analyzed ] ;
KBActivityRecognition:forProperty [ rdf:type ?c1_prop ] .
?c1_prop rdfs:subClassOf KBActivityRecognition:ConditionableProperty .
?c1_analyzed rdfs:subClassOf KBActivityRecognition:AnalyzableForCondition .

?c2 rdf:type KBActivityRecognition:MeanVarianceThreshold ;
KBActivityRecognition:isMinimumThreshold "true"^^xsd:boolean ;
saref-core:hasValue ?c2_threshold ;
Sensors:analyseStateOf [ rdf:type ?c2_analyzed ] ;
KBActivityRecognition:forProperty [ rdf:type ?c2_prop ] .
?c2_prop rdfs:subClassOf KBActivityRecognition:ConditionableProperty .
?c2_analyzed rdfs:subClassOf KBActivityRecognition:AnalyzableForCondition .

?sensor1 rdf:type saref-core:Device ;
saref-core:measuresProperty [ rdf:type ?c1_prop ] ;
Sensors:isRelevantTo ?room ;
Sensors:analyseStateOf [ rdf:type ?c1_analyzed ] .

?sensor2 rdf:type saref-core:Device ;
saref-core:measuresProperty [
rdf:type ?c2_prop ;
SensorsAndWearables:hasAxis [ rdf:type SensorsAndWearables:XAxis ]
] ;
Sensors:isRelevantTo ?room ;
Sensors:analyseStateOf [ rdf:type ?c2_analyzed ] .
}
=>
{
_:q rdf:type sd:Query ;
sd:pattern sd-query:pattern ;
sd:inputVariables (("?sensor1" ?sensor1) ("?newSensor2" ?sensor2)
("?c1_threshold" ?c1_threshold) ("?c2_threshold" ?c2_threshold)
("?activityType" ?activityType) ("?patient" ?patient)
("?model" ?model)) ;
sd:windowParameters () .

_:p rdf:type ActivityRecognition:ActivityPrediction ;
ActivityRecognition:forActivity [ rdf:type ?activityType ] ;
ActivityRecognition:activityPredictionMadeFor ?patient ;
ActivityRecognition:predictedBy ?model ;
saref-core:hasTimestamp _:t .
} .
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"goal": "goal.n3",
"sensorQueryRule": "sensor-query.n3",
"queryPattern": "query-pattern.n3"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
@prefix sd: <http://idlab.ugent.be/sensdesc#> .
@prefix sd-query: <http://idlab.ugent.be/sensdesc/query#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .

@prefix ActivityRecognition: <https://dahcc.idlab.ugent.be/Ontology/ActivityRecognition/> .
@prefix MonitoredPerson: <https://dahcc.idlab.ugent.be/Ontology/MonitoredPerson/> .
@prefix Sensors: <https://dahcc.idlab.ugent.be/Ontology/Sensors/> .
@prefix SensorsAndActuators: <https://dahcc.idlab.ugent.be/Ontology/SensorsAndActuators/> .
@prefix SensorsAndWearables: <https://dahcc.idlab.ugent.be/Ontology/SensorsAndWearables/> .
@prefix Homelab: <https://dahcc.idlab.ugent.be/Homelab/SensorsAndActuators/> .
@prefix HomelabWearable: <https://dahcc.idlab.ugent.be/Homelab/SensorsAndWearables/> .
@prefix KBActivityRecognition: <https://dahcc.idlab.ugent.be/Ontology/ActivityRecognition/KBActivityRecognition/> .

@prefix saref-core: <https://saref.etsi.org/core/> .
@prefix saref4ehaw: <https://saref.etsi.org/saref4ehaw/> .
@prefix saref4bldg: <https://saref.etsi.org/saref4bldg/> .
@prefix saref4wear: <https://saref.etsi.org/saref4wear/> .

@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix time: <http://www.w3.org/2006/time#> .
@prefix ssn: <http://www.w3.org/ns/ssn/> .
@prefix sosa: <http://www.w3.org/ns/sosa/> .

{
?p rdf:type KBActivityRecognition:RoutineActivityPrediction ;
ActivityRecognition:forActivity [ rdf:type ?activityType ] ;
ActivityRecognition:activityPredictionMadeFor ?patient ;
ActivityRecognition:predictedBy ?model ;
saref-core:hasTimestamp ?t ;
KBActivityRecognition:detectedBySensor ?sensor .
?activityType rdfs:subClassOf KBActivityRecognition:DetectableActivity .
}
=>
{
_:p rdf:type KBActivityRecognition:RoutineActivityPrediction ;
ActivityRecognition:forActivity [ rdf:type ?activityType ] ;
ActivityRecognition:activityPredictionMadeFor ?patient ;
ActivityRecognition:predictedBy ?model ;
saref-core:hasTimestamp ?t ;
KBActivityRecognition:detectedBySensor ?sensor .
} .
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
@prefix sd: <http://idlab.ugent.be/sensdesc#> .
@prefix sd-query: <http://idlab.ugent.be/sensdesc/query#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .

@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

sd-query:prefixes-activity-toileting
rdf:type owl:Ontology ;
sh:declare [ sh:prefix "xsd" ; sh:namespace "http://www.w3.org/2001/XMLSchema#"^^xsd:anyURI ] ;
sh:declare [ sh:prefix "saref-core" ; sh:namespace "https://saref.etsi.org/core/"^^xsd:anyURI ] ;
sh:declare [ sh:prefix "ActivityRecognition" ; sh:namespace "https://dahcc.idlab.ugent.be/Ontology/ActivityRecognition/"^^xsd:anyURI ] ;
sh:declare [ sh:prefix "KBActivityRecognition" ; sh:namespace "https://dahcc.idlab.ugent.be/Ontology/ActivityRecognition/KBActivityRecognition/"^^xsd:anyURI ] .

sd-query:pattern
rdf:type sd:QueryPattern ;
sh:prefixes sd-query:prefixes-activity-toileting ;
sh:construct """
CONSTRUCT {
_:p a KBActivityRecognition:RoutineActivityPrediction ;
ActivityRecognition:forActivity [ a ?activityType ] ;
ActivityRecognition:activityPredictionMadeFor ?patient ;
ActivityRecognition:predictedBy ?model ;
saref-core:hasTimestamp ?now ;
KBActivityRecognition:detectedBySensor ?sensor .
}
FROM NAMED WINDOW :win ON <http://protego.ilabt.imec.be/idlab.homelab> [RANGE PT30S SLIDE PT10S]
WHERE {
BIND (NOW() as ?now)
WINDOW :win {
?sensor saref-core:makesMeasurement [
saref-core:hasValue ?v ;
saref-core:hasTimestamp ?t
] .
FILTER (xsd:float(?v) > xsd:float(?threshold))
}
}
ORDER BY DESC(?t)
LIMIT 1
""" .
Loading

0 comments on commit 3c2fbcd

Please sign in to comment.