Sleep detection method, sleep detection device and wearable equipment
By combining sensor data and ultrasonic detection results, the problem of inaccurate judgments caused by wearing conditions and environmental effects of wearable devices in sleep detection is solved, and the accuracy of sleep state detection is improved.
Patent Information
- Application Number
- CN202310234290.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-28
- Publication Date
- 2024-08-30
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In sleep detection of existing wearable devices, the sensor is affected by the wearing condition and the external environment, resulting in inaccurate sleep detection judgments.
Use a sleep detection method that combines an acceleration sensor and/or a gyroscope sensor, and obtain the status of the wearable device and the user's eye opening and closing status through ultrasonic detection to improve the accuracy of sleep state judgment.
With the assistance of ultrasonic detection results, errors in sensor data are corrected, improving the accuracy of sleep state detection, reducing misjudgments, and enhancing the ability to judge the user's sleep status.
Smart Images

Figure CN118557141A
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of terminal devices, and more specifically, to a sleep detection method, a sleep detection device and a wearable device. Background Art
[0002] With the development of wearable devices, more and more wearable devices support sleep detection of users and adjust the corresponding mode, so as to reduce the impact of information notifications on the sleep quality of users. For example, when it is detected that the user has fallen asleep, only push notifications can be sent without sound or vibration reminders.
[0003] Wearable devices usually perform sleep detection based on data collected by multiple sensors represented by acceleration sensors and / or gyroscope sensors. However, since these sensors are easily affected by the wearing condition of the wearable device and the external environment, sleep detection judgment is inaccurate. Summary of the invention
[0004] The embodiments of the present application provide a sleep detection method, a sleep detection apparatus and a wearable device, which can improve the accuracy of detecting the user's sleep state.
[0005] In a first aspect, a sleep detection method is provided, comprising: a first process obtains a first detection result from a second process, the first detection result is used to indicate a first judgment result of a user's sleep state, the first detection result is judged based on data from at least one sensor, the at least one sensor includes an acceleration sensor and / or a gyroscope sensor; the first process obtains an ultrasonic detection result from a third process, the ultrasonic detection result is used to indicate a state of a wearable device and / or a state of the user's eyes being open or closed, the state of the wearable device including a worn state and a non-worn state; the first process determines whether the user is in a sleep state based on the first detection result and the ultrasonic detection result.
[0006] In this embodiment, the first process, the second process and the third process may be processes on the wearable device, and the first process may be an APP that monitors the user's sleep, such as a sleep health APP. The second process may be a preset sleep detection program, and the second process may obtain a first detection result by calling the sensor data for analysis and making a preliminary judgment on whether the user is in a sleeping state. The third process may determine the ultrasonic detection result by calling the ultrasonic detection data for analysis: the state of the wearable device and / or the state of the user's eyes being open or closed. The first process may use the first detection result and the ultrasonic detection result to judge whether the user is in a sleeping state. Due to the combination of the ultrasonic detection data, the result of judging the user's sleeping state may be more accurate.
[0007] The first process may obtain the first detection result and the ultrasonic detection result by requesting the first process from the second process and the third process; or the second process and the third process may periodically or non-periodically feed back to the first process.
[0008] In combination with the first aspect, in some implementations of the first aspect, before the first process obtains the ultrasonic detection result from the third process, the method further includes: the first process sends a query request to the third process, and the query request is used to request the ultrasonic detection result.
[0009] The first process may also send a query request to the second process to request the first detection result.
[0010] In this embodiment, the first process obtains the corresponding detection result by actively requesting.
[0011] After receiving the query request, the second process and the third process may send a query response to the first process, and the query response may include the first detection result and the ultrasonic detection result. Optionally, the query response may also include indication information of whether the query is successful.
[0012] In combination with the first aspect, in some implementations of the first aspect, before the first process sends a query request to the third process, the method includes: the first process sends a call request to the third process, and the call request is used to instruct the third process to perform ultrasonic detection.
[0013] Before the first process sends a query request to the second process, the first process also sends a call request to the second process, instructing the second process to perform a detection to obtain a first detection result.
[0014] In this embodiment, the detection of the second process and the third process may be triggered by the first process, and the first process may instruct the second process and the third process to perform corresponding detection by calling a request. For example, the first process may trigger the second process and the third process to perform corresponding detection after determining that the environment has changed (detecting changes in parameters such as the brightness and sound of the environment); or the first process may trigger the second process and the third process to perform corresponding detection at a fixed time (near the time when the user usually falls asleep); or the first process may trigger the second process and the third process to perform corresponding detection according to the user's operation (the user informs the first process through operation that it is about to start sleeping).
[0015] Optionally, after receiving the call request, the second process and the third process may send a call response to the first process to indicate whether the call is successful.
[0016] In combination with the first aspect, in some implementations of the first aspect, the query request includes an identifier of the first process; and / or the call request includes an identifier of the first process.
[0017] The identifier of the first process may also be the identifier of the APP corresponding to the first process. In this way, the second process and the third process may authenticate the first process or the APP corresponding to the first process according to the identifier. The call or request is allowed only after the identifier is authenticated.
[0018] Optionally, if the second process can detect the state of the wearable device and the opening and closing state of the user's eyes, the query request and the call request also include queried items and called items, that is, the first process can select the type of detection item to be queried and called as needed.
[0019] In combination with the first aspect, in some implementations of the first aspect, the ultrasonic detection result is used to indicate the state of the wearable device, and the first process determines whether the user is in a sleep state based on the first detection result and the ultrasonic detection result, including: when the wearable device is in a worn state, the first process determines whether the user is in a sleep state based on the first detection result.
[0020] In this embodiment, when the ultrasonic detection result indicates the state of the wearable device, the first process can determine whether the user is in a sleeping state according to the first detection result when the wearable device is in a wearing state, that is, when the wearable device is in a wearing state, the preliminary judgment result of the user's sleeping state by the first detection result can be directly used as the basis for judging whether the user is in a sleeping state. When the first detection result shows that the user is in a sleeping state, it is determined that the user is in a sleeping state; when the first detection result shows that the user is not in a sleeping state, it is determined that the user is not in a sleeping state.
[0021] Since the second process detection is mainly to infer the user's motion state based on the motion state of the wearable device indicated by the sensor, and then infer whether the user is in a sleeping state, when the wearable device is not worn, the first detection result has little reference significance for judging whether the user is in a sleeping state. In order to obtain an accurate sleeping state detection result, the user can be prompted to wear the wearable device, so as to facilitate determining whether the user is in a sleeping state in the next time period.
[0022] In combination with the first aspect, in some implementations of the first aspect, the ultrasonic detection result is used to indicate the opening and closing status of the user's eyes, and the first process determines whether the user is in a sleep state based on the first detection result and the ultrasonic detection result, including: when the user's eyes are in a closed state, the first process determines that the user is in a sleep state; when the user's eyes are open, the first process determines that the user is not in a sleep state.
[0023] In this embodiment, when the ultrasonic detection result indicates the user's eye opening and closing state, it can be determined whether the user is in a sleeping state according to the user's eye opening and closing state. In addition, if the first detection result and the final determination result of the user's sleeping state are inconsistent, the cause of the inconsistency can also be estimated.
[0024] In combination with the first aspect, in some implementations of the first aspect, the second process and the third process are the same process.
[0025] In this embodiment, the second process and the third process are integrated and can be integrated into the second process, that is, the second process can call the sensor data to determine the first detection result and call the ultrasonic detection data to determine the ultrasonic detection result.
[0026] In combination with the first aspect, in some implementations of the first aspect, the at least one sensor further includes at least one of the following: a heart rate sensor, a light sensor, a temperature sensor, and a pressure sensor.
[0027] In a second aspect, a sleep detection method is provided, characterized in that it includes: a third process calls an ultrasonic device to perform ultrasonic detection, the ultrasonic detection is used to obtain ultrasonic detection results, the ultrasonic detection results include the state of the wearable device and / or the state of the user's eyes being open or closed, the state of the wearable device includes a worn state and a non-worn state; the third process sends the ultrasonic detection results to the first process.
[0028] In this embodiment, the third process can call the ultrasonic device for detection, thereby determining the ultrasonic detection result based on the obtained ultrasonic data, and sending the ultrasonic detection result to the first process, so that the first process can assist in determining whether the user is in a sleeping state based on the ultrasonic detection result.
[0029] In combination with the second aspect, in some implementations of the second aspect, before the third process sends the ultrasonic detection result to the first process, the method also includes: the third process receives a query request from the first process, and the query request is used to request the ultrasonic detection result.
[0030] In combination with the second aspect, in some implementations of the second aspect, before the third process calls the ultrasonic device to perform ultrasonic detection, the method includes: the third process receives a call request from the first process, and the call request is used to instruct the third process to perform the ultrasonic detection.
[0031] In combination with the second aspect, in some implementations of the second aspect, the query request includes an identifier of the first process; and / or the call request includes an identifier of the first process.
[0032] In combination with the second aspect, in some implementations of the second aspect, the ultrasonic device includes a speaker and a microphone, the speaker is used to send ultrasonic waves, and the microphone is used to receive echoes of the ultrasonic waves.
[0033] In this embodiment, since the speaker and microphone on the wearable device are used to send and receive ultrasonic waves, there is no need to add additional devices for sending and receiving ultrasonic waves, that is, the technical solution of the embodiment of the present application is implemented.
[0034] In combination with the second aspect, in some implementations of the second aspect, the method also includes: when the third process determines that the distance between the user and the wearable device is less than or equal to a first preset threshold, the third process determines that the wearable device is in a worn state; when the third process determines that the distance between the user and the wearable device is greater than the first preset threshold, the third process determines that the wearable device is in a non-worn state.
[0035] In this embodiment, when determining the ultrasonic detection result, the third process can determine the distance between the user and the wearable device according to the ultrasonic detection data, and when the distance is less than or equal to the first preset threshold, it is determined that the wearable device is in the wearing state.
[0036] In combination with the second aspect, in some implementations of the second aspect, the method further includes: when the third process determines that the user's eyes are in a closed state for more than a second preset time length, the third process determines that the user's eyes are in a closed state.
[0037] In this embodiment, the third process can send and receive ultrasonic waves multiple times in a row to determine whether the user's eyes are in a closed state during each detection within a period of time. If the time when the user's eyes are in a closed state exceeds a second preset time length, it can be determined that the user's eyes are in a closed state.
[0038] In a third aspect, a sleep detection method is provided, comprising: obtaining first detection data, the first detection data comprising data of at least one sensor, the at least one sensor comprising an acceleration sensor and / or a gyroscope sensor; obtaining ultrasonic detection data, the ultrasonic detection data being used to determine a state of a wearable device and / or a state of eye opening and closing of a user, the state of the wearable device comprising a worn state and a non-worn state; and determining whether the user is in a sleeping state based on the first detection data and the ultrasonic detection data.
[0039] The sleep detection method may be performed by a processor of the first process or the wearable device. In this embodiment, the processor of the first process or the wearable device may directly determine whether the user is in a sleeping state based on the first detection data and the ultrasonic detection data, wherein the ultrasonic detection data includes data information of ultrasonic waves and ultrasonic echoes.
[0040] In combination with the third aspect, in some implementations of the third aspect, determining whether the user is in a sleep state based on the first detection data and the ultrasonic detection data includes: determining a first detection result based on the first detection data, and the first detection result is used to indicate a first judgment result of the user's sleep state; determining an ultrasonic detection result based on the ultrasonic detection data, and the ultrasonic detection result includes the state of the wearable device and / or the state of the user's eyes being open or closed, and the state of the wearable device includes a worn state and a non-worn state; determining whether the user is in a sleep state based on the first detection result and the ultrasonic detection result.
[0041] In this embodiment, the first process or processor may first determine the first detection result according to the first detection data, and determine the ultrasonic detection result according to the ultrasonic detection data, thereby determining whether the user is in a sleeping state according to the first detection result and the ultrasonic detection result.
[0042] In combination with the third aspect, in some implementations of the third aspect, before acquiring the first detection data, the method includes: calling an ultrasonic device to perform ultrasonic detection.
[0043] In combination with the third aspect, in some implementations of the third aspect, the ultrasonic device includes a speaker and a microphone, the speaker is used to send ultrasonic waves, and the microphone is used to receive echoes of the ultrasonic waves.
[0044] In combination with the third aspect, in some implementation methods of the third aspect, determining the ultrasonic detection result based on the ultrasonic detection data includes: when it is determined that the distance between the user and the wearable device is less than or equal to a first preset threshold, determining that the wearable device is in a worn state; when it is determined that the distance between the user and the wearable device is greater than the first preset threshold, determining that the wearable device is in a non-worn state.
[0045] In combination with the third aspect, in some implementations of the third aspect, determining the ultrasonic detection result based on the ultrasonic detection data includes: when it is determined that the user's eyes are in a closed state for more than a second preset time length, determining that the user's eyes are in a closed state.
[0046] In combination with the third aspect, in some implementations of the third aspect, the ultrasonic detection result is used to indicate the state of the wearable device, and determining whether the user is in a sleep state based on the first detection result and the ultrasonic detection result, including: when the wearable device is in a worn state, determining whether the user is in a sleep state based on the first detection result.
[0047] In combination with the third aspect, in some implementations of the third aspect, the ultrasonic detection result is used to indicate the opening or closing state of the user's eyes, and whether the user is in a sleep state is determined based on the first detection result and the ultrasonic detection result, including: when the user's eyes are in a closed state, determining that the user is in a sleep state; when the user's eyes are in an open state, determining that the user is not in a sleep state.
[0048] In combination with the third aspect, in some implementations of the third aspect, the at least one sensor further includes at least one of the following: a heart rate sensor, a light sensor, a temperature sensor, and a pressure sensor.
[0049] In a fourth aspect, a sleep detection method is provided, comprising: a first process obtains an ultrasonic detection result from a third process, the ultrasonic detection result is used to indicate the state of a wearable device and the state of the user's eyes being open or closed, the state of the wearable device including a worn state and a non-worn state; the first process determines whether the user is in a sleeping state based on the ultrasonic detection result.
[0050] In this embodiment, the first process can determine whether the user is in a sleeping state based on the state of the wearable device determined by the third process and the state of the user's eyes being open or closed.
[0051] In a fifth aspect, a sleep detection system is provided, comprising: a wearable device, for sending a first detection result to an electronic device, the first detection result being used to indicate a first judgment result of a user's sleep state, the first detection result being judged based on data from at least one sensor, the at least one sensor including an acceleration sensor and / or a gyroscope sensor; the wearable device is further used to send an ultrasonic detection result to the electronic device, the ultrasonic detection result being used to indicate the state of the wearable device and / or the state of the user's eyes being open or closed, the state of the wearable device including a worn state and a non-worn state; the electronic device is used to determine whether the user is in a sleep state based on the first detection result and the ultrasonic detection result.
[0052] In this embodiment, the first detection result may be sent by the second process of the wearable device, the ultrasonic detection result may be sent by the third process of the wearable device, and the first process of the electronic device may obtain the first detection result and the ultrasonic detection result and analyze them to obtain the user's sleep state. The electronic device and the wearable device communicate through the bridge unit.
[0053] In combination with the fifth aspect, in some implementations of the fifth aspect, the electronic device is further used to send a query request to the wearable device, and the query request is used to request the ultrasonic detection result.
[0054] In combination with the fifth aspect, in some implementations of the fifth aspect, the electronic device is further used to send a call request to the wearable device, and the call request is used to instruct the wearable device to perform ultrasonic detection.
[0055] In combination with the fifth aspect, in some implementations of the fifth aspect, the query request includes an identifier of the electronic device; and / or the call request includes an identifier of the electronic device.
[0056] In combination with the fifth aspect, in some implementations of the fifth aspect, the ultrasonic detection result is used to indicate the state of the wearable device, and the electronic device is specifically used to: when the wearable device is in a worn state, determine whether the user is in a sleeping state according to the first detection result.
[0057] In combination with the fifth aspect, in some implementations of the fifth aspect, the ultrasonic detection results are used to indicate the opening and closing status of the user's eyes, and the electronic device is specifically used to: when the user's eyes are in a closed state, determine that the user is in a sleeping state; when the user's eyes are in an open state, the electronic device determines that the user is not in a sleeping state.
[0058] In combination with the fifth aspect, in some implementations of the fifth aspect, the at least one sensor also includes at least one of the following: a heart rate sensor, a light sensor, a temperature sensor, and a pressure sensor.
[0059] In a sixth aspect, a sleep detection device is provided, configured to execute the method described in any one of the first aspect or any one of the implementations of the first aspect to the fourth aspect or any one of the implementations of the fourth aspect.
[0060] In a seventh aspect, a wearable device is provided for executing the method described in the first aspect or any implementation manner of the first aspect to the fourth aspect or any implementation manner of the fourth aspect.
[0061] In an eighth aspect, an electronic device is provided for executing the method described in the first aspect or any implementation manner of the first aspect to the fourth aspect or any implementation manner of the fourth aspect.
[0062] In the ninth aspect, a computer storage medium is provided, which, when the computer instructions are executed on an electronic device, enables the electronic device to execute the method described in the first aspect or any implementation of the first aspect to the fourth aspect or any implementation of the fourth aspect.
[0063] In the tenth aspect, an electronic device is provided, comprising: a memory for storing computer instructions; and a processor for executing the computer instructions stored in the memory so that the electronic device executes the method described in the first aspect or any one of the implementations of the first aspect to the fourth aspect or any one of the implementations of the fourth aspect.
[0064] In the eleventh aspect, a chip system is provided, characterized in that it includes at least one processor, and when the program instructions are executed in the at least one processor, the at least one processor executes the method described in the first aspect or any implementation of the first aspect to the fourth aspect or any implementation of the fourth aspect.
[0065] In the twelfth aspect, a chip is provided, comprising a processor and a data interface, wherein the processor reads instructions stored in a memory through the data interface and executes the method described in the first aspect or any implementation of the first aspect to the fourth aspect or any implementation of the fourth aspect.
[0066] Optionally, as an implementation, the chip may further include a memory, wherein the memory stores instructions.
[0067] The processor is used to execute instructions stored in the memory. When the instructions are executed, the processor is used to execute the method described in the first aspect or any implementation of the first aspect to the fourth aspect or any implementation of the fourth aspect.
[0068] The above chip may specifically be a field programmable gate array or a dedicated integrated circuit. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] Figure 1 It is a schematic diagram of the hardware structure of an electronic device to which the embodiments of the present application are applicable.
[0070] Figure 2 It is a schematic diagram of the software structure of an electronic device to which the embodiments of the present application are applicable.
[0071] Figure 3 It is a schematic diagram of a system architecture applicable to an embodiment of the present application.
[0072] Figure 4 A schematic flow chart of a sleep detection method provided in an embodiment of the present application is shown.
[0073] Figure 5 A schematic flow chart of a sleep detection method provided in an embodiment of the present application is shown.
[0074] Figure 6 A schematic flow chart of a sleep detection method provided in an embodiment of the present application is shown.
[0075] Figure 7 A schematic flow chart of a sleep detection method provided in an embodiment of the present application is shown.
[0076] Figure 8 A schematic block diagram of a sleep detection device provided in an embodiment of the present application is shown.
[0077] Fig. 9 A schematic block diagram of a sleep detection device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0078] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0079] The terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations on the present application. As used in the specification and the appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one, two or more. The term "and / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist; for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.
[0080] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear at different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0081] The method provided in the embodiments of the present application is applied to electronic devices, including but not limited to mobile phones, tablet computers, vehicle-mounted devices, wearable devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), smart screens, and other electronic devices with display screens. The embodiments of the present application do not impose any restrictions on the specific types of electronic devices.
[0082] For example, Figure 1 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.
[0083] like Figure 1As shown, the electronic device 100 may include: a processor 110, a memory 120, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a camera 191, a display screen 192, a button 193, etc.
[0084] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.
[0085] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0086] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory, thereby avoiding repeated access, reducing the waiting time of the processor 110, and thus improving the efficiency of the system.
[0087] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0088] For example, the processor 110 and the touch sensor 180E can communicate through an I2C bus interface to implement the touch function of the electronic device 100. The processor 110 and the camera 191 can communicate through a CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 192 can communicate through a DSI interface to implement the display function of the electronic device 100.
[0089] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0090] The charging management module 140 is used to receive charging input from the charger. The power management module 141 is used to connect to the battery 142. While the charging management module 140 is charging the battery 142, the power management module 141 can also be used to power the electronic device 100. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, and battery health status.
[0091] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0092] The electronic device 100 implements the display function through a GPU, a display screen 192, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 192 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0093] The display screen 192 is used to display images, videos, etc. The display screen 192 includes a display panel. The display panel can be 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 (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 192, where N is a positive integer greater than 1.
[0094] The electronic device 100 can realize the shooting function through ISP, camera 191, video codec, GPU, display screen 192 and application processor. ISP is used to process the data fed back by camera 191. Camera 191 is used to capture static images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) phototransistor. In some embodiments, the electronic device 100 may include 1 or N cameras 191, where N is a positive integer greater than 1.
[0095] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0096] The memory 120 is used to store data and / or instructions.
[0097] The memory 120 may include an internal memory. The internal memory is used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory.
[0098] The memory 120 may also include an external memory, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory may communicate with the processor 110 via an external memory interface to implement a data storage function, such as storing music, video and other files in the external memory.
[0099] The electronic device 100 can implement audio functions such as audio playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0100] In the embodiment of the present application, the speaker 170A may be used to transmit ultrasonic waves, and the microphone 170C may be used to receive an echo of the ultrasonic waves (ultrasonic echo).
[0101] The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an acceleration sensor 180C, a distance sensor 180D, a touch sensor 180E, and some other sensors.
[0102] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 192. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 192, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
[0103] The gyroscope sensor 180B is also called an angular velocity sensor, which can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes. For example, the gyroscope can fully monitor the displacement of the player's hand, thereby achieving various game operation effects, such as changing the horizontal screen to the vertical screen, turning in a racing game, and so on.
[0104] The acceleration sensor 180C can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. The acceleration sensor 180C can also be used to identify the posture of the electronic device 100, and is applied to applications such as horizontal and vertical screen switching, pedometers, etc.
[0105] In the embodiment of the present application, the acceleration sensor 180C and / or the gyroscope sensor 180B can be used alone or in combination to determine whether the user is moving by detecting the movement of the electronic device, and then make a preliminary judgment on whether the user is in a sleeping state.
[0106] The distance sensor 180D is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180D to measure the distance to achieve fast focusing.
[0107] The touch sensor 180E is also called a "touch panel". The touch sensor 180E can be set on the display screen 192, and the touch sensor 180E and the display screen 192 form a touch screen, also called a "touch screen". The touch sensor 180E is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 192. In other embodiments, the touch sensor 180E can also be set on the surface of the electronic device, which is different from the position of the display screen 192.
[0108] It should be understood that in the embodiment of the present application, there is no limitation on the type of sensors included in the sensor module 180, and the sensor module 180 may include more or fewer sensors, depending on actual needs, which will not be described in detail here.
[0109] The key 193 may include a power key, a volume key, etc. The key 193 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.
[0110] It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0111] Figure 2 FIG. 1 shows a software structure block diagram of an electronic device provided in an embodiment of the present application. Figure 2 As shown in FIG. 1 , the layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, The system is divided into four layers, from top to bottom: application layer, application framework layer, system runtime layer (including system library and Android runtime) and kernel layer. Below the kernel layer is the hardware layer.
[0112] The application layer can include a series of application (APP) packages. Figure 2 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.
[0113] In an embodiment of the present application, the application layer may include applications related to sleep management (the Sleep Health APP mentioned later, the first process), a preset sleep detection program (the second process) and an ultrasonic detection program (the third process).
[0114] The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. Figure 2 As shown, the application framework layer may include a window manager, a content provider, a phone manager, a resource manager, a notification manager, a view system, a card service engine, and the like.
[0115] The system runtime library layer (libraries) can be divided into two parts: system libraries and Android runtime.
[0116] Android runtime is the Android operating environment, including the core library and virtual machine. Android runtime is responsible for the scheduling and management of the Android system. The core library consists of two parts: one is the function that the Java language needs to call, and the other is the Android core library.
[0117] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0118] The system library is the support of the application framework and can include multiple functional modules, such as: surface manager, media libraries, 2D graphics engine (such as SGL), 3D graphics processing library (such as OpenGL ES), image processing library, etc.
[0119] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0120] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0121] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis and layer processing, etc.
[0122] A 2D graphics engine is a drawing engine for 2D drawings.
[0123] The kernel layer is the layer between hardware and software, which is used to provide essential functions of the operating system such as file management, memory management, process management, network protocol stack, etc. The kernel layer includes at least display driver, camera driver, audio driver, sensor driver, Bluetooth driver, etc.
[0124] Figure 3 The system architecture applicable to the embodiment of the present application is shown as follows: Figure 3 As shown in (a), the embodiment of the present application can be applied to a wearable device 310, and the wearable device 310 can have Figure 1 or, as Figure 2 As shown in (b), the embodiment of the present application can be applied to an electronic device 320, and the electronic device 320 can have Figure 1 The electronic device 320 has a similar structure to the electronic device shown. Schematically, the electronic device 320 can be a smart phone. The electronic device 320 and the wearable device 310 can be connected via a communication medium, so that the electronic device 320 can send instructions to the wearable device 310 via the communication medium, and then perform corresponding operations to perform sleep state detection.
[0125] Wearable devices such as smart watches and bracelets now support detecting whether the user is in a sleeping state through sensor data. However, the results of these sensor detections are easily affected by the wearing condition of the wearable device and the external environment, resulting in inaccurate sleep status judgment results. In this way, it is possible that the user is sleeping but the wearable device still vibrates to prompt the user, affecting the user's sleep, or the user is not sleeping but the wearable device only notifies the user of information without prompting the user through vibration or prompt sound, causing the user to miss important information. The inaccurate judgment of the sleep state affects the user experience.
[0126] The present application embodiment provides a sleep detection method, which can improve the accuracy of sleep detection. Figure 4 As shown, the method includes:
[0127] S410: The second process sends a first detection result to the first process.
[0128] Correspondingly, the first process receives the first detection result from the second process.
[0129] S420: The third process sends the ultrasonic detection result to the first process.
[0130] Correspondingly, the first process receives the ultrasonic detection result from the third process.
[0131] S430: The first process determines whether the user is in a sleeping state according to the first detection result and the ultrasonic detection result.
[0132] The sleep detection method may be executed by a process in the wearable device system. The first process, the second process, and the third process may be processes in the wearable device system. The process executing the corresponding action may be understood as the processor of the wearable device running the corresponding process to execute the corresponding action.
[0133] In S410 and S420, the first process may be an application program (APP), which needs to determine whether the user is in a sleeping state, so as to perform corresponding operations. For example, the application program may be an APP that monitors the user's sleep quality (sleep health APP).
[0134] The second process may be a common preset sleep detection program. The second process mainly uses the data from the sensor to make a preliminary judgment on whether the user is in a sleep state. The first detection result is the result of the preliminary judgment.
[0135] The third process can determine the ultrasonic detection result by analyzing the ultrasonic detection data, and the ultrasonic detection result includes the state of the wearable device (worn or not worn) and / or the user's eye opening and closing state.
[0136] Before the first process obtains the first detection result and the ultrasonic detection result, the second process and the third process can start detection. Specifically, the second process can call the sensor to perform detection to obtain the first detection result; the third process can call the ultrasonic device to perform detection to obtain the ultrasonic detection result.
[0137] In an embodiment of the present application, the second process and the third process can start detection only when preset conditions are met, thereby reducing the overhead and power consumption of the wearable device.
[0138] In some embodiments, the preset condition may be a change in the environment. The change in the environment may be determined based on data collected by the sensor. The second process may determine the change in the environment based on the data collected by the sensor, or the first process may determine the change in the environment based on the data collected by the sensor. The sensor may include at least one of an acceleration sensor, a sound sensor, a light sensor, and a gyroscope sensor. When a user sleeps, there will generally be changes in the environment, such as dimming of the ambient light, quietness of the environment, etc. Wearable devices or other electronic devices generally monitor changes in the environment in real time to provide users with a better experience. For example, when the light dims, the screen brightness can be automatically adjusted to reduce stimulation to the eyes.
[0139] For example, the second process may periodically analyze the sensor data, and when it is determined that a significant change has occurred in the environment, the second process may be started for detection while triggering the third process to perform ultrasonic detection.
[0140] For another example, the first process may periodically analyze the sensor data, and when it is determined that a significant change has occurred in the environment, the second process and the third process may be started to perform sleep detection.
[0141] In other embodiments, the preset condition may be reaching a preset time point, which may be a sleeping time according to the user's historical sleep records or a sleeping time set by the user. In other words, the second process and the third process may be started at a fixed time close to the sleeping time of the user.
[0142] In other embodiments, the preset condition may be receiving an operation from the user. For example, the user may operate on the APP corresponding to the first process to inform the first process that the APP corresponding to the first process is about to start sleeping. The first process may then send instructions to the second process and the third process to instruct the second process and the third process to start detection.
[0143] The first detection result is used to indicate the first judgment result (preliminary judgment result) of the user's sleep state. The first detection result is determined based on the data of at least one sensor. The at least one sensor may include an acceleration sensor and / or a gyroscope sensor. Optionally, the at least one sensor may also include at least one of a light sensor, a heart rate sensor, a sound sensor, and a temperature sensor. The second process may correspond to a preset sleep detection program. The second process may call the at least one sensor when performing the detection, and by analyzing the sensor data, the user's motion state may be determined. The user's motion state may include whether the user is moving and the user's motion amplitude, and then the user's sleep state may be preliminarily determined based on the motion state, that is, whether the user is in a sleep state. In fact, since the sensor is set on the wearable device, the motion state of the wearable device is actually directly determined by the sensor data. The user's motion state can be predicted by combining the directly determined motion state of the wearable device and other known data / conditions and / or sensor data. Further, the predicted user's motion state can be used to make a preliminary judgment on whether the user is in a sleep state. Other known data / conditions may include statistical or user-determined sleep time, the wearing state of the wearable device, etc. The sensor data may include the wearing state of the wearable device and / or the user's body data predicted by at least one of a light sensor, a heart rate sensor, a temperature sensor, etc. The heart rate sensor may use photoplethysmography (PPG) to determine the user's heart rate. This method is to emit light to the blood vessels through the wearable device. Since the peripheral blood volume is large when the heart contracts, the amount of light absorption is large, and less light is reflected back to the watch or bracelet; while the opposite is true when the heart relaxes. The user's heart rate can be determined by the algorithm based on the change in the light transmittance of the user's blood.
[0144] When making a preliminary judgment on whether the user is in a sleeping state based on the user's motion state, the user can be judged to be in a sleeping state (no or few large movements when the user is in a sleeping state) when the sensor data analysis shows that the user has not moved for a certain period of time (for example, more than 20 minutes) or the movement amplitude is less than a preset threshold. And according to the size of the user's movement amplitude, the user's sleep depth can also be predicted, thereby realizing the analysis of the user's sleep quality. Since the analysis of the user's sleep quality is not within the scope of discussion of the embodiments of this application, it will not be repeated here.
[0145] When predicting the wearing state of a wearable device and / or the user's body data through sensor data, since the human body temperature and heart rate are within a certain stable range, if the data collected by the heart rate sensor and the temperature sensor are similar to the human body temperature and heart rate range, it can be determined that the wearable device is in a wearing state at this time. In addition, if the wearable device is worn, the ambient brightness of the part where the wearable device contacts the user's skin will decrease. For example, the back of a smart watch or bracelet will detect a darker ambient brightness due to the occlusion of the user's wrist. The wearing state of a wearable device can also be predicted through analysis of a light sensor. In addition, the user's sleeping state can be predicted through changes in the user's body data. For example, when the user is asleep, the body temperature will decrease and the heart rate will also decrease. This can be combined with changes in the user's heart rate to assist in judging the user's sleeping state.
[0146] The first detection result may also be the result of whether the user's movement amplitude for a period of time (for example, more than 20 minutes) is less than a preset threshold. The user's movement amplitude for a period of time may also be used to make a preliminary judgment on whether the user is in a sleep state. If the user's movement amplitude during the time period is less than the preset threshold, it can be inferred that the user is in a sleep state.
[0147] However, even when the wearable device is actually being worn, it may not be able to collect the user's body temperature and heart rate due to the position and tightness of the wearer's wear and whether it is in direct contact with the skin. Or the light sensor may misjudge the wearing state because it is placed on the table, resulting in errors in the initial judgment of the user's sleeping state.
[0148] Therefore, a third process is added in the embodiment of the present application, and the state of the wearable device and / or the opening and closing state of the user's eyes is detected by the third process, and the first detection result is corrected, thereby reducing the error caused by using only the second process to judge the sleep state and improving the accuracy of sleep state detection.
[0149] When the third process performs detection, the ultrasonic device can be called to transmit and receive ultrasonic waves to obtain ultrasonic detection data. By analyzing the ultrasonic detection data, the ultrasonic detection results are obtained. The ultrasonic detection results may include the state of the wearable device and / or the state of the user's eyes being open or closed.
[0150] In some embodiments, the ultrasonic device may be a specially configured ultrasonic transceiver device; in other embodiments, in order to avoid the need for additional ultrasonic devices, ultrasonic waves may be transmitted through a speaker and reflected ultrasonic echoes may be received from a microphone, and the wearing state of the wearable device and / or the eye opening state of the user may be obtained by analyzing the ultrasonic echoes. The following describes the process of determining the state of the wearable device and the eye opening state of the user by taking the example of receiving and transmitting ultrasonic waves through a speaker and a microphone.
[0151] When the third process is used to determine the state of the wearable device, it can be mainly determined whether the state of the wearable device is a wearing state or an unworn state based on the ultrasonic ranging principle. Taking the wearable device as a smart watch as an example, when the watch is worn, the back of the dial is close to the user's wrist. The speaker of the smart watch can be used to transmit ultrasonic waves to the back of the dial, and the time of transmitting ultrasonic waves and receiving reflected ultrasonic echoes can be recorded, so as to calculate the distance between the smart watch and the human body. In some cases, the ultrasonic echo is not necessarily obtained by the first reflection of the ultrasonic wave. For example, when the user wears the smart watch, the smart watch may be worn directly on the wrist or worn on the wrist through clothing. When the clothing is separated, the ultrasonic wave may be reflected on the surface of the clothing and partially transmitted through the clothing to the user's wrist skin. The ultrasonic echo reflected by the wrist skin can be used to measure the distance between the human body and the smart watch. If the distance between the human body and the smart watch is less than or equal to the preset threshold, it can be judged that the smart watch is in a wearing state; if the distance between the human body and the smart watch is greater than the preset threshold, it can be judged that the smart watch is in an unworn state.
[0152] In addition, since the ultrasound wave generally reflects most of the energy when it is first reflected by the air / solid interface (the solid may be skin or clothing), the receiving intensity of the ultrasound echo of the second reflection may be low, resulting in measurement errors. Users can be reminded in advance to avoid wearing wearable devices through clothing or other items, so as to better judge the user's sleeping state and monitor the user's health.
[0153] Due to the different acoustic impedances of human skin and desktop (where the wearable device may be placed), the intensities of the ultrasonic echo obtained by the first reflection are different (time-intensity image). The greater the difference in acoustic impedance, the higher the intensity of the ultrasonic echo. In addition, the positions of the peaks in the frequency-intensity image of the ultrasonic echo will also be different. By analyzing the ultrasonic echo, the type of medium of the first reflection and the distance to the medium can be determined. When the medium type is human skin and the distance is less than the preset threshold, it can be determined that the wearable device is in the wearable state.
[0154] When the third process is used to determine the user's eye opening and closing state, the user's eye opening and closing state is mainly determined based on the reflection and transmission principle of ultrasonic waves. Since the relative position of the user's eyes and the wearable device changes with the user's posture (supine, side-lying, or arm state), when determining the user's eye opening and closing state through the third process, it is necessary to determine the position of the user's eyes.
[0155] In some embodiments, the wearable device can emit ultrasound in different directions and analyze the reflected ultrasound echo to determine the ultrasound echo reflected from the user's eye. The ultrasound echo can be analyzed to determine the opening and closing state of the user's eyes. When the user's eyes are open, most of the ultrasound will be reflected by the protective film on the surface of the eyeball when it is shot at the eyeball, and some will enter the eyeball and then reflect again through the fundus; if the user's eyes are closed, most of the ultrasound will be reflected by the eyelid when it is shot at the eyeball, and some will penetrate the eyelid and continue to shoot at the eyeball. When the user's eyes are open or closed, the intensity of the reflected echo of the ultrasound and the frequency of the peak of the reflected echo will be different. By analyzing the reflected echo, the opening and closing state of the user's eyes at that moment can be determined. For example, the ultrasound echo images corresponding to the opening and closing of the eyes (time-intensity image and frequency-intensity image, the frequency-intensity image can be converted into a beam-intensity image) can be preset in the wearable device, and then the ultrasound echo actually reflected by the user's eyes is compared with the preset image, so as to determine the instantaneous opening and closing state of the user's single eye.
[0156] In the embodiment of the present application, the eye opening and closing state of the user detected by one ultrasonic wave is the instantaneous eye opening and closing state. To more accurately judge the eye opening and closing state of the user, the user's multiple instantaneous eye opening and closing states can be determined by sending and receiving ultrasonic waves multiple times within a period of time. When the user's eyes are detected to be in a closed state multiple times within a period of time, it can be determined that the user's eyes are in a closed state for more than a preset time, and then it can be determined that the user's eyes are in a closed state.
[0157] In other embodiments, ultrasound can be used to first image the human body according to the ultrasonic imaging principle to determine the approximate direction of the user's head and eyes, and then ultrasound is sent directly to the user's eyes and the ultrasonic echo is analyzed. Through multiple analyses, the opening and closing status of the user's eyes can be determined.
[0158] After the third process determines the user's eye opening and closing state and / or the state of the wearable device, the user's eye opening and closing state and / or the state of the wearable device can be stored in the storage unit of the wearable device. The specific eye opening and closing state may include two conditions: eyes open and eyes closed (eyes open may include two sub-conditions: both eyes open and one eye open), and the state of the wearable device includes a worn state and a non-worn state, so that the subsequent first process can obtain the ultrasonic detection result.
[0159] The first process can obtain the first detection result and the ultrasonic detection result through the interface opened on the second process and the interface opened on the third process.
[0160] Specifically, the first process may send a query request to the second process and the third process before obtaining the first detection result and the ultrasonic detection result. Taking the first process sending a query request to the third process as an example, the query request may be as shown in the following table:
[0161]
[0162] The query request may include the identifier of the first process (or the identifier of the APP corresponding to the first process). Optionally, the query request may also include the type of ultrasonic detection result to be queried. The type of detection result may be represented by integers 0, 1, and 2 to request different ultrasonic detection results. In this case, the state of the wearable device and the user's eye opening and closing state detected by the third process may be used for different applications on the wearable device, and different applications may request different results according to different goals. For example, the first application may be an application for monitoring the user's movement. It is necessary to detect the state of the wearable device. When the user is not wearing the wearable device, the user is prompted to wear the device. The first application may only need to obtain the detection result of the state of the wearable device, so as to facilitate the statistics of the user's movement type and amount. The second application may be the application corresponding to the first process, which needs to monitor the user's sleep, so it will request to obtain the detection result of the state of the wearable device and the detection result of the user's eye opening and closing state.
[0163] The identification of the first process may be in the form of a signature in the above table, so that the third process may send the query result to the first process only when it verifies the signature and determines that the APP corresponding to the first process is an authorized APP (the first process is an authorized process).
[0164] When the third process receives the query request and verifies successfully, it can send a query response to the first process. The query response can be as shown in the following table:
[0165]
[0166] The query response may include: an indication of query success or query failure, and the result of the corresponding query type. For example, for the eye opening and closing state detection, "True" or "False" may be used to represent continuous Xmin eyes closed and discontinuous Xmin eyes closed, respectively, where X may be a preset threshold, such as 10min, 20min, etc. The preset threshold may take different values according to actual conditions, and may be preset by the system or indicated by the first process. For example, if it is desired to make a faster judgment on the sleep status, the value may be set to be smaller, for example, if the user has eyes closed for 5min or 10min continuously (in actual detection, ultrasonic waves are emitted multiple times during the Xmin for measurement, and the continuous eye opening and closing state is inferred through multiple instantaneous eye opening and closing states), the user is considered to have eyes closed; if it is desired to make a more accurate judgment on the sleep status, the value may be set to be larger, for example, when the user has eyes closed for 20min continuously, the user is considered to have eyes closed.
[0167] The query response may vary according to the detection type requested in the query request, for example, only the detection result of the eye opening and closing state or only the result of the state of the wearable device may be included in the query response.
[0168] As described above, the second process and the third process may start the corresponding detection by the instruction of the first process, and the first process may call the second process and the third process to start the detection by sending a call request to the second process and the third process. The call request may be shown in the following table:
[0169]
[0170] The call request may include the detection type and the identification information of the first process (the identification information of the APP corresponding to the first process), which can be used to verify the identity of the first process, for example, a signature. The detection type can be represented by integers 0, 1, and 2 to represent different calling methods for the third process. The third process can allow the call only after successfully verifying the signature.
[0171] When the third process successfully verifies the signature, a call response may be sent to the first process. The call response may use "1" or "0" to represent a successful call or a failed call. For example, "1" represents a successful call and "0" represents a failed call, as shown in the following table:
[0172]
[0173] The wearable device may have other applications or processes that can call the third process or the second process. For the call of the third process, different applications or processes may require the third process to perform different detections. Multiple applications can all follow the above call request and use "0", "1", "2" to indicate different detection types, so that the third process can perform different detections to meet the needs of different applications.
[0174] In some embodiments, the application or process that calls the third process may not need to send a query request to the third process. Instead, the third process periodically feeds back the results of the corresponding detection type to the application or process according to the feedback cycle indicated when the application is called, thereby reducing the signaling interaction between the processes.
[0175] It should be understood that the above representation of the detection results of the third process is only given for illustration purposes. You can also choose to use "0" or "1" to represent the detection results of the eye opening and closing state or the state of the wearable device according to the specific situation, or you can use other methods to represent the detection results. The embodiment of the present application does not limit the method for feeding back the detection results.
[0176] In S430 , the first process determines whether the user is in a sleeping state according to the first detection result and the ultrasonic detection result.
[0177] The first process will combine the first test result and the ultrasonic test result to determine whether the user is in a sleeping state. Since the ultrasonic test result is combined when judging the user's sleeping state, the accuracy of the user's sleeping state can be increased. The following uses the first test result as an example to preliminarily determine whether the user is in a sleeping state (True: sleeping; False: not sleeping) to introduce how the Sleep Health APP ultimately determines the user's sleeping state in different situations.
[0178] Case 1: The ultrasonic detection result is used to indicate whether the user's eyes are open or closed.
[0179] When the first detection result is: True and the user's eye opening and closing state detection result is: True, the first process can determine that the user is in a sleeping state;
[0180] When the first detection result is: True and the user's eye opening and closing state detection result is: False, the first process can determine that the user is in a non-sleeping state;
[0181] This may be due to the wearable device being placed on the table causing misjudgment of the second process.
[0182] When the first detection result is: False and the user's eye opening and closing state detection result is: True, the first process can determine that the user is in a sleeping state;
[0183] This may be due to the user's large movements while sleeping, which may cause the second process to misjudge.
[0184] When the first detection result is: False and the user's eyes opening and closing state detection result is: False, the first process can determine that the user is in a non-sleeping state.
[0185] Case 2: Ultrasonic detection results are used to indicate the state of the wearable device.
[0186] When the first detection result is True and the state detection result of the wearable device is True, the first process can determine that the user is in a sleeping state;
[0187] When the first detection result is True and the state detection result of the wearable device is False, the first process cannot determine whether the user is in a sleeping state;
[0188] In this case, since the wearable device is not worn, the second process may be placed on the desktop and misjudged, and it is not possible to determine whether the user is actually in a sleeping state. At this time, the user can be prompted to wear the wearable device, so as to facilitate the judgment of whether the user is in a sleeping state in the next time period.
[0189] When the first detection result is False and the state detection result of the wearable device is True, the first process may determine that the user is in a non-sleeping state;
[0190] In this case, there is a certain possibility that the user is in a sleeping state, but the sleeping movements are large. In order to improve the accuracy of sleeping state detection, the user's sleep in the next time period can be continuously monitored, so as to obtain a more accurate result by combining multiple judgments.
[0191] When the first detection result is: False and the state detection result of the wearable device is: False, the first process cannot determine the user's sleep state.
[0192] This situation is less likely to occur. The user is not wearing a wearable device, but the second process initially determines that the user is not sleeping. This may be due to factors such as the unstable position of the wearable device. The first process can prompt the user to wear the wearable device, so as to determine whether the user is sleeping during the next detection.
[0193] Case 3: The ultrasonic detection results are used to indicate whether the user's eyes are open or closed and the state of the wearable device.
[0194] When the first detection result is True, the eye opening and closing state detection result is True, and the wearable device state detection result is True, the first process can determine that the user is in a sleeping state;
[0195] When the first detection result is True, the eye opening and closing state detection result is True, and the wearable device state detection result is False, the first process can determine that the user is in a sleeping state;
[0196] In this case, the wearable device may be placed on a table, but since the user's eyes are closed for a period of time, it can be predicted that the user is asleep.
[0197] When the first detection result is True, the eye opening and closing state detection result is False, and the wearable device state detection result is True, the first process can determine that the user is in a non-sleeping state;
[0198] In this case, the user's eyes are open, so it is impossible that he is asleep. The misjudgment of the second process when the user is wearing a wearable device may be due to the user being in a relatively quiet state as a whole, with no movement or very small movement.
[0199] When the first detection result is True, the eye opening and closing state detection result is False, and the wearable device state detection result is False, the first process can determine that the user is in a non-sleeping state;
[0200] It is impossible for the user to be asleep if his eyes are open. The misjudgment in the second process may be due to the wearable device being placed on the table.
[0201] When the first detection result is False, the eye opening and closing state detection result is True, and the wearable device state detection result is True, the first process can determine that the user is in a sleeping state;
[0202] If the user's eyes are closed for a period of time, there is a high possibility that the user is in a sleeping state. The user wears a wearable device but the second process misjudges it, which may be due to the large amplitude of the user's movements when sleeping.
[0203] When the first detection result is: False, the eye opening and closing state detection result is: True, and the wearable device state detection result is: False, the first process can determine that the user is in a sleeping state;
[0204] If the user's eyes are closed for a period of time, it is very likely that the user is in a sleeping state. The second process also determines that the wearable device is not worn because the wearable device is placed in an unstable position.
[0205] When the first detection result is False, the eye opening and closing state detection result is False, and the wearable device state detection result is True, the first process can determine that the user is in a non-sleeping state;
[0206] When the first detection result is: False, the eye opening and closing state detection result is: False, and the wearable device state detection result is: False, the first process can determine that the user is in a non-sleeping state.
[0207] By adding a third process for ultrasonic detection, the user's sleep state can be determined more accurately, and ultrasound has good biosafety. When ultrasound is sent and received directly through speakers and microphones, the accuracy of user sleep detection can be improved without adding additional sensors and without increasing the collection of user privacy data.
[0208] In the technical solution described above, the first process, the second process and the third process are all processes on the wearable device. The technical solution of the present application can also be applied to the scenario where the first process and (the second process and the third process) are not processes on the same device.
[0209] In this case, the first process may be a process on the electronic device, and the second process and the third process may be processes on the wearable device.
[0210] The electronic device can obtain a first detection result and an ultrasonic detection result from the wearable device, where the first detection result is used to indicate a first judgment result of the user's sleep state, and the first detection result is judged based on data from at least one sensor, where the at least one sensor includes an acceleration sensor and / or a gyroscope sensor.
[0211] The electronic device can determine whether the user is in a sleeping state based on the first detection result and the ultrasonic detection result.
[0212] For details, please refer to Figure 4 In the embodiment shown, the only difference is that the communication between the first process and the second process or the first process and the third process becomes inter-device communication, and the electronic device and the wearable device can communicate through a bridging unit or module, and the bridging unit forwards the corresponding call requests, call responses, query requests, and query responses.
[0213] In addition, in the home network, the speaker and microphone used by the third process for ultrasonic detection may not be the speaker and microphone on the wearable device. For example, the third process can call the speaker or microphone of a suitable device through inter-device communication to transmit and receive ultrasonic waves. For example, when the third process detects the opening and closing state of the user's eyes, the user's sleeping posture may be different. In order to obtain a more accurate determination of the user's eye opening and closing state, an appropriate device can be used to send or receive ultrasonic waves according to the user's common sleeping posture. For example, when the user's face is facing the desktop, an intelligent speaker placed on the desktop can be used to transmit ultrasonic waves, so that the ultrasonic waves can avoid being blocked by other objects or parts of the human body and directly shoot to the human eye. When the user is lying on his back, if the smart lamp includes a speaker, the smart lamp can be used to transmit ultrasonic waves to the user's eyes. In some embodiments, there may be a situation where the ultrasonic wave cannot be directly shot to the user's eyes. At this time, the ultrasonic wave may penetrate other media (other tissues of the human body) or other objects to continue to shoot to the user's eyes. The user's eye opening and closing state can be determined by analyzing the ultrasonic echo of the ultrasonic wave that is finally shot to the user's eyes.
[0214] In an embodiment of the present application, the second process and the third process can be one process, that is, the two processes are integrated into the second process, and the second process can call sensors and ultrasonic devices (speakers and microphones) and perform analysis to obtain first detection results and ultrasonic detection results.
[0215] In the embodiments introduced above, regardless of whether the technical solution is implemented by one device (wearable device) or by two devices (wearable device and electronic device), the first process ultimately determines whether the user is in a sleeping state based on the first detection result determined by the second process and the ultrasonic detection result determined by the third process.
[0216] Optionally, the second process and the third process may not exist, that is, the first process can directly obtain the sensor data and the ultrasonic detection data, and analyze them to determine whether the user is in a sleeping state. Of course, the first process can perform the operation of the second process in the above embodiment, first determine the first detection result through the sensor data, and perform the operation of the third process in the above embodiment, first determine the state of the wearable device and / or the user's eye opening and closing state according to the ultrasonic detection data, and then further determine whether the user is in a sleeping state according to the method described above.
[0217] Figure 5 A sleep detection method provided in an embodiment of the present application is shown, which can be applied to a wearable device, and the method includes:
[0218] S510, the sleep health APP starts the third process and the second process.
[0219] In S510, the third process is used to detect the user's eye opening and closing state and the state of the wearable device. The sleep health APP can be an APP on the wearable device, and can be an APP corresponding to the first process described above. For example, the APP can start the second process and the third process after receiving an operation indicating that the user is about to start sleeping; or the sleep health APP can start the second process and the third process to perform sleep detection when it is determined that the environment has changed.
[0220] When the sleep health APP starts the second process and the third process, it can send a call request through an open interface or trigger the third process by receiving an event broadcast to perform eye opening and closing status detection and the status detection of the wearable device.
[0221] After receiving the call request, the second process and the third process may return a call response to the sleep health APP, indicating whether the call is successful.
[0222] S520, the speaker emits ultrasonic waves.
[0223] S530: The microphone receives the ultrasonic echo.
[0224] In S520 and S530, the speaker and the microphone may be a speaker and a microphone on the wearable device, so that the existing devices on the wearable device can be used to transmit and receive ultrasonic waves.
[0225] S541, the third process determines the eye opening and closing state.
[0226] S542: The third process determines the state of the wearable device.
[0227] S543, the second process determines the first detection result.
[0228] In S541 and S542, the third process can determine the user's eye opening and closing state and the state of the wearable device by filtering and analyzing the ultrasonic echo. The detection result can be stored in the storage unit of the wearable device.
[0229] In S543, the second process can preliminarily determine the user's sleep state (first detection result) based on the detection results of multiple sensors. The sleep state is mainly determined based on the movement situation and may be different from the sleep state finally determined.
[0230] S550, get the test results through the Sleep Health APP.
[0231] In S550, the sleep health APP obtains the sleep state (first detection result) preliminarily determined by the second process and the user's eye opening and closing state results and the wearable device state results (ultrasonic detection results) determined by the third process from the second process and the third process respectively.
[0232] S560, the sleep health APP determines whether the user is in a sleeping state.
[0233] In S560, the sleep health APP can combine the detection results of the second process and the third process to determine whether the user is in a sleeping state.
[0234] Figure 5 For details of the embodiments, please refer to Figure 4 For the sake of brevity, the embodiments are not described in detail.
[0235] Figure 6 Another sleep detection method provided by an embodiment of the present application is shown, which can be applied to a smart terminal connected to a wearable device. Figure 6 As shown, the method includes:
[0236] S602, the sleep health APP requests the second bridge unit for the detection result.
[0237] The sleep health APP can be an APP on a smart terminal such as a mobile phone, the second bridge unit is an application on the smart terminal, and the first bridge unit is an application on the wearable device. The smart terminal and the wearable device can communicate through the first bridge unit and the second bridge unit.
[0238] Before S602, the wearable device has used the second process and the third process to perform corresponding detections, and stored the detection results in the storage unit. The sleep health APP can request the detection results of the second process and the third process stored in the wearable device from the second bridge unit when it is necessary to monitor the user's sleep. The request sent to the second bridge unit may include the data that needs to be requested, such as only requesting the results of the eye opening and closing state detection and the detection results of the second process from the third process, but the wearable device may also perform the wearable device wearing state detection using the third process.
[0239] S604: The second bridge unit forwards the request to the first bridge unit.
[0240] S606 & S608, the first bridging unit requests to obtain detection results from the second process and the third process respectively.
[0241] S610: The first bridge unit returns a detection result to the second bridge.
[0242] S612: The second bridge unit returns the detection result to the sleep health APP.
[0243] S614, the sleep health APP determines whether the user is in a sleeping state.
[0244] Figure 6 The specific details of each step of the embodiment shown can be referred to Figure 4 The details of the embodiment will not be described in detail here.
[0245] Figure 7 Another sleep detection method provided by an embodiment of the present application is shown, which can be applied to a wearable device, wherein the second process integrates the function of detecting the state of the wearable device. The method includes:
[0246] S710: Start the second process.
[0247] In S710, the second process may start the sleep state detection after detecting the environmental change. The second process may be started automatically according to the environmental change or at a fixed time.
[0248] S720: The second process determines the first detection result.
[0249] In S720, the second process determines that the first detection result (preliminary judgment on the user's sleeping state) can be judged based on data from multiple sensors. For example, by using an acceleration sensor and / or a gyroscope sensor to determine that the user has not moved for a period of time, it is preliminarily judged that the user is in a sleeping state.
[0250] S730, the speaker emits ultrasonic waves.
[0251] S740, the microphone receives the ultrasonic echo.
[0252] In S730 and S740, the second process has the function of ultrasonic wear status detection. While preliminarily determining the user's sleep state through the sensor, the speaker and microphone are also called to detect the state of the wearable device.
[0253] S750: The second process determines the state of the wearable device.
[0254] In S750, the second process may determine the state of the wearable device based on the analysis of the transmitted and received ultrasonic waves.
[0255] S760, the sleep health APP obtains the test result from the second process.
[0256] In S760, the detection result obtained by the sleep health APP may include the first detection result determined by the second process and the state result of the wearable device.
[0257] S770, the sleep health APP determines whether the user is in a sleeping state.
[0258] In S770, the sleep health APP can determine whether the user is in a sleeping state according to the first detection result and the state of the wearable device.
[0259] Figure 8 A sleep detection device 800 provided in an embodiment of the present application is shown.
[0260] In one embodiment, the sleep detection device can be used to perform Figure 4 In the illustrated embodiment, the actions performed by the first process, the sleep detection device includes a transceiver unit 810 and a processing unit 820 .
[0261] Specifically, the wearable device includes: a transceiver unit 810, used to obtain a first detection result from a second process, the first detection result is used to indicate a first judgment result of a user's sleep state, the first detection result is determined based on data from at least one sensor, and the at least one sensor includes an acceleration sensor and / or a gyroscope sensor; an ultrasonic detection result is obtained from a third process, the ultrasonic detection result is used to indicate the state of the wearable device and / or the state of the user's eyes being open or closed, the state of the wearable device includes a worn state and a non-worn state; a processing unit 820, used to determine whether the user is in a sleep state based on the first detection result and the ultrasonic detection result.
[0262] In some embodiments, the transceiver unit 810 is further used to send a query request to the third process, where the query request is used to request an ultrasonic detection result.
[0263] In some embodiments, the transceiver unit 810 is further used to send a call request to the third process, where the call request is used to instruct the third process to perform ultrasonic detection.
[0264] In some embodiments, the query request includes an identifier of the first process; and / or the call request includes an identifier of the first process.
[0265] In some embodiments, the ultrasonic detection result is used to indicate the state of the wearable device, and the processing unit 820 is specifically used to: when the wearable device is in a wearing state, determine whether the user is in a sleeping state according to the first detection result.
[0266] In some embodiments, the ultrasonic detection results are used to indicate the opening and closing status of the user's eyes. The processing unit 820 is specifically used to: when the user's eyes are in a closed state, determine that the user is in a sleeping state; when the user's eyes are in an open state, determine that the user is not asleep.
[0267] In some embodiments, the second process and the third process are the same process.
[0268] In some embodiments, the at least one sensor further includes at least one of the following: a heart rate sensor, a light sensor, a temperature sensor, and a pressure sensor.
[0269] In some embodiments, the wearable device is a smart watch or a smart bracelet.
[0270] In another embodiment, the sleep detection device can be used to perform Figure 4 In the illustrated embodiment, the actions performed by the third process, the sleep detection device includes a transceiver unit 810 and a processing unit 820 .
[0271] Specifically, the sleep detection device includes: a processing unit 820, which is used to call an ultrasonic device to perform ultrasonic detection, and the ultrasonic detection is used to obtain ultrasonic detection results, and the ultrasonic detection results include the state of the wearable device and / or the state of the user's eyes being open or closed, and the state of the wearable device includes a worn state and a non-worn state; a transceiver unit 810, which is used to send the ultrasonic detection results to the first process.
[0272] In some embodiments, the transceiver unit 810 is further used to receive a query request from the first process, where the query request is used to request the ultrasonic detection result.
[0273] In some embodiments, the transceiver unit 810 is further used to receive a call request from the first process, where the call request is used to instruct the third process to perform the ultrasonic detection.
[0274] In some embodiments, the query request includes an identifier of the first process; and / or the call request includes an identifier of the first process.
[0275] In some embodiments, the ultrasonic device includes a speaker and a microphone, the speaker is used to send ultrasonic waves, and the microphone is used to receive echoes of ultrasonic waves.
[0276] In some embodiments, the processing unit 820 is further used to determine that the wearable device is in a worn state when it is determined that the distance between the user and the wearable device is less than or equal to a first preset threshold; and to determine that the wearable device is in a non-worn state when it is determined that the distance between the user and the wearable device is greater than the first preset threshold.
[0277] In some embodiments, the processing unit 820 is further configured to determine that the eyes of the user are in a closed state when it is determined that the eyes of the user are in a closed state for more than a second preset time period.
[0278] Fig. 9 A sleep detection device 900 provided in an embodiment of the present application is shown. Fig. 9 The sleep detection device 900 shown may be Figure 8 A specific example of a sleep detection device in the embodiment of the present application. The sleep detection device 900 includes: a processor 920. In an embodiment of the present application, the processor 920 is used to implement corresponding control management operations, for example, the processor 920 is used to support the sleep detection device 900 to perform the method or operation or function of the aforementioned embodiment. Optionally, the sleep detection device 900 may also include: a memory 910 and a communication interface 930; the processor 920, the communication interface 930 and the memory 910 may be connected to each other or connected to each other through a bus 940. Among them, the communication interface 930 is used to support the sleep detection device to communicate with other devices, etc., and the memory 910 is used to store program codes and data of the sleep detection device. The processor 920 calls the code or data stored in the memory 910 to implement corresponding operations. The memory 910 may be coupled to the processor or not. The coupling in the embodiment of the present application is an indirect coupling or communication connection between sleep detection devices, units or modules, which may be electrical, mechanical or other forms, and is used for information interaction between sleep detection devices, units or modules.
[0279] Among them, the processor 920 can be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. It can implement or execute various exemplary logic blocks, modules and circuits described in combination with the contents disclosed in this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, and so on. The communication interface 930 can be a transceiver, circuit, bus, module or other type of communication interface. The bus 940 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0280] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0281] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0282] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0283] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0284] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0285] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.
[0286] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A sleep detection method, characterized in that: include: The first process obtains a first detection result from the second process, where the first detection result is used to indicate a first determination result of a user's sleep state, and the first detection result is determined based on data of at least one sensor, where the at least one sensor includes an acceleration sensor and / or a gyroscope sensor; The first process obtains an ultrasonic detection result from the third process, where the ultrasonic detection result is used to indicate a state of the wearable device and / or a state of eye opening and closing of the user, where the state of the wearable device includes a wearing state and a non-wearing state; The first process determines whether the user is in a sleeping state according to the first detection result and the ultrasonic detection result.
2. The method according to claim 1, characterized in that Before the first process obtains the ultrasonic detection result from the third process, the method further includes: The first process sends a query request to the third process, where the query request is used to request the ultrasonic detection result.
3. The method according to claim 2, characterized in that Before the first process sends a query request to the third process, the method includes: The first process sends a call request to the third process, where the call request is used to instruct the third process to perform ultrasonic detection.
4. The method according to claim 2 or 3, characterized in that The query request includes an identifier of the first process; and / or, The call request includes an identifier of the first process.
5. The method according to any one of claims 1 to 4, characterized in that The ultrasonic detection result is used to indicate the state of the wearable device, and the first process determines whether the user is in a sleeping state according to the first detection result and the ultrasonic detection result, including: When the wearable device is in a wearing state, the first process determines whether the user is in a sleeping state according to the first detection result.
6. The method according to any one of claims 1 to 4, characterized in that The ultrasonic detection result is used to indicate the opening and closing state of the user's eyes, and the first process determines whether the user is in a sleeping state according to the first detection result and the ultrasonic detection result, including: When the user's eyes are in a closed state, the first process determines that the user is in a sleeping state; When the user's eyes are in an open state, the first process determines that the user is in an awake state.
7. The method according to any one of claims 1 to 6, characterized in that The second process and the third process are the same process.
8. The method according to any one of claims 1 to 7, characterized in that The at least one sensor further comprises at least one of the following: Heart rate sensor, light sensor, temperature sensor, pressure sensor.
9. A sleep detection method, characterized in that: include: The third process calls the ultrasonic device to perform ultrasonic detection, where the ultrasonic detection is used to obtain ultrasonic detection results, where the ultrasonic detection results include the state of the wearable device and / or the state of the user's eyes being open or closed, where the state of the wearable device includes a wearing state and a non-wearing state; The third process sends the ultrasonic detection result to the first process.
10. The method according to claim 9, characterized in that Before the third process sends the ultrasonic detection result to the first process, the method further includes: The third process receives a query request from the first process, where the query request is used to request the ultrasonic detection result.
11. The method according to claim 9 or 10, characterized in that Before the third process calls the ultrasonic device to perform ultrasonic detection, the method includes: The third process receives a calling request from the first process, where the calling request is used to instruct the third process to perform the ultrasonic detection.
12. The method according to claim 10 or 11, characterized in that The query request includes an identifier of the first process; and / or, The call request includes an identifier of the first process.
13. The method according to any one of claims 9 to 12, characterized in that The ultrasonic device includes a speaker and a microphone, wherein the speaker is used to send ultrasonic waves, and the microphone is used to receive echoes of the ultrasonic waves.
14. The method according to claim 13, characterized in that The method further comprises: When the third process determines that the distance between the user and the wearable device is less than or equal to a first preset threshold, the third process determines that the wearable device is in a wearing state; When the third process determines that the distance between the user and the wearable device is greater than the first preset threshold, the third process determines that the wearable device is in a non-worn state.
15. The method according to claim 13, characterized in that The method further comprises: When the third process determines that the eyes of the user are in the closed state for more than a second preset time period, the third process determines that the eyes of the user are in the closed state.
16. A sleep detection method, characterized in that: include: Acquire first detection data, where the first detection data includes data of at least one sensor, where the at least one sensor includes an acceleration sensor and / or a gyroscope sensor; Acquire ultrasonic detection data, where the ultrasonic detection data is used to determine the state of the wearable device and / or the opening and closing state of the user's eyes, where the state of the wearable device includes a worn state and a non-worn state; Whether the user is in a sleeping state is determined according to the first detection data and the ultrasonic detection data.
17. A sleep detection system, characterized in that: include: The wearable device is used to send a first detection result to the electronic device, where the first detection result is used to indicate a first judgment result of a user's sleep state, where the first detection result is judged based on data of at least one sensor, where the at least one sensor includes an acceleration sensor and / or a gyroscope sensor; The wearable device is further used to send an ultrasonic detection result to the electronic device, wherein the ultrasonic detection result is used to indicate the state of the wearable device and / or the eye opening and closing state of the user, and the state of the wearable device includes a wearing state and a non-wearing state; The electronic device is used to determine whether the user is in a sleeping state according to the first detection result and the ultrasonic detection result.
18. A sleep detection device, characterized in that: Used to perform the method as claimed in any one of claims 1 to 8 or 9 to 15 or 16.
19. A computer storage medium, when the computer instructions are executed on an electronic device, enables the electronic device to execute the method as claimed in any one of claims 1 to 8 or 9 to 15 or 16.
20. A wearable device, characterized in that: include: Memory, for storing computer instructions; A processor, configured to execute computer instructions stored in the memory so that the electronic device executes the method as described in any one of claims 1 to 8 or 9 to 15 or 16.
21. A chip system, characterized in that: The method comprises at least one processor, and when the program instructions are executed in the at least one processor, the at least one processor is caused to perform the method as claimed in any one of claims 1 to 8 or 9 to 15 or 16.
Citation Information
Cited By
Sleep state identification apparatus and implantable closed-loop stimulation system for use in sleep state
WO2026145357A1
