簡易檢索 / 詳目顯示

研究生: 施俊宇
Shih, Chun-Yu
論文名稱: 應用機器學習於公共物聯網之初階研究
An Initial Study of Applying Machine Learning to Civil Internet of Things
指導教授: 李坤洲
Lee, Kun-Chou
學位類別: 碩士
Master
系所名稱: 工學院 - 系統及船舶機電工程學系
Department of Systems and Naval Mechatronic Engineering
論文出版年: 2022
畢業學年度: 110
語文別: 中文
論文頁數: 105
中文關鍵詞: 人工智慧機器學習深度學習公共物聯網
外文關鍵詞: artificial intelligence, machine learning, deep learning, civil internet of things
相關次數: 點閱:122下載:0
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 近年來人工智慧使用機器學習與深度學習技術,應用於各領域進行分析已有顯著成效,更在智慧型手機、第五代行動通訊與物聯網興起後,加速各領域人工智慧相關應用的發展,如自駕車、智慧製造、智慧醫療等…。
    國人習慣以LINE為主要通訊工具,LINE官方統計2018年台灣活躍用戶數達2,100萬人,基於LINE之移動性與普及性,目前已有各種以LINE為傳播媒介之智慧應用形式,如使用LINE Notify之系統或設備異常通知、自動化廣告通知等…,及使用LINE Bot之客服機器人、預訂機器人、股票分析機器人等…。因此,本論文擬以LINE Notify及LINE Bot當成公共物聯網之傳播媒介。
    本論文是應用機器學習於公共物聯網之初階研究,機器學習的方法包括可推算最佳分群數之K-Means聚類分析、閘式循環神經網路、長短期記憶神經網路。本研究為此領域之初階研究,初期分析的資料包括地震及空氣品質等政府機構提供的公開資料,先使用程式自動抓取政府機構提供的公開資料,接著再用程式做機器學習分析,最後再利用Line Notify及Line Bot發佈給大眾,達到「應用機器學習於公共物聯網」之目標。本研究所建立的流程,可輕易推廣到其他機器學習方法與政府機構提供的其他公開資料,希望對公共物聯網有所貢獻。

    SUMMARY
    Recently, the artificial intelligence utilized techniques of machine learning and deep learning, and had significant achievements in different fields. Due to the invention of smart phones and the fifth generation mobile communication, the artificial intelligence is easily applied to autonomous cars, smart manufacture, smart healthcare, …, etc.
    LINE is the most popular communication software in Taiwan. In 2018, there are 21 million users of LINE in Taiwan. This is due to the mobility and convenience of LINE. In particular, functions of “LINE Notify” and “LINE Bot” are usually applied to different fields such as machinery monitoring, advertisement, customer service, shopping, investment, …, etc. This then motivates us to utilize “LINE Notify” and “LINE Bot” as the communication tools to distribute information for civil internet of things.
    This thesis is an initial study of applying machine learning to civil internet of things. The machine learning techniques include K-Means Clustering with optimal number of clusters, GRU (Gate Recurrent Unit), LSTM (Long Short-Term Memory). This thesis is a preliminary research. We get data of earthquake and air quality from public websites of the government. Next, we analyze the data by machine learning programming. Finally, we utilize “LINE Notify” and “LINE Bot” to implement civil internet of things. The research flowchart of this study can be extended to deal with many other public data of the government. This thesis is expected to have contribution in civil internet of things.

    摘要 I Extended Abstract II 誌謝 V 目錄 VI 表目錄 VIII 圖目錄 IX 第一章 緒論 1 § 1-1 研究背景、動機與目的 1 § 1-2 文獻回顧 2 § 1-3 研究架構 3 § 1-4 研究貢獻 4 第二章 公共物聯網的傳播媒介 10 § 2-1 LINE Notify 10 § 2-1-1 認識 LINE Notify 10 § 2-1-2 LINE Notify角色定義 10 § 2-1-3 LINE Notify運作方式 10 § 2-1-4 LINE Notify使用限制 11 § 2-1-5 建立LINE Notify通知 11 § 2-1-6 LINE Notify實驗過程 12 § 2-2 LINE Bot 12 § 2-2-1 認識 LINE Bot 12 § 2-2-2 LINE Bot的運作方式 12 § 2-2-3 LINE Bot使用限制 13 § 2-2-4 建立LINE Bot聊天機器人 13 § 2-2-5 LINE Bot實驗過程 14 第三章 公共物聯網數據之統計學習處理 30 § 3-1 網路爬蟲地震數據 30 § 3-1-1 地震數據資料來源 30 § 3-1-2 網路爬蟲地震數據方法 30 § 3-2 最佳分群數之K-Means聚類分析 31 § 3-2-1 最佳分群數之K-Means聚類法 31 § 3-2-2 決定最佳分群數(聚類數)的方法 32 § 3-3 GADM圖資檔 33 § 3-3-1 下載GADM圖資檔 33 § 3-3-2 GADM圖資檔說明 34 § 3-4 循環神經網路簡介(Recurrent Neural Network,RNN) 34 § 3-5 長短期記憶神經網路簡介(Long Short-Term Memory,LSTM) 35 § 3-5-1 Forget Gate 35 § 3-5-2 Input Gate 35 § 3-5-3 Output Gate 36 § 3-6 閘式循環神經網路簡介(Gate Recurrent Unit,GRU) 36 § 3-6-1 Update Gate 36 § 3-6-2 Reset Gate 36 § 3-6-3 Current Memory Content 37 § 3-6-4 Final Memory 37 § 3-7 網路爬蟲空氣品質數據 37 § 3-7-1 空氣品質數據資料來源 37 § 3-7-2 網路爬蟲前1小時空氣品質數據方法 38 § 3-8 實驗過程 38 § 3-8-1 地震數據網路爬蟲實驗過程 39 § 3-8-2地震數據最佳分群數K-Means聚類分析實驗過程 39 § 3-8-3 LSTM及GRU當月最大震級迴歸驗證實驗過程 40 § 3-8-4 台南空氣品質數據網路爬蟲實驗過程 42 § 3-8-5 LSTM預測台南下1小時空氣品質指標實驗過程 42 第四章 具機器學習功能之公共物聯網 80 § 4-1 氣象資料開放平臺網站之地震海嘯資訊 80 § 4-2 行政院環境保護署空氣品質監測網 80 § 4-3 實驗過程 80 § 4-3-1 地震資訊主程式實驗過程 81 § 4-3-2 空氣品質LINE Notify雲端程式實驗過程 82 § 4-3-3 空氣品質資訊主程式實驗過程 82 § 4-3-4 LINE Bot機器人雲端程式實驗過程 83 第五章 結論與未來展望 102 § 5-1 結論 102 § 5-2 未來展望 103 參考文獻 104   表目錄 表1-1 基於地震資料的特徵因子[6] 9 表3-1 地震測報中心之地震活動彙整網頁元件ID 77 表3-2 LSTM vs GRU當月最大震級迴歸驗證之訓練Loss數據 78 表3-3 LSTM vs GRU當月最大震級迴歸驗證準確率數據 79   圖目錄 圖1-1 臺灣板塊運動示意圖 6 圖1-2 研究架構 7 圖1-3 具機器學習功能之公共物聯網系統架構與流程 8 圖2-1 LINE Notify簡介 15 圖2-2 LINE Notify API Document – Authentication[8] 16 圖2-3 LINE Notify登錄服務路徑(服務提供者用) 17 圖2-4 LINE Notify發行個人存取權杖路徑(開發人員用) 18 圖2-5 Python推播LINE Notify通知訊息程式 19 圖2-6 LINE接收LINE Notify通知訊息畫面 20 圖2-7 LINE BOT 官網介紹 21 圖2-8 LINE Bot機制 22 圖2-9 LINE Developers進入控制台 23 圖2-10 LINE Developers建立服務提供者 24 圖2-11 LINE Developers建立聊天機器人 25 圖2-12 LINE進入官方帳號管理 26 圖2-13 LINE官方帳號管理中,選定聊天機器人建立圖文選單(快速選單) 27 圖2-14 Python LINE Bot聊天機器人Sever端程式 28 圖2-15 LINE Bot聊天機器人自動回覆用戶訊息畫面 29 圖3-1 中央氣象局地震測報中心之地震活動彙整網頁 44 圖3-2 地震數據.csv檔 45 圖3-3 ChromeDrive.exe下載頁面 46 圖3-4 地震活動彙整網頁,進階查詢元件ID取得方式 47 圖3-5 最佳分群數K-means Clustering分群過程,直到全部群心不再變動 48 圖3-6 手肘法(Elbow Method)[13] 49 圖3-7 輪廓係數法(Silhouette Score)[13] 50 圖3-8 台灣地圖檔下載網頁[14] 51 圖3-9 RNN結構展開圖 52 圖3-10 LSTM結構展開圖 53 圖3-11 GRU結構展開圖 54 圖3-12 行政院環境保護署空氣品質指標(AQI)(歷史資料)網頁 55 圖3-13 行政院環境保護署空氣品質指標(AQI)(歷史資料)內容 56 圖3-14 政府資料開放平臺空氣品質指標(AQI)網頁 57 圖3-15 政府資料開放平臺空氣品質指標(AQI) JSON格式網頁內容 58 圖3-16 Python自動爬取地震測報中心之地震活動彙整資料 59 圖3-17 Python地震數據整理及決定最佳K值 60 圖3-18 K=1~10 SSE曲線圖 61 圖3-19 K=2~10 Silhouette Score曲線圖 62 圖3-20 最佳分群數K=2,K-Means聚類分群結果 63 圖3-21 最佳分群數K=2、規模≧4顯著有感地震聚類分析 vs 台灣隱沒帶邊界 64 圖3-22 LSTM及GRU當月最大震級迴歸驗證之地震數據整理流程 65 圖3-23 Python地震數據生成特徵與標籤 66 圖3-24 Python地震數據均值化及拆分訓練集與測試集 67 圖3-25 地震數據GRU模型與訓練方式 68 圖3-26 地震數據LSTM訓練Loss曲線 vs GRU訓練Loss曲線 69 圖3-27 地震數據LSTM迴歸驗證曲線 vs GRU迴歸驗證曲線 70 圖3-28 Python自動爬取政府資料開放平臺網站前1小時空氣品質數據 71 圖3-29 台南空氣品質數據生成特徵與標籤 72 圖3-30 台南空氣品質數據均值化及拆分訓練集與測試集 73 圖3-31 台南空氣品質數據LSTM模型與訓練方式 74 圖3-32 台南空氣品質數據LSTM訓練Loss曲線 75 圖3-33 台南空氣品質數據LSTM預測曲線 76 圖4-1 地震海嘯資訊 84 圖4-2 產生顯著有感地震報告資料 85 圖4-3 顯著有感地震報告資料-JSON格式 86 圖4-4 全國空氣品質指標圖 87 圖4-5 Python檢查有否最新地震訊息程式 88 圖4-6 Python推播LINE Notify最新地震訊息程式 89 圖4-7 Python自動爬取地震測報中心之地震活動彙整資料 90 圖4-8 Python執行地震數據最佳分群數K-Means聚類分析與GRU驗證 91 圖4-9 LINE Notify最新地震訊息通知畫面 92 圖4-10 Python推播LINE Notify即時全國空氣品質指標訊息 93 圖4-11 LINE Notify即時全國空氣品質指標訊息通知畫面 94 圖4-12 Python自動爬取政府資料開放平臺網站前1小時空氣品質數據 95 圖4-13 Python執行LSTM預測台南下1小時空氣品質指標,及圖片上傳圖床 96 圖4-14 LINE Bot聊天機器人雲端程式,依特定問題回覆之設定 97 圖4-15 用戶詢問最佳分群數KMEANS時,機器人回覆結果 98 圖4-16 用戶詢問GRU時,機器人回覆GRU當月最大震級迴歸驗證結果 99 圖4-17 用戶詢問LSTM時,機器人回覆LSTM迴歸結果 100 圖4-18 LINE Bot聊天機器人加好友,彈出QR Code畫面 101

    [1] 臺灣之災害性地震災害情形及臺灣最嚴重的震災情形,
    https://scweb.cwb.gov.tw/zh-TW/Guidance/FAQ/3
    (Retrieved on June 28, 2022).
    [2] 因應地震災害之都市智慧防災策略藍圖初探,
    https://www.abri.gov.tw/News_Content_Table.aspx?n=807&s=140239
    (Retrieved on June 28, 2022).
    [3] 許金城,基於AIOT架構之穿戴式裝置跌倒偵測系統研究,國立臺北科技大學電機工程系所碩士學位論文,110年。
    [4] 施浩宇,透過聊天機器人技術建立LINE BOT族語學習系統過程之研究–以建和卑南族語為例,國立臺東大學教育學系所碩士學位論文,110年。
    [5] P. Novianti, D. Setyorini and U. Rafflesia, “K-Means cluster analysis in earthquake epicenter clustering,” International Journal of Advances in Intelligent Informatics, vol. 3, no. 2, pp. 81-89, July 2017.
    [6] 李林芳、石耀霖、程術,「長短時記憶神經網路在中期地震預報中的探索———以川滇地區為例」,地球物理學報,第65卷第1期,12-25頁,2022年1月。
    [7] K Srinivasa Rao, Dr. G. Lavanya Devi and N. Ramesh, “Air Quality Prediction in Visakhapatnam with LSTM based Recurrent Neural Networks,” International Journal of Intelligent Systems and Applications, vol. 11, no. 2, pp. 18-24, February 2019.
    [8] LINE Notify API Document,
    https://notify-bot.line.me/doc/en/
    (Retrieved on June 23, 2022).
    [9] LINE Developers Messaging API Documentation,
    https://developers.line.biz/en/reference/messaging-api
    (Retrieved on June 4, 2022).
    [10] 文淵閣工作室,Pythn初學特訓班,第三版,臺北市:碁峰資訊股份有限公司,2019。
    [11] C. C. Lee, Application of Statistical Variance Analyses and Nonlinear Probabilistic Models to Earthquakes in Taiwan, Project Reports of National Science and Technology Council, Taiwan, NSC (MOST) 105-2815-C-002-177-M, March 2017.
    [12] Y. Cheng, “Mean shift, mode seeking, and clustering,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 17, no. 8, pp. 790-799, August 1995.
    [13] C. Chinrungrueng and C.H. Sequin, “Optimal adaptive k-means algorithm with dynamic adjustment of learning rate,” IEEE Transactions on Neural Networks, vol. 6, no. 1, pp. 157-169, January 1995.
    [14] GADM圖資檔,
    https://gadm.org/index.html
    (Retrieved on May 4, 2022).
    [15] Understanding LSTM Networks. [online]
    http://colah.github.io/posts/2015-08-Understanding-LSTMs
    (Retrieved on June 1, 2022).
    [16] S. Hochreiter and J. Schmidhuber, “Long short-term memory,” Neural Computation, vol. 9, no. 8, pp. 1735-1780, November 1997.
    [17] J. Chung, C. Gulcehre, K. Cho, and Y. Bengio, “Gated feedback recurrent neural networks,” arXiv:1502.02367, February 2015.

    無法下載圖示 校內:2027-09-18公開
    校外:2027-09-18公開
    電子論文尚未授權公開,紙本請查館藏目錄
    QR CODE