Skip to content

Service for getting the most relevant values of a sensor in a period of time

License

Notifications You must be signed in to change notification settings

asw-i3a/sensor-data-mining

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sensor data mining

Status
circleCI CircleCI
code coverage NOT NEED
code quality NOT NEED
latest build NOT NEED

Welcome to our sensor data mining micro-service

Important: This micro-service is contained inside the domain of the i3a system, if you dont knoe what it is please, refer to the main page of the poject.

This repository contains a micro-service that is intended to mine data from the incidents submitted by sensors in order to get the most relevat metrics about it. Also it calculates some statistical important information that clients can use as desired.

Autors

Problem to mine

We have sensors, that are a type of agents but with int type set to 3. As every other sensor it has a sensorId, and submmits incidents to the system regularly. In order to increase eficiency, we must show the progress of the sensor readings, so me must (1) filter other agent's kind and the sensor's kind. And (2) compute all data for the sensor to get the metric the sensor is reading, and therefore return only the readings but not all the incidents data.

Mining algorithm

As you can see in the code is a very simple algorithm, but perfectly valid for our porpouses.

  1. The algorithm will get all the incidents sibmitted by the given sensorId.
  2. From the sensor data the algorithm deduces which kind of sensor is and assigns a metric for it.
  3. For every incident submitted by that sensor add the value of the metric selected, if exists, and the data of the reading as a timestamp in a map.
  4. Retrun the map with all the readings and the selected metric.

Complexity: Search incidents + Compute data = O(n) + O(n). Being n the number of incidents submitted by the agent.

Next version

Will include filtering by dates so you can get the same result as before but adding a lower data filter and a greater data filter. That is, all incidents between A and B, being A & B dates. (20/02/2018 00:21:34 - 20/02/2019 00:21:34) for one year data.

About

Service for getting the most relevant values of a sensor in a period of time

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published