A focusing method, comprising: obtaining a set of focus value sampling parameter groups and a set of phase difference defocus value sampling parameter groups; determining a first mapping relation between step angles and focus values according to the set of focus value sampling parameter groups and a first predetermined fitting scheme, and determining a second mapping relation between the step angles and defocus values according to the set of defocus value sampling parameter groups and a second predetermined fitting scheme, the step angles being step angles of a camera driving device of a camera module; determining a first step angle in a first step angle set according to the first mapping relation, and determining a second step angle in a second step angle set according to the second mapping relation, a focus value corresponding to the first step angle being maximum among the focus values respectively corresponding to step angles in the first step angle set, and a defocus value corresponding to the second step angle being zero; and completing focusing according to the first step angle and the second step angle comprising: determining a difference between the first step angle and the second step angle; when the difference between the first step angle and the second step angle is smaller than or equal to a preset threshold, determining an average value of the first step angle and the second step angle and completing focusing according to the average value; and when the difference between the first step angle and the second step angle is larger than the preset threshold, determining a third step angle set for a first scan according to the average value of the first step angle and the second step angle, controlling, according to the third step angle set, the camera module to perform the first scan so as to determine a third step angle in the third step angle set, and completing focusing according to the third step angle. obtaining a set of focus value sampling parameter groups and a set of phase difference defocus value sampling parameter groups; determining a first mapping relation between step angles and focus values according to the set of focus value sampling parameter groups and a first predetermined fitting scheme, and determining a second mapping relation between the step angles and defocus values according to the set of defocus value sampling parameter groups and a second predetermined fitting scheme, the step angles being step angles of a camera driving device of a camera module; determining a first step angle in a first step angle set according to the first mapping relation, and determining a second step angle in a second step angle set according to the second mapping relation, a focus value corresponding to the first step angle being maximum among the focus values respectively corresponding to step angles in the first step angle set, and a defocus value corresponding to the second step angle being zero; and completing focusing according to the first step angle and the second step angle comprising: determining a difference between the first step angle and the second step angle; when the difference between the first step angle and the second step angle is smaller than or equal to a preset threshold, determining an average value of the first step angle and the second step angle and completing focusing according to the average value; and when the difference between the first step angle and the second step angle is larger than the preset threshold, determining a third step angle set for a first scan according to the average value of the first step angle and the second step angle, controlling, according to the third step angle set, the camera module to perform the first scan so as to determine a third step angle in the third step angle set, and completing focusing according to the third step angle. determining a difference between the first step angle and the second step angle; when the difference between the first step angle and the second step angle is smaller than or equal to a preset threshold, determining an average value of the first step angle and the second step angle and completing focusing according to the average value; and when the difference between the first step angle and the second step angle is larger than the preset threshold, determining a third step angle set for a first scan according to the average value of the first step angle and the second step angle, controlling, according to the third step angle set, the camera module to perform the first scan so as to determine a third step angle in the third step angle set, and completing focusing according to the third step angle.