WO2020168445A1 - Sleep recognition method, apparatus, storage medium, and electronic device - Google Patents

Sleep recognition method, apparatus, storage medium, and electronic device Download PDF

Info

Publication number
WO2020168445A1
WO2020168445A1 PCT/CN2019/075345 CN2019075345W WO2020168445A1 WO 2020168445 A1 WO2020168445 A1 WO 2020168445A1 CN 2019075345 W CN2019075345 W CN 2019075345W WO 2020168445 A1 WO2020168445 A1 WO 2020168445A1
Authority
WO
WIPO (PCT)
Prior art keywords
sleep
user
electronic device
day
natural
Prior art date
Application number
PCT/CN2019/075345
Other languages
French (fr)
Chinese (zh)
Inventor
戴堃
帅朝春
张寅祥
陆天洋
吴建文
Original Assignee
深圳市欢太科技有限公司
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市欢太科技有限公司, Oppo广东移动通信有限公司 filed Critical 深圳市欢太科技有限公司
Priority to CN201980074358.XA priority Critical patent/CN113056756B/en
Priority to PCT/CN2019/075345 priority patent/WO2020168445A1/en
Publication of WO2020168445A1 publication Critical patent/WO2020168445A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling

Definitions

  • This application belongs to the field of computer technology, and in particular relates to a sleep recognition method, device, storage medium, and electronic equipment.
  • electronic devices such as tablet computers and mobile phones are configured to perform system updates while the user is sleeping, and other operations that affect the user's use or take a long time to avoid affecting the user's use.
  • the related technology achieves the aforementioned purpose by recognizing the user's sleep. For example, the electronic device determines that the user is in a sleep state when the screen is turned off for a specific period of time. However, the accuracy of the sleep recognition of the user in the related technology Lower.
  • the embodiments of the present application provide a sleep recognition method, device, storage medium, and electronic device, which can enable the electronic device to accurately perform sleep recognition on a user.
  • an embodiment of the present application provides a sleep recognition method applied to an electronic device, including:
  • the preset sleep recognition condition is currently met, acquiring behavior characteristics of the user using the electronic device on multiple consecutive natural days including the current day;
  • the first weighted sum value is greater than or equal to the preset weighted sum value, if yes, it is determined that the user is in a sleep state, otherwise it is determined that the user is not in a sleep state.
  • an embodiment of the present application provides a sleep recognition device, which is applied to electronic equipment, and includes:
  • the acquiring module is configured to acquire the behavior characteristics of the user using the electronic device on multiple consecutive natural days including the current day when the preset sleep recognition condition is currently met;
  • the weighting module is used to perform a weighted summation on the behavior characteristics of the multiple consecutive natural days to obtain a first weighted sum value, wherein the weight value corresponding to the behavior characteristics of each natural day is based on the time from near to far The order is lowered;
  • the identification module is used to determine whether the first weighted sum value is greater than or equal to a preset weighted sum value, if yes, it is determined that the user is in a sleep state, otherwise it is determined that the user is not in a sleep state.
  • an embodiment of the present application provides a storage medium on which a computer program is stored, wherein, when the computer program is executed on a computer, the computer is caused to execute the sleep recognition method provided in the embodiment of the present application. step.
  • an embodiment of the present application provides an electronic device, including a memory and a processor, and the processor is configured to execute the following by calling a computer program stored in the memory:
  • the preset sleep recognition condition is currently met, acquiring behavior characteristics of the user using the electronic device on multiple consecutive natural days including the current day;
  • the first weighted sum value is greater than or equal to the preset weighted sum value, if yes, it is determined that the user is in a sleep state, otherwise it is determined that the user is not in a sleep state.
  • the electronic device can obtain the user's behavioral characteristics of using the electronic device on multiple consecutive natural days including the current day when the preset sleep recognition condition is currently met, and compare the obtained multiple consecutive natural days Perform weighted summation of the behavior characteristics of the user to obtain the first weighted sum value, and finally determine whether the first weighted sum value is greater than or equal to the preset weighted sum value, and determine whether the user is in a sleep state according to the judgment result, which can improve the sleep recognition of the user Accuracy.
  • FIG. 1 is a schematic flowchart of a sleep recognition method provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of the weight distribution of behavior features of multiple consecutive natural days obtained in an embodiment of the present application.
  • FIG. 3 is a schematic diagram of another process of a sleep recognition method provided by an embodiment of the present application.
  • Fig. 4 is a schematic diagram of a preset operation configuration interface provided in an embodiment of the present application.
  • Fig. 5 is a schematic structural diagram of a sleep recognition device provided by an embodiment of the present application.
  • Fig. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 7 is another schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 1 is a schematic flowchart of a sleep recognition method provided by an embodiment of the present application.
  • the sleep recognition method can be applied to electronic devices.
  • the process of the sleep recognition method may include:
  • the behavior characteristics of the user using the electronic device on multiple consecutive natural days including the current day are acquired.
  • the sleep recognition condition there is no specific limitation on the setting of the sleep recognition condition in the embodiment of the present application, and can be set by a person of ordinary skill in the art according to actual needs. For example, you can set the sleep recognition condition that the ambient light brightness of the current environment of the electronic device is lower than the preset brightness, so that the electronic device can detect the ambient light brightness of its environment in real time, such as through the set ambient light sensor The ambient light brightness of the environment is detected, and when the ambient light brightness of the environment is lower than the preset brightness, it is determined that the sleep recognition condition is currently met. For another example, the sleep recognition condition can be set as the system time of the electronic device reaches the preset time, and so on.
  • the electronic device when the electronic device determines that the preset sleep recognition condition is currently met, it triggers the sleep recognition of the user, that is, recognizes whether the user is currently in a sleep state. First, the electronic device obtains the user's behavioral characteristics of using the electronic device on multiple consecutive natural days including the current day.
  • the electronic device can obtain the user’s behavioral characteristics of using the electronic device on 7 calendar days including the current day (that is, the current day and the 6 calendar days before the current day); for example, the electronic device can also acquire the user’s behavioral characteristics including the current day. Of 30 calendar days using electronic devices (that is, the current day and the 29 calendar days before that day).
  • the acquired behavior characteristics of multiple consecutive natural days are weighted and summed to obtain a first weighted sum value, where the weight values corresponding to the behavior characteristics of each natural day are in order from near to far in time. reduce.
  • the electronic device after the electronic device obtains the user's behavior characteristics of using the electronic device on multiple consecutive natural days including the current day, it is determined based on the acquired behavior characteristics of the multiple natural days. For the corresponding weight value, a weighted summation is performed on the acquired behavior characteristics of multiple consecutive natural days, and the weighted sum value obtained at this time is recorded as the first weighted sum value.
  • the weight value corresponding to the behavior characteristics of each natural day is reduced in order of time from near to far as a constraint (in layman's terms, the closer the time is, the behavior characteristics of the natural day occupy The higher the weight, and the farther the natural day’s behavior features have a lower weight), and the specific value of the weight value corresponding to the behavior characteristics of each natural day is not specifically limited.
  • the electronic device obtains the user’s behavior characteristics on 7 natural days including the current day (the current day, and the first day of the current day to the sixth day of the current day) for sleep recognition of the user.
  • the weight value corresponding to the behavior characteristic of the day is 0.5
  • the weight value corresponding to the behavior characteristic of the first day of the current day is 0.2
  • the behavior characteristic corresponding to the second day of the current day is 0.1
  • the weight value corresponding to the behavior characteristic of the day is 0.08
  • the weight value corresponding to the behavior characteristic of the fourth day before the current day is 0.06
  • the behavior characteristic corresponding to the fifth day of the current day has a weight value of 0.04.
  • the weight value corresponding to the behavior feature is 0.02.
  • the electronic device performs a weighted summation on the acquired behavior characteristics of multiple consecutive natural days to obtain the first weighted sum value, and then determines whether the first weighted sum value is greater than or equal to the preset weighted sum value.
  • Obtain the judgment result and determine whether the user is in a sleep state according to the judgment result, wherein, if the judgment result is that the first weighted sum value is greater than or equal to the preset weighted sum value, it is judged that the user is currently in a sleep state, and if the judgment result is the first weighted value If the sum value is less than the preset weighted sum value, it is determined that the user is not currently in a sleep state.
  • the electronic device can obtain the user's behavioral characteristics of using the electronic device on multiple consecutive natural days including the current day when the preset sleep recognition condition is currently met, and compare the obtained multiple Perform weighted summation of the behavior characteristics of consecutive natural days to obtain the first weighted sum value, and finally judge whether the first weighted sum value is greater than or equal to the preset weighted sum value, and determine whether the user is in a sleep state according to the judgment result, which can improve the user The accuracy of sleep recognition.
  • FIG. 3 is a schematic diagram of another flow of the sleep recognition method provided by an embodiment of the application.
  • the sleep recognition method can be applied to electronic devices.
  • the process of the sleep recognition method may include:
  • the electronic device obtains the multi-dimensional usage information of the electronic device used by the user on each of the multiple consecutive natural days including the current day.
  • the electronic device obtains the behavior characteristics of each natural day according to the multi-dimensional usage behavior information corresponding to each natural day.
  • the sleep recognition condition can be configured as:
  • the duration of the screen off state reaches the first preset duration.
  • the electronic device can start a timer for timing when entering the screen-off state, and use the timing duration of the timer to characterize the duration of the electronic device in the screen-off state, where the electronic device’s timer duration reaches the first preset Stop the timer when the duration or exit the screen-off state, and reset the timer.
  • the electronic device determines that the sleep recognition condition is currently met.
  • the sleep recognition condition can be configured as:
  • the duration of the static state reaches the second preset duration.
  • an electronic device can start a timer to count when it enters a stationary state (for example, the electronic device can detect whether there is acceleration in any direction according to the built-in three-axis acceleration sensor, and if it does not exist, it is determined to be in a stationary state).
  • the timing duration of the timer represents the duration of the electronic device being in a static state, where the electronic device stops counting the timer and resets the timer when the timing duration of the timer reaches the second preset duration or exits the static state. In this way, when the timing duration of the timer reaches the second preset duration, that is, when the duration of its static state reaches the second preset duration, the electronic device determines that the sleep recognition condition is currently met.
  • the sleep recognition condition can be configured as:
  • the electronic device can start a timer for timing when entering the screen-off state, and use the timer duration to characterize the duration of the electronic device in the screen-off state, where the electronic device's timer duration reaches the third preset Stop the timer when the duration or exit the screen-off state, and reset the timer. In this way, when the time duration of the timer reaches the third preset duration, the electronic device determines whether it is currently in a static state through the three-axis acceleration sensor, and if yes, determines that the sleep recognition condition is currently met.
  • the sleep recognition condition may be configured as:
  • the screen is turned off.
  • the electronic device can start a timer for timing when entering a static state, and the duration of the timer is used to characterize the duration of the electronic device in the static state, where the timer duration of the electronic device reaches the fourth preset duration or Stop the timer counting when exiting the static state and reset the timer. In this way, when the timer duration reaches the fourth preset duration, the electronic device determines whether the screen is currently in the off state, and if yes, determines that the sleep recognition condition is currently met.
  • the values of the first preset duration, the second preset duration, the third preset duration, and the fourth preset duration above may be the same or different. Specifically, a person of ordinary skill in the art can select appropriate values based on experience. .
  • the first preset duration, the second preset duration, the third preset duration, and the fourth preset duration can all be set to 30 minutes. In this way, the electronic device continues to be in the off-screen state.
  • the duration reaches 30 minutes, it is determined that the sleep recognition condition is satisfied; or when the electronic device is in a static state for 30 minutes, it is determined that the sleep recognition condition is satisfied; or when the electronic device is in the off-screen state for 30 minutes In a static state, it is determined that the sleep recognition condition is satisfied; or, when the electronic device is in the off-screen state when the duration of the static state reaches 30 minutes, it is determined that the sleep recognition condition is satisfied.
  • the electronic device when the electronic device determines that the preset sleep recognition condition is currently met, it triggers the sleep recognition of the user, that is, recognizes whether the user is currently in a sleep state. First, the electronic device obtains the user's behavioral characteristics of using the electronic device on multiple consecutive natural days including the current day. To this end, the electronic device obtains the multi-dimensional use information of the electronic device used by the user on each of the multiple consecutive natural days including the current day, and obtains the behavior characteristics of each natural day according to the multi-dimensional use information corresponding to each natural day.
  • the dimensions of obtaining usage information includes the time dimension describing when the user uses the electronic device, the location dimension describing where the user uses the electronic device, and the description how The operation dimension of operating the electronic device, for example, the electronic device can obtain information describing which applications the user uses the electronic device to run, which phone information the user makes using the electronic device, and the power consumption rate of the electronic device in the operation dimension.
  • the electronic device can obtain the user’s behavioral characteristics of using the electronic device on 7 calendar days including the current day (that is, the current day and the 6 calendar days before the current day); for example, the electronic device can also acquire the user’s behavioral characteristics including the current day. Of 30 calendar days using electronic devices (that is, the current day and the 29 calendar days before that day).
  • the electronic device performs a weighted summation on the behavior characteristics of a plurality of consecutive natural days to obtain a first weighted sum value, wherein the weight values corresponding to the behavior characteristics of each natural day are sequentially decreased in the order of time from near to far .
  • the electronic device after the electronic device obtains the user's behavior characteristics of using the electronic device on multiple consecutive natural days including the current day, it is determined based on the acquired behavior characteristics of the multiple natural days. For the corresponding weight value, a weighted summation is performed on the acquired behavior characteristics of multiple consecutive natural days, and the weighted sum value obtained at this time is recorded as the first weighted sum value.
  • the weight value corresponding to the behavior characteristics of each natural day is reduced in order of time from near to far as a constraint (in layman's terms, the closer the time is, the behavior characteristics of the natural day occupy The higher the weight, and the farther the natural day’s behavior features have a lower weight), and the specific value of the weight value corresponding to the behavior characteristics of each natural day is not specifically limited.
  • the electronic device obtains the user’s behavior characteristics on 7 natural days including the current day (the current day, and the first day of the current day to the sixth day of the current day) for sleep recognition of the user.
  • the weight value corresponding to the behavior characteristic of the day is 0.5
  • the weight value corresponding to the behavior characteristic of the first day of the current day is 0.2
  • the behavior characteristic corresponding to the second day of the current day is 0.1
  • the weight value corresponding to the behavior characteristic of the day is 0.08
  • the weight value corresponding to the behavior characteristic of the fourth day before the current day is 0.06
  • the behavior characteristic corresponding to the fifth day of the current day has a weight value of 0.04.
  • the weight value corresponding to the behavior feature is 0.02.
  • the electronic device determines whether the first weighted sum value is greater than or equal to the preset weighted sum value, if yes, it is determined that the user is in a sleep state, otherwise it is determined that the user is not in a sleep state.
  • the electronic device performs a weighted summation on the acquired behavior characteristics of multiple consecutive natural days to obtain the first weighted sum value, and then determines whether the first weighted sum value is greater than or equal to the preset weighted sum value.
  • Obtain the judgment result and determine whether the user is in a sleep state according to the judgment result, wherein, if the judgment result is that the first weighted sum value is greater than or equal to the preset weighted sum value, it is judged that the user is in a sleep state, and if the judgment result is the first weighted sum If the value is less than the preset weighted sum value, it is determined that the user is not in a sleep state.
  • the preset weighted sum value is 27, if the obtained first weighted sum value is 26, it is determined that the user is currently sleeping, and if the obtained first weighted sum value is 25, it is determined that the user is not currently sleeping.
  • the electronic device performs a preset operation, where the preset operation includes at least one of a system update operation, an application update operation, and a power consumption control operation.
  • the electronic device when the electronic device determines that the user is currently in the sleep state, it performs a pre-configured preset operation that is executed when the user is in the sleep state.
  • the preset operation includes but is not limited to at least one of a system update operation, an application update operation, and a power consumption control operation, which may be manually configured by the user or may be configured by the electronic device by default.
  • the electronic device can configure the system update operation as a preset operation, so as to perform the system update operation when the user is in sleep state, and update the system to the latest version; the electronic device can also configure the application update operation as a preset operation, The user performs application update operations when the user is asleep, updates the installed applications to the latest version, etc.; electronic devices can configure the power consumption control operation as a preset operation, thereby applying the preset for reduction when the user is asleep Power consumption control strategy for power consumption, reducing the power consumption of electronic devices and so on.
  • the electronic device provides a preset operation configuration interface.
  • the preset operation configuration interface includes the prompt message "Please select the operation performed during sleep", operation selection box, drop-down button, drop-down Menu, OK button, and Cancel button.
  • the drop-down menu is called out according to the user's click operation on the drop-down button.
  • the drop-down menu provides various operations that the electronic device can perform during the user's sleep interval, as shown in the system update in Figure 4 Operation, application update operations, etc., the user can select the operation performed by the electronic device during sleep according to actual needs, and after selecting the operation that needs to be performed by the electronic device during sleep, click the OK button to instruct the electronic device to select the user The operation as the aforementioned preset operation. Or, if the user finds that there is no need for the operation performed by the electronic device during sleep, he can click the cancel button to instruct the electronic device to perform the preset operation of the default configuration.
  • the electronic device when acquiring the behavior characteristics of each natural day according to the multi-dimensional usage behavior information corresponding to each natural day, the electronic device may execute:
  • the electronic device separately performs a weighted summation on the multi-dimensional usage information of each natural day to obtain the second weighted sum value of each natural day;
  • the electronic device uses the second weighted sum of each natural day as the behavior characteristic of each natural day.
  • the use information of each dimension in the multi-dimensional use information is pre-allocated with a corresponding weight value.
  • the embodiment of the present application does not specifically limit the weight distribution of the multi-dimensional use information, which can be determined by those of ordinary skill in the art. Actually need to be set.
  • the electronic device when the electronic device obtains the behavior characteristics of each natural day according to the multi-dimensional usage behavior information corresponding to each natural day, for any one of the aforementioned multiple natural days, the electronic device can be based on the multi-dimensional usage information of the natural day.
  • the weight value corresponding to the dimension usage information is weighted and summed with the multidimensional usage information of the natural day to obtain the second weighted sum value of the natural day.
  • the electronic device can respectively perform a weighted summation of the multi-dimensional usage information of each natural day to obtain the second weighted sum value of each natural day, and use the second weighted sum value of each natural day as the behavior characteristic of each natural day.
  • the electronic device may execute:
  • the electronic device respectively performs a weighted summation on the normalized multi-dimensional usage information of each natural day to obtain the second weighted sum value of each natural day.
  • the multi-dimensional use information of each natural day is normalized, and the use information of different dimensions is normalized to the same Within the numerical range.
  • a linear function can be used to normalize the multi-dimensional usage information of the natural day to the numerical interval [0,1], and the zero mean can also be used to normalize Yihua normalizes the multi-dimensional usage information of the natural day to the numerical interval [0,1], and so on.
  • the electronic device can also perform multi-dimensional usage information before the user obtains the multi-dimensional usage information of the electronic device used by the user on each of the multiple consecutive natural days including the current day. :
  • the electronic device records the multi-dimensional usage information of the user using the electronic device in real time, and stores the recorded multi-dimensional usage information in the usage information database;
  • the electronic device When acquiring the multi-dimensional usage information of the electronic device used by the user on each of the multiple consecutive natural days including the current day, the electronic device can perform:
  • the electronic device obtains the multi-dimensional usage information of the electronic device used by the user on each of the multiple consecutive natural days including the current day from the usage information database.
  • a local usage information database can be established by the electronic device.
  • the embodiment of the present application does not limit the database type of the usage information database, and can be selected by a person of ordinary skill in the art according to actual needs.
  • the electronic device After the electronic device completes the establishment of the usage information database, in each natural day, the electronic device records the multi-dimensional usage information of the user using the electronic device in real time, and stores the recorded multi-dimensional usage information in the aforementioned usage information database.
  • the electronic device obtains the user’s behavior characteristics on 7 natural days including the current day for sleep recognition of the user. Assuming that the current day is a Sunday, the electronic device obtains the multi-dimensional information of the current day (that is, Sunday) from the usage information database. Usage information, and multi-dimensional usage information from Monday to Saturday before the day.
  • the electronic device before performing the preset operation, the electronic device may perform:
  • the electronic device obtains the user-configured schedule
  • the electronic device obtains the sleep interval planned by the user according to the obtained schedule and determines whether it is currently within the planned sleep interval;
  • the electronic device when the electronic device determines that the user is currently sleeping, it obtains the schedule configured by the user, and further obtains the sleep interval planned by the user according to the obtained schedule, and determines whether it is currently within the planned sleep interval If it is, it means that the recognition result obtained by the electronic device performing sleep recognition on the user is consistent with the work schedule configured by the user, and the preset operation is performed at this time.
  • the electronic device obtains the user-configured schedule for sleeping at 10:30, starting at 6:30 and doing something at 7:00, then according to the schedule, the electronic device can obtain the scheduled sleep interval of 10:30- At 6:30, if the electronic device determines that the sleep recognition condition is met at 12:00 and that the user is in a sleep state, the electronic device performs a preset operation.
  • the electronic device may further execute:
  • the electronic device waits for the aforementioned sleep interval, it determines whether the sleep recognition condition is satisfied, and if yes, executes the aforementioned preset operation, otherwise it does not execute it.
  • the electronic device obtains the user’s configured schedule to sleep at 10:30, start at 6:30 and do something at 7:00, then according to the schedule, the electronic device can obtain the user’s sleep interval as 10:30-6 :30, if the electronic device determines that the sleep recognition condition is met at 10:00 and the user is in a sleep state, the electronic device does not perform the aforementioned preset operation at this time, but waits until 10:30 to determine whether the current sleep recognition is satisfied Condition, if yes, execute the aforementioned preset operation directly.
  • FIG. 5 is a schematic structural diagram of a sleep recognition device provided by an embodiment of the application.
  • the sleep recognition device can be applied to electronic equipment.
  • the sleep recognition device may include: an acquisition module 401, a weighting module 402, and an identification module 403.
  • the obtaining module 401 is configured to obtain the behavior characteristics of the user using the electronic device on multiple consecutive natural days including the current day when the preset sleep recognition condition is currently met;
  • the weighting module 402 is configured to perform a weighted summation of the behavior characteristics of multiple consecutive natural days acquired by the acquisition module 401 to obtain a first weighted sum value, where the weight values corresponding to the behavior characteristics of each natural day are in order from recent to The distant time sequence decreases sequentially;
  • the identification module 403 is used to determine whether the first weighted sum value is greater than or equal to the preset weighted sum value, if yes, determine that the user is in a sleep state, otherwise, determine that the user is not in a sleep state.
  • the acquiring module 401 may be used to:
  • the acquiring module 401 when acquiring the behavior characteristics of each natural day according to the multi-dimensional usage behavior information corresponding to each natural day, the acquiring module 401 may be used to:
  • the second weighted sum value of each natural day is taken as the behavior characteristic of each natural day.
  • the obtaining module 401 may be used to:
  • the normalized multi-dimensional usage information of each natural day is weighted and summed to obtain the second weighted sum value of each natural day.
  • the sleep recognition device further includes a recording module for:
  • the acquisition module 401 may be used to:
  • the sleep recognition conditions include:
  • the duration of the screen off state reaches the first preset duration
  • the duration of the static state reaches the second preset duration
  • the screen is turned off when the duration of the static state reaches the fourth preset duration.
  • the sleep recognition device further includes an execution module for:
  • a preset operation is performed, where the preset operation includes at least one of a system update operation, an application update operation, and a power consumption control operation.
  • the execution module before executing the preset operation, is also used to:
  • the execution module is further configured to:
  • the embodiment of the present application provides a computer-readable storage medium on which a computer program is stored.
  • the stored computer program is executed on a computer, the computer is caused to execute the steps in the sleep recognition method provided in the embodiment of the present application.
  • An embodiment of the present application further provides an electronic device including a memory and a processor, and the processor executes the steps in the sleep recognition method provided in the embodiment of the present application by calling a computer program stored in the memory.
  • FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the application.
  • the electronic device may include a memory 601 and a processor 602.
  • a person of ordinary skill in the art can understand that the structure of the electronic device shown in FIG. 6 does not constitute a limitation on the electronic device, and may include more or less components than those shown in the figure, or a combination of certain components, or different component arrangements. .
  • the memory 601 can be used to store application programs and data.
  • the application program stored in the memory 601 contains executable code.
  • Application programs can be composed of various functional modules.
  • the processor 602 executes various functional applications and data processing by running application programs stored in the memory 601.
  • the processor 602 is the control center of the electronic device. It uses various interfaces and lines to connect the various parts of the entire electronic device, and executes the electronic device by running or executing the application program stored in the memory 601 and calling the data stored in the memory 601
  • the various functions and processing data of the electronic device can be used to monitor the electronic equipment as a whole.
  • the processor 602 in the electronic device will load the executable code corresponding to the process of one or more audio processing programs into the memory 601 according to the following instructions, and the processor 602 will run and store the executable code
  • the application program in the memory 601 thus executes:
  • FIG. 7 is another schematic structural diagram of the electronic device provided by an embodiment of the application. The difference from the electronic device shown in FIG. 6 is that the electronic device further includes components such as an input unit 603 and an output unit 604.
  • the input unit 603 can be used to receive inputted numbers, character information or user characteristic information (such as fingerprints), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
  • user characteristic information such as fingerprints
  • the output unit 604 may be used to output information input by the user or information provided to the user, such as a speaker.
  • the processor 602 in the electronic device will load the executable code corresponding to the process of one or more audio processing programs into the memory 601 according to the following instructions, and the processor 602 will run and store the executable code
  • the application program in the memory 601 thus executes:
  • the processor 602 may execute:
  • the processor 602 may execute:
  • the second weighted sum value of each natural day is taken as the behavior characteristic of each natural day.
  • the processor 602 may execute:
  • the normalized multi-dimensional usage information of each natural day is weighted and summed to obtain the second weighted sum value of each natural day.
  • processor 602 may further execute:
  • the processor 602 may execute:
  • the sleep recognition conditions include:
  • the duration of the screen off state reaches the first preset duration
  • the duration of the static state reaches the second preset duration
  • the screen is turned off when the duration of the static state reaches the fourth preset duration.
  • processor 602 may further execute:
  • a preset operation is performed, where the preset operation includes at least one of a system update operation, an application update operation, and a power consumption control operation.
  • the processor 602 may perform:
  • the processor 602 may execute:
  • the sleep recognition device/electronic device provided by the embodiment of the application belongs to the same concept as the sleep recognition method in the above embodiment. Any method provided in the sleep recognition method embodiment can be run on the sleep recognition device/electronic device. For the implementation process, refer to the embodiment of the sleep recognition method, which will not be repeated here.
  • the program may be stored in a computer readable storage medium, such as stored in a memory, and executed by at least one processor, and may include a process such as an embodiment of the sleep recognition method during execution.
  • the storage medium may be a magnetic disk, an optical disc, a read only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), etc.
  • the sleep recognition device of the embodiment of the present application its functional modules may be integrated into one processing chip, or each module may exist alone physically, or two or more modules may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software function modules. If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer readable storage medium, such as a read-only memory, a magnetic disk, or an optical disk.

Abstract

Provided is a sleep recognition method, which is such that an electronic device, when currently satisfying a preset sleep recognition condition, obtains a user's behavior characteristics of using the electronic device on a plurality of consecutive natural days including the current day and performs a weighted summation to obtain a first weighted sum value, and finally determines whether the first weighted sum value is greater than or equal to a preset weighted sum value, and, according to the result of the determination, determines whether the user is in a sleep state, thus improving accuracy in recognizing sleep of the user.

Description

睡眠识别方法、装置、存储介质及电子设备Sleep recognition method, device, storage medium and electronic equipment 技术领域Technical field
本申请属于计算机技术领域,尤其涉及一种睡眠识别方法、装置、存储介质及电子设备。This application belongs to the field of computer technology, and in particular relates to a sleep recognition method, device, storage medium, and electronic equipment.
背景技术Background technique
目前,如平板电脑、手机等电子设备经过配置,可以在用户睡眠时进行系统更新等影响用户使用或者耗时较长的操作,以此来避免对用户的使用造成影响。为此,相关技术通过对用户进行睡眠识别来达到前述目的,比如电子设备在其熄屏的持续时长达到一特定时长时判定用户处于睡眠状态,然而,相关技术中对用户进行睡眠识别的准确度较低。At present, electronic devices such as tablet computers and mobile phones are configured to perform system updates while the user is sleeping, and other operations that affect the user's use or take a long time to avoid affecting the user's use. To this end, the related technology achieves the aforementioned purpose by recognizing the user's sleep. For example, the electronic device determines that the user is in a sleep state when the screen is turned off for a specific period of time. However, the accuracy of the sleep recognition of the user in the related technology Lower.
发明内容Summary of the invention
本申请实施例提供一种睡眠识别方法、装置、存储介质及电子设备,可以使得电子设备能够准确的对用户进行睡眠识别。The embodiments of the present application provide a sleep recognition method, device, storage medium, and electronic device, which can enable the electronic device to accurately perform sleep recognition on a user.
第一方面,本申请实施例提供一种睡眠识别方法,应用于电子设备,包括:In the first aspect, an embodiment of the present application provides a sleep recognition method applied to an electronic device, including:
若当前满足预设的睡眠识别条件,则获取用户在包含当日在内的多个连续自然日使用所述电子设备的行为特征;If the preset sleep recognition condition is currently met, acquiring behavior characteristics of the user using the electronic device on multiple consecutive natural days including the current day;
对所述多个连续自然日的行为特征进行加权求和,得到第一加权和值,其中,各所述自然日的行为特征所对应的权重值按照由近到远的时间顺序依次降低;Performing a weighted summation on the behavior characteristics of the multiple consecutive natural days to obtain a first weighted sum value, wherein the weight value corresponding to the behavior characteristics of each natural day decreases in order of time from near to far;
判断所述第一加权和值是否大于或等于预设加权和值,是则判定所述用户处于睡眠状态,否则判定所述用户不处于睡眠状态。It is determined whether the first weighted sum value is greater than or equal to the preset weighted sum value, if yes, it is determined that the user is in a sleep state, otherwise it is determined that the user is not in a sleep state.
第二方面,本申请实施例提供一种睡眠识别装置,应用于电子设备,包括:In the second aspect, an embodiment of the present application provides a sleep recognition device, which is applied to electronic equipment, and includes:
获取模块,用于在当前满足预设的睡眠识别条件时,获取用户在包含当日在内的多个连续自然日使用所述电子设备的行为特征;The acquiring module is configured to acquire the behavior characteristics of the user using the electronic device on multiple consecutive natural days including the current day when the preset sleep recognition condition is currently met;
加权模块,用于对所述多个连续自然日的行为特征进行加权求和,得到第一加权和值,其中,各所述自然日的行为特征所对应的权重值按照由近到远的时间顺序依次降低;The weighting module is used to perform a weighted summation on the behavior characteristics of the multiple consecutive natural days to obtain a first weighted sum value, wherein the weight value corresponding to the behavior characteristics of each natural day is based on the time from near to far The order is lowered;
识别模块,用于判断所述第一加权和值是否大于或等于预设加权和值,是则判定所述用户处于睡眠状态,否则判定所述用户不处于睡眠状态。The identification module is used to determine whether the first weighted sum value is greater than or equal to a preset weighted sum value, if yes, it is determined that the user is in a sleep state, otherwise it is determined that the user is not in a sleep state.
第三方面,本申请实施例提供一种存储介质,其上存储有计算机程序,其中,当所述计算机程序在计算机上执行时,使得所述计算机执行本申请实施例提供的睡眠识别方法中的步骤。In a third aspect, an embodiment of the present application provides a storage medium on which a computer program is stored, wherein, when the computer program is executed on a computer, the computer is caused to execute the sleep recognition method provided in the embodiment of the present application. step.
第四方面,本申请实施例提供一种电子设备,包括存储器,处理器,所述处理器通过调用所述存储器中存储的计算机程序,用于执行:In a fourth aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, and the processor is configured to execute the following by calling a computer program stored in the memory:
若当前满足预设的睡眠识别条件,则获取用户在包含当日在内的多个连续自然日使用所述电子设备的行为特征;If the preset sleep recognition condition is currently met, acquiring behavior characteristics of the user using the electronic device on multiple consecutive natural days including the current day;
对所述多个连续自然日的行为特征进行加权求和,得到第一加权和值,其中,各所述自然日的行为特征所对应的权重值按照由近到远的时间顺序依次降低;Performing a weighted summation on the behavior characteristics of the multiple consecutive natural days to obtain a first weighted sum value, wherein the weight value corresponding to the behavior characteristics of each natural day decreases in order of time from near to far;
判断所述第一加权和值是否大于或等于预设加权和值,是则判定所述用户处于睡眠状态,否则判定所述用户不处于睡眠状态。It is determined whether the first weighted sum value is greater than or equal to the preset weighted sum value, if yes, it is determined that the user is in a sleep state, otherwise it is determined that the user is not in a sleep state.
本申请实施例中,电子设备可以在当前满足预设的睡眠识别条件时,获取用户在包含当日在内的多个连续自然日使用电子设备的行为特征,并对获取到的多个连续自然日的行为特征进行加权求和,得到第一加权和值,最后判断第一加权和值是否大于或等于预设加权和值,根据判断结果确定用户是否处于睡眠状态,能够提高对用户进行睡眠识别的准确度。In the embodiment of the present application, the electronic device can obtain the user's behavioral characteristics of using the electronic device on multiple consecutive natural days including the current day when the preset sleep recognition condition is currently met, and compare the obtained multiple consecutive natural days Perform weighted summation of the behavior characteristics of the user to obtain the first weighted sum value, and finally determine whether the first weighted sum value is greater than or equal to the preset weighted sum value, and determine whether the user is in a sleep state according to the judgment result, which can improve the sleep recognition of the user Accuracy.
附图说明Description of the drawings
下面结合附图,通过对本申请的具体实施方式详细描述,将使本申请的技术方案及其有益效果显而易见。The following detailed description of specific implementations of the present application in conjunction with the accompanying drawings will make the technical solutions of the present application and its beneficial effects obvious.
图1是本申请实施例提供的睡眠识别方法的一流程示意图。FIG. 1 is a schematic flowchart of a sleep recognition method provided by an embodiment of the present application.
图2是本申请实施例中获取到的多个连续自然日的行为特征的权重分配示意图。FIG. 2 is a schematic diagram of the weight distribution of behavior features of multiple consecutive natural days obtained in an embodiment of the present application.
图3是本申请实施例提供的睡眠识别方法的另一流程示意图。FIG. 3 is a schematic diagram of another process of a sleep recognition method provided by an embodiment of the present application.
图4是本申请实施例中提供的预设操作配置界面的示意图。Fig. 4 is a schematic diagram of a preset operation configuration interface provided in an embodiment of the present application.
图5是本申请实施例提供的睡眠识别装置的结构示意图。Fig. 5 is a schematic structural diagram of a sleep recognition device provided by an embodiment of the present application.
图6是本申请实施例提供的电子设备的一结构示意图。Fig. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
图7是本申请实施例提供的电子设备的另一结构示意图。FIG. 7 is another schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式detailed description
请参照图示,其中相同的组件符号代表相同的组件,本申请的原理是以实施在一适当的运算环境中来举例说明。以下的说明是基于所例示的本申请具体实施例,其不应被视为限制本申请未在此详述的其它具体实施例。Please refer to the drawings, in which the same component symbols represent the same components, and the principle of the present application is implemented in an appropriate computing environment for illustration. The following description is based on the exemplified specific embodiments of the present application, which should not be regarded as limiting other specific embodiments that are not described in detail herein.
请参照图1,图1是本申请实施例提供的睡眠识别方法的一流程示意图。该睡眠识别方法可以应用于电子设备。该睡眠识别方法的流程可以包括:Please refer to FIG. 1. FIG. 1 is a schematic flowchart of a sleep recognition method provided by an embodiment of the present application. The sleep recognition method can be applied to electronic devices. The process of the sleep recognition method may include:
在101中,若当前满足预设的睡眠识别条件,则获取用户在包括当日在内的多个连续自然日使用电子设备的行为特征。In 101, if the preset sleep recognition condition is currently met, the behavior characteristics of the user using the electronic device on multiple consecutive natural days including the current day are acquired.
应当说明的是,本申请实施例中对于睡眠识别条件的设置不做具体限制,可由本领域普通技术人员根据实际需要进行设置。比如,可以设置睡眠识别条件为电子设备当前所处环境的环境光亮度低于预设亮度,这样,电子设备可以实时对其所处环境的环境光亮度进行侦测,比如通过设置的环境光传感器对所处环境的环境光亮度进行侦测,当其所处环境的环境光亮度低于预设亮度时,判定当前满足睡眠识别条件。又比如,可以设置睡眠识别条件为电子设备的系统时刻到达预设时刻,等等。It should be noted that there is no specific limitation on the setting of the sleep recognition condition in the embodiment of the present application, and can be set by a person of ordinary skill in the art according to actual needs. For example, you can set the sleep recognition condition that the ambient light brightness of the current environment of the electronic device is lower than the preset brightness, so that the electronic device can detect the ambient light brightness of its environment in real time, such as through the set ambient light sensor The ambient light brightness of the environment is detected, and when the ambient light brightness of the environment is lower than the preset brightness, it is determined that the sleep recognition condition is currently met. For another example, the sleep recognition condition can be set as the system time of the electronic device reaches the preset time, and so on.
本申请实施例中,电子设备在判定当前满足预设的睡眠识别条件时,触发对用户的睡眠识别,也即是识别用户当前是否处于睡眠状态。首先,电子设备获取用户在包含当日在内的多个连续自然日使用电子设备的行为特征。In the embodiment of the present application, when the electronic device determines that the preset sleep recognition condition is currently met, it triggers the sleep recognition of the user, that is, recognizes whether the user is currently in a sleep state. First, the electronic device obtains the user's behavioral characteristics of using the electronic device on multiple consecutive natural days including the current day.
应当说明的是,本申请实施例中对获取行为特征的自然日的个数不做具体限制,可由本领域普通技术人员根据实际需要进行设置。比如,电子设备可以获取用户在包括当日在内的7个自然日(即当日以及当日之前的6个自然日)使用电子设备的行为特征;又比如,电子设备还可以获取用户在包括当日在内的30个自然日使用电子设备(即当日以及当日之前的29个自然日)的行为特征。It should be noted that the number of natural days for acquiring behavior characteristics is not specifically limited in the embodiments of this application, and can be set by those of ordinary skill in the art according to actual needs. For example, the electronic device can obtain the user’s behavioral characteristics of using the electronic device on 7 calendar days including the current day (that is, the current day and the 6 calendar days before the current day); for example, the electronic device can also acquire the user’s behavioral characteristics including the current day. Of 30 calendar days using electronic devices (that is, the current day and the 29 calendar days before that day).
在102中,对获取到的多个连续自然日的行为特征进行加权求和,得到第一加权和值,其中,各自然日的行为特征所对应的权重值按照由近到远的时间顺序依次降低。In 102, the acquired behavior characteristics of multiple consecutive natural days are weighted and summed to obtain a first weighted sum value, where the weight values corresponding to the behavior characteristics of each natural day are in order from near to far in time. reduce.
本申请实施例中,电子设备在获取到用户在包含当日在内的多个连续自然日使用电子设备的行为特征之后,根据获取到的多个自然日的行为特征中各自然日的行为特征所对应的权重值,对获取到的多个连续自然日的行为特征进行加权求和,将此时得到加权和值记为第一加权和值。In the embodiment of the present application, after the electronic device obtains the user's behavior characteristics of using the electronic device on multiple consecutive natural days including the current day, it is determined based on the acquired behavior characteristics of the multiple natural days. For the corresponding weight value, a weighted summation is performed on the acquired behavior characteristics of multiple consecutive natural days, and the weighted sum value obtained at this time is recorded as the first weighted sum value.
应当说明的是,本申请实施例中以各自然日的行为特征所对应的权重值按照由近到远的时间顺序依次降低为约束(通俗的说,即时间越近的自然日的行为特征占有更高的权重,而时间越远的自然日的行为特征占有较低的权重),而对于各自然日的行为特征所对应权重值的具体取值不做具体限定。It should be noted that in the embodiments of this application, the weight value corresponding to the behavior characteristics of each natural day is reduced in order of time from near to far as a constraint (in layman's terms, the closer the time is, the behavior characteristics of the natural day occupy The higher the weight, and the farther the natural day’s behavior features have a lower weight), and the specific value of the weight value corresponding to the behavior characteristics of each natural day is not specifically limited.
比如,请参照图2,电子设备获取用户在包含当日在内的7个自然日(分别为当日,以及当日前第一日至当日前第六日)的行为特征用于对用户进行睡眠识别,其中,当日的行为特征所对应的权重值为0.5,当日前第一日的行为特征所对应的权重值为0.2,当日前第二日的行为特征所对应的权重值为0.1,当日前第三日的行为特征所对应的权重值为0.08,当日前第四日的行为特征所对应的权重值为0.06,当日前第五日的行为特征所对应的权重值为0.04,当日前第六日的行为特征所对应的权重值为0.02。For example, referring to Figure 2, the electronic device obtains the user’s behavior characteristics on 7 natural days including the current day (the current day, and the first day of the current day to the sixth day of the current day) for sleep recognition of the user. Among them, the weight value corresponding to the behavior characteristic of the day is 0.5, the weight value corresponding to the behavior characteristic of the first day of the current day is 0.2, the behavior characteristic corresponding to the second day of the current day is 0.1, and the third day of the current day The weight value corresponding to the behavior characteristic of the day is 0.08, the weight value corresponding to the behavior characteristic of the fourth day before the current day is 0.06, and the behavior characteristic corresponding to the fifth day of the current day has a weight value of 0.04. The weight value corresponding to the behavior feature is 0.02.
在103中,判断第一加权和值是否大于或等于预设加权和值,是则判定用户处于睡眠状态,否则判定用户不处于睡眠状态。In 103, it is determined whether the first weighted sum value is greater than or equal to the preset weighted sum value, if yes, it is determined that the user is in a sleep state, otherwise, it is determined that the user is not in a sleep state.
本申请实施例中,电子设备在对获取到的多个连续自然日的行为特征进行加权求和,得到第一加权和值之后,判断第一加权和值是否大于或等于预设加权和值,得到判断结果,根据该判断结果确定用户是否处于睡眠状态,其中,若判断结果为第一加权和值大于或等于预设加权和值,则判定用户当前处于睡眠状态,若判断结果为第一加权和值小于预设加权和值,则判定用户当前不处于睡眠状态。In the embodiment of the present application, the electronic device performs a weighted summation on the acquired behavior characteristics of multiple consecutive natural days to obtain the first weighted sum value, and then determines whether the first weighted sum value is greater than or equal to the preset weighted sum value. Obtain the judgment result, and determine whether the user is in a sleep state according to the judgment result, wherein, if the judgment result is that the first weighted sum value is greater than or equal to the preset weighted sum value, it is judged that the user is currently in a sleep state, and if the judgment result is the first weighted value If the sum value is less than the preset weighted sum value, it is determined that the user is not currently in a sleep state.
由上可知,本申请实施例中,电子设备可以在当前满足预设的睡眠识别条件时,获取用户在包含当日在内的多个连续自然日使用电子设备的行为特征,并对获取到的多个连续自然日的行为特征进行加权求和,得到第一加权和值,最后判断第一加权和值是否大于或等于预设加权和值,根据判断结果确定用户是否处于睡眠状态,能够提高对用户进行睡眠识别的准确度。It can be seen from the above that, in the embodiment of the present application, the electronic device can obtain the user's behavioral characteristics of using the electronic device on multiple consecutive natural days including the current day when the preset sleep recognition condition is currently met, and compare the obtained multiple Perform weighted summation of the behavior characteristics of consecutive natural days to obtain the first weighted sum value, and finally judge whether the first weighted sum value is greater than or equal to the preset weighted sum value, and determine whether the user is in a sleep state according to the judgment result, which can improve the user The accuracy of sleep recognition.
请参照图3,图3为本申请实施例提供的睡眠识别方法的另一流程示意图。该睡眠识别方法可以应用于电子设备。该睡眠识别方法的流程可以包括:Please refer to FIG. 3, which is a schematic diagram of another flow of the sleep recognition method provided by an embodiment of the application. The sleep recognition method can be applied to electronic devices. The process of the sleep recognition method may include:
在201中,若当前满足预设的睡眠识别条件,则电子设备获取用户在包括当日在内的多个连续自然日中各自然日使用电子设备的多维使用信息。In 201, if the preset sleep recognition condition is currently met, the electronic device obtains the multi-dimensional usage information of the electronic device used by the user on each of the multiple consecutive natural days including the current day.
在202中,电子设备根据各自然日对应的多维使用行为信息,获取各自然 日的行为特征。In 202, the electronic device obtains the behavior characteristics of each natural day according to the multi-dimensional usage behavior information corresponding to each natural day.
应当说明的是,本申请实施例中对于睡眠识别条件的设置不做具体限制,可由本领域普通技术人员根据实际需要进行设置。It should be noted that there is no specific limitation on the setting of the sleep recognition condition in the embodiment of the present application, and can be set by a person of ordinary skill in the art according to actual needs.
作为第一种可选的实施方式,睡眠识别条件可以被配置为:As a first optional implementation manner, the sleep recognition condition can be configured as:
处于熄屏状态的持续时长达到第一预设时长。The duration of the screen off state reaches the first preset duration.
比如,电子设备可以在进入熄屏状态的同时启动定时器进行计时,使用定时器的计时时长表征电子设备处于熄屏状态的持续时长,其中,电子设备在定时器的计时时长达到第一预设时长或者退出熄屏状态时停止定时器计时,并复位定时器。这样,电子设备当定时器的计时时长达到第一预设时长,也即是其处于熄屏状态的持续时长达到第一预设时长时,判定当前满足睡眠识别条件。For example, the electronic device can start a timer for timing when entering the screen-off state, and use the timing duration of the timer to characterize the duration of the electronic device in the screen-off state, where the electronic device’s timer duration reaches the first preset Stop the timer when the duration or exit the screen-off state, and reset the timer. In this way, when the time duration of the timer reaches the first preset duration, that is, when the duration of the off-screen state reaches the first preset duration, the electronic device determines that the sleep recognition condition is currently met.
作为第二种可选的实施方式,睡眠识别条件可以被配置为:As a second optional implementation manner, the sleep recognition condition can be configured as:
处于静止状态的持续时长达到第二预设时长。The duration of the static state reaches the second preset duration.
比如,电子设备可以在进入静止状态(比如,电子设备可以根据内置的三轴加速度传感器侦测是否存在任一方向的加速度,若不存在则判定处于静止状态)的同时启动定时器进行计时,使用定时器的计时时长表征电子设备处于静止状态的持续时长,其中,电子设备在定时器的计时时长达到第二预设时长或者退出静止状态时停止定时器计时,并复位定时器。这样,电子设备当定时器的计时时长达到第二预设时长,也即是其处于静止状态的持续时长达到第二预设时长时,判定当前满足睡眠识别条件。For example, an electronic device can start a timer to count when it enters a stationary state (for example, the electronic device can detect whether there is acceleration in any direction according to the built-in three-axis acceleration sensor, and if it does not exist, it is determined to be in a stationary state). The timing duration of the timer represents the duration of the electronic device being in a static state, where the electronic device stops counting the timer and resets the timer when the timing duration of the timer reaches the second preset duration or exits the static state. In this way, when the timing duration of the timer reaches the second preset duration, that is, when the duration of its static state reaches the second preset duration, the electronic device determines that the sleep recognition condition is currently met.
作为第三种可选的实施方式,睡眠识别条件可以被配置为:As a third optional implementation manner, the sleep recognition condition can be configured as:
在处于熄屏状态的持续时长达到第三预设时长时处于静止状态。When the duration of being in the off-screen state reaches the third preset duration, it is in a static state.
比如,电子设备可以在进入熄屏状态的同时启动定时器进行计时,使用定时器的计时时长表征电子设备处于熄屏状态的持续时长,其中,电子设备在定时器的计时时长达到第三预设时长或者退出熄屏状态时停止定时器计时,并复位定时器。这样,电子设备当定时器的计时时长达到第三预设时长时,通过三轴加速度传感器判断当前是否处于静止状态,是则判定当前满足睡眠识别条件。For example, the electronic device can start a timer for timing when entering the screen-off state, and use the timer duration to characterize the duration of the electronic device in the screen-off state, where the electronic device's timer duration reaches the third preset Stop the timer when the duration or exit the screen-off state, and reset the timer. In this way, when the time duration of the timer reaches the third preset duration, the electronic device determines whether it is currently in a static state through the three-axis acceleration sensor, and if yes, determines that the sleep recognition condition is currently met.
作为第四种可选的实施方式,睡眠识别条件可以被配置为:As a fourth optional implementation manner, the sleep recognition condition may be configured as:
在处于静止状态的持续时长达到第四预设时长时处于熄屏状态。When the duration of the static state reaches the fourth preset duration, the screen is turned off.
比如,电子设备可以在进入静止状态的同时启动定时器进行计时,使用定时器的计时时长表征电子设备处于静止状态的持续时长,其中,电子设备在定 时器的计时时长达到第四预设时长或者退出静止状态时停止定时器计时,并复位定时器。这样,电子设备当定时器的计时时长达到第四预设时长时,判断当前是否处于熄屏状态,是则判定当前满足睡眠识别条件。For example, the electronic device can start a timer for timing when entering a static state, and the duration of the timer is used to characterize the duration of the electronic device in the static state, where the timer duration of the electronic device reaches the fourth preset duration or Stop the timer counting when exiting the static state and reset the timer. In this way, when the timer duration reaches the fourth preset duration, the electronic device determines whether the screen is currently in the off state, and if yes, determines that the sleep recognition condition is currently met.
应当说明的是,以上第一预设时长、第二预设时长第三预设时长以及第四预设时长的取值可以相同,也可以不同,具体可由本领域普通技术人员根据经验取合适值。比如,在本申请实施例中,可以将第一预设时长、第二预设时长第三预设时长以及第四预设时长均设置为30分钟,这样,电子设备在处于熄屏状态的持续时长达到30分钟时,判定满足睡眠识别条件;或者,电子设备在处于静止状态的持续时长达到30分钟时,判定满足睡眠识别条件;或者,电子设备在处于熄屏状态的持续时长达到30分钟时处于静止状态,判定满足睡眠识别条件;或者,电子设备在处于静止状态的持续时长达到30分钟时处于熄屏状态,判定满足睡眠识别条件。It should be noted that the values of the first preset duration, the second preset duration, the third preset duration, and the fourth preset duration above may be the same or different. Specifically, a person of ordinary skill in the art can select appropriate values based on experience. . For example, in the embodiment of the present application, the first preset duration, the second preset duration, the third preset duration, and the fourth preset duration can all be set to 30 minutes. In this way, the electronic device continues to be in the off-screen state. When the duration reaches 30 minutes, it is determined that the sleep recognition condition is satisfied; or when the electronic device is in a static state for 30 minutes, it is determined that the sleep recognition condition is satisfied; or when the electronic device is in the off-screen state for 30 minutes In a static state, it is determined that the sleep recognition condition is satisfied; or, when the electronic device is in the off-screen state when the duration of the static state reaches 30 minutes, it is determined that the sleep recognition condition is satisfied.
本申请实施例中,电子设备在判定当前满足预设的睡眠识别条件时,触发对用户的睡眠识别,也即是识别用户当前是否处于睡眠状态。首先,电子设备获取用户在包含当日在内的多个连续自然日使用电子设备的行为特征。为此,电子设备获取用户在包括当日在内的多个连续自然日中各自然日使用电子设备的多维使用信息,并根据各自然日对应的多维使用信息,获取各自然日的行为特征。In the embodiment of the present application, when the electronic device determines that the preset sleep recognition condition is currently met, it triggers the sleep recognition of the user, that is, recognizes whether the user is currently in a sleep state. First, the electronic device obtains the user's behavioral characteristics of using the electronic device on multiple consecutive natural days including the current day. To this end, the electronic device obtains the multi-dimensional use information of the electronic device used by the user on each of the multiple consecutive natural days including the current day, and obtains the behavior characteristics of each natural day according to the multi-dimensional use information corresponding to each natural day.
应当说明的是,本申请实施例中对于获取使用信息的维度不做具体限制,但至少包括描述用户在何时使用电子设备的时间维度、描述用户在何地使用电子设备的地点维度以及描述如何操作电子设备的操作维度,比如,电子设备可以在操作维度获取描述用户使用电子设备运行了哪些应用的信息、用户使用电子设备拨打了哪些电话的信息以及电子设备的电量消耗速率等。It should be noted that there are no specific restrictions on the dimensions of obtaining usage information in the embodiments of this application, but at least it includes the time dimension describing when the user uses the electronic device, the location dimension describing where the user uses the electronic device, and the description how The operation dimension of operating the electronic device, for example, the electronic device can obtain information describing which applications the user uses the electronic device to run, which phone information the user makes using the electronic device, and the power consumption rate of the electronic device in the operation dimension.
应当说明的是,本申请实施例中对获取行为特征的自然日的个数不做具体限制,可由本领域普通技术人员根据实际需要进行设置。比如,电子设备可以获取用户在包括当日在内的7个自然日(即当日以及当日之前的6个自然日)使用电子设备的行为特征;又比如,电子设备还可以获取用户在包括当日在内的30个自然日使用电子设备(即当日以及当日之前的29个自然日)的行为特征。It should be noted that the number of natural days for acquiring behavior characteristics is not specifically limited in the embodiments of this application, and can be set by those of ordinary skill in the art according to actual needs. For example, the electronic device can obtain the user’s behavioral characteristics of using the electronic device on 7 calendar days including the current day (that is, the current day and the 6 calendar days before the current day); for example, the electronic device can also acquire the user’s behavioral characteristics including the current day. Of 30 calendar days using electronic devices (that is, the current day and the 29 calendar days before that day).
在203中,电子设备对多个连续自然日的行为特征进行加权求和,得到第 一加权和值,其中,各自然日的行为特征所对应的权重值按照由近到远的时间顺序依次降低。In 203, the electronic device performs a weighted summation on the behavior characteristics of a plurality of consecutive natural days to obtain a first weighted sum value, wherein the weight values corresponding to the behavior characteristics of each natural day are sequentially decreased in the order of time from near to far .
本申请实施例中,电子设备在获取到用户在包含当日在内的多个连续自然日使用电子设备的行为特征之后,根据获取到的多个自然日的行为特征中各自然日的行为特征所对应的权重值,对获取到的多个连续自然日的行为特征进行加权求和,将此时得到加权和值记为第一加权和值。In the embodiment of the present application, after the electronic device obtains the user's behavior characteristics of using the electronic device on multiple consecutive natural days including the current day, it is determined based on the acquired behavior characteristics of the multiple natural days. For the corresponding weight value, a weighted summation is performed on the acquired behavior characteristics of multiple consecutive natural days, and the weighted sum value obtained at this time is recorded as the first weighted sum value.
应当说明的是,本申请实施例中以各自然日的行为特征所对应的权重值按照由近到远的时间顺序依次降低为约束(通俗的说,即时间越近的自然日的行为特征占有更高的权重,而时间越远的自然日的行为特征占有较低的权重),而对于各自然日的行为特征所对应权重值的具体取值不做具体限定。It should be noted that in the embodiments of this application, the weight value corresponding to the behavior characteristics of each natural day is reduced in order of time from near to far as a constraint (in layman's terms, the closer the time is, the behavior characteristics of the natural day occupy The higher the weight, and the farther the natural day’s behavior features have a lower weight), and the specific value of the weight value corresponding to the behavior characteristics of each natural day is not specifically limited.
比如,请参照图2,电子设备获取用户在包含当日在内的7个自然日(分别为当日,以及当日前第一日至当日前第六日)的行为特征用于对用户进行睡眠识别,其中,当日的行为特征所对应的权重值为0.5,当日前第一日的行为特征所对应的权重值为0.2,当日前第二日的行为特征所对应的权重值为0.1,当日前第三日的行为特征所对应的权重值为0.08,当日前第四日的行为特征所对应的权重值为0.06,当日前第五日的行为特征所对应的权重值为0.04,当日前第六日的行为特征所对应的权重值为0.02。For example, referring to Figure 2, the electronic device obtains the user’s behavior characteristics on 7 natural days including the current day (the current day, and the first day of the current day to the sixth day of the current day) for sleep recognition of the user. Among them, the weight value corresponding to the behavior characteristic of the day is 0.5, the weight value corresponding to the behavior characteristic of the first day of the current day is 0.2, the behavior characteristic corresponding to the second day of the current day is 0.1, and the third day of the current day The weight value corresponding to the behavior characteristic of the day is 0.08, the weight value corresponding to the behavior characteristic of the fourth day before the current day is 0.06, and the behavior characteristic corresponding to the fifth day of the current day has a weight value of 0.04. The weight value corresponding to the behavior feature is 0.02.
在204中,电子设备判断第一加权和值是否大于或等于预设加权和值,是则判定用户处于睡眠状态,否则判定用户不处于睡眠状态。In 204, the electronic device determines whether the first weighted sum value is greater than or equal to the preset weighted sum value, if yes, it is determined that the user is in a sleep state, otherwise it is determined that the user is not in a sleep state.
本申请实施例中,电子设备在对获取到的多个连续自然日的行为特征进行加权求和,得到第一加权和值之后,判断第一加权和值是否大于或等于预设加权和值,得到判断结果,根据该判断结果确定用户是否处于睡眠状态,其中,若判断结果为第一加权和值大于或等于预设加权和值,则判定用户处于睡眠状态,若判断结果为第一加权和值小于预设加权和值,则判定用户不处于睡眠状态。In the embodiment of the present application, the electronic device performs a weighted summation on the acquired behavior characteristics of multiple consecutive natural days to obtain the first weighted sum value, and then determines whether the first weighted sum value is greater than or equal to the preset weighted sum value. Obtain the judgment result, and determine whether the user is in a sleep state according to the judgment result, wherein, if the judgment result is that the first weighted sum value is greater than or equal to the preset weighted sum value, it is judged that the user is in a sleep state, and if the judgment result is the first weighted sum If the value is less than the preset weighted sum value, it is determined that the user is not in a sleep state.
比如,假设预设加权和值为27,若得到的第一加权和值为26,则判定用户当前处于睡眠状态,若得到的第一加权和值为25,则判定用户当前不处于睡眠状态。For example, assuming that the preset weighted sum value is 27, if the obtained first weighted sum value is 26, it is determined that the user is currently sleeping, and if the obtained first weighted sum value is 25, it is determined that the user is not currently sleeping.
在205中,若判定用户处于睡眠状态,则电子设备执行预设操作,其中,预设操作包括系统更新操作、应用更新操作以及功耗控制操作中的至少一种。In 205, if it is determined that the user is in a sleep state, the electronic device performs a preset operation, where the preset operation includes at least one of a system update operation, an application update operation, and a power consumption control operation.
本申请实施例中,电子设备在判定用户当前处于睡眠状态时,执行预先配置的、在用户处于睡眠状态时执行的预设操作。其中,预设操作包括但不限于系统更新操作、应用更新操作以及功耗控制操作中的至少一种,可以由用户手动配置,也可由电子设备缺省配置。In the embodiment of the present application, when the electronic device determines that the user is currently in the sleep state, it performs a pre-configured preset operation that is executed when the user is in the sleep state. Wherein, the preset operation includes but is not limited to at least one of a system update operation, an application update operation, and a power consumption control operation, which may be manually configured by the user or may be configured by the electronic device by default.
比如,电子设备可以将系统更新操作配置为预设操作,从而在用户处于睡眠状态时执行系统更新操作,将系统更新到最新版本;电子设备也可以将应用更新操作配置为预设操作,从而在用户处于睡眠状态时执行应用更新操作,将已安装的应用程序更新到最新版本等;电子设备可以将功耗控制操作配置为预设操作,从而在用户处于睡眠状态时应用预设的用于降低功耗的功耗控制策略,降低电子设备的功耗等等。For example, the electronic device can configure the system update operation as a preset operation, so as to perform the system update operation when the user is in sleep state, and update the system to the latest version; the electronic device can also configure the application update operation as a preset operation, The user performs application update operations when the user is asleep, updates the installed applications to the latest version, etc.; electronic devices can configure the power consumption control operation as a preset operation, thereby applying the preset for reduction when the user is asleep Power consumption control strategy for power consumption, reducing the power consumption of electronic devices and so on.
又比如,请参照图4,电子设备提供有预设操作配置界面,如图4所示,预设操作配置界面包括提示信息“请选择睡眠期间执行的操作”,操作选择框、下拉按钮、下拉菜单、确定按钮以及取消按钮,其中,下拉菜单根据用户对下拉按钮的点击操作呼出,下拉菜单中提供有电子设备可以在用户睡眠区间内执行的多种操作,如图4中示出的系统更新操作、应用更新操作等,用户可以根据实际需要选择电子设备在其睡眠时执行的操作,并在选定需要由电子设备在其睡眠时执行的操作后,点击确定按钮,指示电子设备将用户选择的操作作为前述预设操作。或者,若用户发现无需要电子设备在其睡眠时执行的操作,则可以点击取消按钮,指示电子设备执行缺省配置的预设操作。For another example, please refer to Figure 4. The electronic device provides a preset operation configuration interface. As shown in Figure 4, the preset operation configuration interface includes the prompt message "Please select the operation performed during sleep", operation selection box, drop-down button, drop-down Menu, OK button, and Cancel button. Among them, the drop-down menu is called out according to the user's click operation on the drop-down button. The drop-down menu provides various operations that the electronic device can perform during the user's sleep interval, as shown in the system update in Figure 4 Operation, application update operations, etc., the user can select the operation performed by the electronic device during sleep according to actual needs, and after selecting the operation that needs to be performed by the electronic device during sleep, click the OK button to instruct the electronic device to select the user The operation as the aforementioned preset operation. Or, if the user finds that there is no need for the operation performed by the electronic device during sleep, he can click the cancel button to instruct the electronic device to perform the preset operation of the default configuration.
在一实施方式中,在根据各自然日对应的多维使用行为信息,获取各自然日的行为特征时,电子设备可以执行:In one embodiment, when acquiring the behavior characteristics of each natural day according to the multi-dimensional usage behavior information corresponding to each natural day, the electronic device may execute:
(1)电子设备分别对各自然日的多维使用信息进行加权求和,得到各自然日的第二加权和值;(1) The electronic device separately performs a weighted summation on the multi-dimensional usage information of each natural day to obtain the second weighted sum value of each natural day;
(2)电子设备将各自然日的第二加权和值作为各自然日的行为特征。(2) The electronic device uses the second weighted sum of each natural day as the behavior characteristic of each natural day.
本申请实施例中,对于多维使用信息中每一维度的使用信息预先分配有对应的权重值,其中,本申请实施例对于多维使用信息的权重分配不做具体限制,可由本领域普通技术人员根据实际需要进行设置。这样,电子设备在根据各自然日对应的多维使用行为信息获取各自然日的行为特征时,对于前述多个自然日中的任一个自然日,电子设备可以根据该自然日的多维使用信息中各维使用信息所对应的权重值,对该自然日的多维使用信息进行加权求和,得到该自然 日的第二加权和值。由此,电子设备可以分别对各自然日的多维使用信息进行加权求和,得到各自然日的第二加权和值,并将各自然日的第二加权和值作为各自然日的行为特征。In the embodiment of the present application, the use information of each dimension in the multi-dimensional use information is pre-allocated with a corresponding weight value. The embodiment of the present application does not specifically limit the weight distribution of the multi-dimensional use information, which can be determined by those of ordinary skill in the art. Actually need to be set. In this way, when the electronic device obtains the behavior characteristics of each natural day according to the multi-dimensional usage behavior information corresponding to each natural day, for any one of the aforementioned multiple natural days, the electronic device can be based on the multi-dimensional usage information of the natural day. The weight value corresponding to the dimension usage information is weighted and summed with the multidimensional usage information of the natural day to obtain the second weighted sum value of the natural day. In this way, the electronic device can respectively perform a weighted summation of the multi-dimensional usage information of each natural day to obtain the second weighted sum value of each natural day, and use the second weighted sum value of each natural day as the behavior characteristic of each natural day.
在一实施方式中,在分别对各自然日的多维使用信息进行加权求和,得到各自然日的第二加权和值时,电子设备可以执行:In an embodiment, when the weighted summation of the multi-dimensional usage information of each natural day is performed to obtain the second weighted sum value of each natural day, the electronic device may execute:
(1)电子设备对各自然日的多维使用信息进行归一化处理;(1) Electronic equipment normalizes the multi-dimensional usage information of each natural day;
(2)电子设备分别对各自然日归一化后的多维使用信息进行加权求和,得到各自然日的第二加权和值。(2) The electronic device respectively performs a weighted summation on the normalized multi-dimensional usage information of each natural day to obtain the second weighted sum value of each natural day.
为了提升加权求和的效率,电子设备在对各自然日的多维使用信息进行加权求和时,首先各自然日的多维使用信息进行归一化处理,将不同维度的使用信息归一化到同一数值区间内。In order to improve the efficiency of weighted summation, when electronic devices perform weighted summation on the multi-dimensional use information of each natural day, firstly, the multi-dimensional use information of each natural day is normalized, and the use information of different dimensions is normalized to the same Within the numerical range.
比如,对于前述多个自然日中的任一自然日,可以采用线性函数归一化将该自然日的多维使用信息归一化到数值区间[0,1]之内,还可以采用0均值归一化将该自然日的多维使用信息归一化到数值区间[0,1]之内,等等。For example, for any one of the foregoing multiple natural days, a linear function can be used to normalize the multi-dimensional usage information of the natural day to the numerical interval [0,1], and the zero mean can also be used to normalize Yihua normalizes the multi-dimensional usage information of the natural day to the numerical interval [0,1], and so on.
在一实施方式中,若当前满足预设的睡眠识别条件,则电子设备获取用户在包括当日在内的多个连续自然日中各自然日使用电子设备的多维使用信息之前,电子设备还可以执行:In one embodiment, if the preset sleep recognition conditions are currently met, the electronic device can also perform multi-dimensional usage information before the user obtains the multi-dimensional usage information of the electronic device used by the user on each of the multiple consecutive natural days including the current day. :
(1)电子设备建立使用信息数据库;(1) Establish a database of usage information for electronic equipment;
(2)电子设备实时记录用户使用电子设备的多维使用信息,并将记录的多维使用信息存储至使用信息数据库中;(2) The electronic device records the multi-dimensional usage information of the user using the electronic device in real time, and stores the recorded multi-dimensional usage information in the usage information database;
而在获取用户在包括当日在内的多个连续自然日中各自然日使用电子设备的多维使用信息时,电子设备可以执行:When acquiring the multi-dimensional usage information of the electronic device used by the user on each of the multiple consecutive natural days including the current day, the electronic device can perform:
电子设备从使用信息数据库中获取用户在包括当日在内的多个连续自然日中各自然日使用电子设备的多维使用信息。The electronic device obtains the multi-dimensional usage information of the electronic device used by the user on each of the multiple consecutive natural days including the current day from the usage information database.
为便于管理使用信息数据库,可以由电子设备建立本地的使用信息数据库,其中,本申请实施例对该使用信息数据库的数据库类型不做限定,可由本领域普通技术人员根据实际需要进行选取。In order to facilitate the management of the usage information database, a local usage information database can be established by the electronic device. The embodiment of the present application does not limit the database type of the usage information database, and can be selected by a person of ordinary skill in the art according to actual needs.
电子设备完成使用信息数据库的建立之后,在每一个自然日内,电子设备实时记录用户使用电子设备的多维使用信息,并将记录的多维使用信息存储至前述使用信息数据库中。After the electronic device completes the establishment of the usage information database, in each natural day, the electronic device records the multi-dimensional usage information of the user using the electronic device in real time, and stores the recorded multi-dimensional usage information in the aforementioned usage information database.
比如,电子设备获取用户在包含当日在内的7个自然日的行为特征用于对用户进行睡眠识别,假设当日为周日,则电子设备从使用信息数据库中获取当日(即周日)的多维使用信息,以及当日之前周一至周六的多维使用信息。For example, the electronic device obtains the user’s behavior characteristics on 7 natural days including the current day for sleep recognition of the user. Assuming that the current day is a Sunday, the electronic device obtains the multi-dimensional information of the current day (that is, Sunday) from the usage information database. Usage information, and multi-dimensional usage information from Monday to Saturday before the day.
在一实施方式中,在执行预设操作之前,电子设备可以执行:In an embodiment, before performing the preset operation, the electronic device may perform:
(1)电子设备获取用户配置的作息计划;(1) The electronic device obtains the user-configured schedule;
(2)电子设备根据获取到的作息计划获取用户计划的睡眠区间,并判断当前是否位于计划的睡眠区间内;(2) The electronic device obtains the sleep interval planned by the user according to the obtained schedule and determines whether it is currently within the planned sleep interval;
(3)若是,则电子设备执行预设操作。(3) If yes, the electronic device performs a preset operation.
本申请实施例中,电子设备在判定用户当前处于睡眠状态时,获取用户配置的作息计划,并进一步根据获取到的作息计划获取用户计划的睡眠区间,并判断当前是否位于计划的睡眠区间之内,若是,则说明电子设备对用户进行睡眠识别所得到的识别结果与用户配置的作息计划一致,此时执行预设操作。In the embodiment of the present application, when the electronic device determines that the user is currently sleeping, it obtains the schedule configured by the user, and further obtains the sleep interval planned by the user according to the obtained schedule, and determines whether it is currently within the planned sleep interval If it is, it means that the recognition result obtained by the electronic device performing sleep recognition on the user is consistent with the work schedule configured by the user, and the preset operation is performed at this time.
比如,电子设备获取到用户配置的作息计划为10:30睡,6:30起,7:00做某某事,则根据该作息计划,电子设备可以获取到计划的睡眠区间为10:30-6:30,若在12:00时电子设备判定满足睡眠识别条件且判定用户处于睡眠状态,则电子设备执行预设操作。For example, if the electronic device obtains the user-configured schedule for sleeping at 10:30, starting at 6:30 and doing something at 7:00, then according to the schedule, the electronic device can obtain the scheduled sleep interval of 10:30- At 6:30, if the electronic device determines that the sleep recognition condition is met at 12:00 and that the user is in a sleep state, the electronic device performs a preset operation.
在一实施方式中,在判断当前是否位于睡眠区间内之后,电子设备还可以执行:In an embodiment, after determining whether it is currently in the sleep interval, the electronic device may further execute:
若当前位于前述睡眠区间之前,则当到达前述睡眠区间之内且满足睡眠识别条件时,执行前述预设操作。If it is currently before the aforementioned sleep interval, when it reaches the aforementioned sleep interval and satisfies the sleep recognition condition, execute the aforementioned preset operation.
其中,若得到当前位于前述睡眠区间之前的判断结果,则电子设备等待到前述睡眠区间时,判断是否满足睡眠识别条件,是则执行前述预设操作,否则不执行。Wherein, if the determination result that is currently located before the aforementioned sleep interval is obtained, when the electronic device waits for the aforementioned sleep interval, it determines whether the sleep recognition condition is satisfied, and if yes, executes the aforementioned preset operation, otherwise it does not execute it.
比如,电子设备获取到用户配置的作息计划为10:30睡,6:30起,7:00做某某事,则根据该作息计划,电子设备可以获取到用户睡眠区间为10:30-6:30,若在10:00时电子设备判定满足睡眠识别条件且判定用户处于睡眠状态,此时电子设备不执行前述预设操作,而是等待到的10:30时,判断当前是否满足睡眠识别条件,若是则直接执行前述预设操作。For example, if the electronic device obtains the user’s configured schedule to sleep at 10:30, start at 6:30 and do something at 7:00, then according to the schedule, the electronic device can obtain the user’s sleep interval as 10:30-6 :30, if the electronic device determines that the sleep recognition condition is met at 10:00 and the user is in a sleep state, the electronic device does not perform the aforementioned preset operation at this time, but waits until 10:30 to determine whether the current sleep recognition is satisfied Condition, if yes, execute the aforementioned preset operation directly.
请参照图5,图5为本申请实施例提供的睡眠识别装置的结构示意图。该 睡眠识别装置可以应用于电子设备。睡眠识别装置可以包括:获取模块401、加权模块402以及识别模块403。Please refer to FIG. 5, which is a schematic structural diagram of a sleep recognition device provided by an embodiment of the application. The sleep recognition device can be applied to electronic equipment. The sleep recognition device may include: an acquisition module 401, a weighting module 402, and an identification module 403.
获取模块401,用于在当前满足预设的睡眠识别条件时,获取用户在包括当日在内的多个连续自然日使用电子设备的行为特征;The obtaining module 401 is configured to obtain the behavior characteristics of the user using the electronic device on multiple consecutive natural days including the current day when the preset sleep recognition condition is currently met;
加权模块402,用于对获取模块401获取到的多个连续自然日的行为特征进行加权求和,得到第一加权和值,其中,各自然日的行为特征所对应的权重值按照由近到远的时间顺序依次降低;The weighting module 402 is configured to perform a weighted summation of the behavior characteristics of multiple consecutive natural days acquired by the acquisition module 401 to obtain a first weighted sum value, where the weight values corresponding to the behavior characteristics of each natural day are in order from recent to The distant time sequence decreases sequentially;
识别模块403,用于判断第一加权和值是否大于或等于预设加权和值,是则判定用户处于睡眠状态,否则判定用户不处于睡眠状态。The identification module 403 is used to determine whether the first weighted sum value is greater than or equal to the preset weighted sum value, if yes, determine that the user is in a sleep state, otherwise, determine that the user is not in a sleep state.
在一实施方式中,在获取用户在包括当日在内的多个连续自然日使用电子设备的行为特征时,获取模块401可以用于:In an implementation manner, when acquiring behavioral characteristics of a user using an electronic device on multiple consecutive natural days including the current day, the acquiring module 401 may be used to:
获取用户在包括当日在内的多个连续自然日中各自然日使用电子设备的多维使用信息;Obtain the multi-dimensional usage information of the electronic device used by the user in multiple consecutive natural days including the current day;
根据各自然日对应的多维使用行为信息,获取各自然日的行为特征。Obtain the behavior characteristics of each natural day according to the multi-dimensional usage behavior information corresponding to each natural day.
在一实施方式中,在根据各自然日对应的多维使用行为信息,获取各自然日的行为特征时,获取模块401可以用于:In one embodiment, when acquiring the behavior characteristics of each natural day according to the multi-dimensional usage behavior information corresponding to each natural day, the acquiring module 401 may be used to:
分别对各自然日的多维使用信息进行加权求和,得到各自然日的第二加权和值;Perform a weighted summation on the multi-dimensional usage information of each calendar day to obtain the second weighted sum value of each calendar day;
将各自然日的第二加权和值作为各自然日的行为特征。The second weighted sum value of each natural day is taken as the behavior characteristic of each natural day.
在一实施方式中,在分别对各自然日的多维使用信息进行加权求和,得到各自然日的第二加权和值时,获取模块401可以用于:In an embodiment, when the weighted summation of the multi-dimensional usage information of each natural day is performed to obtain the second weighted sum value of each natural day, the obtaining module 401 may be used to:
对各自然日的多维使用信息进行归一化处理;Normalize the multi-dimensional usage information of each natural day;
分别对各自然日归一化后的多维使用信息进行加权求和,得到各自然日的第二加权和值。The normalized multi-dimensional usage information of each natural day is weighted and summed to obtain the second weighted sum value of each natural day.
在一实施方式中,睡眠识别装置还包括记录模块,用于:In an embodiment, the sleep recognition device further includes a recording module for:
建立使用信息数据库;Establish a database of usage information;
实时记录用户使用电子设备的多维使用信息,并将记录的多维使用信息存储至使用信息数据库中;Real-time recording of the multi-dimensional usage information of users using electronic equipment, and store the recorded multi-dimensional usage information in the usage information database;
在获取用户在包括当日在内的多个连续自然日中各自然日使用电子设备的多维使用信息时,获取模块401可以用于:When acquiring the multi-dimensional usage information of the electronic device used by the user on each of the multiple consecutive natural days including the current day, the acquisition module 401 may be used to:
从使用信息数据库中获取用户在包括当日在内的多个连续自然日中各自然日使用电子设备的多维使用信息。Obtain the multi-dimensional use information of the electronic device used by the user on each of the multiple consecutive natural days including the current day from the use information database.
在一实施方式中,睡眠识别条件包括:In an embodiment, the sleep recognition conditions include:
处于熄屏状态的持续时长达到第一预设时长;The duration of the screen off state reaches the first preset duration;
或者,处于静止状态的持续时长达到第二预设时长;Or, the duration of the static state reaches the second preset duration;
或者,在处于熄屏状态的持续时长达到第三预设时长时处于静止状态;Or, stay in a static state when the duration of the screen off state reaches the third preset duration;
或者,在处于静止状态的持续时长达到第四预设时长时处于熄屏状态。Or, the screen is turned off when the duration of the static state reaches the fourth preset duration.
在一实施方式中,睡眠识别装置还包括执行模块,用于:In an embodiment, the sleep recognition device further includes an execution module for:
若识别模块403判定用户处于睡眠状态,则执行预设操作,其中,预设操作包括系统更新操作、应用更新操作以及功耗控制操作中的至少一种。If the identification module 403 determines that the user is in a sleep state, a preset operation is performed, where the preset operation includes at least one of a system update operation, an application update operation, and a power consumption control operation.
在一实施方式中,在执行预设操作之前,执行模块还用于:In one embodiment, before executing the preset operation, the execution module is also used to:
获取用户配置的作息计划;Get the work schedule configured by the user;
根据获取到的作息计划获取用户计划的睡眠区间,并判断当前是否位于计划的睡眠区间内;Obtain the sleep interval planned by the user according to the obtained schedule, and determine whether it is currently within the planned sleep interval;
若是,则执行预设操作。If yes, perform the preset operation.
在一实施方式中,在判断当前是否位于所述睡眠区间内之后,执行模块还用于:In one embodiment, after judging whether it is currently in the sleep interval, the execution module is further configured to:
若当前位于前述睡眠区间之前,则当到达前述睡眠区间之内且满足睡眠识别条件时,执行前述预设操作。If it is currently before the aforementioned sleep interval, when it reaches the aforementioned sleep interval and satisfies the sleep recognition condition, execute the aforementioned preset operation.
本申请实施例提供一种计算机可读的存储介质,其上存储有计算机程序,当其存储的计算机程序在计算机上执行时,使得计算机执行如本申请实施例提供的睡眠识别方法中的步骤。The embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the stored computer program is executed on a computer, the computer is caused to execute the steps in the sleep recognition method provided in the embodiment of the present application.
本申请实施例还提供一种电子设备,包括存储器,处理器,处理器通过调用存储器中存储的计算机程序,执行本申请实施例提供的睡眠识别方法中的步骤。An embodiment of the present application further provides an electronic device including a memory and a processor, and the processor executes the steps in the sleep recognition method provided in the embodiment of the present application by calling a computer program stored in the memory.
请参照图6,图6为本申请实施例提供的电子设备的结构示意图。该电子设备可以包括存储器601以及处理器602。本领域普通技术人员可以理解,图6中示出的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Please refer to FIG. 6, which is a schematic structural diagram of an electronic device provided by an embodiment of the application. The electronic device may include a memory 601 and a processor 602. A person of ordinary skill in the art can understand that the structure of the electronic device shown in FIG. 6 does not constitute a limitation on the electronic device, and may include more or less components than those shown in the figure, or a combination of certain components, or different component arrangements. .
存储器601可用于存储应用程序和数据。存储器601存储的应用程序中包含有可执行代码。应用程序可以组成各种功能模块。处理器602通过运行存储在存储器601的应用程序,从而执行各种功能应用以及数据处理。The memory 601 can be used to store application programs and data. The application program stored in the memory 601 contains executable code. Application programs can be composed of various functional modules. The processor 602 executes various functional applications and data processing by running application programs stored in the memory 601.
处理器602是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器601内的应用程序,以及调用存储在存储器601内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。The processor 602 is the control center of the electronic device. It uses various interfaces and lines to connect the various parts of the entire electronic device, and executes the electronic device by running or executing the application program stored in the memory 601 and calling the data stored in the memory 601 The various functions and processing data of the electronic device can be used to monitor the electronic equipment as a whole.
在本申请实施例中,电子设备中的处理器602会按照如下的指令,将一个或一个以上的音频处理程序的进程对应的可执行代码加载到存储器601中,并由处理器602来运行存储在存储器601中的应用程序,从而执行:In the embodiment of the present application, the processor 602 in the electronic device will load the executable code corresponding to the process of one or more audio processing programs into the memory 601 according to the following instructions, and the processor 602 will run and store the executable code The application program in the memory 601 thus executes:
若当前满足预设的睡眠识别条件,则获取用户在包括当日在内的多个连续自然日使用电子设备的行为特征;If the preset sleep recognition conditions are currently met, acquiring behavioral characteristics of the user using the electronic device on multiple consecutive natural days including the current day;
对获取到的多个连续自然日的行为特征进行加权求和,得到第一加权和值,其中,各自然日的行为特征所对应的权重值按照由近到远的时间顺序依次降低;Perform a weighted summation on the acquired behavior characteristics of multiple consecutive natural days to obtain a first weighted sum value, where the weight values corresponding to the behavior characteristics of each natural day decrease in order of time from near to far;
判断第一加权和值是否大于或等于预设加权和值,是则判定用户处于睡眠状态,否则判定用户不处于睡眠状态。It is judged whether the first weighted sum value is greater than or equal to the preset weighted sum value, if yes, it is judged that the user is in a sleep state, otherwise it is judged that the user is not in a sleep state.
请参照图7,图7为本申请实施例提供的电子设备的另一结构示意图,与图6所示电子设备的区别在于,电子设备还包括输入单元603和输出单元604等组件。Please refer to FIG. 7. FIG. 7 is another schematic structural diagram of the electronic device provided by an embodiment of the application. The difference from the electronic device shown in FIG. 6 is that the electronic device further includes components such as an input unit 603 and an output unit 604.
其中,输入单元603可用于接收输入的数字、字符信息或用户特征信息(比如指纹),以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入等。The input unit 603 can be used to receive inputted numbers, character information or user characteristic information (such as fingerprints), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
输出单元604可用于输出由用户输入的信息或提供给用户的信息,如扬声器等。The output unit 604 may be used to output information input by the user or information provided to the user, such as a speaker.
在本申请实施例中,电子设备中的处理器602会按照如下的指令,将一个或一个以上的音频处理程序的进程对应的可执行代码加载到存储器601中,并由处理器602来运行存储在存储器601中的应用程序,从而执行:In the embodiment of the present application, the processor 602 in the electronic device will load the executable code corresponding to the process of one or more audio processing programs into the memory 601 according to the following instructions, and the processor 602 will run and store the executable code The application program in the memory 601 thus executes:
若当前满足预设的睡眠识别条件,则获取用户在包括当日在内的多个连续自然日使用电子设备的行为特征;If the preset sleep recognition conditions are currently met, acquiring behavioral characteristics of the user using the electronic device on multiple consecutive natural days including the current day;
对获取到的多个连续自然日的行为特征进行加权求和,得到第一加权和值,其中,各自然日的行为特征所对应的权重值按照由近到远的时间顺序依次降低;Perform a weighted summation on the acquired behavior characteristics of multiple consecutive natural days to obtain a first weighted sum value, where the weight values corresponding to the behavior characteristics of each natural day decrease in order of time from near to far;
判断第一加权和值是否大于或等于预设加权和值,是则判定用户处于睡眠状态,否则判定用户不处于睡眠状态。It is judged whether the first weighted sum value is greater than or equal to the preset weighted sum value, if yes, it is judged that the user is in a sleep state, otherwise it is judged that the user is not in a sleep state.
在一实施方式中,在获取用户在包括当日在内的多个连续自然日使用电子设备的行为特征时,处理器602可以执行:In an implementation manner, when acquiring the behavior characteristics of the user using the electronic device on multiple consecutive natural days including the current day, the processor 602 may execute:
获取用户在包括当日在内的多个连续自然日中各自然日使用电子设备的多维使用信息;Obtain the multi-dimensional usage information of the electronic device used by the user in multiple consecutive natural days including the current day;
根据各自然日对应的多维使用行为信息,获取各自然日的行为特征。Obtain the behavior characteristics of each natural day according to the multi-dimensional usage behavior information corresponding to each natural day.
在一实施方式中,在根据各自然日对应的多维使用行为信息,获取各自然日的行为特征时,处理器602可以执行:In an embodiment, when acquiring the behavior characteristics of each natural day according to the multi-dimensional usage behavior information corresponding to each natural day, the processor 602 may execute:
分别对各自然日的多维使用信息进行加权求和,得到各自然日的第二加权和值;Perform a weighted summation on the multi-dimensional usage information of each calendar day to obtain the second weighted sum value of each calendar day;
将各自然日的第二加权和值作为各自然日的行为特征。The second weighted sum value of each natural day is taken as the behavior characteristic of each natural day.
在一实施方式中,在分别对各自然日的多维使用信息进行加权求和,得到各自然日的第二加权和值时,处理器602可以执行:In an embodiment, when the weighted summation of the multi-dimensional usage information of each natural day is performed to obtain the second weighted sum value of each natural day, the processor 602 may execute:
对各自然日的多维使用信息进行归一化处理;Normalize the multi-dimensional usage information of each natural day;
分别对各自然日归一化后的多维使用信息进行加权求和,得到各自然日的第二加权和值。The normalized multi-dimensional usage information of each natural day is weighted and summed to obtain the second weighted sum value of each natural day.
在一实施方式中,处理器602还可以执行:In an implementation manner, the processor 602 may further execute:
建立使用信息数据库;Establish a database of usage information;
实时记录用户使用电子设备的多维使用信息,并将记录的多维使用信息存储至使用信息数据库中;Real-time recording of the multi-dimensional usage information of users using electronic equipment, and store the recorded multi-dimensional usage information in the usage information database;
在获取用户在包括当日在内的多个连续自然日中各自然日使用电子设备的多维使用信息时,处理器602可以执行:When acquiring the multi-dimensional usage information of the electronic device used by the user on each of the multiple consecutive natural days including the current day, the processor 602 may execute:
从使用信息数据库中获取用户在包括当日在内的多个连续自然日中各自然日使用电子设备的多维使用信息。Obtain the multi-dimensional use information of the electronic device used by the user on each of the multiple consecutive natural days including the current day from the use information database.
在一实施方式中,睡眠识别条件包括:In an embodiment, the sleep recognition conditions include:
处于熄屏状态的持续时长达到第一预设时长;The duration of the screen off state reaches the first preset duration;
或者,处于静止状态的持续时长达到第二预设时长;Or, the duration of the static state reaches the second preset duration;
或者,在处于熄屏状态的持续时长达到第三预设时长时处于静止状态;Or, stay in a static state when the duration of the screen off state reaches the third preset duration;
或者,在处于静止状态的持续时长达到第四预设时长时处于熄屏状态。Or, the screen is turned off when the duration of the static state reaches the fourth preset duration.
在一实施方式中,处理器602还可以执行:In an implementation manner, the processor 602 may further execute:
若判定用户处于睡眠状态,则执行预设操作,其中,预设操作包括系统更新操作、应用更新操作以及功耗控制操作中的至少一种。If it is determined that the user is in the sleep state, a preset operation is performed, where the preset operation includes at least one of a system update operation, an application update operation, and a power consumption control operation.
在一实施方式中,在执行预设操作之前,处理器602可以执行:In an embodiment, before performing a preset operation, the processor 602 may perform:
获取用户配置的作息计划;Get the work schedule configured by the user;
根据获取到的作息计划获取用户计划的睡眠区间,并判断当前是否位于计划的睡眠区间内;Obtain the sleep interval planned by the user according to the obtained schedule, and determine whether it is currently within the planned sleep interval;
若是,则执行预设操作。If yes, perform the preset operation.
在一实施方式中,在判断当前是否位于所述睡眠区间内之后,处理器602可以执行:In an embodiment, after determining whether it is currently in the sleep interval, the processor 602 may execute:
若当前位于前述睡眠区间之前,则当到达前述睡眠区间之内且满足睡眠识别条件时,执行前述预设操作。If it is currently before the aforementioned sleep interval, when it reaches the aforementioned sleep interval and satisfies the sleep recognition condition, execute the aforementioned preset operation.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见上文针对睡眠识别方法的详细描述,此处不再赘述。In the foregoing embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in an embodiment, please refer to the detailed description of the sleep recognition method above, which will not be repeated here.
本申请实施例提供的睡眠识别装置/电子设备与上文实施例中的睡眠识别方法属于同一构思,在睡眠识别装置/电子设备上可以运行睡眠识别方法实施例中提供的任一方法,其具体实现过程详见睡眠识别方法实施例,此处不再赘述。The sleep recognition device/electronic device provided by the embodiment of the application belongs to the same concept as the sleep recognition method in the above embodiment. Any method provided in the sleep recognition method embodiment can be run on the sleep recognition device/electronic device. For the implementation process, refer to the embodiment of the sleep recognition method, which will not be repeated here.
需要说明的是,对本申请实施例睡眠识别方法而言,本领域普通技术人员可以理解实现本申请实施例睡眠识别方法的全部或部分流程,是可以通过计算机程序来控制相关的硬件来完成,计算机程序可存储于一计算机可读取存储介质中,如存储在存储器中,并被至少一个处理器执行,在执行过程中可包括如睡眠识别方法的实施例的流程。其中,的存储介质可为磁碟、光盘、只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)等。It should be noted that for the sleep recognition method of the embodiment of the present application, those of ordinary skill in the art can understand that all or part of the process of implementing the sleep recognition method of the embodiment of the present application can be completed by controlling the relevant hardware by a computer program. The program may be stored in a computer readable storage medium, such as stored in a memory, and executed by at least one processor, and may include a process such as an embodiment of the sleep recognition method during execution. Among them, the storage medium may be a magnetic disk, an optical disc, a read only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), etc.
对本申请实施例的睡眠识别装置而言,其各功能模块可以集成在一个处理芯片中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功 能模块的形式实现。集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中,存储介质譬如为只读存储器,磁盘或光盘等。For the sleep recognition device of the embodiment of the present application, its functional modules may be integrated into one processing chip, or each module may exist alone physically, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or software function modules. If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer readable storage medium, such as a read-only memory, a magnetic disk, or an optical disk.
以上对本申请实施例所提供的一种睡眠识别方法、装置、存储介质以及电子设备进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上,本说明书内容不应理解为对本申请的限制。The sleep recognition method, device, storage medium, and electronic equipment provided by the embodiments of the application are described in detail above. Specific examples are used in this article to illustrate the principles and implementations of the application. The description of the above embodiments is only It is used to help understand the method and core idea of this application; at the same time, for those skilled in the art, according to the idea of this application, there will be changes in the specific implementation and the scope of application. It should be understood as a limitation of this application.

Claims (10)

  1. 一种睡眠识别方法,应用于电子设备,其中,包括:A sleep recognition method applied to electronic equipment, including:
    若当前满足预设的睡眠识别条件,则获取用户在包含当日在内的多个连续自然日使用所述电子设备的行为特征;If the preset sleep recognition condition is currently met, acquiring behavior characteristics of the user using the electronic device on multiple consecutive natural days including the current day;
    对所述多个连续自然日的行为特征进行加权求和,得到第一加权和值,其中,各所述自然日的行为特征所对应的权重值按照由近到远的时间顺序依次降低;Performing a weighted summation on the behavior characteristics of the multiple consecutive natural days to obtain a first weighted sum value, wherein the weight value corresponding to the behavior characteristics of each natural day decreases in order of time from near to far;
    判断所述第一加权和值是否大于或等于预设加权和值,是则判定所述用户处于睡眠状态,否则判定所述用户不处于睡眠状态。It is determined whether the first weighted sum value is greater than or equal to the preset weighted sum value, if yes, it is determined that the user is in a sleep state, otherwise it is determined that the user is not in a sleep state.
  2. 根据权利要求1所述的睡眠识别方法,其中,所述获取用户在包含当日在内的多个连续自然日使用所述电子设备的行为特征,包括:The sleep recognition method according to claim 1, wherein said acquiring the behavior characteristics of the user using the electronic device on multiple consecutive natural days including the current day comprises:
    获取所述用户在各所述自然日使用所述电子设备的多维使用行为信息;Acquiring multi-dimensional usage behavior information of the user using the electronic device on each natural day;
    根据各所述自然日对应的多维使用行为信息,获取各所述自然日的行为特征。According to the multi-dimensional usage behavior information corresponding to each natural day, the behavior characteristics of each natural day are acquired.
  3. 根据权利要求2所述的睡眠识别方法,其中,所述根据各所述自然日对应的多维使用行为信息,获取各所述自然日的行为特征,包括:The sleep recognition method according to claim 2, wherein said obtaining the behavior characteristics of each natural day according to the multi-dimensional usage behavior information corresponding to each natural day comprises:
    分别对各所述自然日的多维使用信息进行加权求和,得到各所述自然日的第二加权和值;Performing a weighted summation on the multi-dimensional usage information of each natural day respectively to obtain the second weighted sum value of each natural day;
    将各所述自然日的第二加权和值作为各所述自然日的行为特征。The second weighted sum value of each natural day is taken as the behavior characteristic of each natural day.
  4. 根据权利要求3所述的睡眠识别方法,其中,所述分别对各所述自然日的多维使用信息进行加权求和,得到各所述自然日的第二加权和值,包括:The sleep recognition method according to claim 3, wherein said separately weighting and summing the multi-dimensional usage information of each of said natural days to obtain the second weighted sum value of each of said natural days comprises:
    对各所述自然日的多维使用信息进行归一化处理;Normalize the multi-dimensional usage information of each natural day;
    分别对各所述自然日归一化后的多维使用信息进行加权求和,得到各所述自然日的第二加权和值。A weighted summation is performed on the normalized multi-dimensional usage information of each natural day to obtain a second weighted sum value of each natural day.
  5. 根据权利要求1所述的睡眠识别方法,其中,所述睡眠识别条件包括:The sleep recognition method according to claim 1, wherein the sleep recognition condition comprises:
    处于熄屏状态的持续时长达到第一预设时长;The duration of the screen off state reaches the first preset duration;
    或者,处于静止状态的持续时长达到第二预设时长;Or, the duration of the static state reaches the second preset duration;
    或者,在处于熄屏状态的持续时长达到第三预设时长时处于静止状态;Or, stay in a static state when the duration of the screen off state reaches the third preset duration;
    或者,在处于静止状态的持续时长达到第四预设时长时处于熄屏状态。Or, the screen is turned off when the duration of the static state reaches the fourth preset duration.
  6. 根据权利要求1所述的睡眠识别方法,其中,所述睡眠识别方法还包括:The sleep recognition method according to claim 1, wherein the sleep recognition method further comprises:
    若判定所述用户处于睡眠状态,则执行预设操作,其中,所述预设操作包括系统更新操作、应用更新操作以及功耗控制操作中的至少一种。If it is determined that the user is in a sleep state, a preset operation is performed, where the preset operation includes at least one of a system update operation, an application update operation, and a power consumption control operation.
  7. 根据权利要求6所述的睡眠识别方法,其中,所述执行预设操作之前,还包括:The sleep recognition method according to claim 6, wherein before the performing the preset operation, the method further comprises:
    获取所述用户配置的作息计划;Obtaining the schedule configured by the user;
    根据所述作息计划获取所述用户计划的睡眠区间,并判断当前是否位于所述计划的睡眠区间内;Acquire the sleep interval planned by the user according to the schedule, and determine whether it is currently within the planned sleep interval;
    若是,则执行所述预设操作。If yes, execute the preset operation.
  8. 一种睡眠识别装置,应用于电子设备,其中,包括:A sleep recognition device applied to electronic equipment, including:
    获取模块,用于在当前满足预设的睡眠识别条件时,获取用户在包含当日在内的多个连续自然日使用所述电子设备的行为特征;The acquiring module is configured to acquire the behavior characteristics of the user using the electronic device on multiple consecutive natural days including the current day when the preset sleep recognition condition is currently met;
    加权模块,用于对所述多个连续自然日的行为特征进行加权求和,得到第一加权和值,其中,各所述自然日的行为特征所对应的权重值按照由近到远的时间顺序依次降低;The weighting module is used to perform a weighted summation on the behavior characteristics of the multiple consecutive natural days to obtain a first weighted sum value, wherein the weight value corresponding to the behavior characteristics of each natural day is based on the time from near to far The order is lowered;
    识别模块,用于判断所述第一加权和值是否大于或等于预设加权和值,是则判定所述用户处于睡眠状态,否则判定所述用户不处于睡眠状态。The identification module is used to determine whether the first weighted sum value is greater than or equal to a preset weighted sum value, if yes, it is determined that the user is in a sleep state, otherwise it is determined that the user is not in a sleep state.
  9. 一种存储介质,其上存储有计算机程序,其中,当所述计算机程序在计算机上执行时,使得所述计算机执行如权利要求1至7中任一项所述的睡眠识别方法。A storage medium having a computer program stored thereon, wherein when the computer program is executed on a computer, the computer is caused to execute the sleep identification method according to any one of claims 1 to 7.
  10. 一种电子设备,包括存储器,处理器,其中,所述处理器通过调用所述存储器中存储的计算机程序,用于执行如权利要求1至7中任一项所述的睡眠识别方法。An electronic device, comprising a memory and a processor, wherein the processor is configured to execute the sleep recognition method according to any one of claims 1 to 7 by calling a computer program stored in the memory.
PCT/CN2019/075345 2019-02-18 2019-02-18 Sleep recognition method, apparatus, storage medium, and electronic device WO2020168445A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980074358.XA CN113056756B (en) 2019-02-18 2019-02-18 Sleep recognition method and device, storage medium and electronic equipment
PCT/CN2019/075345 WO2020168445A1 (en) 2019-02-18 2019-02-18 Sleep recognition method, apparatus, storage medium, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/075345 WO2020168445A1 (en) 2019-02-18 2019-02-18 Sleep recognition method, apparatus, storage medium, and electronic device

Publications (1)

Publication Number Publication Date
WO2020168445A1 true WO2020168445A1 (en) 2020-08-27

Family

ID=72143914

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/075345 WO2020168445A1 (en) 2019-02-18 2019-02-18 Sleep recognition method, apparatus, storage medium, and electronic device

Country Status (2)

Country Link
CN (1) CN113056756B (en)
WO (1) WO2020168445A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117061658A (en) * 2023-07-11 2023-11-14 荣耀终端有限公司 Sleep time identification method, electronic device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103379126A (en) * 2012-04-11 2013-10-30 联想(北京)有限公司 Push period control method, mobile terminal and server
US20140128105A1 (en) * 2012-11-06 2014-05-08 Intertrust Technologies Corporation Activity Recognition Systems and Methods
CN105278666A (en) * 2014-12-16 2016-01-27 维沃移动通信有限公司 Method and device for obtaining work and rest time of users
CN107430716A (en) * 2015-03-31 2017-12-01 微软技术许可有限责任公司 Infer user's sleep pattern
CN107582028A (en) * 2017-09-25 2018-01-16 北京小米移动软件有限公司 Sleep monitor method and device
CN108937867A (en) * 2018-06-29 2018-12-07 出门问问信息科技有限公司 A kind of dormant monitoring method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016067448A1 (en) * 2014-10-31 2016-05-06 富士通株式会社 State display method, program, and state display device
CN105242775B (en) * 2015-09-02 2018-05-08 小米科技有限责任公司 The method and device of state adjustment
US10903665B2 (en) * 2016-11-01 2021-01-26 Microsoft Technology Licensing, Llc Usage data based battery charge or discharge time determination
CN107329778B (en) * 2017-06-08 2021-01-12 Oppo广东移动通信有限公司 System updating method and related product
CN107567083B (en) * 2017-10-16 2021-07-30 北京小米移动软件有限公司 Method and device for performing power-saving optimization processing

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103379126A (en) * 2012-04-11 2013-10-30 联想(北京)有限公司 Push period control method, mobile terminal and server
US20140128105A1 (en) * 2012-11-06 2014-05-08 Intertrust Technologies Corporation Activity Recognition Systems and Methods
CN105278666A (en) * 2014-12-16 2016-01-27 维沃移动通信有限公司 Method and device for obtaining work and rest time of users
CN107430716A (en) * 2015-03-31 2017-12-01 微软技术许可有限责任公司 Infer user's sleep pattern
CN107582028A (en) * 2017-09-25 2018-01-16 北京小米移动软件有限公司 Sleep monitor method and device
CN108937867A (en) * 2018-06-29 2018-12-07 出门问问信息科技有限公司 A kind of dormant monitoring method and device

Also Published As

Publication number Publication date
CN113056756A (en) 2021-06-29
CN113056756B (en) 2024-03-12

Similar Documents

Publication Publication Date Title
CN107644642B (en) Semantic recognition method and device, storage medium and electronic equipment
CN108733342B (en) Volume adjusting method, mobile terminal and computer readable storage medium
US8499245B1 (en) Multi-source profiling for adaptive device operation
WO2019120028A1 (en) Intelligent screen brightness adjustment method and apparatus, and storage medium and mobile terminal
JP6216880B2 (en) Method for determining and displaying power efficiency of application and terminal thereof
US20170289766A1 (en) Digital Assistant Experience based on Presence Detection
WO2015062504A1 (en) Power consumption control method and terminal
CN106293914B (en) A kind of method and terminal of task schedule
US11249645B2 (en) Application management method, storage medium, and electronic apparatus
JP2018504676A (en) Characterization of applications for machine learning on heterogeneous score devices
WO2020133418A1 (en) Application icon display method and apparatus, and storage medium and electronic device
CN108829456A (en) Application program preloads method, apparatus, storage medium and terminal
US10996922B2 (en) Electronic apparatus for processing user utterance
WO2019085749A1 (en) Application program control method and apparatus, medium, and electronic device
US20190347621A1 (en) Predicting task durations
WO2020168448A1 (en) Sleep prediction method and apparatus, and storage medium and electronic device
US20200258001A1 (en) Dynamically determining a user's availability for an activity
WO2019080607A1 (en) Control method and apparatus for household electrical appliance, storage medium, and household electrical appliance
WO2020168445A1 (en) Sleep recognition method, apparatus, storage medium, and electronic device
CN110491419A (en) A kind of control method for playing back, system and terminal device
US11620996B2 (en) Electronic apparatus, and method of controlling to execute function according to voice command thereof
CN113971130A (en) Software performance testing method, device, equipment and storage medium
CN107729144B (en) Application control method and device, storage medium and electronic equipment
WO2020168444A1 (en) Sleep prediction method and apparatus, storage medium, and electronic device
WO2020168451A1 (en) Sleep prediction method and apparatus, storage medium, and electronic device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19916045

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19916045

Country of ref document: EP

Kind code of ref document: A1