IBM Io T Connected Vehicle Insights Trajectory Pattern
IBM Io. T Connected Vehicle Insights Trajectory Pattern March 18, 2019 Tokyo Software Development Laboratory © 2019 IBM Corporation
IBM Io. T Connected Vehicle Insights About This Document This document describes how an application gets trajectory pattern analysis result for vehicles and drivers. [Related links] • IBM Io. T Connected Vehicle Insights – Entitled Content (KC) • Developing apps with IBM Io. T Connected Vehicle Insights • REST APIs for application development • Driver Behavior REST API https: //www. ibm. com/support/knowledgecenter/SSNQ 4 V_gbs/iot-automotive/apis/swagger_Driver. Insights. json 2 © 2019 IBM Corporation
IBM Io. T Connected Vehicle Insights Trajectory Pattern Analysis Overview § Trajectory Pattern Analysis API is a service that is provided by IBM Watson™ Io. T Connected Vehicle Insights that you can use to analyze the Origin/Destination (O/D) and route patterns of driving trips from historical car probe data per vehicle. • An O/D pattern from Home (Origin-1) to Office (Destination-1) that has two route patterns. • One route is mined from 36 historical trips. • Another route is mined from 24 historical trips. • An O/D pattern from Home (Origin-1) to Shopping mall (Destination-2) that has one route pattern. • Another route is mined from 12 historical trips. 3 © 2019 IBM Corporation
IBM Io. T Connected Vehicle Insights Trajectory Pattern Analysis Job REST APIs Example 0. (optional) PUT /driverinsights/tpmjob/tp. Parameters 1. POST /driverinsights/tmpjob/job request body { "od_support_threshold": 4, "od_time_window": 3600, "od_spatial_window": 500, "route_support_threshold": 2, "similarity_level": 0. 75, "trip_extract": false, "trip_extract_parameters": {}, "by_driver_id": false request body (Set parameters) } 3. GET /driverinsights/tmpresult/result. Summary? job_id=3086 b 75 f 5 ca 0 -4 ed 4 -83 b 1 -4 d 3 d 28 eec 338 (Get analysis result) response { "job_id": "f 8 e 4 bbc 7 -863 a-4 a 01 -b 05 d-59 d 775 e 968 aa", "job_submit_date": "2019 -02 -23 T 04: 15: 37. 071 Z", "tenant_id": "public", "diversity_metrics": [ : ] } { "from": ” 2019 -2 -8", "to": ” 2019 -2 -8" (Request analysis) } response { "job_id": "3086 b 75 f-5 ca 0 -4 ed 4 -83 b 1 -4 d 3 d 28 eec 338" } 2. GET /driverinsights/tmpjob/job? job_id=3086 b 75 f-5 ca 04 ed 4 -83 b 1 -4 d 3 d 28 eec 338 response { (Check status) "from": "2019 -2 -8", "to": "2019 -2 -8", "job_id": " 3086 b 75 f-5 ca 0 -4 ed 4 -83 b 1 -4 d 3 d 28 eec 338” "job_submit_date": "2019 -02 -09 T 00: 00. 000 Z", "job_status": "SUCCEEDED" } SUCCEEDED, RUNNING or KILLED Wait until job_status becomes SUCCEEDED. 4 © 2019 IBM Corporation
IBM Io. T Connected Vehicle Insights Driving Diversity Metrics Trajectory Pattern Analysis creates driving diversity metrics per vehicles or drivers. Each diversity metrics contains list of detected origin/destination patterns. Driving Diversity Metrics driver_id string The driver ID. job_submit_date string yyyy-MM-dd. THH: mm: ss. fff. Z rare_mileage_ratio double The ratio of the mileage that is covered by route patterns to the total mileage of the trips that are retrieved. rare_od_ratio double The ratio of the number of trips that are covered by origin to destination patterns to the total number of trips that are retrieved. rare_trip_ratio double The ratio of the number of trips that are covered by route patterns to the total number of trips that are retrieved. total_trip_count integer The total number of trips that are retrieved by the service. job_id string Job ID that is automatically generated by the trajectory pattern analysis component of the service. mo_id string. The ID of the moving object, for example, the vehicle ID. od_patterns 5 [. . . ] © 2019 IBM Corporation
IBM Io. T Connected Vehicle Insights O/D (Origin/Destination) Pattern A driving diversity metrics contains O/D patterns for vehicles or drivers. One O/D patterns represents set of detected route patterns that has the similar origin and destinations. O/D Pattern range of destination range of origin o_min_latitude, o_min_longitude, o_max_latitude, o_max_longitude d_min_latitude, d_min_longitude, d_max_latitude, d_max_longitude Route patterns that has similar origin and destination 6 © 2019 IBM Corporation
IBM Io. T Connected Vehicle Insights O/D Summary Data Model 7 driver_id end_time_slot_head end_time_slot_tail matched_trip_count mo_id start_time_slot_head start_time_slot_tail support_ratio string integer string double total_trip_count matched_weekdays d_max_latitude d_max_longitude d_min_latitude d_min_longitude o_max_latitude o_max_longitude o_min_latitude o_min_longitude job_id od_pattern_id integer array double double string The ID of the driver. The head of the time period for the destination of the origin/destination (O/D) pattern. string. The tail of the time period for the destination of the origin/destination (O/D) pattern. List of all matched trips for this origin/destination (O/D) pattern. The ID of the moving object, for example, the vehicle ID. The head of the time window for the origin of the origin/destination (O/D) pattern The tail of the time window for the origin of the origin/destination (O/D) pattern The ratio of the number of trips that support the current origin/destination (O/D) pattern to the total number of trips. The total number of trips that are retrieved by the system. The list of weekdays within which the origin/destination (O/D) pattern occurs. The maximum latitude of the destination region of the origin/destination (O/D) pattern. The maximum longitude of the destination region of the origin/destination (O/D) pattern. The minimum latitude of the destination region of the origin/destination (O/D) pattern. The minimum longitude of the destination region of the origin/destination (O/D) pattern. The maximum latitude of the origin region of the origin/destination (O/D) pattern. The maximum longitude of the origin region of the origin/destination (O/D) pattern. The minimum latitude of the origin region of the origin/destination (O/D) pattern. The minimum longitude of the origin region of the origin/destination (O/D) pattern. Job ID that is automatically generated by the trajectory pattern analysis component of the service. The origin/destination (O/D) pattern ID that is generated by the trajectory pattern analysis component of the service. © 2019 IBM Corporation
IBM Io. T Connected Vehicle Insights Trajectory Pattern Analysis Result REST APIs Example Once o/d patterns are created, you can retrieves details of patterns. 1. GET /driverinsights/tpmresult/od. List response (Get list of o/d pattern summary) [{ "d_max_latitude": 36. 1084789, "d_max_longitude": -115. 0629902, "d_min_latitude": 36. 1084789, "d_min_longitude": -115. 0629902, "job_id": "f 8 e 4 bbc 7 -863 a-4 a 01 -b 05 d-59 d 775 e 968 aa", "od_pattern_id": "53202 b 36 -da 5 e-4 d 27 -bb 4 a-33 e 8327 cf 745”, : 2. GET /driverinsights/tpmresult/od. Detail ? job_id=f 8 e 4 bbc 7 -863 a-4 a 01 -b 05 d-59 d 775 e 968 aa &od_pattern_id=d 7719095 -9 d 6 a-460 c-8 f 3 e-de 2537 b 746 da response { "matched_trip_count": 8, "matched_trips": [ { : }, : ] : ], "route_pattern_count": 2, "route_patterns": [ { "job_id": "f 8 e 4 bbc 7 -863 a-4 a 01 -b 05 d-59 d 775 e 968 aa", "od_pattern_id": "d 7719095 -9 d 6 a-460 c-8 f 3 e-de 2537 b 746 da", "route_pattern_id": "7517 fbca-197 d-47 bd-aaf 1 -3 dde 8 f 1927 f 2" : }, : ] 3. GET /driverinsights/tmpresult/route. Gps. List? job_id=f 8 e 4 bbc 7 -863 a-4 a 01 b 05 d-59 d 775 e 968 aa&od_pattern_id=d 7719095 -9 d 6 a-460 c-8 f 3 ede 2537 b 746 da&route_pattern_id=7517 fbca-197 d-47 bd-aaf 1 -3 dde 8 f 1927 f 2 response [{ "latitude": 35. 7036666, "longitude": 139. 7533928 }, (Ge details of od/pattern) (Get GPS of a route pattern) } : }] 8 © 2019 IBM Corporation
IBM Io. T Connected Vehicle Insights O/D Pattern Detail driver_id end_time_slot_head string The driver ID. The head of the time window for the destination of the origin/destination (O/D) pattern. end_time_slot_tail matched_trip_count mo_id start_time_slot_head start_time_slot_tail support_ratio total_trip_count matched_weekdays d_max_latitude d_max_longitude d_min_latitude d_min_longitude o_max_latitude o_max_longitude o_min_latitude o_min_longitude job_id od_pattern_id matched_trips route_patterns string integer string double integer array double double string array The tail of the time window for the destination of the origin/destination (O/D) pattern. List of all of the matched trips for this origin/destination (O/D) pattern. The ID of the moving object, for example, the vehicle ID. The head of the time window for the origin of the origin/destination (O/D) pattern. The tail of the time window for the origin of the origin/destination (O/D) pattern. The ratio of the number of trips that support the current origin/destination (O/D) pattern to the total number of trips. The total number of trips that are retrieved by the system. [. . . ] The maximum latitude of the destination region of the origin/destination (O/D) pattern. The maximum longitude of the destination region of the origin/destination (O/D) pattern. The minimum latitude of the destination region of the origin/destination (O/D) pattern. The minimum longitude of the destination region of the origin/destination (O/D) pattern. The maximum latitude of the origin region of the origin/destination (O/D) pattern. The maximum longitude of the origin region of the origin/destination (O/D) pattern. The minimum latitude of the origin region of the origin/destination (O/D) pattern. The minimum longitude of the origin region of the origin/destination (O/D) pattern. The job ID, which is automatically generated by the trajectory pattern analysis component of the service. The origin/destination (O/D) pattern ID that is generated by the trajectory pattern analysis component of the service. [. . . ] 9 © 2019 IBM Corporation
IBM Io. T Connected Vehicle Insights Route Pattern job_id string Job ID that is automatically generated by the trajectory pattern analysis component of the service. od_pattern_id string The origin/destination (O/D) pattern ID that is generated by the trajectory pattern analysis component of the service. route_pattern_id string Route Pattern ID that is generated by the trajectory pattern analysis component of the service. avg_duration double The average driving duration for a route pattern, in seconds. avg_mileage double number($double)The average mileage for a route pattern, in meters. driver_id string The ID of the driver. job_submit_date string Date that the job was submitted, in the format of yyyy-MM-dd. THH: mm: ss. fff. Z. matched_trip_count integer List of all matched trips for specified route pattern. mo_id double The ID of the moving object, for example, the vehicle ID. support_ratio double The relative support ratio of the specified route pattern. tenant_id string The tenant ID. matched_trips 10 [. . . ] © 2019 IBM Corporation
- Slides: 10