In order to improve the accuracy of attitude measurement while drilling,an error parameter identification method of equivalent reverse rotating gyroscopes while drilling based on rotating frost ice optimizer(RFIO)is proposed.Firstly,the error analysis of equivalent reverse rotating inertial navigation system is carried out.The objective function of equivalent reverse rotation error is constructed based on the attitude error while drilling.The constraint conditions of equivalent reverse rotation error are constructed based on the relationship among angular velocity,acceleration and magnetic field strength when drilling tool stops.The error parameters are identified by RFIO algorithm.Secondly,a dynamic upper and lower bound strategy is designed according to the historical objective function,Lévy flights and the number of RFIO iterations to improve the recognition speed of the objective function.Based on the distance between the current objective function value and the optimal value,a rotating wandering strategy is designed to improve the accuracy of error parameter identification.The experimental results show that the error of tool face angle and well inclination angle is controlled within±0.4°,and the error of azimuth angle is controlled within±0.8°.Compared with no equivalent reverse rotation,the accuracy of tool face angle is improved by about 60%,the accuracy of well inclination angle is improved by about 66.7%,and the accuracy of azimuth angle is improved by about 70.4%.