WO2024051790A1 - 睡眠状态检测方法、电子设备及系统 - Google Patents

睡眠状态检测方法、电子设备及系统 Download PDF

Info

Publication number
WO2024051790A1
WO2024051790A1 PCT/CN2023/117593 CN2023117593W WO2024051790A1 WO 2024051790 A1 WO2024051790 A1 WO 2024051790A1 CN 2023117593 W CN2023117593 W CN 2023117593W WO 2024051790 A1 WO2024051790 A1 WO 2024051790A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
display screen
status
time period
axis
Prior art date
Application number
PCT/CN2023/117593
Other languages
English (en)
French (fr)
Inventor
屈婷
张晓武
Original Assignee
荣耀终端有限公司
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 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Publication of WO2024051790A1 publication Critical patent/WO2024051790A1/zh

Links

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/02Detecting, measuring or recording pulse, heart rate, blood pressure or blood flow; Combined pulse/heart-rate/blood pressure determination; Evaluating a cardiovascular condition not otherwise provided for, e.g. using combinations of techniques provided for in this group with electrocardiography or electroauscultation; Heart catheters for measuring blood pressure
    • A61B5/024Detecting, measuring or recording pulse rate or heart rate
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/145Measuring characteristics of blood in vivo, e.g. gas concentration, pH value; Measuring characteristics of body fluids or tissues, e.g. interstitial fluid, cerebral tissue
    • A61B5/1455Measuring characteristics of blood in vivo, e.g. gas concentration, pH value; Measuring characteristics of body fluids or tissues, e.g. interstitial fluid, cerebral tissue using optical sensors, e.g. spectral photometrical oximeters

Definitions

  • the present application relates to the field of terminals, and in particular to a sleep state detection method, electronic equipment and system.
  • the current algorithm used by wearable devices to detect the user's sleep state often causes the electronic device to misjudge the user's sleep state, resulting in a large error between the sleep data obtained by the wearable device and the real sleep data. Sleep data issues such as low accuracy.
  • the present application provides a sleep state detection method, electronic device and system, which enables indirect determination of the user's behavior (for example, whether to use the electronic device 100) through the display screen status of the electronic device 100, and simultaneously obtains the information by combining the ACC sensor and the PPG sensor.
  • the data information obtained is used to detect the user's sleep data. In this way, the probability of misjudgment of the user's sleep state can be reduced, and the accuracy of the user's sleep state judgment can be improved.
  • the power consumption of the electronic device 200 can also be reduced, and the accuracy of obtaining the user's sleep data can be improved.
  • embodiments of the present application provide a detection system, including: a first electronic device and a second electronic device.
  • the first electronic device and the second electronic device establish a communication connection, wherein: the second electronic device uses Then, when the second electronic device determines that the user is in a suspected sleep state through the acceleration ACC sensor, it sends a display screen state detection instruction to the first electronic device.
  • the first electronic device is configured to, in response to the display screen status detection instruction, acquire the display screen status of the first electronic device every first time period.
  • the first electronic device is also configured to send the first status to the second electronic device when the first electronic device determines that the first electronic device is in a non-use state based on the display screen status obtained every first time period. information.
  • the first status information is used to indicate that the first electronic device is in a non-use state.
  • the second electronic device is also configured to, when the second electronic device receives the first status information, detect the user's sleep data through the photoplethysmography PPG sensor.
  • the second electronic device when the electronic device determines that the user is in a suspected sleep state, is specifically configured to: the second electronic device is configured to detect the x-axis, y-axis in real time through the ACC sensor axis and z-axis acceleration value on. The second electronic device is further configured to store the acceleration value of the x-axis, the acceleration value of the y-axis, and the acceleration value of the z-axis within the first time period. The second electronic device is also configured to, when the second electronic device detects that within the second time period, the acceleration value of the x-axis, the acceleration value of the y-axis, and the acceleration value of the z-axis are all less than the first threshold. , confirming that the user is in a suspected sleep state.
  • the first time period includes the second time period.
  • the first electronic device when the first electronic device determines that the first electronic device is in a non-use state based on the display screen status obtained every first time period, the first electronic device is specifically configured to: The first electronic device is configured to record the display screen status obtained every first time period. The first electronic device is also configured to, when the first electronic device determines that within the third time period, the display screen status of the first electronic device is in the on-screen state for greater than a second time period, determine that the first electronic device In non-use condition.
  • the first electronic device is configured to, in response to the display screen status detection instruction, after acquiring the display screen status of the first electronic device every first period of time, the first electronic device further Used to send the display screen status obtained every first time period to the second electronic device.
  • the second electronic device is configured to detect the user's sleep data through a PPG sensor when it is determined that the first electronic device is in a non-use state based on the display screen status obtained every first time period.
  • embodiments of the present application provide a sleep state detection method, applied to a second electronic device.
  • the method includes: establishing a communication connection between the second electronic device and the first electronic device.
  • the second electronic device determines that the user is in a suspected sleep state through the ACC sensor
  • the second electronic device sends a display screen state detection instruction to the first electronic device.
  • the second electronic device receives the first status information sent by the first electronic device.
  • the first status information is used to indicate that the first electronic device is in a non-use state
  • the first status information is the display screen status of the first electronic device based on the first electronic device obtained every first time period, the determined information.
  • the second electronic device detects the user's sleep data through the PPG sensor.
  • the second electronic device when the second electronic device determines that the user is in a suspected sleep state through the acceleration ACC sensor, the second electronic device sends a display screen status detection instruction to the first electronic device, specifically including: the third electronic device
  • the two electronic devices detect the acceleration values on the x-axis, y-axis and z-axis in real time through the ACC sensor.
  • the second electronic device stores the acceleration value of the x-axis, the acceleration value of the y-axis, and the acceleration value of the z-axis within the first time period.
  • the second electronic device determines that the user is in Suspected to be asleep.
  • the first time period includes the second time period.
  • the second electronic device sends a display screen status detection instruction to the first electronic device.
  • embodiments of the present application provide an electronic device, which is a second electronic device and includes one or more processors, one or more memories, and a display screen.
  • the one or more memories are coupled to one or more processors, and the one or more memories are used to store computer program code.
  • the computer program code includes computer instructions that, when executed by the one or more processors, cause The electronic device performs the method in any possible implementation manner of the second aspect.
  • embodiments of the present application provide a computer-readable storage medium, including computer instructions.
  • the electronic device When the computer instructions are run on the electronic device, the electronic device causes the electronic device to execute the method in any possible implementation manner of the second aspect above.
  • embodiments of the present application provide a chip or chip system, including a processing circuit and an interface circuit.
  • the interface circuit is used to receive code instructions and transmit them to the processing circuit.
  • the processing circuit is used to run the code instructions to execute Methods in any possible implementation of the second aspect above.
  • embodiments of the present application provide a computer program product that, when run on an electronic device, causes the electronic device to execute the method in any of the possible implementations of the second aspect.
  • Figure 1 is a schematic architectural diagram of a communication system 10 provided by an embodiment of the present application.
  • Figure 2 is a schematic diagram of the hardware structure of an electronic device 100 provided by an embodiment of the present application.
  • Figure 3 is a schematic diagram of the hardware structure of an electronic device 200 provided by an embodiment of the present application.
  • Figure 4 is a specific flow diagram of a sleep state detection method provided by an embodiment of the present application.
  • FIG. 5 is a specific flow diagram of another sleep state detection method provided by an embodiment of the present application.
  • Figure 6 is a schematic diagram of a software architecture applied to the communication system 10 provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of another software architecture applied to the communication system 10 provided by an embodiment of the present application.
  • FIG. 1 exemplarily shows a schematic architectural diagram of a communication system 10 provided by an embodiment of the present application.
  • the communication system 10 may include: an electronic device 100 and an electronic device 200 .
  • the electronic device 100 may also be called the first electronic device
  • the electronic device 100 may be a mobile phone, a tablet computer, a PC, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (Personal Digital Assistant, PDA) or other electronic devices. equipment. This application does not place any restrictions on the specific type of the electronic device 100 .
  • the electronic device 200 (which may also be called a second electronic device) may be a wearable device such as a smart watch or a smart bracelet, a portable device, an augmented reality (AR)/virtual reality (VR) device, or other electronic device. equipment. This application does not place any restrictions on the specific type of the electronic device 200 .
  • the electronic device 100 can establish a wireless communication connection with the electronic device 200, and the electronic device 200 100 and the electronic device 200 can transmit data information to each other through the above-mentioned wireless communication connection.
  • the electronic device 200 can send a display screen status detection instruction and/or the user's sleep data and other data information to the electronic device 100 through a wireless communication connection
  • the electronic device 100 can send a display screen status to the electronic device 200 through a wireless communication connection, and /or, data information such as device status of the electronic device 100 .
  • sleep data may refer to: in the user's entire sleep time period, the time occupied by each sleep state such as light sleep state, deep sleep state, and rapid eye movement state, and their respective proportions in the sleep time period. wait.
  • the wireless communication connection may be one of Bluetooth, wireless fidelity direct (wireless fidelity direct, Wi-Fi direct), or wireless fidelity software access point (wireless fidelity software access point, Wi-Fi softAP), etc. or multiple wireless communication connections.
  • the electronic device 100 can establish a wired communication connection with the electronic device 200 for data exchange.
  • the electronic device 100 and the electronic device 200 can establish a wired connection through a universal serial bus (USB), and transmit data information to each other based on the above-mentioned wired communication connection.
  • USB universal serial bus
  • the exemplary communication system architecture shown in the embodiment of the present application does not constitute a specific limitation on the communication system 10.
  • the communication system 10 may include more or less than those shown in the figure.
  • Electronic equipment may also include different types of electronic equipment than those shown in the figure.
  • the communication system 10 may also include multiple electronic devices 100 that establish wireless/wired communication connections with the electronic devices 200, such as displays with communication functions, and/or tablets, and/or PCs, etc. This application does not cover this. limit.
  • FIG. 2 is a schematic diagram of the hardware structure of an electronic device 100 provided by an embodiment of the present application.
  • the electronic device 100 may include: a processor 101, a memory 102, a wireless communication module 103, a display screen 104, and a sensor module 105.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may also include more or less components than shown in the figures, or some components may be combined, some components may be separated, or some components may be arranged differently.
  • the components illustrated may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 101 may include one or more processor units.
  • the processor 101 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (GPU), or an image signal processor. (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc.
  • application processor application processor
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • baseband processor baseband processor
  • neural network processor neural-network processing unit
  • NPU neural-network processing unit
  • the controller can generate operation control signals based on the instruction operation code and timing signals to complete the control of fetching and executing instructions.
  • the processor 101 may also be provided with a memory for storing instructions and data.
  • the memory in processor 101 is cache memory. This memory may hold instructions or data that have been recently used or recycled by the processor 101 . If the processor 101 needs to use the instructions or data again, it can be called directly from the memory. Repeated access is avoided and the waiting time of the processor 101 is reduced, thereby improving the efficiency of the system.
  • processor 101 may include one or more interfaces.
  • Interfaces may include integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, pulse code modulation (pulse code modulation, PCM) interface, universal asynchronous receiver and transmitter (universal asynchronous receiver/transmitter (UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and /or USB interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • UART universal asynchronous receiver and transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB interface etc.
  • Memory 102 is coupled to processor 101 for storing various software programs and/or sets of instructions.
  • the memory 102 may include volatile memory (volatile memory), such as random access memory (RAM); it may also include non-volatile memory (non-vlatile memory), such as ROM or flash memory.
  • volatile memory volatile memory
  • non-vlatile memory such as ROM or flash memory.
  • Memory flash memory
  • hard disk drive Hard Disk Drive, HDD
  • SSD solid state drive
  • the memory 102 may also include a combination of the above types of memory.
  • the memory 102 can also store some program codes, so that the processor 101 can call the program codes stored in the memory 102 to implement the implementation method of the embodiment of the present application in the electronic device 100 .
  • the memory 102 can store operating systems, such as uCOS, VxWorks, RTLinux and other embedded operating systems.
  • the wireless communication module 103 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (bluetooth, BT), and global navigation satellites.
  • WLAN wireless local area networks
  • System global navigation satellite system, GNSS
  • frequency modulation frequency modulation, FM
  • near field communication technology near field communication, NFC
  • infrared technology infrared, IR
  • the wireless communication module 103 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 103 receives electromagnetic waves via an antenna, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 101 .
  • the wireless communication module 103 can also receive the signal to be sent from the processor 101, perform frequency modulation and amplification on it, and convert it into electromagnetic waves through the antenna for radiation.
  • the electronic device 100 can also detect or scan devices near the electronic device 100 by transmitting signals through the Bluetooth module (not shown in Figure 2) and the WLAN module (not shown in Figure 2) in the wireless communication module 103. and establishes a wireless communication connection with the nearby device to transmit data.
  • the Bluetooth module can provide one or more Bluetooth communication solutions including classic Bluetooth (basic rate/enhanced data rate, BR/EDR) or Bluetooth low energy (bluetooth low energy, BLE).
  • the WLAN module can provide solutions including Solutions for one or more WLAN communications among Wi-Fi direct, Wi-Fi LAN or Wi-Fi softAP.
  • Display 104 may be used to display images, videos, etc.
  • Display 104 may include a display panel.
  • the display panel can use a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode).
  • LED organic light-emitting diode
  • AMOLED organic light-emitting diode
  • FLED flexible light-emitting diode
  • Miniled MicroLed, Micro-oLed, quantum dot light emitting diode (QLED), etc.
  • the electronic device 100 may include 1 or N display screens 104, where N is a positive integer greater than 1.
  • the sensor module 105 may include a plurality of sensing devices, such as a touch sensor (not shown in the figure) and the like. Touch sensors may also be referred to as "touch devices.”
  • the touch sensor can be disposed on the display screen 104, and the touch sensor and the display screen 104 form a touch screen, which is also called a "touch screen”. Touch sensors can be used to detect touches on or near them.
  • the electronic device 100 shown in FIG. 2 is only used for illustrative explanation of the electronic device provided by this application.
  • the hardware structure of the device does not constitute a specific limitation on this application.
  • FIG. 3 is a schematic diagram of the hardware structure of an electronic device 200 provided by an embodiment of the present application.
  • the electronic device 200 may include: a processor 201, a memory 202, a wireless communication module 203, a power switch 204, a display screen 205, a sensor module 206, etc.
  • a processor 201 a memory 202
  • a wireless communication module 203 a power switch 204
  • a display screen 205 a display screen 205
  • a sensor module 206 a sensor module 206
  • Each of the above modules can be connected through a bus or other means. In the embodiment of this application, the connection through a bus is taken as an example.
  • Processor 201 may be used to read and execute computer readable instructions.
  • the processor 201 may mainly include a controller, arithmetic unit, and a register.
  • the controller is mainly responsible for decoding instructions and issuing control signals for operations corresponding to the instructions.
  • the arithmetic unit is mainly responsible for saving register operands and intermediate operation results temporarily stored during instruction execution.
  • the hardware architecture of the processor 201 may be an application specific integrated circuit (ASIC) architecture, a MIPS architecture, an ARM architecture, or an NP architecture, etc.
  • ASIC application specific integrated circuit
  • Memory 202 is coupled to processor 201 for storing various software and/or sets of instructions.
  • memory 202 may include high-speed random access memory, and may also include non-volatile memory, such as one or more disk storage devices, flash memory devices, or other non-volatile solid-state storage devices.
  • the memory 202 can also store a communication program, which can be used to communicate with the electronic device 100, or other electronic devices.
  • the wireless communication module 203 may include a Bluetooth communication module 203A or others.
  • the electronic device 200 may receive or transmit wireless signals through one or more Bluetooth communication solutions in the Bluetooth communication module 203A to establish a wireless communication connection with the electronic device 100 .
  • the electronic device 200 can obtain the data information transmitted by the electronic device 100 through the above-mentioned wireless communication connection, and can also send data instructions to the electronic device 100 through the above-mentioned wireless communication connection.
  • the Bluetooth communication module 203A can provide a solution including one or more Bluetooth communication among BR/EDR or BLE.
  • the wireless communication module 203 may also include a WLAN communication module (not shown in Figure 3), which may provide one or more of Wi-Fi direct, Wi-Fi LAN or Wi-Fi softAP. A solution for WLAN communication.
  • the electronic device 200 can establish a wireless communication connection with the electronic device 100 through the wireless communication technology provided by the WLAN module, and perform data interaction with the electronic device 200 based on the wireless communication connection.
  • the power switch 204 may be used to control power supply to the electronic device 200 .
  • the sensor module 206 may include a touch sensor 206A, an acceleration (ACC) sensor 206B, a photoplethysmography (PPG) sensor 206C, and the like. in:
  • Touch sensor 206A may also be referred to as a "touch device.”
  • the touch sensor 206A may be provided on the display screen 205 .
  • the touch screen composed of the touch sensor 206A and the display screen 205 may also be called a "touch screen”.
  • Touch sensor 206A may be used to detect touches on or near it.
  • the ACC sensor 206B may be used to detect the magnitude of acceleration of the electronic device 200 in various directions (generally x, y, and z axes). For example, when the electronic device 200 is stationary, the ACC sensor 206B can detect the magnitude and direction of gravity.
  • the PPG sensor 206C can be used to measure the user's heart rate, and/or blood oxygen saturation and other physiological data of the human body. Taking the detection of the user's heart rate as an example, in a specific implementation, the PPG sensor 206C can emit a light signal of a specified wavelength, which can illuminate the arteries under the skin tissue and be reflected back to the PPG sensor 206C. When the heart beats, the contraction and expansion of blood vessels will change the blood volume in the arteries, thus affecting the absorption or attenuation of light signals by the arteries, thereby affecting the reflection of the light signals. The PPG sensor 206C can detect the user's heart rate based on changes in the reflected light signal. It should be noted that the PPG sensor 206C can also detect the user's heart rate through other methods, which is not limited by this application.
  • the electronic device 200 may include one or more physical buttons.
  • the one or more physical keys may receive input operations performed by the user on the keys (for example, pressing the physical keys).
  • the electronic device 200 may perform an operation corresponding to the control shown on the display screen corresponding to the physical key.
  • the electronic device 200 may also include a USB interface.
  • the electronic device 200 may establish a wired communication connection with the electronic device 100 through the USB interface, and transmit data information to each other through the wired communication connection.
  • the electronic device 200 shown in FIG. 3 is only an implementation manner of the embodiment of the present application, and does not constitute a specific limitation on the electronic device 200.
  • the electronic device 200 may be a smart watch, and the electronic device 200 may further include a watch strap and a dial.
  • the dial may include a display screen 205 for displaying images, videos, controls, text information, and the like.
  • the watch strap can be used to fix the electronic device 200 to the limbs of the human body for easy wearing.
  • the electronic device 200 may also include more or fewer components than shown in the figure, which is not limited here.
  • the electronic device 200 can be fixed on the user's wrist through a watch strap.
  • the electronic device 200 can detect whether the user is asleep through the ACC sensor and the PPG sensor.
  • the electronic device 200 may determine that the user is in a sleep state.
  • the above process of detecting whether the user is in a sleep state often causes the electronic device 200 to misjudge that the user has entered a sleep state.
  • the electronic device 200 can detect through the ACC sensor that the acceleration values on the x-axis, y-axis, and z-axis are less than the specified threshold. A1, and the user's heart rate is less than or equal to the specified threshold A2 and remains for a certain period of time. Therefore, the electronic device 200 determines that the user is in a sleep state.
  • the user has not fallen asleep and is still awake.
  • the above-mentioned misjudgment of sleep status will lead to problems such as large errors between the sleep data obtained by the electronic device and the real sleep data, and low accuracy of the sleep data.
  • embodiments of the present application provide a sleep state detection method.
  • this method can be applied to the aforementioned communication system 10.
  • the electronic device 200 may determine that the user is in a suspected sleep state through the ACC sensor. Then, the electronic device 200 may send a display screen status detection instruction to the electronic device 100 . After the electronic device 100 receives the display screen status detection instruction, the electronic device 100 can obtain the display screen status of the electronic device 100 . The electronic device 100 or the electronic device 200 can determine the device status of the electronic device 100 according to the display screen status of the electronic device 100 .
  • the device of the electronic device 100 The status can be divided into: use status and non-use status.
  • the usage state refers to the user using the electronic device 100
  • the non-use state refers to the user not using the electronic device 100 .
  • the electronic device 200 can detect the user's sleep data through the data information of the PPG sensor.
  • the electronic device 200 determines that the device status of the electronic device 100 is in use according to the display screen status of the electronic device 100, the electronic device 200 will not detect the user's sleep data through the data information of the PPG sensor.
  • the electronic device 200 may clear the acceleration data acquired by the ACC sensor.
  • the sleep detection method provided by the embodiment of the present application can indirectly determine the user's behavior (for example, whether to use the electronic device 100) through the display screen state of the electronic device 100, and at the same time combine with the ACC sensor and the data information obtained by the PPG sensor to detect the user's sleep data.
  • the probability of misjudgment of the user's sleep state can be reduced, and the accuracy of the user's sleep state judgment can be improved.
  • the power consumption of the electronic device 200 can also be reduced, and the accuracy of obtaining the user's sleep data can be improved.
  • FIG. 4 exemplarily shows a specific flow chart of a sleep state detection method provided by an embodiment of the present application.
  • the electronic device 100 and the electronic device 200 establish a wireless communication connection.
  • the wireless communication connection is a Bluetooth connection as an example.
  • the electronic device 100 can detect or scan the electronic device 200 by transmitting signals through the Bluetooth module, establish a wireless communication connection with the electronic device 200, and transmit data information to each other.
  • the Bluetooth module can provide one or more Bluetooth communication solutions including BR/EDR or BLE.
  • the electronic device 100 can also transmit signals through the WLAN module to detect or scan the electronic device 200, establish a wireless communication connection with the electronic device 200, and transmit data information to each other.
  • the WLAN module can provide one or more WLAN communication solutions including Wi-Fi direct, Wi-Fi LAN or Wi-Fi softAP.
  • the electronic device 100 can also establish a wireless communication connection with the electronic device 200 through frequency modulation (FM), near field communication (NFC) or infrared technology (infrared, IR). and transmit data information to each other based on the above-mentioned wireless communication connection.
  • FM frequency modulation
  • NFC near field communication
  • IR infrared technology
  • the electronic device 200 determines whether the user is in a suspected sleep state through the ACC sensor.
  • the electronic device 200 can detect acceleration values on the x-axis, y-axis, and z-axis in real time through the ACC sensor.
  • the electronic device 200 may store the acceleration values of the above three axes within a specified time period C1 (which may also be referred to as the first time period, for example, within the past 30 minutes).
  • the electronic device 200 detects that in the specified time period C2 (which may also be referred to as the second time period, for example, in the past 10 minutes)
  • the acceleration values of the above three axes are less than the specified threshold A1 (which may also be referred to as the first time period).
  • electronic equipment 200 can determine that the user is in a suspected sleep state.
  • Electronic device 200 may perform the following steps. Otherwise, the electronic device 200 determines that the user is not in a suspected sleep state, and the electronic device 200 can continue to perform the process of this step.
  • the electronic device 200 can store the acceleration values of the above three axes within a specified time period C1 (for example, within the past 30 minutes).
  • the electronic device 200 detects that the acceleration values of the above three axes are less than the specified threshold A1 (for example, 1.1m/s ⁇ 2) in the specified time period C2 (for example, in the past 10 minutes)
  • the electronic device 200 may determine that the user In a suspected sleep state.
  • the electronic device 200 determines that the user is in a suspected sleep state, the electronic device 200 sends a display screen state detection instruction to the first application in the electronic device 100 .
  • the electronic device 200 may send a display screen status detection instruction to the first application in the electronic device 100 based on the wireless communication connection established in S401.
  • the electronic device 200 can send a display screen status detection instruction to the first application in the electronic device 100 based on the Bluetooth connection.
  • the electronic device 100 After the first application in the electronic device 100 receives the display screen status detection instruction, the electronic device 100 obtains the display screen status of the electronic device 100 through the first application every specified time period B1 (for example, every 3 seconds).
  • the specified function/specified service in the display screen status detection module in the electronic device 100 can detect the status of the display screen on the electronic device 100 . Then, the first application in the electronic device 100 can obtain the display of the electronic device 100 detected by the above specified function/specified service every specified time period B1 (which can also be called the first time period, for example, every 3 seconds). screen status.
  • the display screen status detection module may be located at the application framework layer of the electronic device 100 .
  • the electronic device 100 may detect that the display screen is in a screen-on state or a screen-off state based on the isScreenOn.() function in the power management service (PowerMananger).
  • the screen-on state may refer to a state in which all areas of the display screen of the electronic device 100 are lit;
  • the screen-off state may refer to a state in which the display screen of the electronic device 100 sleeps and becomes a black screen, and the display screen does not display interface elements, but other The device and program are operating normally.
  • the electronic device 100 may detect that the display screen is in a locked state or an unlocked state based on a system broadcast event.
  • the lock screen state may refer to a state in which some functions of the electronic device 100 are locked, that is, the electronic device 100 does not provide some functions.
  • the functions provided by the electronic device 100 in the locked screen state have lower data security requirements, such as answering calls, hanging up calls, adjusting music volume, launching camera applications, turning on/off airplane mode, etc.
  • the electronic device 100 can not only provide the above-mentioned functions with lower data security requirements, but also provide functions with higher data security requirements, such as: launching some applications (such as WeChat applications), and the application Functions provided by the program (for example, displaying the WeChat payment interface). That is to say, in the unlocked state, the electronic device 100 can provide all functions that the electronic device 100 can perform.
  • the electronic device 100 can also obtain the display screen status of the electronic device 100 through other methods.
  • the first application in the electronic device 100 determines the device status of the electronic device 100 based on the display screen status of the electronic device 100.
  • the electronic device 100 determines through the first application based on the display screen status of the electronic device 100, Within a certain time period C4 (which can also be called a third time period, for example, within 1 minute), the time that the display screen on the electronic device 100 is in the first state is greater than the designated time period B2 (which can also be called a second time period, For example, at 51 seconds), the electronic device 100 may determine that the device status of the electronic device 100 is in use. Otherwise, the electronic device 100 determines that the device status of the electronic device 100 is in the non-use state.
  • a certain time period C4 which can also be called a third time period, for example, within 1 minute
  • the time that the display screen on the electronic device 100 is in the first state is greater than the designated time period B2 (which can also be called a second time period, For example, at 51 seconds)
  • the electronic device 100 may determine that the device status of the electronic device 100 is in use. Otherwise, the electronic device 100 determines that the device status of the electronic device 100 is in the non-use
  • the display screen being in the first state may refer to: the display screen being in the screen-on state and the unlocked state, or the display screen being in the screen-on state and the display screen being in the lock-screen state, there is no restriction.
  • the display screen is in the first state, that is, the display screen is in the bright screen state and the unlocked state, as an example to illustrate the process of implementing this solution.
  • the first application of the electronic device 100 may record the display screen status.
  • the first application of the electronic device 100 may determine that the electronic device 100 The device status of device 100 is in use.
  • the electronic device 100 determines, based on the display screen state, through the first application that within the specified time period C4 (for example, within 1 minute), the time that the display screen on the electronic device 100 is in the first state is less than or equal to the specified duration B2 (for example, within 1 minute). , 51 seconds), the electronic device 100 determines that the device status of the electronic device 100 is in a non-use state.
  • the first application of the electronic device 100 may record the display screen status.
  • the first application of the electronic device 100 determines, based on the recorded display screen status, that within 1 minute, the display screen on the electronic device 100 is in the on-screen state and the time in the unlocked state is less than or equal to 51 seconds, the electronic device 100 determines that The device status of the electronic device 100 is a non-use state.
  • the first application in the electronic device 100 sends the status information of the electronic device 100 to the electronic device 200.
  • the status information of the electronic device 100 is used to indicate the device status of the electronic device 100 .
  • the first application in the electronic device 100 may send the status information of the electronic device 100 to the electronic device 200 based on the wireless communication connection established in the aforementioned S401.
  • the first application in the electronic device 100 can send the status information of the electronic device 100 to the electronic device 200 based on the Bluetooth connection.
  • the status information of the electronic device 100 may be used to indicate the device status of the electronic device 100, for example, indicating that the device status of the electronic device 100 is in a use state, or indicating that the device status of the electronic device 100 is in a non-use state.
  • the first status information is used to indicate that the device status of the electronic device 100 is in a non-use state.
  • the electronic device 200 determines whether the device status of the electronic device 100 is in a non-use state based on the received status information of the electronic device 100.
  • the electronic device 200 may detect the user's sleep data through the PPG sensor.
  • the electronic device 200 when the electronic device 200 receives the status information of the electronic device 100 indicating that the device status of the electronic device 100 is in a non-use state, the electronic device 200 can obtain the user's sleep status through the user's heart rate and/or blood oxygen detected by the PPG sensor. data.
  • the electronic device 200 transmits data to the electronic device 100 and the electronic device 200 .
  • the specified time period C5 for example, 1.5 minutes, 2 minutes, etc.
  • the electronic device 200 does not receive the status information of the electronic device 100.
  • the electronic device 200 can detect the status information through the PPG sensor. The user's heart rate and/or blood oxygen is used to obtain the user's sleep data.
  • the electronic device 200 determines that the device status of the electronic device 100 is in use based on the status information of the electronic device 100 sent by the electronic device 100, that is, the user is using the electronic device 100, indicating that the user is in an active state and not in a sleep state. Therefore, the electronic device 200 does not detect the user's sleep data, and the electronic device 200 loops through steps S402-S408. In some examples, when the device status of the electronic device 100 is in use, the electronic device 200 may clear the acceleration data acquired by the ACC sensor.
  • FIG. 5 exemplarily shows a specific flow chart of another sleep state detection method provided by an embodiment of the present application.
  • the electronic device 100 and the electronic device 200 establish a wireless communication connection.
  • the electronic device 200 determines whether the user is in a suspected sleep state through the ACC sensor.
  • the electronic device 200 determines that the user is in a suspected sleep state, the electronic device 200 sends a display screen status detection instruction to the display screen status detection module in the electronic device 100 .
  • the electronic device 200 may send a display screen status detection instruction to the display screen status detection module in the electronic device 100 based on the wireless communication connection established in S501.
  • the electronic device 200 can send the display screen status detection instruction to the display screen status detection module in the electronic device 100 through Bluetooth information synchronization service (synergy).
  • the electronic device 100 can detect the electronic device every specified time B1 (for example, every 3 seconds) through the display screen status detection module. 100 display status.
  • the display screen status detection module may be located at the application framework layer of the electronic device 100 .
  • the manner in which the electronic device 100 detects the status of the display screen on the electronic device 100 reference may be made to the description in step S404, which will not be described again here.
  • the electronic device 100 sends the display screen status of the electronic device 100 to the electronic device 200 every designated time period B1.
  • the display screen status detection module in the electronic device 100 can send the obtained display screen status of the electronic device 100 to the electronic device 200 through a wireless communication connection. It can be understood that since the display screen status detection module in the electronic device 100 detects the display screen status of the electronic device 100 every specified time period B1 (for example, every 3 seconds), therefore, the display screen status in the electronic device 100
  • the detection module may send the detected display screen status of the electronic device 100 to the electronic device 200 through a wireless communication connection every specified time period B1 (for example, every 3 seconds).
  • the display screen status detection module in the electronic device 100 can use the synergy service to connect the electronic device to The display screen status of 100 is sent to the electronic device 200 .
  • the electronic device 200 determines whether the device status of the electronic device 100 is in a non-use state based on the display screen status of the electronic device 100.
  • the electronic device 200 may determine that the electronic device 100 is in a non-use state.
  • the embodiment of this application takes the display screen in the first state: the display screen is in the bright screen state and the unlocked state as an example to illustrate the process of implementing this solution.
  • the electronic device 200 may receive the display screen status of the electronic device 100 sent by the electronic device 100 every 3 seconds (that is, every specified time period B1).
  • the electronic device 200 can record the display screen status. Then, based on the recorded display screen status of the electronic device 100, the electronic device 200 determines that within 1 minute (that is, within the specified time period C4), the display screen on the electronic device 100 is in the on-screen state and unlocked state.
  • the electronic device 200 can determine that the electronic device 100 is in a non-use state.
  • the electronic device 200 may determine that the electronic device 100 is in use.
  • the electronic device 200 may receive the display screen status of the electronic device 100 sent by the electronic device 100 every 3 seconds (that is, every specified time period B1).
  • the electronic device 200 can record the display screen status. Then, based on the recorded display screen status of the electronic device 100, the electronic device 200 determines that within 1 minute (that is, within the specified time period C4), the display screen on the electronic device 100 is in the on-screen state and unlocked state. When the time is greater than 51 seconds (that is, the specified time length B2), the electronic device 200 can determine that the electronic device 100 is in use.
  • the electronic device 200 may detect the user's sleep data through the PPG sensor.
  • the electronic device 200 when the wireless communication connection (eg, synergy service) established by the electronic device 100 and the electronic device 200 is unstable, or the wireless communication connection (eg, the synergy service) established by the electronic device 100 and the electronic device 200 is disconnected At this time, the electronic device 200 cannot receive the display screen status of the electronic device 100 sent by the electronic device 100. At this time, the electronic device 200 can detect the user's sleep data through the PPG sensor.
  • the wireless communication connection eg, synergy service
  • the electronic device 200 determines that the device status of the electronic device 100 is in use based on the display screen status of the electronic device 100 sent by the electronic device 100, that is, the user is using the electronic device 100, indicating that the user is in an active state and not in a sleeping state. Therefore, the electronic device 200 does not detect the user's sleep data, and the electronic device 200 performs the aforementioned specific steps shown in FIG. 5 in a loop. In some examples, when the device status of the electronic device 100 is in use, the electronic device 200 may clear the acceleration data acquired by the ACC sensor.
  • the electronic device 200 may determine that the user is awake and is not currently in a sleep state.
  • the specified threshold A3 for example, 20 steps
  • FIG. 6 exemplarily shows a schematic diagram of a software architecture applied to the communication system 10 provided by an embodiment of the present application.
  • the electronic device 200 may include: a wearable software module 602 located in the application layer, and a sleep state detection module 601 located in the application framework layer.
  • the electronic device 100 may include: a first application 603 located in the application layer, and a display screen status detection module 604 located in the application framework layer. in:
  • the sleep state detection module 601 can be used to: 1. Determine whether the user is in a suspected sleep state through the ACC sensor. When the sleep state detection module 601 determines that the user is in a suspected sleep state, the sleep state detection module 601 can send the information of the suspected sleep state to the wearable software module 602; 2. For receiving the status information of the electronic device 100 sent by the wearable software module 602. When the status information of the electronic device 100 indicates that the electronic device 100 is in a non-use state, the sleep state detection module 601 may detect the user's sleep data through the PPG sensor. In some examples, when the status information of the electronic device 100 indicates that the device status of the electronic device 100 is in use, the sleep state detection module 601 clears the acceleration data obtained by the ACC sensor; 3.
  • the wearable software module 602 may receive the first indication information sent by the wearable software module 602.
  • the first indication information is used to indicate that the device status of the electronic device 100 is unknown.
  • the sleep state detection module 601 may detect the user's sleep data through the PPG sensor.
  • the wearable software module 602 can be used to: 1. Receive the information about the suspected falling asleep state sent by the sleep state detection module 601, and then send the display screen state detection instruction to the electronic device 100 through a wireless communication connection (for example, Bluetooth connection).
  • the first application 603 ; 2. Receive the status information of the electronic device 100 sent by the first application 603 in the electronic device 100 through a wireless communication connection (for example, Bluetooth connection), and then send the status information of the electronic device 100 to the sleep state Detection module 601.
  • a wireless communication connection for example, Bluetooth connection
  • the first application 603 can be used to: 1. Receive the display screen status detection instruction sent by the wearable software module 602 in the electronic device 200 through a wireless communication connection (for example, Bluetooth connection), and then, every specified time period B1 (for example, Send the display screen status detection instruction to the display screen status detection module 604 every 3 seconds); 2.
  • the electronic device 100 information sent by the display screen status detection module 604 can be received every specified time period B1 (for example, every 3 seconds). display screen status, and determine the device status of the electronic device 100 based on the display screen status of the electronic device 100; 3. Send the status information of the electronic device 100 to the wearable software in the electronic device 200 through a wireless communication connection (for example, Bluetooth connection) Module 602.
  • a wireless communication connection for example, Bluetooth connection
  • the display screen status detection module 604 can be used to: 1. Receive the display screen status detection instruction sent by the first application 603 every specified time period B1 (for example, every 3 seconds). In response to the display screen status detection instruction, detect the display screen status of the electronic device 100; 2. Change the display screen status of the electronic device 100 every specified time B1 (for example, every 3 seconds). The status is sent to the first application 603.
  • the display screen status detection module 604 can be used to: 1. Receive the display screen status detection instruction sent by the first application 603 every specified time period B1 (for example, every 3 seconds). In response to the display screen status detection instruction, detect the display screen status of the electronic device 100; 2. Change the display screen status of the electronic device 100 every specified time B1 (for example, every 3 seconds). The status is sent to the first application 603.
  • B1 for example, every 3 seconds
  • FIG. 7 exemplarily shows another software architecture schematic diagram applied to the communication system 10 provided by the embodiment of the present application.
  • the electronic device 200 may include: a wearable software module 702 located in the application layer, and a sleep state detection module 701 located in the application framework layer.
  • the electronic device 100 may include: a display screen status detection module 703 located at the application framework layer. in:
  • the sleep state detection module 701 can be used to: 1. Determine whether the user is in a suspected sleep state through the ACC sensor. When the sleep state detection module 701 determines that the user is in a suspected sleep state, the sleep state detection module 701 can send the information of the suspected sleep state to the wearable software module 702; 2. For receiving the status information of the electronic device 100 sent by the wearable software module 702. When the status information of the electronic device 100 indicates that the device status of the electronic device 100 is in a non-use state, the sleep state detection module 701 may detect the user's sleep data through the PPG sensor. In some examples, when the status information of the electronic device 100 indicates that the device status of the electronic device 100 is in use, the sleep state detection module 701 clears the acceleration data obtained by the ACC sensor; 3.
  • the sleep state detection module 701 can receive the first indication information sent by the wearable software module 702.
  • the first indication information is used to indicate that the device status of the electronic device 100 is unknown.
  • the sleep state detection module 701 may detect the user's sleep data through the PPG sensor.
  • the wearable software module 702 can be used to: 1. Receive the information about the suspected sleep state sent by the sleep state detection module 701, and then, every specified time B1 (for example, every 3 seconds), pass the display screen state detection instruction through the electronic device 100 The synergy service between the electronic device 100 and the electronic device 200 is sent to the display screen status detection module 703 in the electronic device 100; 2. Through the synergy service between the electronic device 100 and the electronic device 200, every specified time period B1 (for example, every 3 seconds ), receive the display screen status of the electronic device 100 sent by the display screen status detection module 703 in the electronic device 100, and determine the device status of the electronic device 100 based on the display screen status of the electronic device 100; 3. Convert the status information of the electronic device 100 Sent to sleep state detection module 701. For specific implementation methods, reference may be made to the description of the embodiment shown in FIG. 5 , which will not be described again here.
  • the display screen status detection module 703 can be used to: 1. Through the synergy service between the electronic device 100 and the electronic device 200, every specified time B1 (for example, every 3 seconds), receive a message sent by the wearable software module 702 in the electronic device 100 The display screen status detection instruction; 2. In response to the display screen status detection instruction, detect the display screen status of the electronic device 100; 3. Through the synergy service between the electronic device 100 and the electronic device 200, every specified time period B1 (for example, Every 3 seconds), the display screen status of the electronic device 100 is sent to the wearable software module 702 in the electronic device 200 .
  • every specified time B1 for example, every 3 seconds
  • the term “when” may be interpreted to mean “if" or “after” or “in response to determining" or “in response to detecting" depending on the context.
  • the phrase “in “When" or “If (stated condition or event) is detected” may be interpreted to mean “If it is determined" or “In response to determining" or “When (stated condition or event) is detected ” or “in response to detection of (stated condition or event).”
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another, e.g., the computer instructions may be transferred from a website, computer, server, or data center Transmission to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) means.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains one or more available media integrated.
  • the available media may be magnetic media (eg, floppy disk, hard disk, tape), optical media (eg, DVD), or semiconductor media (eg, solid state drive), etc.

Landscapes

  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Surgery (AREA)
  • General Health & Medical Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Biomedical Technology (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Medical Informatics (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • Animal Behavior & Ethology (AREA)
  • Pathology (AREA)
  • Public Health (AREA)
  • Veterinary Medicine (AREA)
  • Cardiology (AREA)
  • Physiology (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Optics & Photonics (AREA)
  • Telephone Function (AREA)

Abstract

本申请公开了一种睡眠状态检测方法、电子设备及系统,涉及终端领域,该方法包括:电子设备200可以通过ACC传感器确定用户处于疑似入睡状态。然后,电子设备200可以向电子设备100发送显示屏状态检测指令。电子设备100接收到显示屏状态检测指令后,可以获取电子设备100的显示屏状态。电子设备100或电子设备200可以根据电子设备100的显示屏状态,判断电子设备100的设备状态。当电子设备100或电子设备200确定出电子设备100的设备状态处于非使用状态时,电子设备200可以通过PPG传感器的数据信息,检测用户的睡眠数据。

Description

睡眠状态检测方法、电子设备及系统
本申请要求于2022年09月09日提交中国专利局、申请号为202211103847.3、申请名称为“睡眠状态检测方法、电子设备及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及终端领域,尤其涉及一种睡眠状态检测方法、电子设备及系统。
背景技术
随着终端技术的迅速发展,各种类型的电子设备,例如手机、平板电脑、以及以智能手表为代表的可穿戴设备等已经成为人们生活中必不可少的产品。在日常使用中,用户常可以使用可穿戴设备来检测自身的生理状况以了解自己的身体是否健康。例如,用户可以使用智能手表,根据其检测到的生理数据(例如,心率、身体活动时的加速度值等)来监测自己的睡眠状态。智能手表可以基于上述检测到的用户的生理数据,分析出在用户的整个睡眠时间段中,浅睡状态、深睡状态和快速眼动状态等各睡眠状态各自所占用的时间,以及各自在睡眠时间段中的占比等睡眠数据。用户可以根据上述分析出的睡眠数据,掌控自己的身体健康状况。
然而,当前可穿戴设备用于检测用户睡眠状态的算法,常常会造成电子设备误判用户睡眠状态的情况发生,导致可穿戴设备得到的睡眠数据与真实的睡眠数据存在较大的误差,睡眠数据的精确度较低等问题。
发明内容
本申请提供了一种睡眠状态检测方法、电子设备及系统,实现了通过电子设备100的显示屏状态来间接确定用户的行为(例如,是否使用电子设备100),同时结合ACC传感器和PPG传感器获取到的数据信息来检测用户的睡眠数据。这样,可以减小误判用户睡眠状态的发生概率,提高用户睡眠状态判断的精确性,同时,也可以降低电子设备200的功耗,提高用户睡眠数据获取的精度。
第一方面,本申请实施例提供了一种检测系统,包括:第一电子设备和第二电子设备,该第一电子设备和该第二电子设备建立通信连接,其中:该第二电子设备用于,当该第二电子设备通过加速度ACC传感器确定用户处于疑似入睡状态时,向该第一电子设备发送显示屏状态检测指令。该第一电子设备用于,响应于该显示屏状态检测指令,每隔第一时长获取到该第一电子设备的显示屏状态。该第一电子设备还用于,当该第一电子设备基于该每隔第一时长获取到的显示屏状态确定该第一电子设备处于非使用状态时,向该第二电子设备发送第一状态信息。其中,该第一状态信息用于指示该第一电子设备处于非使用状态。该第二电子设备还用于,当该第二电子设备接收到该第一状态信息时,通过光电容积脉搏波标记法PPG传感器检测该用户的睡眠数据。
在一种可能的实现方式中,当该电子设备确定用户处于疑似入睡状态时,该第二电子设备具体用于:该第二电子设备用于,通过该ACC传感器实时检测到在x轴、y轴和z轴 上的加速度值。该第二电子设备还用于,存储第一时间段内该x轴的加速度值、该y轴的加速度值和该z轴的加速度值。该第二电子设备还用于,当该第二电子设备检测到在第二时间段内,该x轴的加速度值、该y轴的加速度值和该z轴的加速度值都小于第一阈值时,确定用户处于疑似入睡状态。其中,该第一时间段包括该第二时间段。
在一种可能的实现方式中,当该第一电子设备基于该每隔第一时长获取到的显示屏状态确定该第一电子设备处于非使用状态时,该第一电子设备具体用于:该第一电子设备用于,记录该每隔第一时长获取到的显示屏状态。该第一电子设备还用于,当该第一电子设备确定在第三时间段内,该第一电子设备的显示屏状态处于亮屏状态的时间大于第二时长时,确定该第一电子设备处于非使用状态。
在一种可能的实现方式中,该第一电子设备用于,响应于该显示屏状态检测指令,每隔第一时长获取到该第一电子设备的显示屏状态之后,该第一电子设备还用于,将该每隔第一时长获取到的显示屏状态,发送给该第二电子设备。该第二电子设备用于,当基于该每隔第一时长获取到的显示屏状态,确定该第一电子设备处于非使用状态时,通过PPG传感器检测该用户的睡眠数据。
第二方面,本申请实施例提供了一种睡眠状态检测方法,应用于第二电子设备,该方法包括:该第二电子设备和第一电子设备建立通信连接。当该第二电子设备通过ACC传感器确定用户处于疑似入睡状态时,该第二电子设备向该第一电子设备发送显示屏状态检测指令。该第二电子设备接收到该第一电子设备发送的第一状态信息。其中,该第一状态信息用于指示该第一电子设备处于非使用状态,该第一状态信息为该第一电子设备基于每隔第一时长获取到的该第一电子设备的显示屏状态,所确定出的信息。当该第二电子设备接收到该第一状态信息时,该第二电子设备通过PPG传感器检测该用户的睡眠数据。
在一种可能的实现方式中,当该第二电子设备通过加速度ACC传感器确定用户处于疑似入睡状态时,该第二电子设备向该第一电子设备发送显示屏状态检测指令,具体包括:该第二电子设备通过该ACC传感器实时检测到在x轴、y轴和z轴上的加速度值。该第二电子设备存储第一时间段内该x轴的加速度值、该y轴的加速度值和该z轴的加速度值。当该第二电子设备检测到在第二时间段内,该x轴的加速度值、该y轴的加速度值和该z轴的加速度值都小于第一阈值时,该第二电子设备确定用户处于疑似入睡状态。其中,该第一时间段包括该第二时间段。该第二电子设备向该第一电子设备发送显示屏状态检测指令。
第三方面,本申请实施例提供了一种电子设备,为第二电子设备,包括一个或多个处理器、一个或多个存储器和显示屏。该一个或多个存储器与一个或多个处理器耦合,该一个或多个存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当该一个或多个处理器执行该计算机指令时,使得该电子设备执行上述第二方面任一项可能的实现方式中的方法。
第四方面,本申请实施例提供了一种计算机可读存储介质,包括计算机指令,当该计 算机指令在电子设备上运行时,使得该电子设备执行上述第二方面任一项可能的实现方式中的方法。
第五方面,本申请实施例提供了一种芯片或芯片系统,包括处理电路和接口电路,该接口电路用于接收代码指令并传输至该处理电路,该处理电路用于运行该代码指令以执行上述第二方面任一项可能的实现方式中的方法。
第六方面,本申请实施例提供了一种计算机程序产品,当该计算机程序产品在电子设备上运行时,使得该电子设备执行上述第二方面任一项可能的实现方式中的方法。
附图说明
图1为本申请实施例提供的一种通信系统10的架构示意图;
图2为本申请实施例提供的一种电子设备100的硬件结构示意图;
图3为本申请实施例提供的一种电子设备200的硬件结构示意图;
图4为本申请实施例提供的一种睡眠状态检测方法的具体流程示意图;
图5为本申请实施例提供的另一种睡眠状态检测方法的具体流程示意图;
图6为本申请实施例提供的一种应用于通信系统10的软件架构示意图;
图7为本申请实施例提供的另一种应用于通信系统10的软件架构示意图。
具体实施方式
本申请以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请得到说明书和所附权利要书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括复数表达形式,除非其上下文中明确地有相反指示。还应当理解,本申请中使用的术语“和/或”是指包含一个或多个所列出醒目的任何或所有可能组合。在本申请实施例中,术语“第一”、“第二”仅用于描述目的,而不能理解为暗示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征,在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。
首先,介绍本申请实施例提供的一种通信系统10。
请参考图1,图1示例性示出了本申请实施例提供的一种通信系统10的架构示意图。
如图1所示,通信系统10可以包括:电子设备100和电子设备200。
电子设备100(也可以被称为第一电子设备)可以是手机、平板电脑、PC、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personaldigital assistant,PDA)等电子设备。本申请对该电子设备100的具体类型不作任何限制。
电子设备200(也可以被称为第二电子设备)可以是智能手表、智能手环等可穿戴设备、便携式设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备等电子设备。本申请对该电子设备200的具体类型不作任何限制。
如图1所示,电子设备100可以和电子设备200建立无线通信连接,并且,电子设备 100和电子设备200可以通过上述无线通信连接互相传输数据信息。例如,电子设备200可以通过无线通信连接向电子设备100发送显示屏状态检测指令,和/或用户的睡眠数据等数据信息,电子设备100可以通过无线通信连接向电子设备200发送显示屏状态,和/或,电子设备100的设备状态等数据信息。其中,睡眠数据可以指的是:在用户的整个睡眠时间段中,浅睡状态、深睡状态和快速眼动状态等各睡眠状态各自所占用的时间,以及各自在睡眠时间段中的占比等。关于电子设备100和电子设备200互相发送的数据信息,将在后续实施例中详细说明,在此先不赘述。具体的,该无线通信连接可以是蓝牙、无线保真直连(wireless fidelity direct,Wi-Fi direct)或无线保真软件接入点(wireless fidelity software access point,Wi-Fi softAP)等中的一项或多项无线通信连接。
在一种可能的实现方式中,电子设备100可以和电子设备200建立有线通信连接从而进行数据交互。例如,电子设备100可以和电子设备200可以通过通用串行总线(universal serial bus,USB)建立有线连接,并基于上述有线通信连接的方式互相传输数据信息。
需要说明的是,本申请实施例示出的示例性通信系统架构并不构成对通信系统10的具体限定,在本申请另一些实施例中,通信系统10可以包括比图示更多或更少的电子设备,也可以包括与图示中不同类型的电子设备。例如,通信系统10中还可以包括多个与电子设备200建立无线/有线通信连接的电子设备100,例如具有通信功能的显示器,和/或平板电脑,和/或PC等,本申请对此不作限制。
接下来,介绍本申请实施例提供的电子设备100。
请参考图2,图2示例性示出了本申请实施例提供的一种电子设备100的硬件结构示意图。
如图2所示,电子设备100可以包括:处理器101、存储器102、无线通信模块103、显示屏104、和传感器模块105。
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100还可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合来实现。
处理器101可以包括一个或多个处理器单元,例如处理器101可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器101中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器101中的存储器为高速缓冲存储器。该存储器可以保存处理器101刚用过或循环使用的指令或数据。如果处理器101需要再次使用该指令或数据,可以从所述存储器中直接调用。避免了重复存取,减少了处理器101的等待时间,因而提高了系统的效率。
在一些实施例中,处理器101可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或USB接口等。
存储器102与处理器101耦合,用于存储各种软件程序和/或多组指令。具体实现中,存储器102可以包括易失性存储器(volatile memory),例如随机存取存储器(random access memory,RAM);也可以包括非易失性存储器(non-vlatile memory),例如ROM、快闪存储器(flash memory)、硬盘驱动器(Hard Disk Drive,HDD)或固态硬盘(Solid State Drives,SSD);存储器102还可以包括上述种类的存储器的组合。存储器102还可以存储一些程序代码,以便于处理器101调用存储器102中存储的程序代码,以实现本申请实施例在电子设备100中的实现方法。存储器102可以存储操作系统,例如uCOS、VxWorks、RTLinux等嵌入式操作系统。
无线通信模块103可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块103可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块103经由天线接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器101。无线通信模块103还可以从处理器101中接收待发送的信号,对其进行调频、放大,经天线转为电磁波辐射出去。在一些实施例中,电子设备100还可以通过无线通信模块103中的蓝牙模块(图2未示出)、WLAN模块(图2未示出)发射信号探测或扫描在电子设备100附近的设备,并与该附近的设备建立无线通信连接以传输数据。其中,蓝牙模块可以提供包括经典蓝牙(basic rate/enhanced data rate,BR/EDR)或蓝牙低功耗(bluetooth low energy,BLE)中一项或多项蓝牙通信的解决方案,WLAN模块可以提供包括Wi-Fi direct、Wi-Fi LAN或Wi-Fi softAP中一项或多项WLAN通信的解决方案。
显示屏104可以用于显示图像、视频等。显示屏104可以包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏104,N为大于1的正整数。
传感器模块105可以包括多个传感器件,例如,触摸传感器(图中未示出)等。触摸传感器也可以称为“触控器件”。触摸传感器可以设置于显示屏104,由触摸传感器与显示屏104组成触摸屏,也称“触控屏”。触摸传感器可以用于检测作用于其上或附近的触摸操作。
需要说明的是,图2中示出的电子设备100仅仅用于示例性解释本申请所提供的电子 设备的硬件结构,并不对本申请构成具体限制。
下面,介绍本申请实施例提供的电子设备200。
请参考图3,图3示例性示出了本申请实施例提供的一种电子设备200的硬件结构示意图。
如图3所示,电子设备200可以包括:处理器201、存储器202、无线通信模块203、电源开关204、显示屏205和传感器模块206等。上述各个模块可以通过总线或者其他方式连接,本申请实施例已通过总线连接为例。
处理器201可以用于读取和执行计算机可读指令。在具体的实现方式中,处理器201可以主要包括控制器、运算器和寄存器。其中,控制器主要负责指令译码,并为指令对应的操作发出控制信号。运算器主要负责保存指令执行过程中临时存放的寄存器操作数和中间操作结果等。具体实现中,处理器201的硬件架构可以是专用集成电路(ASIC)架构、MIPS架构、ARM架构或者NP架构等等。
存储器202与处理器201耦合,用于存储各种软件和/多组指令。在具体的实现方式中,存储器202可以包括高速随机存取存储器,并且也可以包括非易失性存储器,例如一个或多个磁盘存储设备、闪存设备或其他非易失性固态存储设备。存储器202还可以存储通信程序,该通信程序可用于与电子设备100,或其他电子设备进行通信。
无线通信模块203可以包括蓝牙通信模块203A或其他。电子设备200可以通过蓝牙通信模块203A中的一项或多项蓝牙通信的解决方案以接收或发射无线信号,与电子设备100建立无线通信连接。电子设备200可以通过上述无线通信连接获取到电子设备100传输的数据信息,也可以通过上述无线通信连接向电子设备100发送数据指令。其中,蓝牙通信模块203A可以提供包括BR/EDR或BLE中一项或多项蓝牙通信的解决方案。可选的,无线通信模块203还可以包括有WLAN通信模块(图3中未示出),该WLAN通信模块可以提供包括Wi-Fi direct、Wi-Fi LAN或Wi-Fi softAP中一项或多项WLAN通信的解决方案。在一些实施例中,电子设备200可以通过该WLAN模块提供的无线通信技术与电子设备100建立无线通信连接,并基于该无线通信连接与电子设备200进行数据交互。
电源开关204可以用于控制电源向电子设备200的供电。
关于显示屏205的描述,可以参考前述电子设备100中针对显示屏104的描述,在此不再赘述。
传感器模块206可以包括触摸传感器206A、加速度(ACC)传感器206B和光电容积脉搏波标记法(photoplethysmography,PPG)传感器206C等。其中:
触摸传感器206A也可以被称为“触控器件”。触摸传感器206A可以设置于显示屏205。由触摸传感器206A与显示屏205组成的触摸屏,也可以被称为“触控屏”。触摸传感器206A可以用于检测作用在其上或附近的触摸操作。
ACC传感器206B可以用于检测电子设备200在各个方向(一般为x、y和z轴)上加速度的大小。例如,当电子设备200静止时,ACC传感器206B可以检测出重力的大小及方向。
PPG传感器206C可以用于测量用户的心率,和/或,血氧饱和度等人体的生理数据。 以检测用户的心率为例,在具体的实现方式中,PPG传感器206C可以发射指定波长的光信号,该光信号可以照射到皮肤组织下的动脉血管并被反射回PPG传感器206C。当心脏跳动时,血管的收缩和扩张会改变动脉血管中的血液容积,因此会影响动脉血管对光信号的吸收或衰减,从而影响光信号的反射。PPG传感器206C可以基于反射回来的光信号的变化检测出用户的心率。需要说明的是,PPG传感器206C也可以通过其他方式检测用户的心率,本申请对此不构成限制。
可选的,电子设备200可以包括有一个或多个物理按键。该一个或多个物理按键可以接收用户作用在该按键上的输入操作(例如,按下该物理按键)。响应于该输入操作,电子设备200可以执行与该物理按键对应的显示屏上所示控件相应的操作。
可选的,电子设备200还可以包括有USB接口,电子设备200可以通过该USB接口与电子设备100建立有线通信连接,并通过该有线通信连接的方式互相传输数据信息。
可以理解的是,图3所示的电子设备200仅仅是本申请实施例的一种实现方式,并不构成对电子设备200的具体限制。优选的,电子设备200可以是智能手表,该电子设备200还可以包括有表带和表盘。表盘可以包括有显示屏205,以用于显示图像、视频、控件、文字信息等等。表带可以用于将电子设备200固定在人体四肢部位以便于穿戴。实际应用中,电子设备200还可以包括比图示更多或更少的部件,这里不作限制。
接下来,介绍本申请实施例提供的一种检测到用户是否处于入睡状态的流程。
以电子设备200是智能手表为例来进行示例性说明。在一些应用场景中,电子设备200可以通过表带将电子设备200固定在用户的手腕上。电子设备200可以通过ACC传感器和PPG传感器检测到用户是否处于入睡状态。
具体的,当电子设备200通过ACC传感器检测到在x轴、y轴和z轴上的加速度值小于指定阈值A1,同时,通过PPG传感器检测到用户的心率小于或等于指定阈值A2,且保持一定的时长(例如,10分钟)时,电子设备200可以确定用户处于入睡状态。
然而,上述检测到用户是否处于入睡状态的流程常常会造成电子设备200误判用户已进入睡眠状态的情况发生。例如,当用户长时间平躺于沙发上玩手机并不活动时,用户的身体处于静止状态,电子设备200可以通过ACC传感器检测到在x轴、y轴和z轴上的加速度值小于指定阈值A1,且用户的心率小于或等于指定阈值A2并保持一定的时长,因此,电子设备200判断用户处于入睡状态。然而,在实际场景中用户尚未入睡,仍然处于清醒状态。上述睡眠状态的误判会导致电子设备得到的睡眠数据与真实的睡眠数据存在较大的误差,睡眠数据的精确度较低等问题。
因此,本申请实施例提供了一种睡眠状态检测方法。
具体的,该方法可以应用于前述的通信系统10。
首先,电子设备200可以通过ACC传感器确定用户处于疑似入睡状态。然后,电子设备200可以向电子设备100发送显示屏状态检测指令。电子设备100接收到显示屏状态检测指令后,可以获取电子设备100的显示屏状态。电子设备100或电子设备200可以根据电子设备100的显示屏状态,判断电子设备100的设备状态。这里,电子设备100的设备 状态可以被划分为:使用状态和非使用状态。其中,使用状态指的是用户正在使用电子设备100,非使用状态指的是用户没有使用电子设备100。
当电子设备100或电子设备200根据电子设备100的显示屏状态,确定出电子设备100的设备状态处于非使用状态时,电子设备200可以通过PPG传感器的数据信息,检测用户的睡眠数据。当电子设备100或电子设备200根据电子设备100的显示屏状态,确定出电子设备100的设备状态处于使用状态时,电子设备200不会通过PPG传感器的数据信息,检测用户的睡眠数据。在一些示例中,当电子设备100的设备状态处于使用状态时,电子设备200可以清除ACC传感器获取到的加速度数据。
从上述睡眠状态检测方法的步骤可以看出,本申请实施例提供的睡眠检测方法可以通过电子设备100的显示屏状态来间接确定用户的行为(例如,是否使用电子设备100),同时结合ACC传感器和PPG传感器获取到的数据信息来检测用户的睡眠数据。这样,可以减小误判用户睡眠状态的发生概率,提高用户睡眠状态判断的精确性,同时,也可以降低电子设备200的功耗,提高用户睡眠数据获取的精度。
下面,介绍本申请实施例提供的一种睡眠状态检测方法的具体流程。
请参考图4,图4示例性示出了本申请实施例提供的一种睡眠状态检测方法的具体流程示意图。
如图4所示,该实施方式的具体流程可以如下:
S401.电子设备100和电子设备200建立无线通信连接。
优选的,本申请实施例以无线通信连接是蓝牙连接为例。电子设备100可以通过蓝牙模块发射信号来探测或扫描电子设备200,与电子设备200建立无线通信连接并相互传输数据信息。其中,蓝牙模块可以提供包括BR/EDR或BLE中一项或多项蓝牙通信的解决方案。
在一些示例中,电子设备100也可以通过WLAN模块发射信号来探测或扫描电子设备200,与电子设备200建立无线通信连接并相互传输数据信息。其中,WLAN模块可以提供包括Wi-Fi direct、Wi-Fi LAN或Wi-Fi softAP中一项或多项WLAN通信的解决方案。
在另一些示例中,电子设备100也可以和电子设备200通过调频(frequency modulation,FM)、近距离无线通信技术(near field communication,NFC)或红外技术(infrared,IR)等方式建立无线通信连接并基于上述无线通信连接相互传输数据信息。本申请对此不作限制。本申请对此不作限制。
S402.电子设备200通过ACC传感器确定用户是否处于疑似入睡状态。
具体的,电子设备200可以通过ACC传感器实时检测到在x轴、y轴和z轴上的加速度值。电子设备200可以存储指定时间段C1内(也可以被称为第一时间段,例如,近30分钟内)上述三个轴的加速度值。当电子设备200检测到在指定时间段C2中(也可以被称为第二时间段,例如,近10分钟中),上述三个轴的加速度值小于指定阈值A1(也可以被称为第一阈值,例如,1.1m/s^2),且,在指定时间段C3中(例如,近15分钟中),上述三轴的加速度值大于指定阈值A1的时长小于指定时长B3(例如,3分钟)时,电子设备 200可以确定用户处于疑似入睡状态。电子设备200可以执行下列步骤。否则,电子设备200确定用户不处于疑似入睡状态,则电子设备200可以继续执行本步骤的流程。
在一种可能的实现方式中,电子设备200可以存储指定时间段C1内(例如,近30分钟内)上述三个轴的加速度值。当电子设备200检测到在指定时间段C2中(例如,近10分钟中),上述三个轴的加速度值小于指定阈值A1(例如,1.1m/s^2)时,电子设备200可以确定用户处于疑似入睡状态。
S403.当电子设备200确定用户处于疑似入睡状态时,电子设备200向电子设备100中的第一应用发送显示屏状态检测指令。
具体的,电子设备200可以基于前述S401建立的无线通信连接,向电子设备100中的第一应用发送显示屏状态检测指令。优选的,电子设备200可以基于蓝牙连接,向电子设备100中的第一应用发送显示屏状态检测指令。
S404.当电子设备100中的第一应用接收到显示屏状态检测指令后,电子设备100通过第一应用每隔指定时长B1(例如,每隔3秒)获取到电子设备100的显示屏状态。
具体的,每隔指定时长B1(例如,每隔3秒),电子设备100中的显示屏状态检测模块中的指定函数/指定服务可以检测到电子设备100上显示屏的状态。然后,电子设备100中的第一应用,可以每隔指定时长B1(也可以被称为第一时长,例如,每隔3秒)获取到上述指定函数/指定服务检测到的电子设备100的显示屏状态。其中,显示屏状态检测模块可以位于电子设备100的应用框架层。
示例性的,电子设备100可以基于电源管理服务(PowerMananger)中的isScreenOn.()函数检测到显示屏为亮屏状态或者为灭屏状态。其中,亮屏状态可以指的是电子设备100上显示屏所有区域都点亮显示的状态;灭屏状态可以指的是电子设备100的显示屏休眠成为黑屏,显示屏不显示界面元素,但是其他器件和程序正常工作的状态。电子设备100可以基于系统广播事件,检测到显示屏处于锁屏状态或者处于解锁状态。其中,锁屏状态可以指的是电子设备100中部分功能被锁定的状态,即电子设备100不提供部分功能。电子设备100在锁屏状态下提供的功能对数据安全的要求较低,例如:接听电话、挂断电话、调节音乐音量大小、启动相机应用、打开/关闭飞行模式等。电子设备100在解锁状态下,不光能提供上述对数据安全要求较低的功能,还能提供对数据安全要求较高的功能,例如:启动部分应用程序(例如微信应用程序),以及,该应用程序提供的功能(例如,显示微信付款界面)。也即是说,在解锁状态下,电子设备100可以提供全部电子设备100可以执行的功能。
可以理解的是,上述示例性说明仅仅用于解释本申请,并不构成对本申请的具体限制。电子设备100还可以通过其他方式获取到电子设备100的显示屏状态。
S405.电子设备100中的第一应用基于电子设备100的显示屏状态,确定出电子设备100的设备状态。
具体的,当电子设备100基于电子设备100的显示屏状态,通过第一应用确定出在指 定时间段C4内(也可以被称为第三时间段,例如,在1分钟内),电子设备100上显示屏处于第一状态的时间大于指定时长B2(也可以被称为第二时长,例如,51秒)时,电子设备100可以确定电子设备100的设备状态处于使用状态。否则,电子设备100确定电子设备100的设备状态处于非使用状态。
其中,显示屏处于第一状态可以指的是:显示屏处于亮屏状态且解锁状态,或者,显示屏处于亮屏状态而显示屏是否处于锁屏状态并不作限制。优选的,本申请实施例以显示屏处于第一状态为显示屏处于亮屏状态且解锁状态为例,来说明实施本方案的流程。
示例性的,当电子设备100的第一应用每隔3秒获取到电子设备100的显示屏状态时,电子设备100的第一应用可以记录下该显示屏状态。当电子设备100的第一应用基于记录下的显示屏状态,确定出在1分钟内,电子设备100上显示屏处于亮屏状态且解锁状态的时间大于51秒时,电子设备100可以确定出电子设备100的设备状态处于使用状态。
当电子设备100基于显示屏状态,通过第一应用确定出在指定时间段C4内(例如,在1分钟内),电子设备100上显示屏处于第一状态的时间小于或等于指定时长B2(例如,51秒)时,电子设备100确定出电子设备100的设备状态处于非使用状态。
示例性的,当电子设备100的第一应用每隔3秒获取到电子设备100的显示屏状态时,电子设备100的第一应用可以记录下该显示屏状态。当电子设备100的第一应用基于记录下的显示屏状态,确定出在1分钟内,电子设备100上显示屏处于亮屏状态且解锁状态的时间小于或等于51秒时,电子设备100确定出电子设备100的设备状态处于非使用状态。
S406.电子设备100中的第一应用向电子设备200发送电子设备100的状态信息。其中,电子设备100的状态信息用于指示电子设备100的设备状态。
具体的,电子设备100中的第一应用可以基于前述S401建立的无线通信连接,向电子设备200发送电子设备100的状态信息。优选的,电子设备100中的第一应用,可以基于蓝牙连接,向电子设备200发送电子设备100的状态信息。其中,电子设备100的状态信息可以用于指示电子设备100的设备状态,例如,指示电子设备100的设备状态处于使用状态,或者,指示电子设备100的设备状态处于非使用状态。其中,第一状态信息用于指示电子设备100的设备状态处于非使用状态。
S407.电子设备200基于接收到的电子设备100的状态信息,判断电子设备100的设备状态是否处于非使用状态。
S408.当电子设备200确定电子设备100的设备状态处于非使用状态时,电子设备200可以通过PPG传感器检测用户的睡眠数据。
具体的,当电子设备200接收到电子设备100的状态信息指示电子设备100的设备状态处于非使用状态时,电子设备200可以通过PPG传感器检测到的用户心率和/或血氧,获取用户的睡眠数据。
在一些示例中,当电子设备100和电子设备200建立的无线通信连接不稳定,或者,电子设备100和电子设备200建立的无线通信连接已断开时,电子设备200在向电子设备 100发送显示屏状态检测指令后的指定时间段C5(例如,1.5分钟、2分钟等)内,电子设备200没有接收电子设备100的状态信息,此时,电子设备200可以通过PPG传感器检测到的用户心率和/或血氧,获取用户的睡眠数据。
当电子设备200基于电子设备100发送的电子设备100的状态信息,确定电子设备100的设备状态处于使用状态时,即是用户正在使用电子设备100,表明用户正处于活动状态而不处于睡眠状态,因此,电子设备200不检测用户的睡眠数据,电子设备200循环执行步骤S402-S408。在一些示例中,当电子设备100的设备状态处于使用状态时,电子设备200可以清除ACC传感器获取到的加速度数据。
接下来,介绍本申请实施例提供的另一种睡眠状态检测方法的具体流程。
请参考图5,图5示例性示出了本申请实施例提供的另一种睡眠状态检测方法的具体流程示意图。
如图5所示,该实施方式的具体流程可以如下:
S501.电子设备100和电子设备200建立无线通信连接。
具体的,关于该步骤的说明可以参考前述S401中的描述,在此不再赘述。
S502.电子设备200通过ACC传感器确定用户是否处于疑似入睡状态。
具体的,关于该步骤的说明可以参考前述S402中的描述,在此不再赘述。
S503.当电子设备200确定用户处于疑似入睡状态时,电子设备200向电子设备100中的显示屏状态检测模块,发送显示屏状态检测指令。
具体的,电子设备200可以基于前述S501建立的无线通信连接,向电子设备100中的显示屏状态检测模块发送显示屏状态检测指令。优选的,电子设备200可以通过蓝牙信息同步服务(synergy)向电子设备100中的显示屏状态检测模块,发送显示屏状态检测指令。
S504.当电子设备100中的显示屏状态检测模块接收到显示屏状态检测指令后,电子设备100可以通过显示屏状态检测模块,每隔指定时长B1(例如,每隔3秒)检测到电子设备100的显示屏状态。
具体的,显示屏状态检测模块可以位于电子设备100的应用框架层。关于电子设备100检测电子设备100上显示屏状态的方式,可以参考前述步骤S404中的描述,在此不再赘述。
S505.电子设备100每隔指定时长B1将电子设备100的显示屏状态发送给电子设备200。
具体的,电子设备100中的显示屏状态检测模块,可以将获取到的电子设备100的显示屏状态,通过无线通信连接发送给电子设备200。可以理解的是,由于电子设备100中的显示屏状态检测模块,每隔指定时长B1(例如,每隔3秒)检测到电子设备100的显示屏状态,因此,电子设备100中的显示屏状态检测模块,可以每隔指定时长B1(例如,每隔3秒)将本次检测到的电子设备100的显示屏状态,通过无线通信连接发送给电子设备200。优选的,电子设备100中的显示屏状态检测模块,可以通过synergy服务将电子设备 100的显示屏状态发送给电子设备200。
S506.电子设备200基于电子设备100的显示屏状态,判断电子设备100的设备状态是否处于非使用状态。
具体的,当电子设备200基于电子设备100的显示屏状态,确定出在指定时间段C4内(例如,1分钟内),电子设备100上显示屏处于第一状态的时间小于或等于指定时长B2(例如,51秒)时,电子设备200可以确定出电子设备100处于非使用状态。
其中,关于显示屏处于第一状态的说明可以参考前述说明,在此不再赘述。优选的,本申请实施例以显示屏处于第一状态为:显示屏处于亮屏状态且解锁状态为例,来说明实施本方案的流程。
示例性的,电子设备200可以每隔3秒(也即是每隔指定时长B1)接收到电子设备100发送的电子设备100的显示屏状态。电子设备200可以记录下该显示屏状态。然后,当电子设备200基于上述记录下的电子设备100的显示屏状态,确定出在1分钟内(也即是在指定时间段C4内),电子设备100上显示屏处于亮屏状态且解锁状态的时间小于或等于51秒(也即是指定时长B2)时,电子设备200可以确定出电子设备100处于非使用状态。
具体的,当电子设备200基于电子设备100的显示屏状态,确定出在指定时间段C4内(例如,在1分钟内),电子设备100上显示屏处于第一状态的时间大于指定时长B2(例如,51秒)时,电子设备200可以确定出电子设备100处于使用状态。
示例性的,电子设备200可以每隔3秒(也即是每隔指定时长B1)接收到电子设备100发送的电子设备100的显示屏状态。电子设备200可以记录下该显示屏状态。然后,当电子设备200基于上述记录下的电子设备100的显示屏状态,确定出在1分钟内(也即是在指定时间段C4内),电子设备100上显示屏处于亮屏状态且解锁状态的时间大于51秒(也即是指定时长B2)时,电子设备200可以确定出电子设备100处于使用状态。
S507.当电子设备200确定出电子设备100的设备状态处于非使用状态时,电子设备200可以通过PPG传感器检测用户的睡眠数据。
具体的,关于该步骤的说明可以参考前述步骤S408中的描述,在此不再赘述。
在一些示例中,当电子设备100和电子设备200建立的无线通信连接(例如,synergy服务)不稳定,或者,电子设备100和电子设备200建立的无线通信连接(例如,synergy服务)已断开时,电子设备200接收不到电子设备100发送的电子设备100的显示屏状态,此时,电子设备200可以通过PPG传感器检测用户的睡眠数据。
当电子设备200基于电子设备100发送的电子设备100显示屏状态,确定电子设备100的设备状态处于使用状态时,即是用户正在使用电子设备100,表明用户正处于活动状态而不处于睡眠状态,因此,电子设备200不检测用户的睡眠数据,电子设备200循环执行前述图5所示具体步骤。在一些示例中,当电子设备100的设备状态处于使用状态时,电子设备200可以清除ACC传感器获取到的加速度数据。
在一些示例中,当电子设备200基于ACC传感器和PPG传感器处于睡眠状态后,若电子设备200基于陀螺仪传感器和ACC传感器,检测到用户行走的步数大于或等于指定阈值A3(例如,20步)时,电子设备200可以确定用户已经清醒,当前并不处于睡眠状态。
下面,介绍本申请实施例提供的一种应用于通信系统10的软件架构。
请参考图6,图6示例性示出了本申请实施例提供的一种应用于通信系统10的软件架构示意图。
如图6所示,电子设备200可以包括:位于应用层中的穿戴软件模块602,位于应用程序框架层的睡眠状态检测模块601。电子设备100可以包括:位于应用层中的第一应用603,位于应用程序框架层中的显示屏状态检测模块604。其中:
睡眠状态检测模块601可以用于:1.通过ACC传感器判断用户否处于疑似入睡状态。当睡眠状态检测模块601确定用户处于疑似入睡状态时,睡眠状态检测模块601可以向穿戴软件模块602发送疑似入睡状态的信息;2.用于接收穿戴软件模块602发送的电子设备100的状态信息。当电子设备100的状态信息指示电子设备100处于非使用状态时,睡眠状态检测模块601可以通过PPG传感器检测用户的睡眠数据。在一些示例中,当电子设备100的状态信息指示电子设备100的设备状态处于使用状态时,睡眠状态检测模块601清除ACC传感器获取到的加速度数据;3.在一些示例中,当电子设备100和电子设备200建立的无线通信连接(例如,蓝牙连接)不稳定,或者,电子设备100和电子设备200建立的无线通信连接已断开时,穿戴软件模块602接收不到电子设备100中第一应用发送的电子设备100的状态信息,此时,睡眠状态检测模块601可以接收到穿戴软件模块602发送的第一指示信息,该第一指示信息用于指示电子设备100的设备状态未知。响应于该第一指示信息,睡眠状态检测模块601可以通过PPG传感器检测用户的睡眠数据。具体实现方式可以参考图4所示实施例的说明,在此不再赘述。
穿戴软件模块602可以用于:1.接收睡眠状态检测模块601发送的疑似入睡状态的信息,然后,将显示屏状态检测指令通过无线通信连接(例如,蓝牙连接),发送给电子设备100中的第一应用603;2.通过无线通信连接(例如,蓝牙连接),接收到电子设备100中第一应用603发送的电子设备100的状态信息,然后,将电子设备100的状态信息发送给睡眠状态检测模块601。具体实现方式可以参考图4所示实施例的说明,在此不再赘述。
第一应用603可以用于:1.通过无线通信连接(例如,蓝牙连接),接收到电子设备200中穿戴软件模块602发送的显示屏状态检测指令,然后,可以每隔指定时长B1(例如,每隔3秒)将显示屏状态检测指令发送给显示屏状态检测模块604;2.可以每隔指定时长B1(例如,每隔3秒)接收到显示屏状态检测模块604发送的电子设备100的显示屏状态,并基于电子设备100的显示屏状态判断电子设备100的设备状态;3.通过无线通信连接(例如,蓝牙连接),将电子设备100的状态信息发送给电子设备200中的穿戴软件模块602。具体实现方式可以参考图4所示实施例的说明,在此不再赘述。
显示屏状态检测模块604可以用于:1.每隔指定时长B1(例如,每隔3秒),接收到第一应用603发送的显示屏状态检测指令。响应于该显示屏状态检测指令,检测电子设备100的显示屏状态;2.每隔指定时长B1(例如,每隔3秒),将电子设备100的显示屏状 态发送给第一应用603。具体实现方式可以参考图4所示实施例的说明,在此不再赘述。
接下来,介绍本申请实施例提供的另一种应用于通信系统10的软件架构。
请参考图7,图7示例性示出了本申请实施例提供的另一种应用于通信系统10的软件架构示意图。
如图7所示,电子设备200可以包括:位于应用层中的穿戴软件模块702,位于应用程序框架层的睡眠状态检测模块701。电子设备100可以包括:位于应用框架层的显示屏状态检测模块703。其中:
睡眠状态检测模块701可以用于:1.通过ACC传感器判断用户否处于疑似入睡状态。当睡眠状态检测模块701确定用户处于疑似入睡状态时,睡眠状态检测模块701可以向穿戴软件模块702发送疑似入睡状态的信息;2.用于接收穿戴软件模块702发送的电子设备100的状态信息。当电子设备100的状态信息指示电子设备100的设备状态处于非使用状态时,睡眠状态检测模块701可以通过PPG传感器检测用户的睡眠数据。在一些示例中,当电子设备100的状态信息指示电子设备100的设备状态处于使用状态时,睡眠状态检测模块701清除ACC传感器获取到的加速度数据;3.在一些示例中,当电子设备100和电子设备200建立的无线通信连接(例如,synergy服务)不稳定,或者,电子设备100和电子设备200建立的无线通信连接已断开时,电子设备200接收不到电子设备100中显示屏状态检测模块703发送的电子设备100的显示屏状态,此时,睡眠状态检测模块701可以接收到穿戴软件模块702发送的第一指示信息,该第一指示信息用于指示电子设备100的设备状态未知。响应于该第一指示信息,睡眠状态检测模块701可以通过PPG传感器检测用户的睡眠数据。具体实现方式可以参考图5所示实施例的说明,在此不再赘述。
穿戴软件模块702可以用于:1.接收睡眠状态检测模块701发送的疑似入睡状态的信息,然后,每隔指定时长B1(例如,每隔3秒),将显示屏状态检测指令通过电子设备100和电子设备200间的synergy服务,发送给电子设备100中的显示屏状态检测模块703;2.通过电子设备100和电子设备200间的synergy服务,每隔指定时长B1(例如,每隔3秒),接收到电子设备100中显示屏状态检测模块703发送的电子设备100的显示屏状态,并基于电子设备100的显示屏状态判断电子设备100的设备状态;3.将电子设备100的状态信息发送给睡眠状态检测模块701。具体实现方式可以参考图5所示实施例的说明,在此不再赘述。
显示屏状态检测模块703可以用于:1.通过电子设备100和电子设备200间的synergy服务,每隔指定时长B1(例如,每隔3秒),接收到电子设备100中穿戴软件模块702发送的显示屏状态检测指令;2.响应于该显示屏状态检测指令,检测电子设备100的显示屏状态;3.通过电子设备100和电子设备200间的synergy服务,每隔指定时长B1(例如,每隔3秒),将电子设备100的显示屏状态发送给电子设备200中的穿戴软件模块702。具体实现方式可以参考图5所示实施例的说明,在此不再赘述。
上述实施例中所用,根据上下文,术语“当…时”可以被解释为意思是“如果…”或“在…后”或“响应于确定…”或“响应于检测到…”。类似地,根据上下文,短语“在确 定…时”或“如果检测到(所陈述的条件或事件)”可以被解释为意思是“如果确定…”或“响应于确定…”或“在检测到(所陈述的条件或事件)时”或“响应于检测到(所陈述的条件或事件)”。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如DVD)、或者半导体介质(例如固态硬盘)等。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。

Claims (10)

  1. 一种检测系统,其特征在于,包括:第一电子设备和第二电子设备,所述第一电子设备和所述第二电子设备建立通信连接,其中:
    所述第二电子设备用于,当所述第二电子设备通过加速度ACC传感器确定用户处于疑似入睡状态时,向所述第一电子设备发送显示屏状态检测指令;
    所述第一电子设备用于,响应于所述显示屏状态检测指令,每隔第一时长获取到所述第一电子设备的显示屏状态;
    所述第一电子设备还用于,当所述第一电子设备基于所述每隔第一时长获取到的显示屏状态确定所述第一电子设备处于非使用状态时,向所述第二电子设备发送第一状态信息;其中,所述第一状态信息用于指示所述第一电子设备处于非使用状态;
    所述第二电子设备还用于,当所述第二电子设备接收到所述第一状态信息时,通过光电容积脉搏波标记法PPG传感器检测所述用户的睡眠数据。
  2. 根据权利要求1所述的检测系统,其特征在于,所述第二电子设备,具体用于:
    通过所述ACC传感器实时检测到在x轴、y轴和z轴上的加速度值;
    存储第一时间段内所述x轴的加速度值、所述y轴的加速度值和所述z轴的加速度值;
    当所述第二电子设备检测到在第二时间段内,所述x轴的加速度值、所述y轴的加速度值和所述z轴的加速度值都小于第一阈值时,确定用户处于疑似入睡状态;其中,所述第一时间段包括所述第二时间段。
  3. 根据权利要求1所述的检测系统,其特征在于,所述第一电子设备,具体用于:
    记录所述每隔第一时长获取到的显示屏状态;
    当所述第一电子设备确定在第三时间段内,所述第一电子设备的显示屏状态处于亮屏状态的时间小于或等于第二时长时,确定所述第一电子设备处于非使用状态。
  4. 根据权利要求1所述的检测系统,其特征在于,所述第一电子设备还用于,响应于所述显示屏状态检测指令,每隔第一时长获取到所述第一电子设备的显示屏状态之后,将所述每隔第一时长获取到的显示屏状态,发送给所述第二电子设备;
    所述第二电子设备还用于,当基于所述每隔第一时长获取到的显示屏状态,确定所述第一电子设备处于非使用状态时,通过PPG传感器检测所述用户的睡眠数据。
  5. 一种睡眠状态检测方法,应用于第二电子设备,其特征在于,包括:
    所述第二电子设备和第一电子设备建立通信连接;
    当所述第二电子设备通过ACC传感器确定用户处于疑似入睡状态时,所述第二电子设备向所述第一电子设备发送显示屏状态检测指令;
    所述第二电子设备接收到所述第一电子设备发送的第一状态信息;其中,所述第一状态信息用于指示所述第一电子设备处于非使用状态,所述第一状态信息为所述第一电子设 备基于每隔第一时长获取到的所述第一电子设备的显示屏状态,所确定出的信息;
    当所述第二电子设备接收到所述第一状态信息时,所述第二电子设备通过PPG传感器检测所述用户的睡眠数据。
  6. 根据权利要求5所述的方法,其特征在于,当所述第二电子设备通过加速度ACC传感器确定用户处于疑似入睡状态时,所述第二电子设备向所述第一电子设备发送显示屏状态检测指令,具体包括:
    所述第二电子设备通过所述ACC传感器实时检测到在x轴、y轴和z轴上的加速度值;
    所述第二电子设备存储第一时间段内所述x轴的加速度值、所述y轴的加速度值和所述z轴的加速度值;
    当所述第二电子设备检测到在第二时间段内,所述x轴的加速度值、所述y轴的加速度值和所述z轴的加速度值都小于第一阈值时,所述第二电子设备确定用户处于疑似入睡状态;其中,所述第一时间段包括所述第二时间段;
    所述第二电子设备向所述第一电子设备发送显示屏状态检测指令。
  7. 一种电子设备,为第二电子设备,其特征在于,包括:一个或多个处理器、一个或多个存储器和显示屏;所述一个或多个存储器与一个或多个处理器耦合,所述一个或多个存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当所述一个或多个处理器执行所述计算机指令时,使得所述电子设备执行如权利要求5-6中的任一项所述的方法。
  8. 一种计算机可读存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求5-6中的任一项所述的方法。
  9. 一种芯片或芯片系统,其特征在于,包括处理电路和接口电路,所述接口电路用于接收代码指令并传输至所述处理电路,所述处理电路用于运行所述代码指令以执行如权利要求5-6中任一项所述的方法。
  10. 一种计算机程序产品,其特征在于,当所述计算机程序产品在电子设备上运行时,使得所述电子设备执行如权利要求5-6中的任一项所述的方法。
PCT/CN2023/117593 2022-09-09 2023-09-08 睡眠状态检测方法、电子设备及系统 WO2024051790A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211103847.3 2022-09-09
CN202211103847.3A CN117678970A (zh) 2022-09-09 2022-09-09 睡眠状态检测方法、电子设备及系统

Publications (1)

Publication Number Publication Date
WO2024051790A1 true WO2024051790A1 (zh) 2024-03-14

Family

ID=90127162

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/117593 WO2024051790A1 (zh) 2022-09-09 2023-09-08 睡眠状态检测方法、电子设备及系统

Country Status (2)

Country Link
CN (1) CN117678970A (zh)
WO (1) WO2024051790A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105433904A (zh) * 2015-11-24 2016-03-30 小米科技有限责任公司 睡眠状态检测方法、装置及系统
WO2021213337A1 (zh) * 2020-04-23 2021-10-28 华为技术有限公司 可穿戴电子设备的使用监测方法、介质及其电子设备
US20220015716A1 (en) * 2019-03-25 2022-01-20 Samsung Electronics Co., Ltd. Electronic device for screening risk degree of obstructive sleep apnea, and operation method therefor
WO2022088938A1 (zh) * 2020-10-29 2022-05-05 华为技术有限公司 睡眠监测方法、装置、电子设备及计算机可读存储介质
WO2022151887A1 (zh) * 2021-01-15 2022-07-21 华为技术有限公司 睡眠监测方法及相关装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105433904A (zh) * 2015-11-24 2016-03-30 小米科技有限责任公司 睡眠状态检测方法、装置及系统
US20220015716A1 (en) * 2019-03-25 2022-01-20 Samsung Electronics Co., Ltd. Electronic device for screening risk degree of obstructive sleep apnea, and operation method therefor
WO2021213337A1 (zh) * 2020-04-23 2021-10-28 华为技术有限公司 可穿戴电子设备的使用监测方法、介质及其电子设备
WO2022088938A1 (zh) * 2020-10-29 2022-05-05 华为技术有限公司 睡眠监测方法、装置、电子设备及计算机可读存储介质
WO2022151887A1 (zh) * 2021-01-15 2022-07-21 华为技术有限公司 睡眠监测方法及相关装置

Also Published As

Publication number Publication date
CN117678970A (zh) 2024-03-12

Similar Documents

Publication Publication Date Title
US10945677B2 (en) Method for detecting biometric information and electronic device using same
US20220040533A1 (en) Electronic apparatus and operating method thereof
KR102620178B1 (ko) 전자 장치 및 그의 동작 방법
KR102486797B1 (ko) 전자 장치 및 전자 장치의 디스플레이 구동 방법
EP3357421A1 (en) Electronic device for authenticating biometric data and system
KR102461604B1 (ko) 데이터 송수신 방법 및 장치
US11041821B2 (en) Electronic device and method for sensing moisture in an electronic device
KR102540111B1 (ko) 전자 장치 및 전자 장치의 동작 방법
KR20180047654A (ko) 사용자 활동 인식 방법 및 이를 구현한 전자 장치
KR102126566B1 (ko) 전자 장치의 적외선 통신 방법 및 그 전자 장치
US10198057B2 (en) Electronic device and method for measuring position change
EP3093731B1 (en) Method for extending function by docking and electronic device thereof
KR20180024626A (ko) 저전력 상태에서 시간 정보 제공 방법 및 이 방법을 포함하는 전자 장치
US9949064B2 (en) Electronic device and operating method thereof
KR20170109401A (ko) 전자 장치 및 그 제어 방법
CN108388334B (zh) 电子设备及防止电子设备消耗电流的方法
EP3381369B1 (en) Electronic device and method for measuring biometric information
WO2021190538A1 (zh) 电子设备的睡眠呼吸暂停监测方法和介质
EP3470970B1 (en) Electronic device and touch input sensing method of electronic device
US20200177724A1 (en) Electronic device and operating method thereof
WO2024051790A1 (zh) 睡眠状态检测方法、电子设备及系统
US10298733B2 (en) Method for executing function of electronic device using bio-signal and electronic device therefor
KR20180127831A (ko) 전자 장치 및 그의 정보 공유 방법
KR20180050174A (ko) 전자 장치 및 그 제어 방법
CN113162837B (zh) 语音消息的处理方法、装置、设备及存储介质

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: 23862484

Country of ref document: EP

Kind code of ref document: A1