The invention relates to the field of electronic technique, particularly to a method and a device for obtaining work and
rest time of users, wherein the method and the device are applied to a
mobile device. The method comprises the following steps of: setting a user work and rest monitoring period of time; recording a time point when a preset discrimination parameter varies during the monitoring period of time, and taking the time point as a
reference time point of getting up or sleeping of the user; determining initial work and
rest time points of the user according to the
reference time point and variation of the preset discrimination parameter, wherein the initial work and
rest time points include an initial get-up time point and an initial
sleeping time point; and determining the work and rest time of the user according to the initial work and rest time points, wherein the work and rest time includes get-up time and
sleep time of the user. The invention also provides a device for realizing the method above. In the embodiment of the invention, by obtaining the initial work and rest time points, and verifying and analyzing the obtained work and rest time points, humanized, automatic and accurate acquisition of the work and rest time of the user can be realized, and the work and rest time can be updated dynamically.