The refractive index of a substance is closely related to its optical properties, concentration, composition, dispersion and other properties, and the research on fiber Bragg grating type refractive index sensor and fiber interferometric type refractive index sensor based on optical principle is the most concerned. Based on the relationship between optical resonance and defect states, a dual DBR structure composed of silicon and air alternation is designed to achieve a wider modulation range in the photonic band gap. The rigorous coupled wave analysis (RCWA) method was used to quantitatively calculate transmissivity of each wavelength photon, and then spectral data in different displacement were obtained. By analyzing the defect states of the spectrum, the optical structure of the refractive index sensor was determined, and the performance index of the modulation system under this structure was obtained: the wavelength modulation range was from 1.2 micron to 2.7 micron, the corresponding displacement range was 0-1.5 micron, the system sensitivity was up to 1019 nm/RIU, and the linear range of the first-order defect state mode was 0.999. The minimum peak transmittance of defect mode is greater than 0.65 based on 10 pm wavelength calculated step. Good linearity and high peak transmittance also provide strong support for high performance sensors. The optical system can be used in a variety of applications, such as biochemical sensing detection. There is no doubt that the performance of the device will exceed the reported performance due to the improvements in the above functional features.