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.
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.
Logical flow and plug-in points
The logical flow of the analysis and plug-in points is noted in the following diagram.
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:
|
| 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 |
|
| 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 |
|
|
| 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.
|
| 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.
|
| 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.
|
| 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 |
|
|
| 8 | Behavior detector plug-in loader | com.ibm.iot.automotive.moma.drb.hybrid. behavior.CorneringBehavior |
|
|
| 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.