Giter VIP home page Giter VIP logo

crowdsensing's Introduction

Privacy-aware Crowdsensing

alternatetext alternatetext alternatetext alternatetext alternatetext

Piattaforma di mobile crowdsensing (piattaforma raccolta dati attraverso la collaborazione da parte degli utenti), per il monitoraggio dell’inquinamento acustico in uno scenario urbano.

Funzionalità

La piattaforma è in grado di poter inviare un rumore rilevato in maniera periodica e semi-automatica o manuale andando a definire dei criteri di privacy personalizzati dall'utente front-end. La manipolazione dei dati sensibili viene effettuata all'interno di un server trusted capace di poter stabilire un meccanismo di offuscamento basato sull'algoritmo di spatial cloaking. Ogni rilevamento ha un tempo di vita limitato, scelto dall'utente e rispettato nel trusted server all'interno di una lista logica che ha la funzionalità di buffer di sistema, in modo da aggregare e raccogliere dati provenienti da differenti utenti e utilizzarli per lo spatial cloaking (andando a considerare i principi di privacy definiti dai parametri k e range di ogni rilevazione. Infine, dopo il camuffamento dei dati, si avrà come output un rilevamento offuscato inoltrato al back-end server, visualizzato in una dashboard e salvato in maniera persistente in un database insieme alle informazioni di servizio legate ai criteri di valutazione di Quality of Service e privacy, nonchè del valore di trade-off tra i due.

Tecnologie utilizzate

  1. PostGIS per la gestione del back-end sui dati spaziali
  2. OpenLayers per la gestione dei dati spaziali nella dashboard del front-end
  3. Node.js per la gestione del server trusted utilizzato per il meccanismo di cloaking spaziale
  4. PostgreSQL come DBMS di gestione delle informazioni spaziali
  5. App Android basata su Java (SDK 17 - Oreo 8.1)

Utilizzo del progetto

Il progetto è stato deployato localmente su delle macchine dedicate per il testing e utilizzato esclusivamente per fornire un sistema funzionante in grado di poter far testare per scopi accademici alcuni meccanismi di privacy spaziale tipici dell'ambito context-aware.

Contributors

  • Andrea Gurioli (@andreagurioli1995)
  • Giovanni Pietrucci (@giovanniPi997)
  • Mario Sessa (@kode-git)

crowdsensing's People

Contributors

andreagurioli1995 avatar giovannipi997 avatar kode-git avatar

Stargazers

 avatar

crowdsensing's Issues

ReferenceError: Cannot access 'stack' before initialization

Describe the bug
ReferenceError on global stack using inside the trusted server, we need to find a method to resolve it because it is the base of the spatial cloaking.

To Reproduce
Steps to reproduce the behavior:

  1. Start the Android Emulator on App/
  2. Install Application on Run
  3. Enable Microphone and GPS
  4. Go in /Server/ directory
  5. Execute npm run trust on the first shell (Port: 3000)
  6. Execute npm run backend on the second shell (Port: 4000)
  7. Send Record on App Button

Expected behavior
I expected to load in the database the spatial location or nothing in case of making a pending state

Additional context
I used global.stack and exports.stack to define a real reference on the server-trusted but it seems like blind on stack variable initialization.

Decibels Measurements Evaluation

Describe the bug
Decibels noise measurements are not real in the MediaRecorder.getMaxAmplitude() and differ in according to the API versions in Android devices.

Expected behavior
Given a sound recording, returns a level of decibels around 70 dB (residential areas) to 90 dB (commercial areas) in according to the middle noise of a metropolitan city.

Code

REFERENCE = 0.1;
public double getNoiseLevel() 
{
    //Log.d("SPLService", "getNoiseLevel() ");
    int x = mRecorder.getMaxAmplitude();
    double x2 = x;
    Log.d("SPLService", "x="+x);
    double db = (20 * Math.log10(x2 / REFERENCE));
    //Log.d("SPLService", "db="+db);
    if(db>0)
    {
        return db;
    }
    else
    {
        return 0;
    }
}

Additional context
The REFERENCE value is not 0.1 and the values in decibels are like 20 to 40 dB.

Dashboard Data Management

In the implementation of the dashboard missed the following points:

  1. Fixing settings centroids to off for default.
  2. Sliders alignments
  3. Remove arrow in slider
  4. Adding 404 error handle in Ajax (with field named "error")
  5. Adding marker with popup for prediction (single-step version)
  6. Setting of popup for markers (Noise Decibels, Quality of Service, Privacy) and only "Noise Decibels" for predicted markers.
  7. In the cluster polygon, adding a popup with mean of noise decibels named "Mean Noise Decibels"

java.lang.OutOfMemoryError on Android application

App Error Stacktrace

E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.crowdsensingapp, PID: 22132
java.lang.OutOfMemoryError: Could not allocate JNI Env: Failed anonymous mmap(0x0, 8192, 0x3, 0x2, 61, 0): Permission denied. See process maps in the log.
at java.lang.Thread.nativeCreate(Native Method)
at java.lang.Thread.start(Thread.java:733)
at com.android.volley.RequestQueue.start(RequestQueue.java:127)
at com.android.volley.toolbox.Volley.newRequestQueue(Volley.java:91)
at com.android.volley.toolbox.Volley.newRequestQueue(Volley.java:67)
at com.android.volley.toolbox.Volley.newRequestQueue(Volley.java:102)
at com.example.crowdsensingapp.MapsActivity.getMeanDb(MapsActivity.java:301)
at com.example.crowdsensingapp.MapsActivity$5.onLocationResult(MapsActivity.java:228)
at com.google.android.gms.internal.location.zzau.notifyListener(Unknown Source:4)
at com.google.android.gms.common.api.internal.ListenerHolder.notifyListenerInternal(Unknown Source:17)
at com.google.android.gms.common.api.internal.ListenerHolder$zaa.handleMessage(Unknown Source:5)
at android.os.Handler.dispatchMessage(Handler.java:106)
at com.google.android.gms.internal.base.zap.dispatchMessage(Unknown Source:8)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

How to execute bug

Start applications and wait until the crash, it is caused by OutOfMemoryError for permissions to allocate JNI environment.

Spatial Cloaking Management and Comprehension

Describe the bug
Spatial Cloaking Management and Comprehension

To Reproduce
Can't, it is a logical issue

Expected behavior
When the android app runs and sends data, how it should be display these infos? How should manage these data in the back-end and in the database structure?

Screenshots
Not applicable

Meccanismo automatico di configurazione del sistema per ottimizzare trade-off Privacy-QoS

App Android
Nell'App Android verrà inviato un flag "automatic" in grado di definire se, per quel particolare punto o set di punti inviati dall'utente, si deve applicare un settaggio back-end per il k e il range tale che si migliori il trade-off tra Privacy e QoS.

Server Trusted
Nel server trusted ci sta uno stack con i punti da dover aggregare in modo da ottenere come risultato un punto spaziale dato dallo spatial cloaking e prendendo un filtraggio per range, k e user_id.

Quando un punto "automatic" entra all'interno del server trusted, bisogna settare k, range tale che:

  1. k viene massimizzato in modo da ottenere il valore massimo di Privacy possibile, considerando i valori dello stack
  2. Minimizzare il valore del range per minimizzare l'errore quadratico medio tra il punto spaziale e il punto reale, ossia massimizzare il QoS.

In modo da ottimizzare trade-off = a * P + (1-a) * Q basandosi su un a dato dall'utente.
Ciò che si otterrà è un punto tale che avrà il massimo trade-off Privacy-QoS tra le possibili combinazioni di k, range del punto x inserito con i vari punti ancora all'interno dello stack.

Server Backend
Riceverà i punti dello spatial cloaking in cui:

  1. L'indice del QoS è calcolato seguendo una media quadratica delle differenze tra i db dei punti generati e quelli del nodo spaziale.
  2. L'indice di Privacy che è calcolato andando a vedere la distanza media tra il nodo spaziale e i punti da cui è stato generato.

Balancing QoS and Privacy metrics

We need to evaluate QoS and privacy metrics in the same domain. The solution is to establish a value domain for both values and normalize them before the Trade-off elaboration. After that, the trade-off can be a good level of classification about noise management in a specific area of interest.

ReferenceError: Range values

During the automatic range setting it's better to have a range between 0 and 3000 than 1 to 2999.
That's because we calculate the automatic range in the way:

Math.floor(Range * Alpha * 10 / 10) which should be an integer between 0 and 3000 (actually is from 1 to 2999)

Correction should be on the Android App scripts in the settings session.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.