Presentation is loading. Please wait.

Presentation is loading. Please wait.

The following diagrams detail the interaction of AWS, Alexa, Fitbit apis, and the user #1 – User needs to link Fitbit account to skill #2 – User needs.

Similar presentations


Presentation on theme: "The following diagrams detail the interaction of AWS, Alexa, Fitbit apis, and the user #1 – User needs to link Fitbit account to skill #2 – User needs."— Presentation transcript:

1 The following diagrams detail the interaction of AWS, Alexa, Fitbit apis, and the user #1 – User needs to link Fitbit account to skill #2 – User needs to have a machine learning datasource created from Fitbit data #3 – User needs to have a custom machine learning model created #4 – The user askes for the best time to workout. Current data is pulled from the Fitbit platform and run against the machine learning model to create a recommendation.

2 The function looks for a authorization token for a linked account
Alexa – Best Workout Recommendation Skill 1A User Asks – “Alexa, ask Workout Recommendation to find the best time to go to the gym today? 1B Alexa passes the request to the “Get_Best_Workout_Time_Interface_Alexa” lambda function The function looks for a authorization token for a linked account No token is found, so Alexa responds “You must have a Fitbit account to use this skill. Please use the Alexa app to link your Amazon account with your Fitbit Account” 1C User links Fitbit Account to app Fitbit.com 1A 1C 1B S3: Data for Machine Learning Lambda: Get_Best_Workout_Time_Interface_Alexa SNS Topic: Start_ML_Model Lambda: Create_ML_Model_Workout_App Amazon Machine Learning Amazon Dynamo Workout_Recommendations Create_ML_Model_Workout App2 (runs every 30 minutes)

3 The token is passed via SNS to another lambda function.
Alexa – Best Workout Recommendation Skill 2A User Asks – “Alexa, ask Workout Recommendation to find the best time to go to the gym today? 2B – 2C Alexa passes the request to the “Get_Best_Workout_Time_Interface_Alexa” lambda function The function finds an authorization token and checks the Workout_Recommendations table to see if a Machine Learning Model exists No record is found, so Alexa responds “Your Fitbit historical data needs to be analyzed to provide the best workout recommendations. This process will take about an hour.” 2D-2E-2F The token is passed via SNS to another lambda function. The function uses the token to pull back activity records from Fitbit The data is saved to an S3 bucket 2G-2H A Machine Learning Data Source is created using the data saved in S3 The DynamnoDB status table is updated Note: If the user were to query Alexa during the process, the response would be: “Your Fitbit historical data is being analyzed to provide the best workout recommendations. Please check back in an hour.” Fitbit.com 2A 2B 2E 2F 2D S3: Data for Machine Learning Lambda: Get_Best_Workout_Time_Interface_Alexa SNS Topic: Start_ML_Model Lambda: Create_ML_Model_Workout_App 2H 2C 2G Amazon Machine Learning Amazon Dynamo Workout_Recommendations Create_ML_Model_Workout App2 (runs every 30 minutes)

4 Alexa – Best Workout Recommendation Skill
User Asks – “Alexa, ask Workout Recommendation to find the best time to go to the gym today? 3A-3B The Create_ML_Model_Workout_App2 Lambda function runs every 30 minutes and queries the status table to determine if any action is needed on Machine Learning services If the Datasource created in step 2 is complete, then the Machine Learning Model is created. The status table is updated to reflect that the Machine Learning Model is being created. 3C-3D If the Machine Learning Model created in step 3A-3B is complete, then status table is updated to reflect that the system can be used. Fitbit.com S3: Data for Machine Learning SNS Topic: Start_ML_Model Lambda: Create_ML_Model_Workout_App Lambda: Get_Best_Workout_Time_Interface_Alexa 3B Amazon Machine Learning 3D Amazon Dynamo 3A 3C Workout_Recommendations Create_ML_Model_Workout App2 (runs every 30 minutes)

5 Alexa – Best Workout Recommendation Skill
The Create_ML_Model_Workout_App2 Lambda function runs every 30 minutes and queries the status table to determine if any action is needed on Machine Learning services If the Datasource created in step 2 is complete, then the Machine Learning Model is created. The status table is updated to reflect that the Machine Learning Model is being created. 3C-3D If the Machine Learning Model created in step 3A-3B is complete, then status table is updated to reflect that the system can be used. Fitbit.com S3: Data for Machine Learning SNS Topic: Start_ML_Model Lambda: Create_ML_Model_Workout_App Lambda: Get_Best_Workout_Time_Interface_Alexa 3B Amazon Machine Learning 3D Amazon Dynamo 3A 3C Workout_Recommendations Create_ML_Model_Workout App2 (runs every 30 minutes)

6 A Machine Learning model exists. 4E
Alexa – Best Workout Recommendation Skill 4A User Asks – “Alexa, ask Workout Recommendation to find the best time to go to the gym today? 4B – 4C Alexa passes the request to the “Get_Best_Workout_Time_Interface_Alexa” lambda function The function finds an authorization token and checks the Workout_Recommendations table to see if a Machine Learning Model exists A Machine Learning model exists. 4E The user token is used to retrieve current data from Fitbit. This includes, for the day the current users weight, the amount of sleep the user achieved, and the number of calories burned the previous day. 4F The Fitbitdata, along with the day of the week is passed to the Machine Learning Model The model evaluates 4 options – working out in the morning, mid-day, afternoon, and evening – and gives a prediction on the number of “very active minutes” for each time period. 4G The lambda code determines the best option and Alexa tells the user: “Based on your previous activity, the best time for you to work out is Morning” (or Mid-Day, Afternoon, or Evening) Fitbit.com 4A 4G 4E 4B S3: Data for Machine Learning Lambda: Get_Best_Workout_Time_Interface_Alexa SNS Topic: Start_ML_Model Lambda: Create_ML_Model_Workout_App 4F 4C Amazon Machine Learning Amazon Dynamo Workout_Recommendations Create_ML_Model_Workout App2 (runs every 30 minutes)

7 Is the Model being built?
Main Flow Alternate Flow Alexa, ask Workout Recommendation to find the best time to go to the gym today^ Alexa, ask Workout Recommendation to find the best time to go to the gym User Query ^ Today or Tomorrow Is User Account Linked Is a ML Model Available? Is the Model being built? Lambda Logic N N N Y Y Y You must have a Fitbit account to use this skill. Please use the Alexa app to link your Amazon account with your Fitbit Account. Based on your previous activity, the best time for you to work out is Morning * Your Fitbit historical data is being analyzed to provide the best workout recommendations. Please check back in an hour. Your Fitbit historical data needs to be analyzed to provide the best workout recommendations. This process will take about an hour. You did not tell me what day to check. Please ask me, what is the best time to work out today or what is the best time to work out tomorrow. Alexa Response * Morning, Mid-Day, Afternoon, or Evening Corresponding Flow Chart 1 4 3 2


Download ppt "The following diagrams detail the interaction of AWS, Alexa, Fitbit apis, and the user #1 – User needs to link Fitbit account to skill #2 – User needs."

Similar presentations


Ads by Google