CN113056756B - Sleep recognition method and device, storage medium and electronic equipment - Google Patents

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

Info

Publication number
CN113056756B
CN113056756B CN201980074358.XA CN201980074358A CN113056756B CN 113056756 B CN113056756 B CN 113056756B CN 201980074358 A CN201980074358 A CN 201980074358A CN 113056756 B CN113056756 B CN 113056756B
Authority
CN
China
Prior art keywords
sleep
electronic device
user
natural
preset
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201980074358.XA
Other languages
Chinese (zh)
Other versions
CN113056756A (en
Inventor
戴堃
帅朝春
张寅祥
陆天洋
吴建文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
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 Guangdong Oppo Mobile Telecommunications Corp Ltd, Shenzhen Huantai Technology Co Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Publication of CN113056756A publication Critical patent/CN113056756A/en
Application granted granted Critical
Publication of CN113056756B publication Critical patent/CN113056756B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Educational Administration (AREA)
  • Game Theory and Decision Science (AREA)
  • Development Economics (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Medical Treatment And Welfare Office Work (AREA)
  • Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)

Abstract

According to the sleep recognition method, when the preset sleep recognition conditions are met currently, the electronic equipment can acquire the behavior characteristics of the user using the electronic equipment on a plurality of continuous natural days including the current day, and the behavior characteristics are weighted and summed to obtain a first weighted sum value, finally whether the first weighted sum value is larger than or equal to the preset weighted sum value is judged, whether the user is in a sleep state is determined according to the judgment result, and the accuracy of sleep recognition of the user can be improved.

Description

Sleep recognition method and device, storage medium and electronic equipment
Technical Field
The application belongs to the technical field of computers, and particularly relates to a sleep identification method, a sleep identification device, a storage medium and electronic equipment.
Background
At present, electronic devices such as tablet computers and mobile phones are configured, and when a user sleeps, the electronic devices can be subjected to operations such as system updating and the like which affect the use of the user or consume longer time, so that the influence on the use of the user is avoided. For this reason, the related art achieves the aforementioned object by performing sleep recognition on the user, such as the electronic device determining that the user is in a sleep state when the duration of the screen is turned off for a certain duration, however, the accuracy of performing sleep recognition on the user is low in the related art.
Disclosure of Invention
The embodiment of the application provides a sleep identification method, a sleep identification device, a storage medium and electronic equipment, which can enable the electronic equipment to accurately identify the sleep of a user.
In a first aspect, an embodiment of the present application provides a sleep identification method, which is applied to an electronic device, and includes:
if the preset sleep recognition condition is met currently, acquiring behavior characteristics of a user using the electronic equipment on a plurality of continuous natural days including the current day;
carrying out weighted summation on the behavior features of the plurality of continuous natural days to obtain a first weighted summation value, wherein the weight value corresponding to the behavior features of each natural day is sequentially reduced according to the time sequence from near to far;
and judging whether the first weighted sum value is larger than or equal to a preset weighted sum value, if so, judging that the user is in a sleep state, otherwise, judging that the user is not in the sleep state.
In a second aspect, an embodiment of the present application provides a sleep recognition apparatus, which is applied to an electronic device, including:
the acquisition module is used for acquiring the behavior characteristics of a user using the electronic equipment on a plurality of continuous natural days including the current day when the preset sleep recognition condition is met currently;
The weighting module is used for carrying out weighted summation on the behavior characteristics of the plurality of continuous natural days to obtain a first weighted sum value, wherein the weight value corresponding to the behavior characteristics of each natural day is sequentially reduced according to the time sequence from near to far;
the identification module is used for judging whether the first weighted sum value is larger than or equal to a preset weighted sum value, if so, judging that the user is in a sleep state, otherwise, judging that the user is not in the sleep state.
In a third aspect, embodiments of the present application provide a storage medium having a computer program stored thereon, wherein the computer program, when executed on a computer, causes the computer to perform the steps in the sleep identification method provided by embodiments of the present application.
In a fourth aspect, embodiments of the present application provide an electronic device including a memory, a processor configured to execute, by invoking a computer program stored in the memory:
if the preset sleep recognition condition is met currently, acquiring behavior characteristics of a user using the electronic equipment on a plurality of continuous natural days including the current day;
carrying out weighted summation on the behavior features of the plurality of continuous natural days to obtain a first weighted summation value, wherein the weight value corresponding to the behavior features of each natural day is sequentially reduced according to the time sequence from near to far;
And judging whether the first weighted sum value is larger than or equal to a preset weighted sum value, if so, judging that the user is in a sleep state, otherwise, judging that the user is not in the sleep state.
According to the method and the device for identifying the sleep state of the user, when the preset sleep identification condition is met currently, the electronic device can acquire the behavior characteristics of the user using the electronic device on a plurality of continuous natural days including the current day, the acquired behavior characteristics of the plurality of continuous natural days are weighted and summed to obtain a first weighted sum value, whether the first weighted sum value is larger than or equal to the preset weighted sum value is finally judged, whether the user is in the sleep state is determined according to the judging result, and accuracy of sleep identification of the user can be improved.
Drawings
The technical solution of the present application and the advantageous effects thereof will be made apparent from the following detailed description of the specific embodiments of the present application with reference to the accompanying drawings.
Fig. 1 is a flow chart of a sleep identification method according to an embodiment of the present application.
Fig. 2 is a schematic diagram of weight distribution of behavior characteristics of a plurality of consecutive natural days acquired in an embodiment of the present application.
Fig. 3 is another flow chart of a sleep identification method according to 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 according to an embodiment of the present application.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Fig. 7 is another schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Referring to the drawings, wherein like reference numerals refer to like elements throughout, the principles of the present application are illustrated as embodied in a suitable computing environment. The following description is based on the illustrated embodiments of the present application and should not be taken as limiting other embodiments not described in detail herein.
Referring to fig. 1, fig. 1 is a flow chart of a sleep recognition method according to an embodiment of the present disclosure. The sleep identification method can be applied to an electronic device. The sleep identification method comprises the following steps:
in 101, if a preset sleep recognition condition is currently satisfied, a behavior feature of a user using the electronic device on a plurality of continuous natural days including a current day is acquired.
It should be noted that, in the embodiment of the present application, the setting of the sleep recognition condition is not particularly limited, and may be set by one of ordinary skill in the art according to actual needs. For example, the sleep recognition condition may be set to be that the ambient light level of the current environment where the electronic device is located is lower than the preset brightness, so that the electronic device may detect the ambient light level of the current environment where the electronic device is located in real time, for example, the ambient light level of the current environment is detected by the set ambient light sensor, and when the ambient light level of the current environment is lower than the preset brightness, it is determined that the sleep recognition condition is currently satisfied. For another example, the sleep recognition condition may be set such that the system time of the electronic device reaches a preset time, and so on.
In the embodiment of the application, when the electronic device determines that the preset sleep recognition condition is met currently, the sleep recognition of the user is triggered, namely whether the user is in a sleep state currently is recognized. First, the electronic device obtains behavior features of a user using the electronic device on a plurality of consecutive natural days including the current day.
It should be noted that, in the embodiment of the present application, the number of natural days for acquiring the behavior feature is not specifically limited, and may be set by those of ordinary skill in the art according to actual needs. For example, the electronic device may obtain behavior characteristics of the user using the electronic device on 7 natural days (i.e., the current day and 6 natural days before the current day) including the current day; for another example, the electronic device may also obtain behavior characteristics of the user using the electronic device on 30 natural days including the current day (i.e., the current day and 29 natural days before the current day).
In 102, the obtained behavior features of a plurality of consecutive natural days are weighted and summed to obtain a first weighted sum value, wherein the weight values corresponding to the behavior features of the respective natural days are sequentially reduced according to the time sequence from near to far.
In this embodiment of the present invention, after acquiring behavior features of a user using the electronic device on a plurality of consecutive natural days including the same day, the electronic device performs weighted summation on the acquired behavior features of the plurality of consecutive natural days according to weight values corresponding to the behavior features of the respective natural days in the acquired behavior features of the plurality of natural days, and records the weighted summation value obtained at this time as a first weighted summation value.
It should be noted that, in the embodiment of the present application, the weight values corresponding to the behavior features of each natural day are sequentially reduced to be constrained according to the time sequence from near to far (in general terms, the behavior features of the natural day that is closer in time occupy higher weights, and the behavior features of the natural day that is farther in time occupy lower weights), and the specific value of the weight value corresponding to the behavior feature of each natural day is not specifically limited.
For example, referring to fig. 2, the electronic device obtains the behavior characteristics of the user on 7 natural days (respectively, the current day, and the first to sixth days before the current day) including the current day, where the weight value corresponding to the behavior characteristic on the current day is 0.5, the weight value corresponding to the behavior characteristic on the first day before the current day is 0.2, the weight value corresponding to the behavior characteristic on the second day before the current day is 0.1, the weight value corresponding to the behavior characteristic on the third day before the current day is 0.08, the weight value corresponding to the behavior characteristic on the fourth day before the current day is 0.06, the weight value corresponding to the behavior characteristic on the fifth day before the current day is 0.04, and the weight value corresponding to the behavior characteristic on the sixth day before the current day is 0.02.
In 103, it is determined whether the first weighted sum is greater than or equal to a preset weighted sum, if yes, the user is determined to be in a sleep state, otherwise, the user is determined not to be in a sleep state.
In the embodiment of the present application, after performing weighted summation on the acquired behavior features of multiple continuous natural days to obtain a first weighted sum, the electronic device determines whether the first weighted sum is greater than or equal to a preset weighted sum, to obtain a determination result, and determines whether the user is in a sleep state according to the determination result, where if the determination result is that the first weighted sum is greater than or equal to the preset weighted sum, it is determined that the user is currently in the sleep state, and if the determination result is that the first weighted sum is less than the preset weighted sum, it is determined that the user is not currently in the sleep state.
As can be seen from the foregoing, in the embodiment of the present application, when a preset sleep recognition condition is currently satisfied, the electronic device may acquire behavior features of a user using the electronic device on a plurality of continuous natural days including the current day, perform weighted summation on the acquired behavior features on the plurality of continuous natural days to obtain a first weighted sum value, and finally determine whether the first weighted sum value is greater than or equal to the preset weighted sum value, determine whether the user is in a sleep state according to a determination result, so that accuracy of performing sleep recognition on the user may be improved.
Referring to fig. 3, fig. 3 is another flow chart of the sleep recognition method according to the embodiment of the present application. The sleep identification method can be applied to an electronic device. The sleep identification method comprises the following steps:
in 201, if a preset sleep recognition condition is currently satisfied, the electronic device obtains multidimensional usage information of using the electronic device by a user on each of a plurality of consecutive natural days including the current day.
In 202, the electronic device obtains behavior features of each natural day according to the multidimensional usage behavior information corresponding to each natural day.
It should be noted that, in the embodiment of the present application, the setting of the sleep recognition condition is not particularly limited, and may be set by one of ordinary skill in the art according to actual needs.
As a first alternative embodiment, the sleep recognition condition may be configured to:
the duration in the off-screen state reaches a first preset duration.
For example, the electronic device may start the timer to count while entering the off-screen state, and use the counted time length of the timer to represent the duration time length of the electronic device in the off-screen state, where the electronic device stops the timer to count when the counted time length of the timer reaches the first preset time length or exits the off-screen state, and resets the timer. Thus, when the timing duration of the timer reaches a first preset duration, that is, when the duration in the off-screen state reaches the first preset duration, the electronic device determines that the sleep recognition condition is met currently.
As a second alternative embodiment, the sleep recognition condition may be configured to:
the duration in the stationary state reaches a second preset duration.
For example, the electronic device may start the timer to count while entering the stationary state (for example, the electronic device may detect whether there is acceleration in any direction according to the built-in triaxial acceleration sensor, if not, determine that the electronic device is in the stationary state), and use the count duration of the timer to characterize the duration of the electronic device in the stationary state, where the electronic device stops the timer to count when the count duration of the timer reaches the second preset duration or exits from the stationary state, and resets the timer. Thus, when the timing duration of the timer reaches the second preset duration, that is, the duration of the timer in the static state reaches the second preset duration, the electronic device determines that the sleep recognition condition is currently met.
As a third alternative embodiment, the sleep recognition condition may be configured to:
and when the duration in the screen-off state reaches a third preset duration, the screen-off state is in a static state.
For example, the electronic device may start the timer to count while entering the off-screen state, and use the counted time length of the timer to represent the duration time length of the electronic device in the off-screen state, where the electronic device stops the timer to count when the counted time length of the timer reaches a third preset time length or exits the off-screen state, and resets the timer. In this way, when the timing duration of the timer reaches the third preset duration, the electronic equipment judges whether the current sleep state is in the static state or not through the triaxial acceleration sensor, and if so, judges that the sleep recognition condition is met currently.
As a fourth alternative embodiment, the sleep recognition condition may be configured to:
and when the duration in the static state reaches the fourth preset duration, the screen is in a screen-off state.
For example, the electronic device may start the timer to count while entering the stationary state, and use the counted time length of the timer to characterize the duration time length of the electronic device in the stationary state, where the electronic device stops the timer to count when the counted time length of the timer reaches a fourth preset time length or exits from the stationary state, and resets the timer. Thus, when the timing time of the timer reaches the fourth preset time, the electronic equipment judges whether the current state is in the screen-off state or not, and if so, judges that the sleep recognition condition is met currently.
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 may be the same or different, and in particular, suitable values may be obtained by a person of ordinary skill in the art according to 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 may all be set to 30 minutes, so that when the duration of the electronic device in the screen-off state reaches 30 minutes, it is determined that the sleep recognition condition is satisfied; or when the duration of the electronic equipment in the static state reaches 30 minutes, judging that the sleep recognition condition is met; or the electronic equipment is in a static state when the duration of the screen-off state reaches 30 minutes, and the sleep recognition condition is judged to be met; or the electronic equipment is in a screen-off state when the duration of the static state reaches 30 minutes, and the sleep recognition condition is judged to be met.
In the embodiment of the application, when the electronic device determines that the preset sleep recognition condition is met currently, the sleep recognition of the user is triggered, namely whether the user is in a sleep state currently is recognized. First, the electronic device obtains behavior features of a user using the electronic device on a plurality of consecutive natural days including the current day. For this purpose, the electronic device acquires multidimensional usage information of the electronic device used by the user on each of a plurality of consecutive natural days including the same day, and acquires behavior characteristics of each natural day based on the multidimensional usage information corresponding to each natural day.
It should be noted that, in the embodiment of the present application, the dimension for obtaining the usage information is not specifically limited, but includes at least a time dimension describing when the user uses the electronic device, a place dimension describing where the user uses the electronic device, and an operation dimension describing how to operate the electronic device, for example, the electronic device may obtain, in the operation dimension, information describing which applications the user uses the electronic device to run, information about which phones the user uses the electronic device to make, and a power consumption rate of the electronic device.
It should be noted that, in the embodiment of the present application, the number of natural days for acquiring the behavior feature is not specifically limited, and may be set by those of ordinary skill in the art according to actual needs. For example, the electronic device may obtain behavior characteristics of the user using the electronic device on 7 natural days (i.e., the current day and 6 natural days before the current day) including the current day; for another example, the electronic device may also obtain behavior characteristics of the user using the electronic device on 30 natural days including the current day (i.e., the current day and 29 natural days before the current day).
In 203, the electronic device performs weighted summation on the behavior features of the multiple continuous natural days to obtain a first weighted sum value, where the weight values corresponding to the behavior features of the respective natural days decrease sequentially according to the time sequence from near to far.
In this embodiment of the present invention, after acquiring behavior features of a user using the electronic device on a plurality of consecutive natural days including the same day, the electronic device performs weighted summation on the acquired behavior features of the plurality of consecutive natural days according to weight values corresponding to the behavior features of the respective natural days in the acquired behavior features of the plurality of natural days, and records the weighted summation value obtained at this time as a first weighted summation value.
It should be noted that, in the embodiment of the present application, the weight values corresponding to the behavior features of each natural day are sequentially reduced to be constrained according to the time sequence from near to far (in general terms, the behavior features of the natural day that is closer in time occupy higher weights, and the behavior features of the natural day that is farther in time occupy lower weights), and the specific value of the weight value corresponding to the behavior feature of each natural day is not specifically limited.
For example, referring to fig. 2, the electronic device obtains the behavior characteristics of the user on 7 natural days (respectively, the current day, and the first to sixth days before the current day) including the current day, where the weight value corresponding to the behavior characteristic on the current day is 0.5, the weight value corresponding to the behavior characteristic on the first day before the current day is 0.2, the weight value corresponding to the behavior characteristic on the second day before the current day is 0.1, the weight value corresponding to the behavior characteristic on the third day before the current day is 0.08, the weight value corresponding to the behavior characteristic on the fourth day before the current day is 0.06, the weight value corresponding to the behavior characteristic on the fifth day before the current day is 0.04, and the weight value corresponding to the behavior characteristic on the sixth day before the current day is 0.02.
In 204, the electronic device determines whether the first weighted sum is greater than or equal to a preset weighted sum, if so, determines that the user is in a sleep state, otherwise, determines that the user is not in a sleep state.
In this embodiment of the present invention, after performing weighted summation on the acquired behavior features of multiple continuous natural days to obtain a first weighted sum, the electronic device determines whether the first weighted sum is greater than or equal to a preset weighted sum, to obtain a determination result, and determines whether the user is in a sleep state according to the determination result, where if the determination result is that the first weighted sum is greater than or equal to the preset weighted sum, the user is determined to be in the sleep state, and if the determination result is that the first weighted sum is less than the preset weighted sum, the user is determined not to be in the sleep state.
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 in a sleep state, and if the obtained first weighted sum value is 25, it is determined that the user is not currently in a sleep state.
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 application, when the electronic device determines that the user is currently in the sleep state, the electronic device executes a preset operation which is preset and 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, and may be manually configured by a user or may be configured by an electronic device by default.
For example, the electronic device may configure the system update operation as a preset operation, so as to perform the system update operation when the user is in a sleep state, and update the system to the latest version; the electronic device may also configure the application update operation as a preset operation, so as to execute the application update operation when the user is in a sleep state, update the installed application program to the latest version, and the like; the electronic device may configure the power consumption control operation as a preset operation, so as to apply a preset power consumption control policy for reducing power consumption when the user is in a sleep state, reduce power consumption of the electronic device, and so on.
For another example, referring to fig. 4, the electronic device is provided with a preset operation configuration interface, as shown in fig. 4, where the preset operation configuration interface includes a prompt message "please select an operation performed during sleep", an operation selection frame, a pull-down button, a pull-down menu, a determination button, and a cancel button, where the pull-down menu exhales according to a click operation of the pull-down button by a user, and a plurality of operations that the electronic device can perform in a sleep interval of the user are provided in the pull-down menu, such as a system update operation, an application update operation, and the like shown in fig. 4, and the user can select an operation performed by the electronic device when the electronic device sleeps according to actual needs, and click the determination button after selecting an operation that needs to be performed by the electronic device when the electronic device sleeps, to instruct the electronic device to use the operation selected by the user as the preset operation. Alternatively, if the user finds that there is no need for an operation to be performed by the electronic device while it is asleep, the cancel button may be clicked, instructing the electronic device to perform a preset operation of the default configuration.
In an embodiment, when the behavior feature of each natural day is obtained according to the multidimensional usage behavior information corresponding to each natural day, the electronic device may execute:
(1) The electronic equipment respectively carries out weighted summation on the multidimensional using information of each natural day to obtain a second weighted summation value of each natural day;
(2) The electronic device takes the second weighted sum value of the respective natural days as the behavior characteristic of the respective natural days.
In the embodiment of the present application, the usage information of each dimension in the multidimensional usage information is pre-allocated with a corresponding weight value, where the weight allocation of the multidimensional usage information in the embodiment of the present application is not specifically limited, and may be set by a person of ordinary skill in the art according to actual needs. In this way, when the electronic device obtains the behavior feature of each natural day according to the multidimensional usage behavior information corresponding to each natural day, the electronic device may weight and sum the multidimensional usage information of the natural day according to the weight value corresponding to each of the multidimensional usage information of the natural day for any one of the plurality of natural days, to obtain the second weighted sum value of the natural day. Thus, the electronic device can respectively carry out weighted summation on the multidimensional usage information of each natural day to obtain a second weighted sum value of each natural day, and the second weighted sum value of each natural day is used as the behavior characteristic of each natural day.
In an embodiment, when the weighted summation is performed on the multidimensional usage information of each natural day to obtain the second weighted summation value of each natural day, the electronic device may perform:
(1) The electronic equipment performs normalization processing on the daily multidimensional use information;
(2) The electronic equipment respectively carries out weighted summation on the multidimensional usage information normalized by the natural days to obtain a second weighted summation value of the natural days.
In order to improve the efficiency of weighted summation, when the electronic equipment performs weighted summation on the multidimensional usage information of each natural day, firstly, the multidimensional usage information of each natural day is normalized, and the usage information of different dimensions is normalized to be in the same numerical interval.
For example, for any one of the foregoing natural days, the multidimensional usage information of the natural day may be normalized to within the numerical interval [0,1] using linear function normalization, may be normalized to within the numerical interval [0,1] using 0-mean normalization, and so on.
In an embodiment, if the preset sleep recognition condition is currently met, the electronic device may further execute, before the electronic device obtains the multidimensional usage information that the user uses the electronic device on each of a plurality of consecutive natural days including the current day:
(1) The electronic equipment establishes a use information database;
(2) The electronic equipment records the multidimensional using information of the electronic equipment used by the user in real time, and stores the recorded multidimensional using information into a using information database;
and when acquiring the multi-dimensional usage information of the user using the electronic device on each of a plurality of consecutive natural days including the same day, the electronic device may perform:
the electronic device acquires, from the usage information database, multidimensional usage information in which the user uses the electronic device on each of a plurality of consecutive natural days including the current day.
In order to facilitate management of the usage information database, a local usage information database may be established by the electronic device, where the type of the database of the usage information database is not limited in the embodiments of the present application, and may be selected by those of ordinary skill in the art according to actual needs.
After the electronic equipment completes the establishment of the usage information database, the electronic equipment records the multidimensional usage information of the electronic equipment used by the user in real time in each natural day, and stores the recorded multidimensional usage information into the usage information database.
For example, the electronic device acquires behavior characteristics of the user on 7 natural days including the current day for sleep recognition of the user, and, assuming the current day is sunday, the electronic device acquires multidimensional usage information of the current day (i.e., sunday) and multidimensional usage information of monday through Saturday before the current day from the usage information database.
In an embodiment, before performing the preset operation, the electronic device may perform:
(1) The electronic equipment acquires a work and rest plan configured by a user;
(2) The electronic equipment acquires a sleep interval planned by the user according to the acquired work and rest plan, and judges whether the sleep interval is currently positioned in the planned sleep interval or not;
(3) If yes, the electronic equipment executes a preset operation.
In the embodiment of the application, when the electronic device determines that the user is currently in a sleep state, the electronic device acquires a work and rest plan configured by the user, further acquires a sleep interval of the user plan according to the acquired work and rest plan, and determines whether the user is currently located in the sleep interval of the plan, if so, the electronic device is indicated that an identification result obtained by carrying out sleep identification on the user is consistent with the work and rest plan configured by the user, and at the moment, preset operation is executed.
For example, the electronic device obtains a user configured work and rest plan of 10:30 sleep, 6:30 start, 7:00 doing something, according to the work and rest plan, the electronic device can acquire that the planned sleep interval is 10:30-6:30, and if the electronic device judges that the sleep recognition condition is met and the user is in the sleep state at 12:00, the electronic device executes preset operation.
In an embodiment, after determining whether the current sleep interval is within the sleep interval, the electronic device may further perform:
if the current sleep interval is located before the sleep interval, executing the preset operation when the current sleep interval is reached and the sleep identification condition is met.
If the judgment result that the electronic equipment is currently located in front of the sleep interval is obtained, judging whether the sleep identification condition is met or not when the electronic equipment waits for the sleep interval, if yes, executing the preset operation, otherwise, not executing the preset operation.
For example, the electronic device obtains a user configured work and rest plan of 10:30 sleep, 6:30 start, 7:00 doing something, the electronic device can acquire that the sleep interval of the user is 10:30-6:30 according to the work and rest plan, if the electronic device judges that the sleep recognition condition is met and judges that the user is in a sleep state when the sleep recognition condition is 10:00, the electronic device does not execute the preset operation at the moment, and judges whether the sleep recognition condition is met currently when the electronic device waits for 10:30, and if so, the preset operation is directly executed.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a sleep recognition device according to an embodiment of the present disclosure. The sleep recognition apparatus may be applied to an electronic device. The sleep recognition apparatus may include: an acquisition module 401, a weighting module 402 and an identification module 403.
An obtaining module 401, configured to obtain, when a preset sleep recognition condition is currently satisfied, behavior features of a user using the electronic device on a plurality of continuous natural days including a current day;
a weighting module 402, configured to perform weighted summation on the behavior features of the multiple continuous natural days acquired by the acquisition module 401 to obtain a first weighted sum value, where weight values corresponding to the behavior features of the natural days sequentially decrease according to a time sequence from near to far;
the identifying module 403 is configured to determine whether the first weighted sum is greater than or equal to a preset weighted sum, if yes, determine that the user is in a sleep state, and if not, determine that the user is not in a sleep state.
In one embodiment, in acquiring behavioral characteristics of a user using an electronic device on a plurality of consecutive natural days, including the day, the acquisition module 401 may be configured to:
acquiring multidimensional use information of using the electronic equipment by a user on each natural day in a plurality of continuous natural days including the current day;
and acquiring the behavior characteristics of each natural day according to the multidimensional use behavior information corresponding to each natural day.
In an embodiment, when acquiring the behavior feature of each natural day according to the multidimensional usage behavior information corresponding to each natural day, the acquiring module 401 may be configured to:
Respectively carrying out weighted summation on the multidimensional use information of each natural day to obtain a second weighted summation value of each natural day;
the second weighted sum of the natural days is taken as the behavior characteristic of the natural days.
In an embodiment, when the multidimensional usage information of each natural day is weighted and summed to obtain the second weighted sum value of each natural day, the obtaining module 401 may be configured to:
normalizing the multi-dimensional use information of each natural day;
and respectively carrying out weighted summation on the multidimensional usage information normalized by the natural days to obtain a second weighted summation value of the natural days.
In an embodiment, the sleep recognition device further comprises a recording module for:
establishing a usage information database;
recording multidimensional use information of the electronic equipment used by a user in real time, and storing the recorded multidimensional use information into a use information database;
in acquiring multidimensional usage information for a user to use an electronic device on each of a plurality of consecutive natural days, including the current day, the acquisition module 401 may be configured to:
multidimensional usage information is obtained from a usage information database for a user to use the electronic device on each of a plurality of consecutive natural days including the current day.
In one embodiment, the sleep recognition condition includes:
the duration in the screen-off state reaches a first preset duration;
or the duration in the static state reaches a second preset duration;
or, when the duration in the screen-off state reaches a third preset duration, the screen-off state is in a static state;
or in the screen-off state when the duration in the static state reaches the fourth preset duration.
In an embodiment, the sleep recognition apparatus further includes an execution module for:
if the recognition module 403 determines 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.
In an embodiment, before performing the preset operation, the execution module is further configured to:
acquiring a work and rest plan configured by a user;
acquiring a sleep interval planned by a user according to the acquired work and rest plan, and judging whether the sleep interval is currently positioned in the planned sleep interval;
if yes, executing a preset operation.
In one embodiment, after determining whether the current sleep interval is within the sleep interval, the execution module is further configured to:
if the current sleep interval is located before the sleep interval, executing the preset operation when the current sleep interval is reached and the sleep identification condition is met.
The present embodiments provide a computer-readable storage medium having stored thereon a computer program which, when executed on a computer, causes the computer to perform the steps in the sleep recognition method as provided by the embodiments of the present application.
The embodiment of the application also provides electronic equipment, which comprises a memory and a processor, wherein the processor executes the steps in the sleep identification method provided by the embodiment of the application by calling the computer program stored in the memory.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device may include a memory 601 and a processor 602. It will be appreciated by those of ordinary skill in the art that the electronic device structure shown in fig. 6 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The memory 601 may be used to store applications and data. The memory 601 stores an application program including executable code. Applications may constitute 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 a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing application programs stored in the memory 601 and calling data stored in the memory 601, thereby performing overall monitoring of the electronic device.
In the embodiment of the present application, the processor 602 in the electronic device loads executable codes corresponding to the processes of one or more audio processing programs into the memory 601 according to the following instructions, and the processor 602 executes the application program stored in the memory 601, so as to execute:
if the preset sleep recognition condition is met currently, acquiring behavior characteristics of the user using the electronic equipment on a plurality of continuous natural days including the current day;
carrying out weighted summation on the acquired behavior features of a plurality of continuous natural days to obtain a first weighted summation value, wherein the weight values corresponding to the behavior features of the natural days are sequentially reduced according to the time sequence from near to far;
judging whether the first weighted sum value is larger than or equal to a preset weighted sum value, if so, judging that the user is in a sleep state, otherwise, judging that the user is not in the sleep state.
Referring to fig. 7, fig. 7 is another schematic structural diagram of an electronic device according to an embodiment of the present application, which is different from the electronic device shown in fig. 6 in that the electronic device further includes an input unit 603, an output unit 604, and other components.
The input unit 603 may be used to receive input numbers, character information or user characteristic information (such as fingerprints), and to generate a keyboard, a mouse, a joystick, optical or trackball signal input, etc. in connection with user settings and function control.
The output unit 604 may be used to output information input by a user or information provided to a user, such as a speaker or the like.
In the embodiment of the present application, the processor 602 in the electronic device loads executable codes corresponding to the processes of one or more audio processing programs into the memory 601 according to the following instructions, and the processor 602 executes the application program stored in the memory 601, so as to execute:
if the preset sleep recognition condition is met currently, acquiring behavior characteristics of the user using the electronic equipment on a plurality of continuous natural days including the current day;
carrying out weighted summation on the acquired behavior features of a plurality of continuous natural days to obtain a first weighted summation value, wherein the weight values corresponding to the behavior features of the natural days are sequentially reduced according to the time sequence from near to far;
Judging whether the first weighted sum value is larger than or equal to a preset weighted sum value, if so, judging that the user is in a sleep state, otherwise, judging that the user is not in the sleep state.
In an embodiment, in acquiring behavioral characteristics of a user using an electronic device on a plurality of consecutive natural days, including the day, the processor 602 may perform:
acquiring multidimensional use information of using the electronic equipment by a user on each natural day in a plurality of continuous natural days including the current day;
and acquiring the behavior characteristics of each natural day according to the multidimensional use behavior information corresponding to each natural day.
In one embodiment, when acquiring the behavior feature of each natural day according to the multidimensional usage behavior information corresponding to each natural day, the processor 602 may perform:
respectively carrying out weighted summation on the multidimensional use information of each natural day to obtain a second weighted summation value of each natural day;
the second weighted sum of the natural days is taken as the behavior characteristic of the natural days.
In one embodiment, the processor 602 may perform, when performing weighted summation on the multidimensional usage information of each natural day to obtain a second weighted sum value of each natural day:
normalizing the multi-dimensional use information of each natural day;
And respectively carrying out weighted summation on the multidimensional usage information normalized by the natural days to obtain a second weighted summation value of the natural days.
In an embodiment, the processor 602 may also perform:
establishing a usage information database;
recording multidimensional use information of the electronic equipment used by a user in real time, and storing the recorded multidimensional use information into a use information database;
in acquiring multidimensional usage information for a user using an electronic device on each of a plurality of consecutive natural days including the day, the processor 602 may perform:
multidimensional usage information is obtained from a usage information database for a user to use the electronic device on each of a plurality of consecutive natural days including the current day.
In one embodiment, the sleep recognition condition includes:
the duration in the screen-off state reaches a first preset duration;
or the duration in the static state reaches a second preset duration;
or, when the duration in the screen-off state reaches a third preset duration, the screen-off state is in a static state;
or in the screen-off state when the duration in the static state reaches the fourth preset duration.
In an embodiment, the processor 602 may also perform:
And if the user is in the sleep state, executing preset operation, wherein the preset operation comprises at least one of system updating operation, application updating operation and power consumption control operation.
In one embodiment, before performing the preset operation, the processor 602 may perform:
acquiring a work and rest plan configured by a user;
acquiring a sleep interval planned by a user according to the acquired work and rest plan, and judging whether the sleep interval is currently positioned in the planned sleep interval;
if yes, executing a preset operation.
In one embodiment, after determining whether it is currently within the sleep interval, the processor 602 may perform:
if the current sleep interval is located before the sleep interval, executing the preset operation when the current sleep interval is reached and the sleep identification condition is met.
In the foregoing embodiments, the descriptions of the embodiments are focused on, and the portions of an embodiment that are not described in detail in the foregoing embodiments may be referred to in the foregoing detailed description of the sleep recognition method, which is not repeated herein.
The sleep identification device/electronic device provided in the embodiment of the present application belongs to the same concept as the sleep identification method in the above embodiment, and any method provided in the sleep identification method embodiment may be run on the sleep identification device/electronic device, and the specific implementation process is detailed in the sleep identification method embodiment and will not be described herein.
It should be noted that, for the sleep identification method according to the embodiment of the present application, it will be understood by those skilled in the art that all or part of the flow of implementing the sleep identification method according to the embodiment of the present application may be implemented by controlling related hardware through a computer program, where the computer program may be stored in a computer readable storage medium, such as a memory, and executed by at least one processor, and may include, during execution, the flow of the embodiment of the sleep identification method. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a random access Memory (RAM, random Access Memory), or the like.
For the sleep recognition device of the embodiment of the present application, each functional module may be integrated in one processing chip, or each module may exist alone physically, or two or more modules may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules, if implemented as software functional modules and sold or used as a stand-alone product, may also be stored on a computer readable storage medium such as read-only memory, magnetic or optical disk, etc.
The foregoing describes in detail a sleep recognition method, apparatus, storage medium and electronic device provided in the embodiments of the present application, and specific examples are applied to illustrate principles and implementations of the present application, where the foregoing description of the embodiments is only for helping to understand the method and core ideas of the present application; meanwhile, as those skilled in the art will vary in the specific embodiments and application scope according to the ideas of the present application, the contents of the present specification should not be construed as limiting the present application in summary.

Claims (7)

1. The sleep recognition method is applied to the electronic equipment and comprises the following steps:
if it is determined that the preset sleep recognition condition is met according to the current state information of the electronic device, acquiring multidimensional usage behavior information of the electronic device used by a user on each of a plurality of continuous natural days including the current day, wherein corresponding weight values are pre-allocated to the usage information of each dimension in the multidimensional usage behavior information, and the dimensions of the usage behavior information comprise: a time dimension describing when a user uses an electronic device, a place dimension describing where the user uses the electronic device, and an operation dimension describing how to operate the electronic device, the usage behavior information of the operation dimension including: information describing applications that a user uses to run the electronic device, information of telephones that the user uses to dial, and information of power consumption rate of the electronic device;
Carrying out normalization processing on the multidimensional usage behavior information of each natural day so as to normalize the usage information of different dimensions to the same numerical interval;
for any one of a plurality of natural days, according to weight values corresponding to each dimension of the multidimensional usage behavior information of the natural days, carrying out weighted summation on the multidimensional usage behavior information normalized by the natural days to obtain second weighted sum values of the natural days, and taking the second weighted sum values of the natural days as behavior characteristics of the natural days;
carrying out weighted summation on the behavior characteristics of the natural days to obtain a first weighted sum value, wherein the weight value corresponding to the behavior characteristics of the natural days is sequentially reduced according to the time sequence from near to far;
and judging whether the first weighted sum value is larger than or equal to a preset weighted sum value, if so, judging that the user is in a sleep state, otherwise, judging that the user is not in the sleep state.
2. The sleep identification method as set forth in claim 1, wherein the sleep identification condition includes:
the duration in the screen-off state reaches a first preset duration;
or the duration in the static state reaches a second preset duration;
Or, when the duration in the screen-off state reaches a third preset duration, the screen-off state is in a static state;
or in the screen-off state when the duration in the static state reaches the fourth preset duration.
3. The sleep identification method as set forth in claim 1, wherein the sleep identification method further includes:
and if the user is in the sleep state, executing preset operation, wherein the preset operation comprises at least one of system updating operation, application updating operation and power consumption control operation.
4. The sleep identification method as set forth in claim 3, wherein, before the performing the preset operation, further comprising:
acquiring a work and rest plan configured by the user;
acquiring a sleep interval of the user plan according to the work and rest plan, and judging whether the sleep interval is currently positioned in the sleep interval of the plan;
if yes, executing the preset operation.
5. A sleep recognition device applied to an electronic device, comprising:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring multidimensional usage behavior information of the electronic equipment used by a user on a plurality of continuous natural days including the current day when the current meeting of preset sleep recognition conditions is determined according to the current state information of the electronic equipment, wherein corresponding weight values are pre-allocated to the usage information of each dimension in the multidimensional usage behavior information, and the dimensions of the usage behavior information comprise: a time dimension describing when a user uses an electronic device, a place dimension describing where the user uses the electronic device, and an operation dimension describing how to operate the electronic device, the usage behavior information of the operation dimension including: information describing applications that a user uses to run the electronic device, information of telephones that the user uses to dial, and information of power consumption rate of the electronic device;
The weighting module is used for carrying out normalization processing on the multidimensional usage behavior information of each natural day so as to normalize the usage information of different dimensions into the same numerical value interval; for any one of a plurality of natural days, according to weight values corresponding to each dimension of the multidimensional usage behavior information of the natural days, carrying out weighted summation on the multidimensional usage behavior information normalized by the natural days to obtain second weighted sum values of the natural days, and taking the second weighted sum values of the natural days as behavior characteristics of the natural days; carrying out weighted summation on the behavior characteristics of the natural days to obtain a first weighted sum value, wherein the weight value corresponding to the behavior characteristics of the natural days is sequentially reduced according to the time sequence from near to far;
the identification module is used for judging whether the first weighted sum value is larger than or equal to a preset weighted sum value, if so, judging that the user is in a sleep state, otherwise, judging that the user is not in the sleep state.
6. A storage medium having stored thereon a computer program, wherein the computer program, when executed on a computer, causes the computer to perform the sleep identification method as claimed in any one of claims 1 to 4.
7. An electronic device comprising a memory, a processor, wherein the processor is configured to perform the sleep identification method of any one of claims 1 to 4 by invoking a computer program stored in the memory.
CN201980074358.XA 2019-02-18 2019-02-18 Sleep recognition method and device, storage medium and electronic equipment Active CN113056756B (en)

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 (2)

Publication Number Publication Date
CN113056756A CN113056756A (en) 2021-06-29
CN113056756B true CN113056756B (en) 2024-03-12

Family

ID=72143914

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201980074358.XA Active CN113056756B (en) 2019-02-18 2019-02-18 Sleep recognition method and device, storage medium and electronic equipment

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
CN105242775A (en) * 2015-09-02 2016-01-13 小米科技有限责任公司 State adjustment method and apparatus
CN105278666A (en) * 2014-12-16 2016-01-27 维沃移动通信有限公司 Method and device for obtaining work and rest time of users
CN107329778A (en) * 2017-06-08 2017-11-07 广东欧珀移动通信有限公司 The method and Related product of system update
CN107430716A (en) * 2015-03-31 2017-12-01 微软技术许可有限责任公司 Infer user's sleep pattern
CN107567083A (en) * 2017-10-16 2018-01-09 北京小米移动软件有限公司 The method and apparatus for carrying out power saving optimization processing
CN107582028A (en) * 2017-09-25 2018-01-16 北京小米移动软件有限公司 Sleep monitor method and device

Family Cites Families (5)

* 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
WO2014074513A1 (en) * 2012-11-06 2014-05-15 Intertrust Technologies Corporation Activity recognition systems and methods
JP6337972B2 (en) * 2014-10-31 2018-06-06 富士通株式会社 Status display method, program, and status display device
US10903665B2 (en) * 2016-11-01 2021-01-26 Microsoft Technology Licensing, Llc Usage data based battery charge or discharge time determination
CN108937867A (en) * 2018-06-29 2018-12-07 出门问问信息科技有限公司 A kind of dormant monitoring method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN105242775A (en) * 2015-09-02 2016-01-13 小米科技有限责任公司 State adjustment method and apparatus
CN107329778A (en) * 2017-06-08 2017-11-07 广东欧珀移动通信有限公司 The method and Related product of system update
CN107582028A (en) * 2017-09-25 2018-01-16 北京小米移动软件有限公司 Sleep monitor method and device
CN107567083A (en) * 2017-10-16 2018-01-09 北京小米移动软件有限公司 The method and apparatus for carrying out power saving optimization processing

Also Published As

Publication number Publication date
CN113056756A (en) 2021-06-29
WO2020168445A1 (en) 2020-08-27

Similar Documents

Publication Publication Date Title
CN108733342B (en) Volume adjusting method, mobile terminal and computer readable storage medium
CN109951594A (en) Intelligent adjusting method, device, storage medium and the mobile terminal of screen intensity
CN106648747B (en) Process preloading processing method and device
CN109947496B (en) Application program preloading method and device, storage medium and mobile terminal
US11249645B2 (en) Application management method, storage medium, and electronic apparatus
CN107610698A (en) A kind of method for realizing Voice command, robot and computer-readable recording medium
CN104967731B (en) A kind of terminal notifying method and terminal
CN106569585A (en) Method and terminal of managing application program process
WO2020133418A1 (en) Application icon display method and apparatus, and storage medium and electronic device
WO2019085749A1 (en) Application program control method and apparatus, medium, and electronic device
CN107193527A (en) A kind of audio control method, terminal and computer-readable recording medium
CN115408696B (en) Application identification method and electronic equipment
CN107943571B (en) Background application control method and device, storage medium and electronic equipment
CN113056756B (en) Sleep recognition method and device, storage medium and electronic equipment
CN108197002A (en) Mobile equipment is without burying point data statistical method, system, terminal and medium
CN107832131B (en) Application program closing method and device, storage medium and electronic equipment
CN112997148A (en) Sleep prediction method, device, storage medium and electronic equipment
CN106445698B (en) Method and device for acquiring step counting data
CN106648916B (en) Method and device for reporting pedometer message
CN107154996B (en) Incoming call interception method and device, storage medium and terminal
CN113170018A (en) Sleep prediction method, device, storage medium and electronic equipment
CN112463626B (en) Memory leakage positioning method and device, computer equipment and storage medium
CN111355848B (en) Positioning control method and device of electronic equipment, storage medium and electronic equipment
CN107844375B (en) Using method for closing, device, storage medium and electronic equipment
CN109799715B (en) Data receiving method, device and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant