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

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

问题描述

我目前正在开发一项基于医疗保健的 Alexa 技能.所以我需要存储有关疾病、诊断和症状的信息.我已经掌握了一项基本技能,包括文件中有关一种疾病的信息,制作了一个 zip 文件,将其上传到 AWS Lambda 并获得了亚马逊的认证.现在,我需要在我需要获得有关许多疾病的信息的地方进行更广泛的研究.我在哪里可以存储这些庞大的数据以及如何从我的 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 服务,该服务可以使用某种 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天全站免登陆