Taking the Ms 7.4 earthquake in Indonesia on September 28, 2018 as the background, this paper uses the sliding quartile (IQR) algorithm, sliding principal component analysis (PCA) algorithm and short-time Fourier transform (STFT) algorithm to study the space-time electromagnetic data in the epicentral area by using the *X*, *Y* and Z components of ULF magnetic field observed by Zhangheng-1 electromagnetic satellite.The results show that the three algorithms can effectively extract the anomaly before the earthquake. 1) The mean value of *X*, *Y* and* Z* components began to appear anomaly 7 days before the earthquake. The anomaly degree of *Y* and *Z* components increased gradually with the approaching of the earthquake occurrence time, and reached the peak value 2 days before the earthquake. The maximum anomaly degree of *Y* component reached 0.7 nT, and then slowly disappeared after the earthquake. 2) 5 days before the earthquake, the anomaly of the principal component began to appear, the proportion of the first principal component decreased sharply by more than 15%. The proportion of the second and third principal components increased sharply, and the anomaly lasted for 3 days. 3) 9 days before the earthquake, the proportion of 13 and 25 Hz power spectral density anomalies appeared at the same time, 13 Hz proportion increased by 35%, 25 Hz proportion decreased by more than 40%. 13 Hz proportion appeared positive anomalies and 25 Hz proportion appeared negative anomalies, of which the largest positive anomaly reached 0.1, the largest negative anomaly reached ?0.15. The anomalies disappeared after the earthquake. According to the solar geomagnetic activity in the same period of time, the comprehensive analysis shows that the above electromagnetic anomalies can be used as precursors of earthquakes in Indonesia.

%U http://xbna.pku.edu.cn/EN/10.13209/j.0479-8023.2021.097