A ranging method, wherein the method comprises: obtaining a first echo signal that is obtained after laser light emitted by a laser to a measured object is reflected by the measured object; when the first echo signal is a saturated echo signal, determining a saturation degree of the first echo signal, characterised in that the first echo signal comprises a plurality of sampling points, and the determining a saturation degree of the first echo signal comprises: determining, in the plurality of sampling points, the saturation degree of the first echo signal based on a quantity of saturated sampling points whose amplitude values are greater than or equal to a second threshold in the first echo signal, wherein the saturation degree is positively correlated with the quantity of saturated sampling points, and an amplitude value corresponding to the second threshold is greater than an amplitude value corresponding to a first threshold; determining one or two corresponding moments at which an amplitude value of the first echo signal is the first threshold, and determining an earlier moment of the two moments or the one moment as the receiving moment of the first echo signal, wherein a part whose amplitude value is less than the first threshold in the first echo signal is noise; calculating an initial distance based on a receiving moment of the first echo signal, wherein the initial distance is a distance between the measured object and the laser; determining, based on a correspondence between the saturation degree and a distance compensation value, a target distance compensation value corresponding to the saturation degree of the first echo signal; and compensating the initial distance by using the target distance compensation value, wherein a distance obtained after compensation is used as a measured distance between the measured object and the laser. obtaining a first echo signal that is obtained after laser light emitted by a laser to a measured object is reflected by the measured object; when the first echo signal is a saturated echo signal, determining a saturation degree of the first echo signal, characterised in that the first echo signal comprises a plurality of sampling points, and the determining a saturation degree of the first echo signal comprises: determining, in the plurality of sampling points, the saturation degree of the first echo signal based on a quantity of saturated sampling points whose amplitude values are greater than or equal to a second threshold in the first echo signal, wherein the saturation degree is positively correlated with the quantity of saturated sampling points, and an amplitude value corresponding to the second threshold is greater than an amplitude value corresponding to a first threshold; determining one or two corresponding moments at which an amplitude value of the first echo signal is the first threshold, and determining an earlier moment of the two moments or the one moment as the receiving moment of the first echo signal, wherein a part whose amplitude value is less than the first threshold in the first echo signal is noise; calculating an initial distance based on a receiving moment of the first echo signal, wherein the initial distance is a distance between the measured object and the laser; determining, based on a correspondence between the saturation degree and a distance compensation value, a target distance compensation value corresponding to the saturation degree of the first echo signal; and compensating the initial distance by using the target distance compensation value, wherein a distance obtained after compensation is used as a measured distance between the measured object and the laser. determining, in the plurality of sampling points, the saturation degree of the first echo signal based on a quantity of saturated sampling points whose amplitude values are greater than or equal to a second threshold in the first echo signal, wherein the saturation degree is positively correlated with the quantity of saturated sampling points, and an amplitude value corresponding to the second threshold is greater than an amplitude value corresponding to a first threshold; determining one or two corresponding moments at which an amplitude value of the first echo signal is the first threshold, and determining an earlier moment of the two moments or the one moment as the receiving moment of the first echo signal, wherein a part whose amplitude value is less than the first threshold in the first echo signal is noise; calculating an initial distance based on a receiving moment of the first echo signal, wherein the initial distance is a distance between the measured object and the laser; determining, based on a correspondence between the saturation degree and a distance compensation value, a target distance compensation value corresponding to the saturation degree of the first echo signal; and compensating the initial distance by using the target distance compensation value, wherein a distance obtained after compensation is used as a measured distance between the measured object and the laser.