The invention discloses a thin film piezoelectric sonic sensor. The thin film piezoelectric sonic sensor comprises a substrate layer, a ground electrode layer and a piezoelectric layer which are arranged in a laminated mode, and one or more transducers are arranged on the side, away from the ground electrode layer, of the piezoelectric layer; and photonic crystals at least formed in the piezoelectric layer are correspondingly arranged on the two sides of the transducers, and the resonant frequency of the thin film piezoelectric sonic sensor is located in band gaps of the photonic crystals. According to the thin film piezoelectric sonic sensor, the photonic crystals are at least arranged on the piezoelectric layer, the mechanical vibration stability of the piezoelectric layer is improved, the sonic wave reflectivity is improved, the energy loss of sonic wave transmission is lowered, and the quality factor of the sensor is improved. The invention discloses a photonic crystal. The photonic crystal comprises a matrix and a scatterer formed on the matrix, the matrix is formed by at least two media layers in a laminated mode, and materials of any one of the media layers are different from those of other media layers. According to the photonic crystal, the sonic wave energy loss can be effectively reduced, and the quality factor of the sensor can be effectively improved when the photonic crystal is applied to the thin film piezoelectric sonic sensor.