Based on mode coupling theory, the temperature and refractive index of sugar solution were measured by using structured fiber Bragg grating, which solved the cross impact of the refractive index of the external medium on temperature measurement. And using fiber Bragg grating sensor matrix was used to make distributed measurement, so as to realize the measurement on the temperature and refractive index of the non uniform solution. In this paper, a structured FBG sensor array was used to achieve the program of distributed refractive index measurement with temperature compensation function. The results indicate that the measurement sensitivity of temperature and refractive index can reach 8.5pm/℃and 5.42nm/riu, respectively.