Mentions légales du service

Skip to content
Snippets Groups Projects

TELESAFE

[NOTE] It is possible to ask for the Orange4Home dataset to fully reproduce the detection results of the algorithms (corresponding to some curves in the paper). Please visit https://amiqual4home.inria.fr/en/orange4home/ to get the contact for downloading the dataset and to put the csv file in /databases/orange4home/, replacing the text.csv file.

[UPDATE] The parallelized version of precomputing PWM is recently added for the revision of the paper. Please refer to the section Parallelization in computation of PWM below.

This project implements the mechanism described in the paper TELESAFE - Detecting Private/Work Boundary Crossings in Energy Consumption Trails in Telework, currently under review for the VLDB 2025 conference.

In a nutshell, TELESAFE effectively identifies crossings between work and private life by analyzing aggregated, non-annotated time series data. It does this by maintaining indices of neighboring subsequences for each subsequence within a specified epsilon distance threshold. Utilizing this structure along with a classification system, the subsequences are identified as either private or work-related.

For the sake of performance, we implement DBScan-Lite to create local clusters and propose optimisations in the algorithms, yielding satisfying results. Please refer to core/detector.py file for more details.

Structures

├── core
│   ├── aeon
│   ├── ApplianceDetectionBenchmark
│   │   ├── MyBenchmark.py
│   │   ├── MyBenchmark_gpu.py
│   ├── dtw
│   ├── TSSeg
│   ├── detector.py
│   ├── inject.py
│   ├── mp.py
│   ├── time_series.py
│   ├── utils.py
│   └──workday.py
├── databases
│   ├── tracebase
│   ├── orange4Home
│   ├── injection
│   └── household_power_consumption.txt
├── evals
│   ├── eval_day_occurrence.py
│   ├── mp_emoq_linky.py
│   ├── mp_emoq_test.py
│   ├── no_injection_test.py
│   └── eval_dbscan.py
└── plots

Datasets

Orange4Home¹

Private Teleworking database from Orange, contains teleworking data for several days.

Tracebase²

Public Household device individual traces used : Tracebase

Individual Household Electric Power Consumption³

Public Measurements of electric power consumption : UCI

Installation environments with requirements in conda

This project requires python 3.11.0 and we recommand you to use anaconda and create an isolate environment

conda create -n "telework" python==3.11.0
conda activate telework
pip install -r requirements.txt

Reproduce results of I1-I6 (private dataset not needed)

python3 vldb_plot.py

The results will be shown in the folder "results/vldb/"

The following executions need the private dataset orange4home: Ask for access from the link : https://amiqual4home.inria.fr/en/orange4home/ for downloading the dataset and to put it in /databases/orange4home/ folder.

Detection with TELESAFE example

cd evals
python3 eval_day_occurrence.py I1 True False 60S 1 --name_devices TV-LCD --nb_injections_private 1 --nb_injections_public 1 --day_min 1 --day_max 1 --index_min 0 --index_max 0 --sublen 60

The detection results will be shown in the folder "../results/" and named "detection.png"

Simulation of limited computing resource

  • Switch to the "armv8" branch
git checkout armv8
  • Build docker image named linky
docker build -t armv8 .
  • Run TELESAFE in a container
docker run --rm -m 1g --cpus="1" --platform linux64/arm64 armv8

Create your injection datasets

The main file to inject private devices into work time series is inject.py

  • Use the load method to load a dataset. The function return a triplet of time series : work time serie, a list of private time series and the summed up time serie

  • The work time series used are randomly selected from the Orange4Home

  • Run_script_injection.py allows to create injections automatically with different number of injections and number of dataset per number of injection.

The datasets will be created in path: /databases/injection/

Parallelization in computation of PWM

  • Switch to the armv8_dbscan branch
git checkout armv8_dbscan
  • Use the parallel version to compute PWM in TELESAFE-DBSCAN and TELESAFE-Lite, the parallelized versions are commented in the evals/eval_dbscan (for TELESAFE-DBSCAN) and evals/mp_emoq_linky (for TELESAFE-Lite)
...
predictd_index_emoq = emoqd.algo1_light_parallel(num_processus=num_process)
...
...
pw_ind = pw.get_parallel(r=0.1, epsilon=epsilon, num_processus=num_processus)
...
  • Modify the file in Dockerfile to choose which algorithm tested
...
ENTRYPOINT ["python", "./evals/eval_dbscan.py"] # Put ENTRYPOINT ["python", "./evals/mp_emoq_linky.py"] to run TELESAFE-Lite algorithm
  • Build docker image named linky
docker build -t armv8 .
  • Run TELESAFE in a container
docker run --rm -m 1g --cpus="4" --platform linux64/arm64 armv8 1440 30 4

[1] Julien Cumin, Grégoire Lefebvre, Fano Ramparany, and James L. Crowley. “A Dataset of Routine Daily Activities in an Instrumented Home”. In 11th International Conference on Ubiquitous Computing and Ambient Intelligence (UCAmI), 2017.

[2] Andreas Reinhardt, Paul Baumann, Daniel Burgstahler, Matthias Hollick, Hristo Chonov, Marc Werner, Ralf Steinmetz: On the Accuracy of Appliance Identification Based on Distributed Load Metering Data. Proceedings of the 2nd IFIP Conference on Sustainable Internet and ICT for Sustainability (SustainIT), 2012.

[3] Hebrail, G. & Berard, A. (2006). Individual Household Electric Power Consumption [Dataset]. UCI Machine Learning Repository. https://doi.org/10.24432/C58K54.