## 7 Conclusions  
Taking the Yangbi earthquake sequence in 2021 as an example, this paper discusses the feasibility of the automatic discrimination of the polarity of P-wave first motion and  
Figure 6: M-T diagram, earthquake distribution, and focal mechanism solutions for foreshocks and aftershocks. (**a**) M-T diagram of the Yangbi earthquake sequence. The yellow star indicates the mainshock. (**b**) Focal mechanism solutions of the foreshock sequence. (**c**) Focal mechanisms of the mainshock and aftershocks. The color of the beach ball represents different types of focal mechanisms (see Figure 5). Figure 7: Temporal variation in \(KA\) angle and \(K\) value in the Yangbi earthquake sequence. (**a**) \(KA\) angle of the foreshock sequence. (**b**) \(KA\) angle of the aftershock sequence. (**c**) \(K\) value for the consistency of the foreshock and aftershock (light green indicates \(KA\leq 25^{\circ}\)), and the red dotted line separates the foreshock and aftershock. The red dotted lines in (**a,b**) indicate \(25^{\circ}\)\(KA\) angle. its application in focal mechanism inversion and establishes a workflow named FocMechFlow for automatic focal mechanism inversion by using P-wave first motion. The main conclusions are as follows. (1) Compared with manual and rule-based methods, deep learning-based methods have high accuracy in determining P-wave first-motion polarity. Even if there is a 0.1-s error in the P-wave arrival time, the recognition accuracy of the P-wave first-motion polarity is still over 80%. (2) Focal mechanism solutions of 112 earthquakes in the Yangbi earthquake sequence were determined with FocMech-Flow, which were in good agreement with previous results. FocMech-Flow can reduce the lower limit of focal mechanism inversion to approximately M\({}_{\text{L}}\)2.0, and can obtain a large number of focal mechanism solutions for small and moderate earthquakes (M\({}_{\text{L}}\leq\) 3.0), which provides extensive data to depict the fine fault geometry and stress field inversion. (3) The Yangbi earthquake sequence is mainly strike-slip. A few earthquakes have normal fault components. The focal mechanisms with strike-slip and normal fault components account for more than 92% of events. The focal mechanisms of the Yangbi foreshock sequence are highly similar to that of the mainshock. The consistency of focal mechanism solutions decreases for the aftershock sequence, which reflects the stress field adjustment after the earthquake. The following supporting information can be downloaded at: [[https://www.mdpi.com/article/10.3390/app13042233/s1](https://www.mdpi.com/article/10.3390/app13042233/s1)]([https://www.mdpi.com/article/10.3390/app13042233/s1](https://www.mdpi.com/article/10.3390/app13042233/s1)), Figure S1: Inconsistent discrimination between DiTingMotion and analysts. The red dotted line indicates P-wave arrival time. Light blue shading region indicates the DiTingMotion detection window (\(\pm\)0.64 s centered at the P-wave arrival time); Figure S2: Consistent discrimination between DiTingMotion and analysts. The red dashed line indicates the arrival time of P-wave. Light blue shading indicates the DiTingMotion detection window (\(\pm\)0.64 s centered at the P-wave arrival time); Table S1: The source parameters of 112 earthquakes in this paper. Conceptualization, S.L. ([PERSON]), L.F. (Lihua Fang) and Y.Z. ; Data curation, S.L. ([PERSON]), S.L. ([PERSON]) and L.F. ([PERSON]); Formal analysis, S.L. ([PERSON]); Funding acquisition, L.F. ([PERSON]); Investigation, S.L. ([PERSON]); Methodology, L.F. ([PERSON]) and Z.X. ; Project administration, L.F. ([PERSON]); Resources, L.F. ([PERSON]), Z.X., Y.Z., S.L. ([PERSON]) and L.F. ([PERSON]); Software, S.L. ([PERSON]), Z.X. and L.F. ([PERSON]); Supervision, S.L. ([PERSON]), L.F. ([PERSON]), Z.X., Y.Z. and S.L. ([PERSON]); Validation, S.L. ([PERSON]); Writing--original draft, S.L. ([PERSON]); Writing--review and editing, L.F. ([PERSON]), Z.X., Y.Z. and S.L. ([PERSON]). All authors have read and agreed to the published version of the manuscript.