# Line Techpulse 2019
Life on Line:
開發更多 line 相關 App,與生活各個面向結合
Every thing on Line
Add AI tech
## News
https://www.computerdiy.com.tw/20191204_aichatbot_line-taiwan-techpulse-2019/
## Key note
資管 --> line tech lead
人工智慧的領先者
**Line brain 人工智慧領域 八項** --> Provide to 3rd parties
2020 企業夥伴 Line Brain 測試
技術內容的分享
專案開發經驗
1. 開放平台
Line mini app
app 結合 Line
2. Line is a AI company
OCR
**Clova chatbot builder**
AI 的重點是應用到生活
- 用戶檢舉資料 用文字辨識語言辨識,減少客服工作
- smart channel
- line today
- Line 訊息查證 (用戶舉報訊息)
Line AI (Line 總部的技術)
- Speech
- voice
- face
台灣團隊負責優化中文的部分
3. Privacy first and 大量資料
在隱私權條款裡必須要有使用資料的同意
**資料在分析的時候已經被混淆了**
feature as a service
到第四屆 Line Techpulse 2019 取經
今年的主題 Life in Line
重點放在 Line 如何 AI 應用技術
## Line API platform update
chatbot 開發
**Better User experience / Developer experience**
- approachable (new OA)
- no friend limit
- start from 0 dollar
- less restriction
Flex Message update
更彈性的格式
progress bar / 車票 ?
flex message simulator
### API update
Line 官方帳號後台看得到的關於官方帳號的資料,都有 API 可以取得
- Rich menu batch API
- Get Usage API
- Get user interaction(User 如何回應訊息 開件量)
- Insight API
- LIFF v2
- Support external browser
- Deep Link: https://liff.line.me
- Debug yout liff v2 app on desktop (Good !!)
- Path adn Query `parameterhttps://liff.line.me/{liffId}/path?query=foo`
- OpenID connect (用 Line login channel)
- Bot link(Line login 順邊加入 Line bot 好友!?)
- LIFF Playground (test API without writing code)
- liff.shareTargetPicker 分享資訊給好友
- Try Line API (文件可以直接試打 API)
- 繁體中文的 API 文件
## Clova AI chatbot builder (韓國人講者)
### Line 自己的 AI chatbot builder
Next year in taiwan
machine learning
Use case: naver cs chatbot
speech to text / text to speech / chatbot
leverage to other platform
不用自己開發 NLP
AutoML
在系統輸入問答集
No need to develop ......
Content Manage System + NLP Model + Line Chatbot
https://clova.ai/techdemo?lang=en
https://docs.ncloud.com/en/chatbot/chatbot-1-2.html
.....
## Line enterprise security
Why enterprise security is hard ??
怎麼做沒有講啊 QQ
Deveolpers usually have sensitive information,
Also hacking engineer is much easier than hacking server
用 Machine learning 去找到有弱點的 code !?
**Key to win: Good process, tooling, tuning and communication**
Security education platform ??
## Line 貼文串推薦系統(Line timeline)(recommendation system)
講者的節奏很好。雖然是英文,聽得很清楚,但好難 QQ
two
- collaborative filter
Raw data:
每個 user 看每個文章多久
user 是否有 click 某個特定文章
## Line Protostar (https://protostar.line.me/)
主要就是把應用般到 line 上面
Line 的孵化器
中華開發創新加速器
勤業眾信
還可以有綠牌的官方帳號 !!
圍繞在 Line 這個 Native app 上的各種應用,我們也可以這麼做嗎?
主要都是 Messaging API + LIFF 的應用
Taxi Go --> Line taxi
TA 大部分都是針對年青人
1. 潔客幫
2. 記帳雞
3. Alley pin
- 運用 Line bot designer
4. 途你
5. 肚肚
6. 通勤學
- 裂變行銷
7. MONTAGG
8. tiki poki 口袋售票
9. DR.Line
- image map message
- 利用 Liff 觸發關鍵字
10. 優活家
大概有一半都是跟診所病人相關的應用 😂😂
## Line pay
提供海外交易的服務
區塊鏈 !?!
Gateway to Gateway
**Event Sourcing 架構**
Line pay app
**app2app**: line pay 開啟時,會導到 line app 去登入認證,有點像 Oauth
Open Banking
Line pay API v3
不需要 ACL 了 (Access Control List) 白名單
Auto scaling,ip 改變!?
Line pay Offline APIs
1. event sourcing
2. local app2app (透過 token 交換)
3. partner Line pay api
4. Line Pay 未來 跨國界(Global)支付
Global user + local user + partner
## LINE SPOT and How We Build It
以 Line 對話為中心
聊天視窗左下角的加號可以直接分享 line spot,有漂亮的 buzcard,就可以取代 url 預覽醜醜圖
Tech Stack of Line spot
`Vue.js + GraphQL + kafka + event sourcing + kubernete`
Micro service 架構 vs monolithic
Pros
每個功能各自獨立,各自資料庫,各自部署
Flexbility of development / Easy to maintain
每個功能可以個字 auto scale
Cons
service 之間的溝通難度變高
維運難度增加
Front-end and Microservice
User interface 透過 GraphQL 去跟 API gateway 溝通,
然後 API gateway 再去跟各個 microservice 做溝通
- 資料結構整合問題 (data from partner)
- 多個資料庫
因為要串接
Event sourcing + kafka
kafka Connector as k8s resource
Drone CI with kubernetes
## Line spot 後端工程師 分享 如何跟眾多 partner 做資料串接
LINE spot solution: Event sourcing
Processing data manually
一定要有手動 import 的功能
Open close principle
對所有 partner 開放,但其中一個修改不能影響到其他人
Geralization & customization
## Line 訊息查證平台
已證實的消息,用 ML 擴展成近似語意的消息
## GraphQL + API gateway (Line Taiwan F2E)
BFF patern: backend for frontend
client 只要跟 API gateway 溝通
API gateway 會處理成 client 要的格式
API gateway 跟多個 micro service(server) 溝通
github API 可以去看看有 graphQL 跟 restapi 版本
graphQL query: client 可以在 query 裡指定自己要的欄位有哪些
## Line today 資料工程師
word embedding
BERT
Search 的重點還有一個是 sort ~
都是線性代數啊 QQ
## Line music (Line Data scientist)
老人用 Line 很多
Line music 年輕人使用偏多
利用 data 分析了解使用者輪廓
## Client and automation
### Android 資深工程師
因為要應對相對快速的 App UI 迭代
prototypr tools are quick, but..
Modify app directly takes time
用 Flutter 建立 prototype 好像比較方便
### ios 資深工程師
speed up ios development with LLDB code injection and framework live preview (加速開發)
build 的過程太久 @@ 拖慢開發速度
line 要 build 半個小時 QQ
把整個 app 重新編譯的次數減少,其他 module 不要編譯?
only build the framework
dependency inject
斷開 dependency 連結
tips for existing project
把要 build 的東西放到 dummy framework ? 只 build 他就好
playground live preview:
- interactive
- Framework
- preview
- code injection
## Line QA team
Monitor
- function fail
- api fail
- server fail
FCU
- file manager https://github.com/xcapt/express-filemanager
- crontab UI (google air flow)
- Uri-pinger https://github.com/globocom/url-pinger
why FCU is important
1. user 等兩秒就離開了
2. 快速找出問題在哪,避免很多工程師花很多時間找問題
3. 非開發人員也可以使用 FCU
show 出有問題的 API endpoint 是哪個 status code
每小時有多個問題時才作通知
## 小心得
Line 的優勢,龐大的使用者群,跨國界
Line 真的厲害
Line 工程師很多女生
Line 很多地方都運用 AI - 搜尋 autocomplete 推薦 NLP chatbot 關鍵字
其實下午場的 line taiwan 的技術分享其實乾貨還蠻多的
多多嘗試各種技術
我覺得如果演講裡有 take away 是最好的
下午場都講比較多技術細節
工程師演講 厲害
## 投影片
https://speakerdeck.com/line_developers_tw