Various social events, such as holidays, important sporting events, and major celebrations, may result in sudden large-scale passenger flows in certain sections and stations of urban rail transit systems. The sudden inbound passenger flows caused by these events can easily lead to continuous congestion of the subway network, which has a profound impact on the safety, reliability, and stability of a subway system. Because of the large magnitude of swipe data and the high dimensionality of time series, it is difficult to identify the emergence of such large passenger flows. Additionally, the recognition accuracy of the existing identification methods cannot meet the operational monitoring requirements. To address the above-mentioned issues, this paper proposes an optimized symbolic aggregate approximation (SAX) algorithm to identify historical sudden passenger flows caused by large-scale events around subways. Specifically, pre-set cluster types and dynamic time warping (DTW) are proposed to enhance the matching rate. Compared with the K-means method, the proposed method exhibits an average increase of 30% in mining accuracy, and the calculation time is shortened to one-sixteenth of the original value.