Customizing driving behavior insights

The Driver Behavior component of the IBM® IoT Connected Vehicle Insights service includes the Driving behavior analysis feature. The Driving behavior analysis feature contains a Driving Behavior plug-in that you can customize to detect customer-specific metrics, context, and driver behavior. The custom plug-in can be deployed on the Driver Behavior component for the online data analysis.

Driving Behavior plug-in framework

The following diagram outlines the components of the Driving Behavior plug-in framework, which is responsible for driving behavior analysis. The framework accommodates customizations to the default Driving Behavior plug in so that you can tailor the data analysis for your business needs.

Driving Behavior plug-in framework

Data flow

The following diagram shows an overview of the data flow, where VDH = Vehicle Data Hub, DMM = Dynamic Map Manager, HBase = Hadoop database, and HDFS = Hadoop Distributed File System.

Driving Behavior plug-in data flow

Logical flow and plug-in points

The logical flow of the analysis and plug-in points is noted in the following diagram.

Driving Behavior plug-in analysis core logic flow

Descriptions of each part of the logic flow

Descriptions of the plug-in points, which are shown in the diagram, are provided in the following table.

No Name in logic diagram Interface Description
1 Data interpolation plug-in loader com.ibm.iot.automotive.moma.drb. operations.plugin.IDataInterpolator Plug-in point to interpolate customer-specific data.
2 Trajectory summary builder com.ibm.iot.automotive.moma.drb. operations.plugin.ISummaryBuilder Plug-in point to insert a summary of a trajectory.
3 Context splitter plug-in loader com.ibm.iot.automotive.moma.drb. operations.plugin.IContextSplitter Plug-in point to split a trajectory into multiple subtrajectories (context injection). This method is called multiple times if a trajectory is already split into subtrajectories.
4 Data annotation plug-in loader com.ibm.iot.automotive.moma.drb. operations.plugin.IAnnotator Plug-in point to insert annotations for each GPS point.
5 Behavior detector plug-in loader com.ibm.iot.automotive.moma.drb. operations.plugin.IBehaviorDetector Plug-in point to detect behavior.
6 Whole trip behavior detector plug-in loader com.ibm.iot.automotive.moma.drb. operations.plugin.IWholeTripBehaviorDetector Plug-in point to detect behavior, such as fatigued driving, for the whole trip.

Default plug-in

Descriptions of the plug-in points for the default plug-in are provided in the following table.

No Plug-in interface Default plug-in Dependent plug-in Description
1 Data interpolation plug-in loader com.ibm.iot.automotive.moma.drb.operations.
inerpolator.plugins.DefaultWeatherDataInterpolator
(none)  
2 Trajectory summary builder com.ibm.iot.automotive.moma.drb.operations.
summarybuilder.plugins.DefaultTrajectorySummaryBuilder
(none)

The following metrics are calculated:

  • time_span
  • distance
  • average_speed
  • max_speed
  • idle_time
  • night_driving_time
  • rush_hour_driving
  • day_of_week
  • day_of_month
  • month_of_year
3 Context splitter plug-in loader com.ibm.iot.automotive.moma.drb.operations.
context.plugins.DefaultByRoadTypeSplitter
(none) context_category= roadType,context_category_id=2
4   com.ibm.iot.automotive.moma.drb.operations.
context.plugins.DefaultBySpeedPatternSplitter
(none) context_category= roadType,context_category_id=3
5   com.ibm.iot.automotive.moma.drb.operations.
context.plugins.DefaultByTimeRangeSplitter
(none) context_category= speedPattern,context_category_id=0
6   com.ibm.iot.automotive.moma.drb.operations.
context.plugins.DefaultByWeatherTypeSplitter
DefaultWeatherDataInterpolator context_category= weatherType,context_category_id= 10
7 Data annotation plug-in loader com.ibm.iot.automotive.moma.drb.operations.
annotator.plugins.DefaultHeadingPatternAnnotator
(none)  
8   com.ibm.iot.automotive.moma.drb.operations.
annotator.plugins.DefaultSpeedActionAnnotator
(none)  
9   com.ibm.iot.automotive.moma.drb.operations.
annotator.plugins.DefaultSpeedingAnnotator
(none)  
10 Behavior detector plug-in loader com.ibm.iot.automotive.moma.drb.operations.
behavior.plugins.DefaultAccelStopBehaviorDetector
DefaultSpeedActionAnnotator
  • behavior_id=1,behavior_name=Harsh acceleration
  • behavior_id=2,behavior_name=Harsh braking/li>
  • behavior_id=4,behavior_name=Frequent stops
  • behavior_id=5,behavior_name=Frequent acceleration
  • behavior_id=6,behavior_name=Frequent braking
11   com.ibm.iot.automotive.moma.drb.operations.
behavior.plugins.DefaultSpeedingBehaviorDetector
DefaultSpeedActionAnnotator behavior_id=3,behavior_name=Speeding
12   com.ibm.iot.automotive.moma.drb.operations.
behavior.plugins.DefaultTurnBehaviorDetector
DefaultHeadingPatternAnnotator
  • behavior_id=7,behavior_name=Sharp turn
  • behavior_id=8,behavior_name=Acceleration before turn
  • ehavior_id=9,behavior_name=Over-braking before exiting turn
13 Whole trip behavior detector plug-in loader com.ibm.iot.automotive.moma.drb.operations.
behavior.plugins.DefaultFatiguedBehaviorDetector
(none) behavior_id=10,behavior_name=Fatigued driving

Default plug-in for edge behavior

Descriptions of the plug-in points for the default plug-in for edge behavior are provided in the following table.

No Plug-in interface Default plug-in Dependent plug-in Description
1 Data interpolation plug-in Llader com.ibm.iot.automotive.moma.drb.hybrid.
inerpolator.MetaSystemMissingDataInterpolatorWithDMMRest
(none)

Car probe data interpolator uses the DMM REST API.

Specify the following configuration to access the Dynamic Map Manager (DMM) as Property in DrbCustomizableConfig.xml.

  • name=dmmUrl, value={Your DMM REST API URL}
  • name=tenantId, value={Your tenantId (for example “public”)}
  • name=internalTenantId, value={Your internalTenantId (for example “1”)}
  • name=userId, value={Your REST basic authentication userId}
  • name=password, value{Your REST basic authentication password}
2 Data interpolation plug-in loader com.ibm.iot.automotive.moma.drb.hybrid.
inerpolator.MetaSystemMissingDataInterpolatorWithDMMDataBusClient
(none)

Car probe data interpolator uses the DMM Data Bus API.

Specify the following configuration to access DMM (Dynamic Map Manager) as Property in DrbCustomizableConfig.xml.

  • name=tenantId, value={Your tenantId (for example “public”)}
  • name=requiredAttributeList, value={Your necessary link properties by comma-separated (for example, “all”)}
  • name=distanceThreshold, value={Your required distance by meter unit (for example 50)}
3 Trajectory summary builder com.ibm.iot.automotive.moma.drb.hybrid.
summarybuilder.ExtendedTrajectorySummaryBuilder
DefaultTrajectorySummaryBuilder

In addition to the metrics for the default plug-in, the following metrics are calculated for edge behavior.

  • travel_time_roadtype_N

  • travel_distance_roadtype_N

4 Data annotation plug-in loader com.ibm.iot.automotive.moma.drb.hybrid.
annotator.SpeedActionAnnotatorForEdge
DefaultSpeedActionAnnotator If (name=ignoreInterpolated, value=true) is specified in DrbCustomizableConfig.xml as Property, which is interpolated data is ignored for annotation.
5   com.ibm.iot.automotive.moma.drb.hybrid.
annotator.SpeedingAnnotatorForEdge
DefaultSpeedingAnnotator If (name=ignoreInterpolated, value=true) is specified in DrbCustomizableConfig.xml as Property, which is interpolated data is ignored for annotation.
6   com.ibm.iot.automotive.moma.drb.hybrid.
annotator.SteeringEventAnnotator
(none) Specify name=acceleration_y_threashold and value as m/s^2 unit for setting y-axis acceleration threshold in DrbCustomizableConfig.xml.
7 Behavior detector plug-in loader com.ibm.iot.automotive.moma.drb.hybrid.
behavior.AbruptSteeringDetector
 
  • behavior_id=1000,behavior_name=Abrupt steering

8 Behavior detector plug-in loader com.ibm.iot.automotive.moma.drb.hybrid.
behavior.CorneringBehavior
 
  • behavior_id=1001,behavior_name=Cornering event

  • Specify name=intervalThreshold,value={milliseconds order (for example) 1000} for determining whether steeringEvent comes with this interval threshold.

  • Specify name=continuousCount,value={count (for example) 2} for determining whether steeringEvent continues greater than or equal to this threshold.

9 Whole trip behavior detector plug-in loader com.ibm.iot.automotive.moma.drb.hybrid.
behavior.GeoJsonWriterForDebug
(none)

GeoJson writer for debug purpose.

Specify name= basePath and value of directory where you want to output GeoJson for debug in DrbCustomizableConfig.xml.

Developing the plug-in

For information on developing the plug-in, see Developing custom Driver Behavior plug-ins.

Data model

The data model for the Driving Behavior plug-in framework, which is comprised of a Hadoop database (HBase) model and Db2 database model, is defined in Driving Behavior plug-in data model.