如何为我正在开发的Alexa技能存储数据? [英] How to store the data for the Alexa skill I am developing?

查看:81
本文介绍了如何为我正在开发的Alexa技能存储数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在开发基于医疗保健的Alexa技能。因此,我需要存储有关疾病,其诊断和症状的信息。我已经掌握了一项基本技能,包括在文件中包含有关一种疾病的信息,制作了zip文件,将其上传到AWS Lambda并获得了Amazon的认证。现在,在需要获得许多疾病信息的地方,我需要做的更多。我在哪里可以存储这些巨大的数据,以及如何从Lambda函数中检索它们?如果使用DynamoDB是正确的方法,那么如何从Lambda函数从那里检索数据?还是还有其他更好的方法?

I am currently developing an Alexa skill based on health care. So I need to store information about diseases, their diagnosis and symptoms. I have made a basic skill including information about one disease in a file, made a zip file, uploaded it to AWS Lambda and got certified by Amazon. Now I need to make this more extensive where I need to have information about many diseases. Where can I store this huge data and how to retrieve it from my Lambda function? If using DynamoDB is the right way, then how to retrieve data from there from my Lambda function? Or Is there any other better way?

推荐答案

您可能需要首先根据自己的技能设置帐户关联。这可能是一个过程,但请查看此页面此处。我建议使用Google或Amazon作为您的OAuth提供商。

You'll likely need to set up account linking on your skill first. It can be a bit of a process, but check out this page here. I would suggest using Google or Amazon as your OAuth provider.

帐户链接使您可以将特定用户及其回声与您拥有的数据库中的条目相关联。因此,在用户链接到数据库之后,您有两个选择。

Account linking allows you to associate a particular user and their echo with an entry in a database you own. So after you have a user linked up with your database, you have two options.

选项1是(我相信)您可以使用任何可用语言直接从Lambda服务中查询数据库。

Option 1 is (I believe) you can query your database directly from the Lambda service using any of the available languages.

选项2,设置一个Web服务,该Web服务可以使用某种RESTful服务获取并设置数据库中的信息,然后调用该服务。

Option 2, set up a web service that can get and set information in the database using some sort of RESTful service, and then make calls to that service instead.

完成这种事情并不容易,但是很有可能。

It's not easy to get this kind of thing done, but It's very possible.

编辑:此外,如果您想提供很多相关信息,疾病,请考虑研究是否已有疾病数据库,以及是否存在可以访问的API。这样可以为您节省很多时间。

In addition, if you're looking to provide information on a lot of diseases, consider researching if there is an already available database of diseases, and if APIs exist to access it. This could save a lot of time for you.

这篇关于如何为我正在开发的Alexa技能存储数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆