台灣位於環太平洋地震帶,每個月都會有數以千計的地震發生。近年來,儀器的廣 設與儲存資料的技術進步,使得成功記錄並且儲存到的地震數量大量提升。目前台灣每 年有超過18000個地震被記錄到。而人工智慧技術的迅速發展逐漸能夠取代例行性作業, 以減少人力需求並同時大量提高速度。 本研究主要利用 python 中的 obspy 套件做為主要的 I/O 套件,並且使用 keras 作為 深度學習的框架。在研究中,我們利用 Mousavi 等人在 2020 年提出的 Earthquake transformer 模型作為基礎進行修改與優化,其訓練的基礎建立在為 P 波到時與 S 波到 時設計相對應的標籤。另外,本研究將原先的地震標籤改為雜訊標籤,並且在模型的輸 出層後加上了辨識器,使其成為一個生成對抗模型,與原先的 Earthquake transformer 相 比,有著更加穩定的輸出。在獲得地震到時後,本研究將 Chang 等人於 2019 發表的地 震事件與相關波形連結程式進行優化,加入本研究的資料處理流程中,完成了蒐集連續 資料到輸出定位結果的完整流程。 本研究中使用了和平 2017 年的資料進行訓練,並且使用和平 2020 年的資料做為測 試,並將整體流程應用在氣象局 2012 年一月的資料上。在和平 2020 年的資料中,P 波 與 S 波的到時召回率分別為 0.95 與 0.85,而精確度則分別為 0.87 與 0.81。透過本研究 開發的整體流程,能夠快速處理大量連續資料,並且在未來,能夠透過完整流程逐漸增 加訓練資料集,並在次投入訓練。使模型效能再次提升。待模型效能經多次檢驗後取得 一定的可靠度,便能投入既有的工作流程。;Thousands of earthquakes occur in Taiwan because Taiwan locates in the circum-pacific seismic belt. In recent years, with numerous settings of the seismic sensor and the improvement of storage technology, the number of earthquakes that have been recorded and stored increased a lot. An average of 18000 earthquakes are recorded each year. With the development of science and technology, artificial intelligence can handle some single task to increase the processing speed while reducing the manpower requirements. In our research, we use the model structure which is modified and optimized based on the model proposed from the study by Mousavi et al. in 2020. Training model based on designing the label for P and S onset time. In addition, the original label for the seismic signal is changed to the noise label, and also adds a discriminator after the final layer of the origin model. Make the entire model structure become a generative adversarial network. Compared with the earthquake transformer, the model in our study has more stable performance. After getting the time P and S onset, we optimize the associator algorithm proposed by Chang et al. in 2019 and add it to our process flow. And locate the earthquake by seisan then output the result in s-file format. We use the seismic waveform in Hoping during 2017 as training data, and use the data in the same region during 2020 as testing data. We also applied the workflow to the continuous data from CWB during January 2012. The recall of P and S onset in 2020 reaches 0.95 and 0.85, and the precision reaches 0.87 and 0.81. The workflow in our research can analyze a large amount of data very fast. In the future, we also can increase the training dataset by the workflow. After the performance becomes stable, we can add the flow to our other research, too.