Photonic firewall is a monitoring protection device that will directly detect and locate optical network attacks at the optical layer, which can effectively ensure the security of optical networks. An all-optical matching system is the core part of photonic firewall, which determines the performance of a photonic firewall, so it is of great significance to research and develop all-optical matching system for high-speed and high-order modulation formats signals. At present, an all-optical matching system for binary modulation formats is relatively mature, but the all-optical matching system for high-order phase modulation format signals is still limited by how to solve the problem of phase synchronization. In this paper, a new all-optical matching system based on self-interference matching is proposed for quadrature phase shift keying (QPSK) optical signal, which avoids the introduction of local target sequence optical signals and phase-locking circuits. The theoretical analysis and simulation verification are conducted for the designed system. The results demonstrate that the system can accurately identify and locate 4-symbol or 8-symbol target sequences in the input QPSK optical signals with 16-symbol and 32-symbol data sequences at a data rate of 100 Gbaud.