ChatBot 在Line上面的架構

in #chatbot6 years ago

在聊天機器人頻道內,輸入文字時的流程簡圖

用戶Line App ---> Line server ---> Chatbot server ---> Line server ---> 用戶Line App

當我們在規劃聊天機器人時,要有一個概念:

「用戶是不會直接和Chatbot連線的」

站在Line用戶的立場來看,Chatbot是「躲」在Line Server後方,一方面保障了Chatbot的安全(IP不會洩漏),一方面在防火牆上設定單純一些(只允許Line Server的訪問)。

Chatbot server,其實也就只是一個「網站」,Line server會把用戶輸入的資料(文字,圖片,網址等)以JSON的格式傳送過來,Chatbot server每被Line Server「丟」一個JSON過來,就會依程式的設定做出對應的行為,而「大部分」的行為,都是「丟」訊息回去給Line Server,再轉給Line用戶。

Line server其實也就只是一個「中繼站」的角色。

真正的聊天機器人的設計,重心會是在Chatbot server的程式編寫上面。和Line有關的設定比重不大。

下一篇文章,將會介紹Line帳號的設定及限制

Sort:  

Congratulations @ian8ko! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

Upvote this notification to help all Steemit users. Learn why here!

Coin Marketplace

STEEM 0.17
TRX 0.13
JST 0.027
BTC 61297.02
ETH 2687.45
USDT 1.00
SBD 2.59