WO2022088938A1 - Sleep monitoring method and apparatus, and electronic device and computer-readable storage medium - Google Patents

Sleep monitoring method and apparatus, and electronic device and computer-readable storage medium Download PDF

Info

Publication number
WO2022088938A1
WO2022088938A1 PCT/CN2021/115753 CN2021115753W WO2022088938A1 WO 2022088938 A1 WO2022088938 A1 WO 2022088938A1 CN 2021115753 W CN2021115753 W CN 2021115753W WO 2022088938 A1 WO2022088938 A1 WO 2022088938A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
electronic device
user
monitoring
vehicle
Prior art date
Application number
PCT/CN2021/115753
Other languages
French (fr)
Chinese (zh)
Inventor
许德省
李靖
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022088938A1 publication Critical patent/WO2022088938A1/en

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/48Other medical applications
    • A61B5/4806Sleep evaluation
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/02Detecting, measuring or recording pulse, heart rate, blood pressure or blood flow; Combined pulse/heart-rate/blood pressure determination; Evaluating a cardiovascular condition not otherwise provided for, e.g. using combinations of techniques provided for in this group with electrocardiography or electroauscultation; Heart catheters for measuring blood pressure
    • A61B5/0205Simultaneously evaluating both cardiovascular conditions and different types of body conditions, e.g. heart and respiratory condition
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/103Detecting, measuring or recording devices for testing the shape, pattern, colour, size or movement of the body or parts thereof, for diagnostic purposes
    • A61B5/11Measuring movement of the entire body or parts thereof, e.g. head or hand tremor, mobility of a limb
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/103Detecting, measuring or recording devices for testing the shape, pattern, colour, size or movement of the body or parts thereof, for diagnostic purposes
    • A61B5/11Measuring movement of the entire body or parts thereof, e.g. head or hand tremor, mobility of a limb
    • A61B5/1126Measuring movement of the entire body or parts thereof, e.g. head or hand tremor, mobility of a limb using a particular sensing technique
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/68Arrangements of detecting, measuring or recording means, e.g. sensors, in relation to patient
    • A61B5/6801Arrangements of detecting, measuring or recording means, e.g. sensors, in relation to patient specially adapted to be attached to or worn on the body surface
    • A61B5/6802Sensor mounted on worn items
    • A61B5/681Wristwatch-type devices

Definitions

  • the present application relates to the field of data processing, and in particular, to a sleep monitoring method, apparatus, electronic device, and computer-readable storage medium.
  • sleep monitoring is a common function of electronic devices (such as mobile phones, wristbands, smart watches, etc.). Through this function, users can understand their own sleep data such as the time of going out/sleep, sleep duration, etc., and then master their own sleep status.
  • the user's sleep-onset point and sleep-off point should be determined.
  • the electronic device usually determines the sleeping point and the sleeping point of the user according to the acceleration data monitored by the electronic device, so as to monitor the sleep of the user.
  • the electronic device may not be able to accurately determine the sleeping point and the sleeping point of the user, so that the electronic device cannot accurately record the user's sleep situation on the vehicle.
  • the present application provides a sleep monitoring method, device, electronic device, and computer-readable storage medium, which can accurately record the sleep condition of a user on a vehicle.
  • a sleep monitoring method applied to an electronic device, the method comprising:
  • the electronic device determines whether the user is on the vehicle; if the user is on the vehicle, the electronic device obtains the first monitoring data of the user on the vehicle, and the first monitoring data includes information related to the vehicle; Target data is obtained from the monitoring data, and the target data is data obtained after filtering out information related to vehicles in the first monitoring data; the sleep of the user is monitored according to the target data.
  • the first monitoring data includes information related to the vehicle.
  • vehicle-related information may cause the electronic device to monitor the user's sleep according to the first monitoring data, it may not be able to accurately calculate the user's sleep-onset point and/or sleep-off point on the vehicle. Therefore, there is usually a situation in which the user is on the vehicle and the electronic device does not record the user's sleep or lacks the user's sleep record.
  • the electronic device filters out the information related to the vehicle in the first monitoring data, thus filtering out the data affecting the user action data in the first monitoring data.
  • the target data obtained after filtering can more accurately reflect the user's own action state, so that the electronic device can accurately calculate the user's sleep-onset point and/or sleep-off point on the vehicle, thereby solving the problem of the user's sleep in the traffic.
  • the problem of not recording or less recording sleep on the tool has improved the user experience.
  • the method provided by the embodiments of the present application further includes: if the user is not on the vehicle, the electronic device monitors the user's sleep according to the acquired second monitoring data, and the second monitoring The data includes the user's status information.
  • the electronic device may monitor the sleep of the user in different states. That is to say, the above electronic device can not only monitor the sleep of the user when the user is on the vehicle, but also can be used to monitor the sleep of the user when the user is not on the vehicle, which improves the user experience.
  • the first monitoring mode is employed when the user is on the vehicle, i.e. the influence of vehicle-related information needs to be filtered out.
  • the second monitoring mode is adopted. At this time, since the monitoring data collected by the electronic device usually does not include information related to the vehicle, there is no need to filter the data and use the collected monitoring data for sleep monitoring. Through the above two monitoring modes, the sleep monitoring is more targeted, and the sleep monitoring results are more accurate.
  • the method provided in this embodiment of the present application further includes: the electronic device determines to use the first monitoring mode to monitor the user on the vehicle
  • the first monitoring mode refers to the process of filtering out the information related to the vehicle on the monitoring data obtained by the electronic device.
  • the method provided in this embodiment of the present application further includes: the electronic device determines to use the second monitoring mode to monitor the sleep of the user.
  • the user's sleep is monitored, and the second monitoring mode means that information related to the vehicle in the monitoring data obtained by the electronic device does not need to be filtered out.
  • the electronic device may determine whether the user is on a vehicle, and determine, according to the determination result, to use the first monitoring mode or the second monitoring mode to monitor the user's sleep.
  • the electronic device can automatically switch the monitoring mode, the degree of intelligence is high, and the user experience is improved.
  • the electronic device obtains the target data according to the first monitoring data, including: the electronic device obtains the driving data of the vehicle; the electronic device determines the data component of the first monitoring data that matches the driving data as Vehicle-related information; the electronic device filters out the vehicle-related information from the first monitoring data to obtain target data.
  • the driving data includes first acceleration data when the vehicle is in a stationary state and second acceleration data when the vehicle is in a driving state; the electronic device combines the first monitoring data with the driving data
  • the matched data components are determined to be vehicle-related information, including: the electronic device constructs a noise data matrix according to the first acceleration data and the second acceleration data; the electronic device inputs the noise data matrix and the first monitoring data into a preset decomposition model, Obtaining data components in the first monitoring data that match the driving data; the electronic device determines the data components in the first monitoring data that match the driving data as vehicle-related information.
  • the noise data matrix includes the first acceleration data and the second acceleration data, which can ensure that in the subsequent data filtering process, both the data interference caused by the driving process of the vehicle and the data existing when the vehicle is stationary are considered. Interference makes data filtering more thorough. In addition, using the trained preset decomposition model for decomposition processing can effectively improve the monitoring efficiency and monitoring accuracy.
  • the electronic device monitors the user's sleep according to the target data, including: when the amount of data in the target data reaches a preset amount, the electronic device monitors the user's sleep according to the target data; When the amount of data in the target data does not reach the preset amount, the electronic device continues to acquire the first monitoring data.
  • Performing sleep monitoring according to a preset amount of target data can reduce the amount of data processing and avoid the contingency of monitoring results obtained from data at a single sampling moment.
  • the electronic device monitors the user's sleep according to the target data, including: the electronic device obtains multiple sets of data according to the target data; the electronic device obtains multiple sets of data according to the respective statistical characteristics of each set of data in the multiple sets of data The value determines a first state label corresponding to each group of data, wherein the first state label includes a sleep state and an awake state; the electronic device determines the sleep monitoring result according to the first state label corresponding to each group of data.
  • the electronic device determines the sleep monitoring result according to the first state label corresponding to each group of data, including: the electronic device acquires the user's pulse wave data; the electronic device determines the sleep monitoring result according to the pulse wave data and each group of data.
  • the respective corresponding statistical feature values determine the second state label corresponding to each group of data, wherein the second state label includes a sleep state and an awake state; the electronic device determines the corresponding data of each group of data according to the first state label and the second state label.
  • Final state label the electronic device determines the sleep monitoring result according to the final state label corresponding to each set of data.
  • the monitoring results of the sensor data and the monitoring results of the PPG data are comprehensively considered, so that the accuracy of the sleep monitoring results can be further improved.
  • determining whether the user is on a vehicle by the electronic device includes: the electronic device obtains travel information and/or exercise information of the user, and determines whether the user is located in the vehicle according to the travel information and/or exercise information. or, the electronic device displays prompt information on the display screen, and the prompt information is used to prompt the user to select whether the user is on the vehicle; the electronic device monitors the first operation instruction input by the user; the electronic device determines the user according to the first operation instruction whether on a vehicle.
  • the electronic device can automatically switch the sleep monitoring mode, making the sleep monitoring function of the electronic device more intelligent and improving the user experience.
  • a user-selected method is also provided, and the user determines whether the vehicle is on a vehicle. This method can more accurately determine the user's state.
  • an embodiment of the present application provides a sleep monitoring device, the device comprising:
  • a judging unit used for the electronic device to judge whether the user is on the vehicle
  • the first monitoring unit is used for obtaining the first monitoring data of the user on the vehicle if the user is on the vehicle, and the first monitoring data includes information related to the vehicle; the electronic device obtains the target data according to the first monitoring data , the target data is the data obtained after filtering out the vehicle-related information in the first monitoring data; the electronic device monitors the user's sleep according to the target data.
  • an embodiment of the present application provides an electronic device, the electronic device includes a processor, and the processor is configured to run a computer program stored in a memory to implement the method provided by any possible implementation manner of the first aspect.
  • the embodiments of the present application provide a computer-readable storage medium, including computer instructions, when the computer instructions are executed on a computer or a processor, the computer or the processor is made to perform any possible implementation of the first aspect. method provided.
  • the embodiments of the present application provide a computer program product, which when the computer program product runs on a computer or a processor, causes the computer or processor to execute the method provided by any possible implementation manner of the first aspect.
  • the sleep monitoring device described in the second aspect provided above corresponds to the method provided in the first aspect, the electronic device described in the third aspect, the computer storage medium described in the fourth aspect, or the fifth aspect.
  • the computer program products described are all used to execute the method provided by the first aspect. Therefore, for the beneficial effects that can be achieved, reference may be made to the beneficial effects in the corresponding method, which will not be repeated here.
  • FIG. 1 is a schematic diagram of a sleep phase heart rate variation trend provided by an embodiment of the present application
  • FIG. 2 is a schematic diagram of a change trend of acceleration data amplitude provided by an embodiment of the present application
  • FIG. 3 is a schematic structural diagram of an electronic device 100 provided by an embodiment of the present application.
  • FIG. 4 is a software structural block diagram of the electronic device 100 provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of an application interface of sleep monitoring provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a main screen interface provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of an application interface for monitoring mode selection provided by an embodiment of the present application.
  • FIG. 8 is a schematic flowchart of a sleep monitoring method provided by an embodiment of the present application.
  • FIG. 9 is a schematic flowchart of a sleep monitoring method in a first monitoring mode provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of a decomposition result provided by an embodiment of the present application.
  • FIG. 11 is a structural block diagram of a sleep monitoring apparatus provided by an embodiment of the present application.
  • words such as “first” and “second” are used to distinguish the same or similar items with basically the same function and effect.
  • the first message and the second message are only for distinguishing different messages, and the sequence of the first message is not limited.
  • the words “first”, “second” and the like do not limit the quantity and execution order, and the words “first”, “second” and the like are not necessarily different.
  • At least one means one or more
  • plural means two or more.
  • And/or which describes the association relationship of the associated objects, indicates that there can be three kinds of relationships, for example, A and/or B, which can indicate: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A, B can be singular or plural.
  • the character “/” generally indicates that the associated objects are an “or” relationship.
  • At least one item(s) below” or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s).
  • At least one (a) of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c may be single or multiple .
  • the sleep monitoring technology usually monitors the user's going out/sleeping time based on acceleration data, gyroscope data, and/or PPG (Photopleth aysmography, photocapacitive pulse wave marking) data, etc.
  • FIG. 1 it is a schematic diagram of a change trend of heart rate in a sleep phase provided by an embodiment of the present application.
  • the heart rate of user A changes.
  • the time corresponding to the vertical solid line in the figure is the time of falling asleep. It can be seen from the figure that the heart rate of user A decreases as a whole after falling asleep.
  • the heart rate of user B changes.
  • the time corresponding to the vertical solid line in the figure is the time of falling asleep. It can be seen from the figure that the heart rate of user B increases as a whole after falling asleep.
  • the trend of heart rate changes may be different in different sleep stages of users. To sum up, if sleep monitoring is performed solely on the basis of acceleration data, gyroscope data or PPG data, the accuracy of sleep monitoring results obtained is low.
  • the user's action is usually monitored according to acceleration data and gyroscope data, and the user's heart rate is monitored according to PPG data, and then the user's sleep/sleep time is determined in combination with the user's action and the user's heart rate.
  • FIG. 2 it is a schematic diagram of the variation trend of the acceleration data amplitude provided by the embodiment of the present application.
  • Fig. 2 shows the trend of amplitude variation of the monitored acceleration data when the user is on the vehicle. It can be seen from FIG.
  • the existing sleep monitoring technology cannot accurately monitor the user's going-out/going-to-sleep time, resulting in the user's sleep on the vehicle being not recorded or less recorded, thereby affecting the user experience.
  • embodiments of the present application provide a sleep monitoring method.
  • a process of filtering out information related to the vehicle needs to be performed on the monitoring data obtained by the electronic device, and then the user's sleep is monitored according to the filtered data. Since the influence of the shaking or acceleration of the vehicle on the user's actions is filtered out, the sleep monitoring method provided by the embodiments of the present application can accurately monitor the time points of the user's going out/falling asleep on the vehicle, and finally realize the solution to the problem of the user's sleep on the vehicle. Sleep on is not recorded or is less recorded for the purpose.
  • the electronic device may be a mobile phone, a wearable device, a tablet computer, a netbook, a notebook computer, an ultra-mobile personal computer (UMPC), or a personal digital assistant (personal digital assistant).
  • Assistant, PDA and other devices with the function of monitoring user sleep, the embodiments of the present application do not impose any restrictions on the specific types of electronic devices.
  • the wearable device may be a smart bracelet, a smart watch, or the like.
  • FIG. 3 is a schematic structural diagram of an electronic device 100 provided by an embodiment of the present application.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195 and so on.
  • SIM Subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
  • the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait.
  • application processor application processor, AP
  • modem processor graphics processor
  • graphics processor graphics processor
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • the processor is configured to execute the sleep monitoring method provided by the embodiment of the present application, for example, the processor executes the following steps S801-S803 or steps S901-S903.
  • the controller may be the nerve center and command center of the electronic device 100 .
  • the controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from memory. Repeated accesses are avoided and the waiting time of the processor 110 is reduced, thereby increasing the efficiency of the system.
  • the processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transceiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL).
  • the processor 110 may contain multiple sets of I2C buses.
  • the processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flash, the camera 193 and the like through different I2C bus interfaces.
  • the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate with each other through the I2C bus interface, so as to realize the touch function of the electronic device 100 .
  • the I2S interface can be used for audio communication.
  • the processor 110 may contain multiple sets of I2S buses.
  • the processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 .
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
  • the PCM interface can also be used for audio communications, sampling, quantizing and encoding analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • a UART interface is typically used to connect the processor 110 with the wireless communication module 160 .
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 .
  • MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc.
  • the processor 110 communicates with the camera 193 through a CSI interface, so as to realize the photographing function of the electronic device 100 .
  • the processor 110 communicates with the display screen 194 through the DSI interface to implement the display function of the electronic device 100 .
  • the GPIO interface can be configured by software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface may be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like.
  • the GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones.
  • the interface can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 .
  • the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 may receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 charges the battery 142 , it can also supply power to the electronic device through the power management module 141 .
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140 and supplies power to the processor 110 , the internal memory 121 , the external memory, the display screen 194 , the camera 193 , and the wireless communication module 160 .
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance).
  • the power management module 141 may also be provided in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 may provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the electronic device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low frequency baseband signal is processed by the baseband processor and passed to the application processor.
  • the application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 .
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared technology (IR).
  • WLAN wireless local area networks
  • BT Bluetooth
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication
  • IR infrared technology
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
  • the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • Wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband code division Multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM , and/or IR technology, etc.
  • GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi-zenith) satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
  • Display screen 194 is used to display images, videos, and the like.
  • Display screen 194 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 (active-matrix organic light).
  • LED diode AMOLED
  • flexible light-emitting diode flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
  • the electronic device 100 may include one or N display screens 194 , where N is a positive integer greater than one.
  • the electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
  • the ISP is used to process the data fed back by the camera 193 .
  • the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, converting it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin tone.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object is projected through the lens to generate an optical image onto the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
  • a digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy and so on.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs.
  • the electronic device 100 can play or record videos of various encoding formats, such as: Moving Picture Experts Group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
  • MPEG Moving Picture Experts Group
  • MPEG2 moving picture experts group
  • MPEG3 MPEG4
  • MPEG4 Moving Picture Experts Group
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • Applications such as intelligent cognition of the electronic device 100 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100 .
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, information such as the first monitoring data obtained in the sleep monitoring method provided in the embodiment of the present application, the filtered data obtained after processing, and the like are stored in an external memory card.
  • Internal memory 121 may be used to store computer executable program code, which includes instructions.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing the instructions stored in the internal memory 121 .
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area may store an operating system, an application program required for at least one function (such as a sleep monitoring function, etc.), and the like.
  • the storage data area may store data created during the use of the electronic device 100 (such as monitoring data obtained by the sleep monitoring function, etc.) and the like.
  • the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
  • the electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. For example, music playback, recording, prompt signal playback, etc.
  • the audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
  • Speaker 170A also referred to as a "speaker" is used to convert audio electrical signals into sound signals.
  • the electronic device 100 can listen to music, listen to a hands-free call, or listen to a prompt signal through the speaker 170A.
  • the receiver 170B also referred to as "earpiece" is used to convert audio electrical signals into sound signals.
  • the voice can be answered by placing the receiver 170B close to the human ear.
  • the microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals.
  • the user can make a sound by approaching the microphone 170C through a human mouth, and input the sound signal into the microphone 170C.
  • the electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
  • the earphone jack 170D is used to connect wired earphones.
  • the earphone interface 170D may be the USB interface 130, or may be a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the pressure sensor 180A is used to sense pressure signals, and can convert the pressure signals into electrical signals.
  • the pressure sensor 180A may be provided on the display screen 194 .
  • the capacitive pressure sensor may be comprised of at least two parallel plates of conductive material. When a force is applied to 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 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example, when a touch operation whose intensity is less than the first pressure threshold acts on the short message application icon, the instruction for viewing 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, the instruction to create a new short message is executed.
  • the gyro sensor 180B may be used to determine the motion attitude of the electronic device 100 .
  • the angular velocity of electronic device 100 about three axes ie, x, y, and z axes
  • the gyroscope sensor 180B can be used for anti-shake shooting, and can also be used for navigation and somatosensory game scenes.
  • the air pressure sensor 180C is used to measure air pressure.
  • the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the electronic device 100 can detect the opening and closing of the flip holster using the magnetic sensor 180D.
  • the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D. Further, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can monitor the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes, ie, x, y and z axes).
  • the magnitude and direction of gravity can be monitored when the electronic device 100 is stationary. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
  • the electronic device 100 can measure the distance through infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
  • Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes.
  • the light emitting diodes may be infrared light emitting diodes.
  • the electronic device 100 emits infrared light to the outside through the light emitting diode.
  • Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100 . When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100 .
  • the electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power.
  • Proximity light sensor 180G can also be used in holster mode, pocket mode automatically unlocks and locks the screen.
  • the ambient light sensor 180L is used to sense ambient light brightness.
  • the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket, so as to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking pictures with fingerprints, answering incoming calls with fingerprints, and the like.
  • the temperature sensor 180J is used to detect the temperature.
  • the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J in order to reduce power consumption and implement thermal protection.
  • the electronic device 100 when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 caused by the low temperature.
  • the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 180K also called “touch panel”.
  • the touch sensor 180K may be disposed on the display screen 194 , and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”.
  • the touch sensor 180K is used to detect a touch operation 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 touch operations may be provided through display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the location where the display screen 194 is located.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 180M can also contact the pulse of the human body and receive the blood pressure beating signal.
  • the application processor may analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M, so as to realize the function of heart rate monitoring.
  • the keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key.
  • the electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100 .
  • Motor 191 can generate vibrating cues.
  • the motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback.
  • touch operations acting on different applications can correspond to different vibration feedback effects.
  • the motor 191 can also correspond to different vibration feedback effects for touch operations on different areas of the display screen 194 .
  • Different application scenarios for example: time reminder, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 192 can be an indicator light, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, and the like.
  • the SIM card interface 195 is used to connect a SIM card.
  • the SIM card can be contacted and separated from the electronic device 100 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195 .
  • the electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • the SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the same SIM card interface 195 at the same time. Multiple cards can be of the same type or different.
  • the SIM card interface 195 can also be compatible with different types of SIM cards.
  • the SIM card interface 195 is also compatible with external memory cards.
  • the electronic device 100 interacts with the network through the SIM card to implement functions such as call and data communication.
  • the electronic device 100 employs an eSIM, ie: an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .
  • the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
  • the embodiment of the present invention takes an Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100 as an example.
  • FIG. 4 is a block diagram of the software structure of the electronic device 100 provided by the embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces.
  • the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer, a system library and Android runtime (Android runtime), and a kernel layer.
  • the application layer can include a series of application packages.
  • the application package can include applications such as camera, gallery, calendar, call, map, navigation, sports health, bluetooth, music, video, short message and so on.
  • a sports health application can include sleep monitoring capabilities.
  • the electronic device can obtain monitoring data through the sleep monitoring function, and analyze and process the monitoring data through the sleep monitoring function, so as to monitor the user's sleep.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer may include window managers, content providers, view systems, telephony managers, resource managers, notification managers, and the like.
  • a window manager is used to manage window programs.
  • the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc.
  • the data may include monitoring data obtained by the sensor module 180 (eg, acceleration data obtained by the acceleration sensor 180E, etc.), videos, images, audios, calls made and received, browsing history and bookmarks, phonebooks, and the like.
  • monitoring data obtained by the sensor module 180 (eg, acceleration data obtained by the acceleration sensor 180E, etc.)
  • videos images, audios, calls made and received, browsing history and bookmarks, phonebooks, and the like.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications.
  • a display interface can consist of one or more views.
  • the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
  • the phone manager is used to provide the communication function of the electronic device 100 .
  • the management of call status including connecting, hanging up, etc.).
  • the resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on.
  • the notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a brief pause without user interaction.
  • the notification manager is used to notify the download completion, message reminders (such as travel messages, etc.) and so on.
  • the notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications that appear on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the electronic device vibrates, and the indicator light flashes.
  • Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
  • the core library consists of two parts: one is the function functions that the java language needs to call, and the other is the core library of Android.
  • the application layer and the application framework layer run in virtual machines.
  • 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 lifecycle management, stack management, thread management, safety and exception management, and garbage collection.
  • the system layer can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
  • surface manager surface manager
  • media library Media Libraries
  • 3D graphics processing library eg: OpenGL ES
  • 2D graphics engine eg: SGL
  • the Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
  • 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display drivers, camera drivers, audio drivers, and sensor drivers.
  • the following embodiments of the sleep monitoring method may be implemented on an electronic device having the above-mentioned hardware structure/software structure.
  • the sleep monitoring function on the electronic device may be set to be enabled by default. For example, as long as the electronic device is powered on, the sleep monitoring function is enabled.
  • the sleep monitoring function can also be turned on/off by a user-defined time period. For example, if the user-defined time period is 22:00-07:00, the sleep monitoring function will be turned on at 22:00 and turned off at 07:00 the next day.
  • FIG. 5 is a schematic diagram of an application interface of sleep monitoring provided by an embodiment of the present application. As shown in FIG. 5 , it is an application interface 50 of sleep monitoring of the electronic device 100 . Interface 50 may include monitoring indicators 501 , data display area 502 and function controls 503 . in:
  • the monitoring identifier 501 is used to indicate that the sleep monitoring function is in progress.
  • the monitoring identification may be a static image or a dynamic image, which is not specifically limited here.
  • the data display area 502 is used to display monitoring data.
  • the display form of monitoring data can be in digital form, as shown in (a) in FIG. 5 ; or in the form of a statistical graph, as shown in (b) in FIG. 5 .
  • the display form of the monitoring data is not specifically limited in the embodiment of the present application.
  • the function control 503 is used to implement corresponding software functions when the user clicks/touches. As shown in FIG. 5 , the function control 503 may be an “end” control, and when the user clicks the control, the sleep monitoring function is turned off.
  • the foreground operation mode is convenient for users to operate, but it will occupy more system resources. Also, when the sleep monitoring function is in foreground mode, users cannot operate other applications.
  • FIG. 6 is a schematic diagram of a home screen interface provided by an embodiment of the present application. As shown in FIG. 6 , it is the main screen interface 60 of the electronic device 100 .
  • Home screen interface 60 may include a status bar 601 and a notification bar 602 . in:
  • the status bar 601 may include information such as operator name, time, signal strength, and current remaining power.
  • the notification bar 602 is used for displaying notification information of the application program, as shown in FIG. 6 , displaying the notification information of the sleep monitoring application program.
  • the position, display mode and display duration of the notification bar on the main screen interface can be set by the user, which is not specifically limited here.
  • the user can enter the sleep monitoring application through the notification bar, such as by clicking/long pressing the area occupied by the notification bar to enter the sleep monitoring application.
  • the user's travel state can be divided into two types: a travel state on a vehicle and a travel state not on a vehicle.
  • the monitoring data obtained by the electronic device includes both the user's state information and the vehicle-related information.
  • the information related to the vehicle will interfere with the user's state information, thereby affecting the accuracy of the sleep monitoring result.
  • the monitoring data acquired by the electronic device includes the state information of the user, but does not include information related to the vehicle.
  • the monitoring data can be used to monitor the user's sleep.
  • two sleep monitoring modes may be provided.
  • the electronic device determines to use the first monitoring mode to monitor the user's sleep on the vehicle.
  • the first monitoring mode refers to a process of filtering out information related to vehicles on monitoring data acquired by the electronic device.
  • the electronic device determines to use the second monitoring mode to monitor the sleep of the user.
  • the second monitoring mode refers to the information related to the vehicle in the monitoring data obtained by the electronic device without filtering.
  • the user can choose the monitoring mode by himself.
  • the electronic device determines to use the first monitoring mode or the second monitoring mode to perform sleep monitoring according to the operation instruction input by the user.
  • FIG. 7 it is a schematic diagram of an application interface for monitoring mode selection provided by an embodiment of the present application.
  • FIG. 7 it is an application interface 70 of sleep detection of the electronic device 100 .
  • Interface 70 may include selection information area 701 and selection controls 702 . in:
  • the selection information area 701 displays a mode of “taking a vehicle” and a mode of “not taking a vehicle”.
  • the mode of "taking a vehicle” corresponds to the first monitoring mode
  • the mode of "not taking a vehicle” corresponds to the second monitoring mode.
  • the names of the monitoring modes shown in FIG. 7 are only examples and are not used for specific limitations. In practical applications, the names of the monitoring modes can be defined as other content, as long as it is convenient for users to distinguish.
  • the selection control 702 is used to implement corresponding software functions when the user clicks/touches, and the selection control corresponds to the above selection information.
  • each of the selection information “taking a vehicle” and “not taking a vehicle” corresponds to a selection control.
  • the electronic device 100 displays the interface shown in (b) in FIG. 7 , at this time, the electronic device determines that the user is on the vehicle, and It is determined to use the first monitoring mode in the sleep monitoring function to detect the sleep of the user.
  • the electronic device 100 displays the interface shown in (c) in FIG. 7 , at this time, the electronic device determines that the user is not on the vehicle, and determines to use the sleep monitoring function The second monitoring mode in the user's sleep is detected.
  • the electronic device determines whether the user is on a vehicle, and determines to use the first monitoring mode or the second monitoring mode to monitor the user's sleep according to the determination result.
  • the sleep monitoring method may include the following steps:
  • the electronic device determines whether the user is on a vehicle.
  • the electronic device determines to use the first monitoring mode to monitor the sleep of the user on the vehicle.
  • the electronic device determines to use the second monitoring mode to monitor the sleep of the user on the vehicle.
  • the second monitoring mode may be set as the default monitoring mode, and when the electronic device determines that the user is on the vehicle, the electronic device switches the monitoring mode to the first monitoring mode.
  • the electronic device may also send prompt information to the user to prompt the user to use the first monitoring mode for sleep monitoring in the future.
  • the prompt information can be one or more of voice information, negative one-screen information, or vibration signals, etc.
  • sleep monitoring is more intelligent and user experience is better.
  • the electronic device when the electronic device determines that the user is on a vehicle, the electronic device may prompt the user whether to adopt the first monitoring mode. Then, it is determined whether to adopt the first monitoring mode according to the operation instruction input by the user. In this way, the wrong selection of the monitoring mode caused by the misjudgment of the electronic device can be effectively avoided.
  • the electronic device determines that the user is on the vehicle, the electronic device prompts the user whether to use the first monitoring mode. If the user agrees to use the first monitoring mode, the electronic device will follow the user's instruction, that is, the first monitoring mode will be used subsequently. The monitoring mode monitors the user's sleep.
  • the electronic device prompts the user whether to adopt the first monitoring mode, if the user does not give feedback within a specified time (for example, 1 minute), the electronic device determines to use the first monitoring mode to monitor the user's sleep.
  • a specified time for example, 1 minute
  • the electronic device when the electronic device determines that the user is on the vehicle, the electronic device prompts the user whether to adopt the first monitoring mode. If the user does not agree to adopt the first monitoring mode, the electronic device will follow the user's instruction, that is, the first monitoring mode will be adopted subsequently. The second monitoring mode monitors the user's sleep.
  • Method 1 The electronic device obtains travel information of the user, and the electronic device determines whether the user is on a vehicle according to the travel information.
  • the travel information may include the departure time, running time, arrival time, etc. of the vehicle that the user takes, such as the takeoff/landing time of an airplane, and the arrival/departure time of a train. Travel information can be obtained from other applications on the electronic device, such as travel reminder text messages, booking emails, booking applications and negative one-screen information (as shown in Figure 6, the event reminder information set by the user, "flight number CN2222" , "Departure time 2020/1510 10:00") and so on.
  • the electronic device can determine the time range in which the user is on the vehicle according to the travel information. For example, assuming that the obtained travel information is that the departure time of the plane is 10:00 and the landing time is 14:00, it can be determined that the user is on the plane from 10:00 to 14:00. Another example: Assuming that the obtained travel information is "Beijing-Shanghai, G2222", the electronic device can query the timetable of the G2222 train on the Internet according to the travel information, and determine the timetable from Beijing to Shanghai from the obtained timetable. The time period is 10:00-17:00, then it can be determined that the user is on the high-speed rail from 10:00-17:00.
  • the electronic device may preset the working time of the monitoring mode according to the determined time range. For example, assuming that the electronic device has determined that the time range for the user to take the vehicle is 10:00-14:00, the electronic device can switch the monitoring mode from the second monitoring mode to the first monitoring mode at 10:00, and at 14:00: 00 switches the monitoring mode from the first monitoring mode to the second monitoring mode.
  • the electronic device when the user leaves the vehicle, can switch from the first monitoring mode to the second monitoring mode. That is, the first monitoring mode is exited and the second monitoring mode is enabled. In one embodiment of the present application, the electronic device can automatically leave the first monitoring mode and automatically enable the second monitoring mode.
  • the electronic device can automatically leave the first monitoring mode and enable the second monitoring mode under the user's instruction.
  • the user may be prompted to enter the second monitoring mode after n time. If the user agrees to enter the second monitoring mode, the electronic device will enter the second monitoring mode after n times. If the user does not agree to enter the second monitoring mode, the electronic device will continue to use the first monitoring mode to monitor the user's sleep after n time. Alternatively, the electronic device automatically enters the second monitoring mode after the electronic device prompts the user for a preset time. Or after the electronic device prompts the user, if the user does not give feedback within the specified time, the electronic device enters the second monitoring mode after n time.
  • the time range in which the user is actually on the vehicle is usually larger than the time range determined according to the travel information above.
  • the determined time range of the user on the vehicle ie, the working time of the first monitoring mode
  • the electronic device can set the monitoring mode to the first monitoring mode at 09:30.
  • the second method can be used for judgment.
  • Method 2 The electronic device acquires the user's motion information, and the electronic device determines whether the user is on a vehicle according to the motion information.
  • the exercise information may include exercise data and health data.
  • the processor in the electronic device may acquire the user's movement data (such as movement of speed, exercise time, exercise route, etc.), the processor in the electronic device can obtain the user's health data (such as heart rate value, etc.) through the bone conduction sensor (180M shown in Figure 3) installed on the electronic device.
  • the user's movement data such as movement of speed, exercise time, exercise route, etc.
  • the processor in the electronic device can obtain the user's health data (such as heart rate value, etc.) through the bone conduction sensor (180M shown in Figure 3) installed on the electronic device.
  • the electronic device may determine the speed threshold of the user's movement speed according to the obtained user's movement data.
  • the electronic device can determine the normal heart rate range of the user according to the acquired health data of the user (the normal heart rate range in this embodiment of the present application refers to the range of the user's heart rate value in a non-exercise state).
  • the electronic device can monitor the user's exercise data and health data through the sports health application, and then determine the speed threshold of the user's exercise speed and the user's normal heart rate range according to the user's exercise data and health data, and then according to the determined speed threshold and the normal heart rate range to determine whether the user is on a vehicle.
  • the user can set the time range for allowing the electronic device to obtain the user's exercise data and health data through the sleep monitoring function.
  • a setting page of a sleep monitoring function in an electronic device gives options "Always allow", “Allow only during use”.
  • the electronic device can obtain the user's health data in real time in the background through the sleep monitoring function.
  • the electronic device can obtain the user's health data through the sleep monitoring function only when the sleep monitoring function is turned on in the foreground.
  • the movement speed of the user monitored by the electronic device is relatively large, and the heart rate value of the user exceeds the normal heart rate range.
  • the movement speed of the user detected by the electronic device is relatively large, but the user's heart rate value is within the normal heart rate range.
  • one way for the electronic device to determine whether the user is on a vehicle according to the motion information may be: when the user's motion speed is greater than the speed threshold and the user's heart rate exceeds the normal heart rate range, the electronic device determines The user is in a vehicle.
  • the electronic device may not be able to determine whether the user is in the On the vehicle, the electronic device cannot accurately determine the time range when the user is on the vehicle.
  • a caching mechanism can be set to ensure that data can be cached for a period of time. For example, assuming that the user is on the vehicle at 10:00 according to the motion information, and the cache duration is 0.5h, then 09:30 can be recorded as the time node when the user is on the vehicle. It is equivalent to extending the working time of the first monitoring mode forward by 0.5h.
  • the first method and the second method can be combined, and the identification results of the two methods can be comprehensively considered.
  • the first monitoring mode in S802 will be introduced below.
  • FIG. 9 it is a schematic flowchart of a sleep monitoring method in a first monitoring mode provided by an embodiment of the present application. As shown in FIG. 9 , by way of example and not limitation, when the user is on the vehicle, the electronic device determines to use the first monitoring mode to detect the sleep of the user. In the first monitoring mode, the following steps may be specifically included:
  • the electronic device acquires first monitoring data of the user on the vehicle.
  • the processor in the electronic device can acquire various sensor data in real time through the sensor module installed on the electronic device, such as acceleration data, speed data, heart rate value, and the like.
  • Electronic devices can acquire sensor data in real time, whether or not the user is in a vehicle.
  • the data used for sleep monitoring is actually sensor data acquired when the user is on the vehicle. Therefore, the first monitoring data in the embodiment of the present application is the data monitored when the user is on the vehicle.
  • the working time of the sleep monitoring function in the electronic device is 06:00-22:00, and the electronic device has been collecting sensor data during the time period of 06:00-22:00. Assuming that the electronic device determines that the user is on the vehicle during the time period of 09:00-10:00, the electronic device records the monitoring data obtained by the electronic device during the time period of 09:00-10:00 as the first monitoring The monitoring data obtained by the electronic device in the two time periods of 06:00-09:00 and 10:00-22:00 are recorded as the second monitoring data.
  • the first monitoring data includes not only the user's state information, but also the vehicle-related information, and may also include measurement error data caused by the hardware configuration of the sensor itself.
  • the information related to the vehicle may include acceleration data generated due to the shaking of the vehicle, and may also include acceleration data of the vehicle itself during the running of the vehicle, and so on.
  • the first monitoring data Since the user is on the vehicle, the first monitoring data is not only affected by the user's actions, but also by the information related to the vehicle. Therefore, it is necessary to filter out the vehicle-related information from the first monitoring data by using the method in the following S902.
  • the electronic device obtains target data according to the first monitoring data.
  • the target data is the data obtained after filtering out the vehicle-related information in the first monitoring data.
  • the information related to the vehicle can be regarded as a kind of noise data
  • the first monitoring data can be regarded as the mixed data of the user's state information and the noise data.
  • the process of filtering out the state information of the vehicle in the first monitoring data can be regarded as a process of denoising the first monitoring data.
  • a way for the electronic device to obtain target data according to the first monitoring data in S902 may include the following steps:
  • the electronic device obtains the driving data of the vehicle.
  • the driving data of the vehicle can be used to represent the driving state of the vehicle, and is the data that interferes the most with the user's state information.
  • the travel data of the vehicle may include speed data and/or acceleration data of the traffic, and the like.
  • the data attribute of the driving data of the vehicle is consistent with the data attribute of the first monitoring data. For example, assuming that the first monitoring data includes acceleration data, the corresponding vehicle driving data also includes acceleration data; assuming that the first monitoring data includes speed data, the corresponding vehicle driving data also includes speed data. In other words, if the speed data in the first monitoring data needs to be denoised, the electronic device needs to acquire the speed data of the vehicle. If the acceleration data in the first monitoring data needs to be denoised, the electronic device needs to acquire the acceleration data of the vehicle.
  • the driving data of the vehicle may be acceleration data of the vehicle.
  • the acceleration sensor obtains three-axis acceleration, that is, the x-axis acceleration, the y-axis acceleration, and the z-axis acceleration. Therefore, the three-axis acceleration may be included in the driving data of the vehicle.
  • the first monitoring data species may also include triaxial acceleration.
  • the driving data of the vehicle can represent the driving state of the vehicle, and the driving state of the vehicle may include two states: stationary and driving.
  • the running data of the vehicle generally refers to the acceleration data when the vehicle is running.
  • the vehicle itself when the vehicle is stationary, the vehicle itself usually has a certain acceleration due to slight shaking of the vehicle itself or sensor measurement errors, which in turn affects the user's status information.
  • the driving data of the vehicle may include both first acceleration data used to indicate that the vehicle is in a stationary state, and may also include first acceleration data used to indicate that the vehicle is in a stationary state.
  • the second acceleration data of the vehicle in a driving state.
  • the following describes the acquisition methods of the first acceleration data and the second acceleration data respectively.
  • the acquisition methods of the first acceleration data may include but are not limited to the following two methods:
  • Mode 1 The electronic device confirms the departure time of the vehicle according to the travel information of the user; within a preset time before the departure time of the vehicle, the electronic device acquires acceleration data in real time, and records the acceleration data as candidate data;
  • the candidate data is subjected to noise reduction filtering processing; the electronic device determines whether the user is relatively stationary according to the candidate data processed by the noise reduction filtering; if the user is relatively stationary, the electronic device records the candidate data corresponding to when the user is relatively stationary as the first acceleration data.
  • the user is not in a state of absolute stillness. Due to the user's breathing, the small movements of the limbs, and the shaking of the vehicle, the user's body will produce slight movements. But these slight movements will not cause the electronic device to obtain relatively large acceleration data. Therefore, after the electronic device performs noise reduction filtering processing on the acquired acceleration data, it can effectively filter out the acceleration data generated by the slight actions of the user.
  • the value of the acceleration data obtained by the electronic device worn by the user is relatively large. If the vehicle is in a stationary state, the value of the acceleration data obtained by the electronic device worn by the user is relatively small.
  • the electronic device determines whether the user is relatively stationary according to the candidate data processed by noise reduction filtering, which may include: if the variation of any two-axis acceleration in the candidate data is less than the first preset value, the electronic device determines whether the user is relatively stationary.
  • the user is relatively stationary.
  • the change of the single-axis acceleration is small, indicating that the user's motion range is small in a certain direction.
  • the variation of the acceleration of any two axes is small, indicating that the user is in a relatively stationary state, and the vehicle is in a stationary state at this time.
  • the first preset value may be preset according to the needs of monitoring accuracy.
  • the first acceleration data may be obtained according to the second method.
  • Mode 2 The electronic device acquires acceleration data in real time, records the acceleration data as candidate data, and caches the candidate data; the electronic device performs noise reduction filtering processing on the candidate data; the electronic device determines whether the vehicle is a vehicle according to the candidate data after noise reduction filtering processing. is in a driving state; if it is determined that the vehicle is in a driving state, the electronic device determines the departure time of the vehicle, and obtains the cached data before the departure time; the electronic device determines whether the user is relatively stationary according to the cached data; if the user is relatively stationary, the electronic device The corresponding candidate data when the user is relatively stationary is recorded as the first acceleration data.
  • the electronic device judging whether the vehicle is in a driving state according to the candidate data processed by noise reduction filtering may include: if the variation of the acceleration of a certain axis in the candidate data is greater than the second preset value, then the electronic device The device determines that the vehicle is in a running state.
  • the second preset value may be preset with reference to the traveling speed of the vehicle and the movement speed of the user.
  • the electronic device may also determine whether the vehicle is in a driving state by using the acquired data of the gyro sensor. Since the gyro sensor can detect the shift of the center of gravity of the human body, when the vehicle is started, the center of gravity of the user on the vehicle is shifted. The electronic device can judge whether the vehicle is in a driving state through the offset of the center of gravity monitored by the gyro sensor. For example, if the electronic device detects a continuous and regular angular offset through the gyro sensor, and the angular offset is greater than the preset offset, the electronic device determines that the vehicle is in a driving state.
  • the angular offset of the gyro sensor generated when the vehicle is started is usually greater than the angular offset of the gyro sensor generated when the user is walking. Therefore, the preset offset can refer to the angular offset when the user is walking. Make a preset.
  • the first acceleration data may be set as the first preset acceleration.
  • the first preset acceleration may be 0, or a small constant value, or a random value, or the like.
  • the acquisition methods of the second acceleration data may include but are not limited to the following two methods:
  • Mode 1 After determining that the vehicle is in a driving state, the electronic device acquires acceleration data in real time, and records the acceleration data as the data to be monitored; the electronic device determines the second acceleration according to the single-axis acceleration with the largest change in the data to be monitored.
  • Method 2 After determining that the vehicle is in a driving state, the electronic device obtains Global Positioning System (GPS, Global Positioning System) data; the electronic device calculates the driving distance according to the GPS data, and calculates the second acceleration data according to the driving distance.
  • GPS Global Positioning System
  • the second acceleration data may be set as the second preset acceleration.
  • the second preset acceleration may be 0, or a smaller constant value, or a random value, or the like.
  • the first and second modes in order to improve the accuracy of the acquired second acceleration data, may be comprehensively considered.
  • the electronic device determines the data components in the first monitoring data that match the driving data as vehicle-related information.
  • the electronic device filters out the vehicle-related information from the first monitoring data to obtain target data.
  • the sensor module in the embodiment shown in FIG. 3 usually acquires sensor data at a certain sampling frequency. Therefore, the first monitoring data may include one or more sensor data, and each sensor data in the first monitoring data corresponds to a sampling moment. Correspondingly, the data in the driving data is in one-to-one correspondence with the data in the first monitoring data. Exemplarily, as described in S902, both the first monitoring data and the driving data may include acceleration data. Assuming that the first monitoring data includes acceleration data corresponding to the sampling times t1 and t2, correspondingly, the driving data also includes acceleration data corresponding to the sampling times t1 and t2.
  • the data components matched with the driving data include the data components corresponding to the driving data which are equal, and also include the data components corresponding to the driving data proportional to the driving data.
  • Correspondingly equal means that the values of the data corresponding to the two at the same sampling time are equal.
  • the values of the acceleration data corresponding to the sampling times t1 and t2 in the driving data are p, q
  • the values of the acceleration data corresponding to the sampling times t1 and t2 in the data components matching the driving data are also p, q .
  • Corresponding proportional means that the values of the data corresponding to the two at the same sampling time are proportional. For example, it is assumed that the values of the acceleration data corresponding to the sampling times t1 and t2 in the driving data are respectively p and q, and the values of the acceleration data corresponding to the sampling times t1 and t2 in the data components matched with the driving data are respectively 5p and 5q.
  • an implementation manner for the electronic device to obtain the target data from the first monitoring data is:
  • the electronic device determines the data components of the first monitoring data that match the driving data as vehicle-related information, and then subtracts the data components that match the driving data from the first monitoring data.
  • the difference data obtained by subtracting the data components matched with the driving data from the first monitoring data is the target data.
  • the three-axis acceleration can be processed separately. Specifically, the electronic device subtracts the x-axis acceleration in the corresponding data components matching the driving data from the x-axis acceleration at each sampling moment in the first monitoring data, and subtracts the y-axis acceleration at each sampling moment in the first monitoring data The acceleration subtracts the y-axis acceleration in the corresponding data components matching the driving data, and subtracts the z-axis acceleration in the corresponding data components matching the driving data from the z-axis acceleration at each sampling time in the first monitoring data. .
  • the three-axis acceleration can also be fused first, and then the fused acceleration can be processed. Specifically, the electronic device fuses the x-axis, y-axis, and z-axis accelerations corresponding to each sampling moment in the first monitoring data into one acceleration to obtain the first fusion acceleration; and fuses each sampling moment in the data components matched with the driving data into one acceleration The corresponding x-axis, y-axis, and z-axis accelerations are fused into one acceleration to obtain the second fusion acceleration; then the second fusion acceleration is subtracted from the first fusion acceleration corresponding to each sampling time.
  • the above-mentioned method for the electronic device to obtain the target data from the first monitoring data has low algorithm complexity and is easy to implement. However, the user's status information and the vehicle-related information are usually not simply superimposed together, but mixed together. If the first monitoring data is directly used to subtract the data component matching the driving data, the obtained target data may not accurately reflect the user's action state.
  • another implementation manner for the electronic device to obtain the target data from the first monitoring data is as follows: it may include:
  • the electronic device constructs a noise data matrix according to the first acceleration data and the second acceleration data; the electronic device inputs the noise data matrix and the first monitoring data into a preset decomposition model, and obtains a data component of the first monitoring data that matches the driving data; The electronic device determines data components in the first monitoring data that match the driving data as vehicle-related information, and the electronic device determines data components that do not match the driving data in the first monitoring data as target data.
  • the travel data includes the first acceleration data and the second acceleration data.
  • Each of the first acceleration data and the second acceleration data may include a plurality of data.
  • a way for the electronic device to construct the noise data matrix according to the first acceleration data and the second acceleration data may be: using the data in the first acceleration data and the second acceleration data as elements in the noise data matrix.
  • the first acceleration data includes two sets of three-axis accelerations (x1, y1, z1), (x2, y2, z2), and the second acceleration data includes (x3, y3, z3), (x4, y4) , z4), (x5, y5, z5) three sets of three-axis acceleration.
  • An example of a noisy data matrix is given below:
  • noise data matrix is only an example, and the form of the noise data matrix is not specifically limited.
  • another way for the electronic device to construct a noise data matrix according to the first acceleration data and the second acceleration data may be: the electronic device first performs data statistics on the first acceleration data and the second acceleration data respectively, and then according to the statistics The resulting data constructs a noisy data matrix.
  • the first acceleration data includes two sets of three-axis accelerations (x1, y1, z1), (x2, y2, z2), and the second acceleration data includes (x3, y3, z3), (x4, y4) , z4), (x5, y5, z5) three sets of three-axis acceleration.
  • the electronic device can first fuse each group of three-axis accelerations in the first acceleration data into one acceleration value to obtain a1 and a2; and fuse each group of three-axis accelerations in the second acceleration data into one acceleration value to obtain a3, a4 and a5, then a1, a2, a3, a4 and a5 are built into a noise data matrix. Since the amount of data in the first acceleration is not equal to the amount of data in the second acceleration, a preset value may be used to make up for it.
  • An example of a noisy data matrix is given below:
  • the preset value in the above noise data matrix is 0.
  • the above method of fusing each group of three-axis accelerations into one acceleration value may be: determining the statistical characteristic value of each group of three-axis accelerations as the acceleration value after each group of three-axis accelerations is fused.
  • the statistical eigenvalues can be mean, variance, median, root mean square, etc.
  • noise data matrix is only an example, and is not used to specifically limit the preset value and the form of the noise data matrix.
  • the noise data matrix can be set according to the needs of the preset decomposition model for data processing.
  • the dimensions of the data matrix are set to match the dimensions of the first monitoring data. For example, it is assumed that the cross-noise data matrix needs to be multiplied by the first monitoring data in the preset decomposition model, and the first monitoring data is (x0, y0, z0).
  • the first monitoring data can be formed into a 3 ⁇ 1 vector, correspondingly, the dimension of the noise data matrix needs to satisfy n ⁇ 3 (n is a positive integer); if the first monitoring data is formed into a 1 ⁇ 3 vector, correspondingly, the noise The dimension of the data matrix needs to satisfy 3 ⁇ n.
  • the preset decomposition model may be an algorithm model capable of realizing a data denoising function, that is, taking the data in the noise data matrix as noise data, and performing denoising processing on the first monitoring data according to the noise data.
  • the preset decomposition model may also be an algorithm model capable of realizing a signal decomposition function, that is, decomposing the first monitoring data into a noise part (ie, driving data) and a non-noise part (ie, target data), such as neural network, variational modal decomposition model , the classical modal decomposition model, etc.
  • FIG. 10 is a schematic diagram of a decomposition result provided by an embodiment of the present application.
  • FIG. 10 is a data curve fitted by the first monitoring data
  • (b) in FIG. 10 is a data curve fitted by driving data
  • (c) in FIG. 10 is A data curve fitted with data components that are decomposed from the first monitoring data and matched with the driving data
  • (d) in FIG. 10 is a data curve fitted by the target data. It can be seen from FIG.
  • the preset decomposition model decomposes the first monitoring data into data components that match the driving data and data components that do not match the driving data (ie, target data).
  • the process of decomposing out the noise part and the non-noise part Decomposing the data components matching the driving data from the first monitoring data is equivalent to filtering out information related to vehicles in the first monitoring data.
  • the data components (ie target data) obtained after decomposition that do not match the driving data are equivalent to the status information of the user obtained after filtering out the information related to the vehicle.
  • the decomposition model can be pre-trained.
  • the sensor data when the user is not on the vehicle can be obtained as the sample data of the user's status information; the sensor data of the vehicle can be obtained as the sample data of the driving data; the sample data of the driving data can be fused into the user's status as the noise data
  • the fused data is used as the sample data of the first monitoring data; then the decomposition model is trained according to the sample data of the user's state information, the sample data of the driving data and the sample data of the monitoring data.
  • the target data obtained according to the above method can more accurately reflect the user's own action state. Monitoring the user's sleep according to the target data can avoid the influence of the acceleration of the vehicle itself on the user's actions, and effectively improve the accuracy of sleep monitoring.
  • the electronic device monitors the user's sleep according to the target data.
  • the acceleration data can reflect the user's action state more sensitively, when the user performs some small movements (such as breathing, slight shaking, etc.), the acceleration data can still be more clearly represented, which will affect sleep. Monitoring interferes. In order to improve the monitoring accuracy, noise reduction filtering can be performed on the target data to filter out the influence of small amplitude movements on sleep monitoring. Further, since the data values of the acceleration data are complex and the data calculation is complicated, in order to simplify the data processing, the target data after the noise reduction filtering process can be normalized. For example, the target data less than a certain threshold is recorded as 0, and the target data greater than or equal to the threshold is recorded as 1.
  • the electronic device can perform sleep monitoring separately according to the target data at each sampling moment.
  • data processing is too frequent, the amount of calculation is large, and the monitoring results obtained from the data at a single sampling moment are contingent. Therefore, the electronic device can perform sleep monitoring according to the target data at multiple sampling times.
  • S903 may include the following steps:
  • the electronic device monitors the user's sleep according to the target data; when the amount of data in the target data does not reach the preset amount, the electronic device continues to acquire the first monitoring data.
  • a caching mechanism can be set. Since the sampling frequency is fixed, only setting the cache duration is equivalent to limiting the amount of data.
  • S903 may include: when the cache duration reaches the preset duration, the electronic device monitors the user's sleep according to the target data; when the cache duration does not reach the preset duration, the electronic device continues to obtain the first monitoring data.
  • an implementation manner of monitoring the user's sleep according to the target data may be: inputting the target data into a preset monitoring model to obtain an output monitoring result.
  • the preset monitoring model may be a neural network model, a clustering model, or the like, and the monitoring result may be used to indicate that the user is in an awake or sleeping state.
  • the user since the target data includes data at multiple sampling moments, the user may fall asleep or fall asleep at a certain sampling moment.
  • the above method only the sleep state of the user corresponding to the target data can be monitored, but the specific time of going to sleep and going to sleep of the user cannot be monitored.
  • another implementation manner in which the electronic device monitors the sleep of the user according to the target data may be: the electronic device obtains multiple sets of data according to the target data; the electronic device obtains multiple sets of data according to the multiple sets of data; The respective corresponding statistical feature values determine the respective first state labels corresponding to each group of data; the electronic device determines the sleep monitoring result according to the respective first state labels corresponding to each group of data.
  • the electronic device obtains multiple sets of data according to the target data, and the electronic device may divide the target data into multiple sets of data.
  • the statistical eigenvalues can be median, root mean square, mean, dynamic frequency, spectral energy, etc.
  • band-pass filtering can be performed on the acquired first monitoring data and driving data, and the polar Low and very high frequencies are filtered out.
  • the first state label includes a sleep state and an awake state.
  • the results of sleep monitoring include the time to fall asleep, the time to fall out of sleep, and the duration of sleep.
  • the first state label corresponding to each group of data may be determined by using a neural network, a clustering algorithm, or a decision tree algorithm. In this way, it is possible to more accurately determine the time when the user falls asleep.
  • the target data is divided into 10 groups, and the target data corresponds to the time period of 10:00-10:50.
  • the first group includes the data of the time period of 10:00-10:05
  • the second group includes the data of the time period of 10:06-10:10
  • the tenth group includes the data of 10:46- 10:50 data in this time period (that is, the target data is divided according to time, and each group of data corresponds to 5 minutes).
  • the electronic device calculates the corresponding statistical characteristic values of each group of data respectively, and obtains 10 statistical characteristic values.
  • Determine the first state label corresponding to each statistical feature value for example, determine that the first state label corresponding to the first feature value is the awake state, the first state label corresponding to the second feature value is the awake state, and the third The first state labels corresponding to the eigenvalues to the eighth eigenvalue are all sleep states, and the first state labels corresponding to the ninth eigenvalue and the tenth eigenvalue are all awake states. Then the electronic device can determine according to the first state label that the user's falling asleep time is the start time corresponding to the third set of data (ie 10:15), and the user's falling asleep time is the end time corresponding to the seventh set of data (ie 10:15). :35). Furthermore, the electronic device may determine that the sleep duration of the user is 20 minutes.
  • the electronic device determines the sleep monitoring result according to the target data, and does not specifically limit the division rules and the like of the target data.
  • the more groups the target data is divided into the more accurate the monitored out/sleep time will be, but the larger the data processing volume will be.
  • acceleration data is used for monitoring.
  • PPG data such as pulse wave time domain characteristic data, pulse wave frequency domain characteristic data, etc.
  • monitoring methods may include:
  • the electronic device acquires the user's pulse wave data; the electronic device determines the second state label corresponding to each group of data according to the pulse wave data and the corresponding statistical characteristic value of each group of data; the electronic device determines according to the first state label and the second state label Each group of data has a corresponding final state label; the electronic device determines the sleep monitoring result according to the corresponding final state label of each group of data.
  • the second state label includes the sleep state and the awake state.
  • a neural network, a decision tree algorithm, a machine learning algorithm, etc. can be used to classify the pulse wave data and the statistical feature values, and determine the second state label corresponding to the pulse wave data and the statistical feature values.
  • different algorithms can be used when obtaining the first state label and the second state label.
  • the decision tree algorithm is used to obtain the first state label
  • the machine learning algorithm such as the LightGBM model
  • the first state label and the second state label may be fused into a final state label according to different weights.
  • the awake state is quantized as 1, the sleep state is quantized as 0, the weight of the first state label is 0.8, and the weight of the second state label is 0.2.
  • the quantification threshold of the final state label is 0.5 (that is, when it is greater than or equal to 0.5, it is an awake state, and when it is less than 0.5, it is a sleep state), correspondingly, the final state label finally determined is the awake state.
  • the second monitoring mode in S803 is introduced below.
  • the electronic device determines to use the second monitoring mode to detect the sleep of the user.
  • the second monitoring mode it may specifically include: the electronic device monitors the sleep of the user according to the acquired second monitoring data.
  • the second monitoring data is the monitoring data obtained by the electronic device when the user is not on the vehicle.
  • the vehicle-related information is not included. Therefore, it is not necessary to perform denoising processing on the second monitoring data, and it is sufficient to perform sleep monitoring according to the second monitoring data.
  • the electronic device can monitor the sleep of the user in different states. Specifically, the electronic device can not only monitor the sleep of the user when the user is on the vehicle, but also monitor the sleep of the user when the user is not on the vehicle. Thus, the problem of not recording or less recording of the user's sleep on the vehicle is solved, and the user experience is improved.
  • Application scenarios may include offline monitoring scenarios, online monitoring scenarios, and fusion monitoring scenarios.
  • electronic devices acquire sensor data and cache the acquired sensor data. After the time node corresponding to when the user is on the vehicle is determined, the first monitoring data in the sensor data (that is, the data monitored by the electronic device when the user is on the vehicle) is determined according to the time node. Then, the vehicle-related information in the first monitoring data is filtered out to obtain target data, and the user's sleep is monitored according to the target data. Wherein, when filtering out the information related to the vehicle, the electronic device may acquire the driving data of the vehicle from the buffered sensor data.
  • the electronic device needs to cache a large amount of sensor data, which has high requirements on the storage space of the electronic device.
  • the electronic device can first upload the acquired sensor data to a third-party storage space such as a cloud server, and when the sleep monitoring method needs to be executed, the sensor data is stored in the storage space. Obtain relevant data from third-party storage space.
  • the electronic device that collects sensor data and the electronic device that executes the sleep monitoring method may be different electronic devices.
  • the electronic device for collecting sensor data may be a sports bracelet, and the electronic device for executing the sleep monitoring method may be a mobile phone. After the sports bracelet collects the sensor data, the sensor data is transmitted to the mobile phone, and the mobile phone executes the sleep monitoring method provided by the embodiment of the present application.
  • Offline monitoring needs to analyze and process the data after the electronic device has obtained all the monitoring data.
  • the delay of the monitoring results is high, and the user cannot grasp the sleep situation in time.
  • the monitoring results of offline monitoring are more accurate. Therefore, offline monitoring is more suitable for situations where the timeliness of monitoring is low and the accuracy of monitoring results is high.
  • electronic devices acquire sensor data in real time.
  • the electronic device records the subsequently acquired sensor data as the first monitoring data, and enters the first monitoring mode.
  • the electronic device filters out the vehicle-related information in the first monitoring data, obtains target data, and monitors the user's sleep according to the target data.
  • Online monitoring requires real-time processing of monitoring data, and the delay of monitoring results is low. However, when filtering out information related to vehicles, since the acquired real-time monitoring data is not comprehensive, the acquired driving data of vehicles may be inaccurate, which may lead to errors in the final sleep monitoring results. Therefore, compared with offline monitoring, online monitoring is more suitable for situations where the timeliness of monitoring is higher and the monitoring results are allowed to have errors.
  • the electronic device can first cache part of the monitoring data to ensure that more accurate vehicle driving data can be obtained. In other words, the electronic device starts sleep monitoring after acquiring part of the monitoring data. In this way, although the monitoring result will be delayed for a short period of time at the initial stage of entering the first monitoring mode, the high accuracy of the monitoring result can be guaranteed. Compared with offline monitoring, fusion monitoring has lower latency; and compared with online monitoring, fusion monitoring has higher accuracy.
  • FIG. 11 is a structural block diagram of a sleep monitoring apparatus provided by an embodiment of the present application. For the convenience of description, only the parts related to the embodiments of the present application are shown. Referring to Figure 11, the device includes:
  • the electronic device determines whether the user is on the vehicle.
  • the electronic device determines to use the first monitoring mode to monitor the sleep of the user on the vehicle.
  • the electronic device determines to use the second monitoring mode to monitor the sleep of the user on the vehicle.
  • the device further includes:
  • the first monitoring unit 114 is used for obtaining the first monitoring data of the user on the vehicle if the user is on the vehicle, and the first monitoring data includes information related to the vehicle; the electronic device obtains the target according to the first monitoring data
  • the target data is the data obtained after filtering out the vehicle-related information in the first monitoring data; the electronic device monitors the user's sleep according to the target data.
  • the second monitoring unit 115 is configured to monitor the sleep of the user according to the second monitoring data obtained by the electronic device if the user is not on the vehicle, and the second monitoring data includes the state information of the user.
  • the first monitoring unit 114 is also used for:
  • the electronic device obtains the driving data of the vehicle; the electronic device determines the data component in the first monitoring data that matches the driving data as the vehicle-related information; the electronic device filters out the vehicle-related information from the first monitoring data to obtain the target data.
  • the driving data includes first acceleration data when the vehicle is in a stationary state and second acceleration data when the vehicle is in a driving state.
  • the first monitoring unit 114 is also used for:
  • the electronic device constructs a noise data matrix according to the first acceleration data and the second acceleration data; the electronic device inputs the noise data matrix and the first monitoring data into a preset decomposition model, and obtains a data component of the first monitoring data that matches the driving data; The electronic device determines a data component of the first monitoring data that matches the driving data as vehicle-related information.
  • the first monitoring unit 114 is also used for:
  • the electronic device monitors the user's sleep according to the target data; when the amount of data in the target data does not reach the preset amount, the electronic device continues to acquire the first monitoring data.
  • the first monitoring unit 114 is also used for:
  • the electronic device obtains multiple sets of data according to the target data; the electronic device determines a first state label corresponding to each set of data according to the corresponding statistical characteristic value of each set of data in the multiple sets of data; the electronic device determines the corresponding first state according to each set of data Labels identify sleep monitoring results.
  • the first state label includes a sleep state and an awake state.
  • the first monitoring unit 114 is also used for:
  • the electronic device acquires the user's pulse wave data; the electronic device determines the second state label corresponding to each group of data according to the pulse wave data and the corresponding statistical characteristic value of each group of data; the electronic device determines according to the first state label and the second state label Each group of data has a corresponding final state label; the electronic device determines the sleep monitoring result according to the corresponding final state label of each group of data.
  • the second state label includes a sleep state and an awake state.
  • the judging unit 111 is also used for:
  • the electronic device obtains the travel information and/or exercise information of the user, and determines whether the user is on a vehicle according to the travel information and/or exercise information;
  • the electronic device displays prompt information on the display screen, and the prompt information is used to prompt the user to select whether the user is on the vehicle; the electronic device monitors the first operation instruction input by the user; the electronic device determines whether the user is on the vehicle according to the first operation instruction superior.
  • Embodiments of the present application further provide a computer-readable storage medium, including computer instructions, when the computer instructions are executed on a computer or a processor, the computer or processor can execute the steps in the above-mentioned embodiments of the sleep monitoring methods.
  • the embodiments of the present application provide a computer program product, when the computer program product runs on a computer or a processor, the computer or processor can implement the steps in the above-mentioned embodiments of the sleep monitoring methods.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general purpose computer, special purpose computer, computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted over a computer-readable storage medium. The computer instructions can be sent from one website site, computer, server or data center to another website site, computer, server or data center for transmission.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes an integration of one or more available media.
  • the usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media (eg, solid state disks (SSDs)), and the like.
  • An embodiment of the present application further provides a chip system, which is characterized in that the chip system includes a processor, the processor is coupled to a memory, and the processor executes a computer program stored in the memory to implement the steps in each of the above sleep monitoring method embodiments .
  • the chip system may be a single chip, or a chip module composed of multiple chips.

Abstract

The present application is suitable for the field of data processing. Provided are a sleep monitoring method and apparatus, and an electronic device and a computer-readable storage medium. The sleep monitoring method comprises: an electronic device determining whether a user is located in a vehicle; if the user is located in the vehicle, the electronic device acquiring first monitoring data of the user in the vehicle, wherein the first monitoring data comprises information related to the vehicle; the electronic device obtaining target data according to the first monitoring data, wherein the target data is data obtained after the information related to the vehicle is filtered from the first monitoring data; and the electronic device monitoring the sleep of the user according to the target data. By means of the method, the sleep of a user in a vehicle can be accurately recorded.

Description

睡眠监测方法、装置、电子设备及计算机可读存储介质Sleep monitoring method, apparatus, electronic device, and computer-readable storage medium
本申请要求于2020年10月29日提交国家知识产权局、申请号为202011185682.X、申请名称为“睡眠监测方法、装置、电子设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the State Intellectual Property Office on October 29, 2020, the application number is 202011185682.X, and the application name is "sleep monitoring method, device, electronic device and computer-readable storage medium", The entire contents of which are incorporated herein by reference.
技术领域technical field
本申请涉及数据处理领域,尤其涉及一种睡眠监测方法、装置、电子设备及计算机可读存储介质。The present application relates to the field of data processing, and in particular, to a sleep monitoring method, apparatus, electronic device, and computer-readable storage medium.
背景技术Background technique
目前,睡眠监测是电子设备(如手机、手环、智能手表等)的一项常用功能。用户能够通过该项功能了解自身的出/入睡时间、睡眠时长等睡眠数据,进而掌握自身的睡眠状态。At present, sleep monitoring is a common function of electronic devices (such as mobile phones, wristbands, smart watches, etc.). Through this function, users can understand their own sleep data such as the time of going out/sleep, sleep duration, etc., and then master their own sleep status.
而睡眠监测方法中要确定用户的入睡点以及出睡点。目前电子设备通常是根据电子设备监测到的加速度数据确定用户的入睡点以及出睡点,以对用户进行睡眠监测。但是目前当用户处于交通工具上时,可能存在电子设备无法准确地确定用户的入睡点以及出睡点的情况,导致电子设备无法准确地记录用户在交通工具上的睡眠情况。In the sleep monitoring method, the user's sleep-onset point and sleep-off point should be determined. At present, the electronic device usually determines the sleeping point and the sleeping point of the user according to the acceleration data monitored by the electronic device, so as to monitor the sleep of the user. However, at present, when the user is on the vehicle, the electronic device may not be able to accurately determine the sleeping point and the sleeping point of the user, so that the electronic device cannot accurately record the user's sleep situation on the vehicle.
发明内容SUMMARY OF THE INVENTION
本申请提供一种睡眠监测方法、装置、电子设备及计算机可读存储介质,可以准确地记录用户在交通工具上的睡眠情况。The present application provides a sleep monitoring method, device, electronic device, and computer-readable storage medium, which can accurately record the sleep condition of a user on a vehicle.
为达到上述目的,本申请采用如下技术方案:To achieve the above object, the application adopts the following technical solutions:
第一方面,提供一种睡眠监测方法,应用于电子设备中,该方法包括:In a first aspect, a sleep monitoring method is provided, applied to an electronic device, the method comprising:
电子设备判断用户是否位于交通工具上;若用户位于交通工具上,电子设备获取用户位于所述交通工具上的第一监测数据,第一监测数据中包括交通工具相关的信息;电子设备根据第一监测数据得到目标数据,目标数据为滤除第一监测数据中交通工具相关的信息之后得到的数据;根据目标数据对用户的睡眠进行监测。The electronic device determines whether the user is on the vehicle; if the user is on the vehicle, the electronic device obtains the first monitoring data of the user on the vehicle, and the first monitoring data includes information related to the vehicle; Target data is obtained from the monitoring data, and the target data is data obtained after filtering out information related to vehicles in the first monitoring data; the sleep of the user is monitored according to the target data.
上述睡眠监测方法中,由于用户位于交通工具上,因此,第一监测数据中包括了交通工具相关的信息。但是,由于交通工具相关的信息的引入可能使得电子设备在根据第一监测数据对用户的睡眠进行监测时,无法准确地计算出用户在交通工具上的睡眠入睡点和/或睡眠出睡点,故通常存在用户处于交通工具上电子设备不记录用户的睡眠或者缺少用户睡眠记录的情况。而本申请实施例中电子设备通过将第一监测数据中交通工具相关的信息滤除掉,这样即滤除了第一监测数据中影响用户动作数据的数据。故通过过滤后得到的目标数据能够较准确地反映用户自身的动作状态,可以使得电子设备准确地计算出用户在交通工具上的睡眠入睡点和/或睡眠出睡点,从而解决了用户在交通工具上的睡眠不记录或少记录的问题,提升了用户体验。In the above sleep monitoring method, since the user is on the vehicle, the first monitoring data includes information related to the vehicle. However, since the introduction of vehicle-related information may cause the electronic device to monitor the user's sleep according to the first monitoring data, it may not be able to accurately calculate the user's sleep-onset point and/or sleep-off point on the vehicle. Therefore, there is usually a situation in which the user is on the vehicle and the electronic device does not record the user's sleep or lacks the user's sleep record. However, in the embodiment of the present application, the electronic device filters out the information related to the vehicle in the first monitoring data, thus filtering out the data affecting the user action data in the first monitoring data. Therefore, the target data obtained after filtering can more accurately reflect the user's own action state, so that the electronic device can accurately calculate the user's sleep-onset point and/or sleep-off point on the vehicle, thereby solving the problem of the user's sleep in the traffic. The problem of not recording or less recording sleep on the tool has improved the user experience.
结合第一方面,在一些实施例中,本申请实施例提供的方法还包括:若用户未位于交通工具上,则电子设备根据获取到的第二监测数据对用户的睡眠进行监测,第二监测数据中包括用户的状态信息。With reference to the first aspect, in some embodiments, the method provided by the embodiments of the present application further includes: if the user is not on the vehicle, the electronic device monitors the user's sleep according to the acquired second monitoring data, and the second monitoring The data includes the user's status information.
本申请实施例中,电子设备可以对用户在不同状态时的睡眠进行监测。也就是说,上述电子设备不仅可以对用户处于交通工具上时的睡眠进行监测,还可以用于对用户未处于交通工具上时的睡眠进行监测,提升了用户的体验。另外,当用户位于交通工具上 时采用第一监测模式,即需要滤除交通工具相关的信息的影响。当用户未位于交通工具上时采用第二监测模式,这时由于电子设备采集到的监测数据中通常不包括交通工具相关的信息,因此无需滤除数据、利用采集到的监测数据进行睡眠监测。通过上述两种监测模式,使得睡眠监测更具针对性,使得睡眠监测结果更加准确。In this embodiment of the present application, the electronic device may monitor the sleep of the user in different states. That is to say, the above electronic device can not only monitor the sleep of the user when the user is on the vehicle, but also can be used to monitor the sleep of the user when the user is not on the vehicle, which improves the user experience. In addition, the first monitoring mode is employed when the user is on the vehicle, i.e. the influence of vehicle-related information needs to be filtered out. When the user is not on the vehicle, the second monitoring mode is adopted. At this time, since the monitoring data collected by the electronic device usually does not include information related to the vehicle, there is no need to filter the data and use the collected monitoring data for sleep monitoring. Through the above two monitoring modes, the sleep monitoring is more targeted, and the sleep monitoring results are more accurate.
结合第一方面,在一些实施例中,在电子设备获取用户位于交通工具上的第一监测数据之前,本申请实施例提供的方法还包括:电子设备确定采用第一监测模式监测用户在交通工具上的睡眠,第一监测模式指需对电子设备获取到的监测数据执行滤除与交通工具相关的信息的过程。With reference to the first aspect, in some embodiments, before the electronic device acquires the first monitoring data of the user on the vehicle, the method provided in this embodiment of the present application further includes: the electronic device determines to use the first monitoring mode to monitor the user on the vehicle The first monitoring mode refers to the process of filtering out the information related to the vehicle on the monitoring data obtained by the electronic device.
结合第一方面,在一些实施例中,电子设备根据获取到的第二监测数据对所述用户的睡眠进行监测之前,本申请实施例提供的方法还包括:电子设备确定采用第二监测模式对用户的睡眠进行监测,第二监测模式指无需滤除电子设备获取到的监测数据中与交通工具相关的信息。With reference to the first aspect, in some embodiments, before the electronic device monitors the sleep of the user according to the acquired second monitoring data, the method provided in this embodiment of the present application further includes: the electronic device determines to use the second monitoring mode to monitor the sleep of the user. The user's sleep is monitored, and the second monitoring mode means that information related to the vehicle in the monitoring data obtained by the electronic device does not need to be filtered out.
本申请实施例中,电子设备可以判断用户是否位于交通工具上,并根据判断结果确定采用第一监测模式或第二监测模式对用户的睡眠进行监测。通过上述方法,电子设备能够自动切换监测模式,智能化程度较高,提升了用户体验。In this embodiment of the present application, the electronic device may determine whether the user is on a vehicle, and determine, according to the determination result, to use the first monitoring mode or the second monitoring mode to monitor the user's sleep. Through the above method, the electronic device can automatically switch the monitoring mode, the degree of intelligence is high, and the user experience is improved.
结合第一方面,在一些实施例中,电子设备根据第一监测数据得到目标数据,包括:电子设备获取交通工具的行驶数据;电子设备将第一监测数据中与行驶数据匹配的数据分量确定为交通工具相关的信息;电子设备从第一监测数据中滤除交通工具相关的信息,得到目标数据。With reference to the first aspect, in some embodiments, the electronic device obtains the target data according to the first monitoring data, including: the electronic device obtains the driving data of the vehicle; the electronic device determines the data component of the first monitoring data that matches the driving data as Vehicle-related information; the electronic device filters out the vehicle-related information from the first monitoring data to obtain target data.
与对第一监测数据进行去噪处理相比,利用上述处理的方法,能够针对性地滤除交通工具相关的信息,进而能够获得更加准确地用户的状态信息。Compared with performing denoising processing on the first monitoring data, by using the above processing method, information related to vehicles can be filtered out in a targeted manner, and more accurate user status information can be obtained.
结合第一方面,在一些实施例中,行驶数据中包括交通工具处于静止状态时的第一加速度数据和交通工具处于行驶状态时的第二加速度数据;电子设备将第一监测数据中与行驶数据匹配的数据分量确定为交通工具相关的信息,包括:电子设备根据第一加速度数据和第二加速度数据构建噪声数据矩阵;电子设备将噪声数据矩阵和第一监测数据输入到预设分解模型中,得到第一监测数据中与行驶数据匹配的数据分量;电子设备将第一监测数据中与行驶数据匹配的数据分量确定为交通工具相关的信息。With reference to the first aspect, in some embodiments, the driving data includes first acceleration data when the vehicle is in a stationary state and second acceleration data when the vehicle is in a driving state; the electronic device combines the first monitoring data with the driving data The matched data components are determined to be vehicle-related information, including: the electronic device constructs a noise data matrix according to the first acceleration data and the second acceleration data; the electronic device inputs the noise data matrix and the first monitoring data into a preset decomposition model, Obtaining data components in the first monitoring data that match the driving data; the electronic device determines the data components in the first monitoring data that match the driving data as vehicle-related information.
噪声数据矩阵中包括了第一加速度数据和第二加速度数据,这样能够保证在后续的数据过滤过程中,既考虑了交通工具行驶过程中造成的数据干扰,又考虑了交通工具静止时存在的数据干扰,使得数据过滤的更加彻底。另外,利用训练好的预设分解模型进行分解处理,能够有效提高监测的效率和监测准确度。The noise data matrix includes the first acceleration data and the second acceleration data, which can ensure that in the subsequent data filtering process, both the data interference caused by the driving process of the vehicle and the data existing when the vehicle is stationary are considered. Interference makes data filtering more thorough. In addition, using the trained preset decomposition model for decomposition processing can effectively improve the monitoring efficiency and monitoring accuracy.
结合第一方面,在一些实施例中,电子设备根据目标数据对用户的睡眠进行监测,包括:当目标数据中的数据量达到预设数量时,电子设备根据目标数据对用户的睡眠进行监测;当目标数据中的数据量未达到预设数量时,电子设备继续获取第一监测数据。With reference to the first aspect, in some embodiments, the electronic device monitors the user's sleep according to the target data, including: when the amount of data in the target data reaches a preset amount, the electronic device monitors the user's sleep according to the target data; When the amount of data in the target data does not reach the preset amount, the electronic device continues to acquire the first monitoring data.
根据预设数量的目标数据进行睡眠监测,能够减少数据处理量,并且能够避免根据单个采样时刻的数据得到的监测结果的偶然性。Performing sleep monitoring according to a preset amount of target data can reduce the amount of data processing and avoid the contingency of monitoring results obtained from data at a single sampling moment.
结合第一方面,在一些实施例中,电子设备根据目标数据对用户的睡眠进行监测,包括:电子设备根据目标数据得到多组数据;电子设备根据多组数据中每组数据各自对应的统计特征值确定每组数据各自对应的第一状态标签,其中,第一状态标签包括睡眠状态和清醒状态;电子设备根据每组数据各自对应的第一状态标签确定睡眠监测结果。With reference to the first aspect, in some embodiments, the electronic device monitors the user's sleep according to the target data, including: the electronic device obtains multiple sets of data according to the target data; the electronic device obtains multiple sets of data according to the respective statistical characteristics of each set of data in the multiple sets of data The value determines a first state label corresponding to each group of data, wherein the first state label includes a sleep state and an awake state; the electronic device determines the sleep monitoring result according to the first state label corresponding to each group of data.
结合第一方面,在一些实施例中,电子设备根据每组数据各自对应的第一状态标签 确定睡眠监测结果,包括:电子设备获取用户的脉搏波数据;电子设备根据脉搏波数据和每组数据各自对应的统计特征值确定每组数据各自对应的第二状态标签,其中,第二状态标签包括睡眠状态和清醒状态;电子设备根据第一状态标签和第二状态标签确定每组数据各自对应的最终状态标签;电子设备根据每组数据各自对应的最终状态标签确定睡眠监测结果。With reference to the first aspect, in some embodiments, the electronic device determines the sleep monitoring result according to the first state label corresponding to each group of data, including: the electronic device acquires the user's pulse wave data; the electronic device determines the sleep monitoring result according to the pulse wave data and each group of data. The respective corresponding statistical feature values determine the second state label corresponding to each group of data, wherein the second state label includes a sleep state and an awake state; the electronic device determines the corresponding data of each group of data according to the first state label and the second state label. Final state label; the electronic device determines the sleep monitoring result according to the final state label corresponding to each set of data.
利用上述方法,综合考虑传感器数据的监测结果和PPG数据的监测结果,能够进一步提高睡眠监测结果的准确性。By using the above method, the monitoring results of the sensor data and the monitoring results of the PPG data are comprehensively considered, so that the accuracy of the sleep monitoring results can be further improved.
结合第一方面,在一些实施例中,电子设备判断用户是否位于交通工具上,包括:电子设备获取用户的出行信息和/或运动信息,根据出行信息和/或运动信息判断用户是否位于所述交通工具上;或者,电子设备在显示屏上显示提示信息,提示信息用于提示用户选择用户是否位于交通工具上;电子设备监测用户输入的第一操作指令;电子设备根据第一操作指令确定用户是否位于交通工具上。With reference to the first aspect, in some embodiments, determining whether the user is on a vehicle by the electronic device includes: the electronic device obtains travel information and/or exercise information of the user, and determines whether the user is located in the vehicle according to the travel information and/or exercise information. or, the electronic device displays prompt information on the display screen, and the prompt information is used to prompt the user to select whether the user is on the vehicle; the electronic device monitors the first operation instruction input by the user; the electronic device determines the user according to the first operation instruction whether on a vehicle.
通过出行信息/运动信息判断用户是否处于交通工具上,能够实现电子设备对睡眠监测模式的自动切换,使得电子设备的睡眠监测功能更加智能,提升用户体验。另外,还提供用户自主选择的方式,由用户确定是否位于交通工具上,该种方式能够更加准确地判断用户的状态。By judging whether the user is on a vehicle through travel information/motion information, the electronic device can automatically switch the sleep monitoring mode, making the sleep monitoring function of the electronic device more intelligent and improving the user experience. In addition, a user-selected method is also provided, and the user determines whether the vehicle is on a vehicle. This method can more accurately determine the user's state.
第二方面,本申请实施例提供了一种睡眠监测装置,该装置包括:In a second aspect, an embodiment of the present application provides a sleep monitoring device, the device comprising:
判断单元,用于电子设备判断用户是否位于交通工具上;a judging unit, used for the electronic device to judge whether the user is on the vehicle;
第一监测单元,用于若用户位于交通工具上,电子设备获取用户位于交通工具上的第一监测数据,第一监测数据中包括交通工具相关的信息;电子设备根据第一监测数据得到目标数据,目标数据为滤除第一监测数据中交通工具相关的信息之后得到的数据;电子设备根据目标数据对用户的睡眠进行监测。The first monitoring unit is used for obtaining the first monitoring data of the user on the vehicle if the user is on the vehicle, and the first monitoring data includes information related to the vehicle; the electronic device obtains the target data according to the first monitoring data , the target data is the data obtained after filtering out the vehicle-related information in the first monitoring data; the electronic device monitors the user's sleep according to the target data.
第三方面,本申请实施例提供了一种电子设备,电子设备包括处理器,处理器用于运行存储器中存储的计算机程序,以实现如第一方面任一种可能的实施方式提供的方法。In a third aspect, an embodiment of the present application provides an electronic device, the electronic device includes a processor, and the processor is configured to run a computer program stored in a memory to implement the method provided by any possible implementation manner of the first aspect.
第四方面,本申请实施例提供了一种计算机可读存储介质,包括计算机指令,当计算机指令在计算机或处理器上运行时,使得计算机或处理器执行如第一方面任一种可能的实施方式提供的方法。In a fourth aspect, the embodiments of the present application provide a computer-readable storage medium, including computer instructions, when the computer instructions are executed on a computer or a processor, the computer or the processor is made to perform any possible implementation of the first aspect. method provided.
第五方面,本申请实施例提供了一种计算机程序产品,当计算机程序产品在计算机或处理器上运行时,使得计算机或处理器执行如第一方面任一种可能的实施方式提供的方法。In a fifth aspect, the embodiments of the present application provide a computer program product, which when the computer program product runs on a computer or a processor, causes the computer or processor to execute the method provided by any possible implementation manner of the first aspect.
可以理解地,上述提供的第二方面所述的睡眠监测装置与第一方面所提供的方法一一对应,第三方面所述的电子设备、第四方面所述的计算机存储介质或者第五方面所述的计算机程序产品均用于执行第一方面所提供的方法。因此,其所能达到的有益效果可参考对应方法中的有益效果,此处不再赘述。Understandably, the sleep monitoring device described in the second aspect provided above corresponds to the method provided in the first aspect, the electronic device described in the third aspect, the computer storage medium described in the fourth aspect, or the fifth aspect. The computer program products described are all used to execute the method provided by the first aspect. Therefore, for the beneficial effects that can be achieved, reference may be made to the beneficial effects in the corresponding method, which will not be repeated here.
附图说明Description of drawings
图1是本申请实施例提供的睡眠阶段心率变化趋势的示意图;FIG. 1 is a schematic diagram of a sleep phase heart rate variation trend provided by an embodiment of the present application;
图2是本申请实施例提供的加速度数据幅值的变化趋势的示意图;2 is a schematic diagram of a change trend of acceleration data amplitude provided by an embodiment of the present application;
图3是本申请实施例提供的一种电子设备100的结构示意图;FIG. 3 is a schematic structural diagram of an electronic device 100 provided by an embodiment of the present application;
图4是本申请实施例提供的电子设备100的软件结构框图;FIG. 4 is a software structural block diagram of the electronic device 100 provided by an embodiment of the present application;
图5是本申请实施例提供的睡眠监测的应用界面示意图;5 is a schematic diagram of an application interface of sleep monitoring provided by an embodiment of the present application;
图6是本申请实施例提供的一种主屏幕界面示意图;6 is a schematic diagram of a main screen interface provided by an embodiment of the present application;
图7是本申请实施例提供的监测模式选择的应用界面示意图;7 is a schematic diagram of an application interface for monitoring mode selection provided by an embodiment of the present application;
图8是本申请实施例提供的睡眠监测方法的流程示意图;8 is a schematic flowchart of a sleep monitoring method provided by an embodiment of the present application;
图9是本申请实施例提供的第一监测模式下的睡眠监测方法的流程示意图;9 is a schematic flowchart of a sleep monitoring method in a first monitoring mode provided by an embodiment of the present application;
图10是本申请实施例提供的分解结果的示意图;10 is a schematic diagram of a decomposition result provided by an embodiment of the present application;
图11是本申请实施例提供的睡眠监测装置的结构框图。FIG. 11 is a structural block diagram of a sleep monitoring apparatus provided by an embodiment of the present application.
具体实施方式Detailed ways
为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。例如,第一消息和第二消息仅仅是为了区分不同的消息,并不对其先后顺序进行限定。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。In order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with basically the same function and effect. For example, the first message and the second message are only for distinguishing different messages, and the sequence of the first message is not limited. Those skilled in the art can understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like are not necessarily different.
需要说明的是,本申请中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。It should be noted that, in this application, words such as "exemplary" or "for example" are used to represent examples, illustrations or illustrations. Any embodiment or design described in this application as "exemplary" or "such as" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present the related concepts in a specific manner.
本申请中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。In this application, "at least one" means one or more, and "plurality" means two or more. "And/or", which describes the association relationship of the associated objects, indicates that there can be three kinds of relationships, for example, A and/or B, which can indicate: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A, B can be singular or plural. The character "/" generally indicates that the associated objects are an "or" relationship. "At least one item(s) below" or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (a) of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c may be single or multiple .
睡眠监测技术通常是根据加速度数据、陀螺仪数据和/或PPG(Photopleth aysmography,光电容脉搏波标记法)数据等监测用户的出/入睡时间。The sleep monitoring technology usually monitors the user's going out/sleeping time based on acceleration data, gyroscope data, and/or PPG (Photopleth aysmography, photocapacitive pulse wave marking) data, etc.
由于加速度计和陀螺仪本身灵敏度较高,易受外界因素影响,导致用户动作的监测结果的特异性较高,无法准确地监测用户动作的大小。而对于基于PPG数据的心率监测,由于存在个体差异,导致用户心率监测结果的特殊性较高。示例性的,参见图1,是本申请实施例提供的睡眠阶段心率变化趋势的示意图。如图1中的(a)所示的用户A的心率变化,图中竖实线对应的时刻为入睡时刻,从图中可以看出,用户A入睡后心率整体下降。如图1中的(b)所示的用户B的心率变化,图中竖实线对应的时刻为入睡时刻,从图中可以看出,用户B入睡后心率整体上升。从图1示例中可以看出,不同用户睡眠阶段心率变化趋势可能不同。综上,如果单独依据加速度数据、陀螺仪数据或PPG数据进行睡眠监测,得到的睡眠监测结果的准确度较低。因此,现有技术中,通常是根据加速度数据和陀螺仪数据监测用户动作的大小,根据PPG数据监测用户的心率,然后结合用户动作的大小和用户的心率确定用户的出/入睡时间。Since the accelerometer and the gyroscope themselves have high sensitivity and are easily affected by external factors, the specificity of the monitoring result of the user's action is high, and the magnitude of the user's action cannot be accurately monitored. For heart rate monitoring based on PPG data, due to individual differences, the user's heart rate monitoring results are highly specific. Exemplarily, referring to FIG. 1 , it is a schematic diagram of a change trend of heart rate in a sleep phase provided by an embodiment of the present application. As shown in (a) of Figure 1, the heart rate of user A changes. The time corresponding to the vertical solid line in the figure is the time of falling asleep. It can be seen from the figure that the heart rate of user A decreases as a whole after falling asleep. As shown in (b) of Figure 1, the heart rate of user B changes. The time corresponding to the vertical solid line in the figure is the time of falling asleep. It can be seen from the figure that the heart rate of user B increases as a whole after falling asleep. As can be seen from the example in Figure 1, the trend of heart rate changes may be different in different sleep stages of users. To sum up, if sleep monitoring is performed solely on the basis of acceleration data, gyroscope data or PPG data, the accuracy of sleep monitoring results obtained is low. Therefore, in the prior art, the user's action is usually monitored according to acceleration data and gyroscope data, and the user's heart rate is monitored according to PPG data, and then the user's sleep/sleep time is determined in combination with the user's action and the user's heart rate.
但是,现有的睡眠监测技术未考虑用户位于交通工具上的情况。当用户位于地铁、高铁、大巴或飞机等交通工具上时,可能会因为交通工具的晃动或交通工具本身加速度的影响,使得监测到的加速度数据或者陀螺仪数据无法较准确地反映出用户动作的大小,进而无法准确地判断出用户的出/入睡时间。示例性的,参见图2,是本申请实施例提供的加速度数据幅值的变化趋势的示意图。图2中示出了当用户位于交通工具上时监测到 的加速度数据的幅值变化趋势。从图2中可以看出,根据加速度数据确定出的用户的入睡时间并不是用户真正的入睡时间。因此,当用户位于交通工具上时,现有的睡眠监测技术无法准确地监测出用户的出/入睡时间,导致用户在交通工具上的睡眠不记录或少记录的情况,进而影响了用户体验。However, existing sleep monitoring techniques do not take into account the fact that the user is on a vehicle. When the user is on a vehicle such as a subway, high-speed rail, bus or plane, the monitored acceleration data or gyroscope data may not be able to accurately reflect the user's actions due to the shaking of the vehicle or the influence of the acceleration of the vehicle itself. size, so it is impossible to accurately determine the user's going out/sleeping time. For example, referring to FIG. 2 , it is a schematic diagram of the variation trend of the acceleration data amplitude provided by the embodiment of the present application. Fig. 2 shows the trend of amplitude variation of the monitored acceleration data when the user is on the vehicle. It can be seen from FIG. 2 that the user's falling asleep time determined according to the acceleration data is not the real falling asleep time of the user. Therefore, when the user is on the vehicle, the existing sleep monitoring technology cannot accurately monitor the user's going-out/going-to-sleep time, resulting in the user's sleep on the vehicle being not recorded or less recorded, thereby affecting the user experience.
基于上述问题,本申请实施例提供一种睡眠监测方法。该方法中,当用户位于交通工具上时,需要对电子设备获取到的监测数据执行滤除与交通工具相关的信息的过程,然后根据滤除后的数据对用户的睡眠进行监测。由于滤除了交通工具的晃动或加速度对用户动作的影响,因此,本申请实施例提供的睡眠监测方法能够准确地监测出用户在交通工具上的出/入睡时间点,最终实现解决用户在交通工具上的睡眠不记录或少记录的目的。Based on the above problems, embodiments of the present application provide a sleep monitoring method. In this method, when the user is on the vehicle, a process of filtering out information related to the vehicle needs to be performed on the monitoring data obtained by the electronic device, and then the user's sleep is monitored according to the filtered data. Since the influence of the shaking or acceleration of the vehicle on the user's actions is filtered out, the sleep monitoring method provided by the embodiments of the present application can accurately monitor the time points of the user's going out/falling asleep on the vehicle, and finally realize the solution to the problem of the user's sleep on the vehicle. Sleep on is not recorded or is less recorded for the purpose.
为了说明本申请所述的技术方案,下面通过具体实施例来进行说明。In order to illustrate the technical solutions described in the present application, the following specific embodiments are used for description.
首先介绍本申请实施例涉及的电子设备,该电子设备可以是手机、可穿戴设备、平板电脑、上网本、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、个人数字助理(personal digital assistant,PDA)等具有监测用户睡眠功能的设备,本申请实施例对电子设备的具体类型不作任何限制。比如可穿戴设备可以为智能手环、智能手表等。First, the electronic device involved in the embodiments of the present application is introduced. The electronic device may be a mobile phone, a wearable device, a tablet computer, a netbook, a notebook computer, an ultra-mobile personal computer (UMPC), or a personal digital assistant (personal digital assistant). Assistant, PDA) and other devices with the function of monitoring user sleep, the embodiments of the present application do not impose any restrictions on the specific types of electronic devices. For example, the wearable device may be a smart bracelet, a smart watch, or the like.
请参阅图3,图3是本申请实施例提供的一种电子设备100的结构示意图。Please refer to FIG. 3 , which is a schematic structural diagram of an electronic device 100 provided by an embodiment of the present application.
电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195 and so on. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。示例性的,处理器用于执行本申请实施例提供的睡眠监测方法,例如,处理器执行下述步骤S801-S803或步骤S901-S903。The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors. Exemplarily, the processor is configured to execute the sleep monitoring method provided by the embodiment of the present application, for example, the processor executes the following steps S801-S803 or steps S901-S903.
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller may be the nerve center and command center of the electronic device 100 . The controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从存储器中直接调用。避免了重复存取, 减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from memory. Repeated accesses are avoided and the waiting time of the processor 110 is reduced, thereby increasing the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flash, the camera 193 and the like through different I2C bus interfaces. For example, the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate with each other through the I2C bus interface, so as to realize the touch function of the electronic device 100 .
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments, the processor 110 may contain multiple sets of I2S buses. The processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 . In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。I2S接口和PCM接口都可以用于音频通信。The PCM interface can also be used for audio communications, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 110 with the wireless communication module 160 . For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 . MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc. In some embodiments, the processor 110 communicates with the camera 193 through a CSI interface, so as to realize the photographing function of the electronic device 100 . The processor 110 communicates with the display screen 194 through the DSI interface to implement the display function of the electronic device 100 .
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface may be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口、Micro USB接口、USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices.
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 . In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is used to receive charging input from the charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from the wired charger through the USB interface 130 . In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 charges the battery 142 , it can also supply power to the electronic device through the power management module 141 .
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 . The power management module 141 receives input from the battery 142 and/or the charging management module 140 and supplies power to the processor 110 , the internal memory 121 , the external memory, the display screen 194 , the camera 193 , and the wireless communication module 160 . The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance). In some other embodiments, the power management module 141 may also be provided in the processor 110 . In other embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。 Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 may provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the electronic device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Wherein, the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and passed to the application processor. The application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 . In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared technology (IR). The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用 分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. Wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband code division Multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM , and/or IR technology, etc. GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi-zenith) satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。Display screen 194 is used to display images, videos, and the like. Display screen 194 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 (active-matrix organic light). emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on. In some embodiments, the electronic device 100 may include one or N display screens 194 , where N is a positive integer greater than one.
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used to process the data fed back by the camera 193 . For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, converting it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin tone. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be provided in the camera 193 .
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。Camera 193 is used to capture still images or video. The object is projected through the lens to generate an optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other formats of image signals. In some embodiments, the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。A digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy and so on.
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos of various encoding formats, such as: Moving Picture Experts Group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。The NPU is a neural-network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process the input information and can continuously learn by itself. Applications such as intelligent cognition of the electronic device 100 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功 能。例如将本申请实施例提供的睡眠监测方法中获取到的第一监测数据、处理后得到的滤除后的数据等信息保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100 . The external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, information such as the first monitoring data obtained in the sleep monitoring method provided in the embodiment of the present application, the filtered data obtained after processing, and the like are stored in an external memory card.
内部存储器121可以用于存储计算机可执行程序代码,可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如睡眠监测功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如睡眠监测功能获取到的监测数据等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。Internal memory 121 may be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by executing the instructions stored in the internal memory 121 . The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an operating system, an application program required for at least one function (such as a sleep monitoring function, etc.), and the like. The storage data area may store data created during the use of the electronic device 100 (such as monitoring data obtained by the sleep monitoring function, etc.) and the like. In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音、提示信号播放等。The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. For example, music playback, recording, prompt signal playback, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐、收听免提通话或收听提示信号。Speaker 170A, also referred to as a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music, listen to a hands-free call, or listen to a prompt signal through the speaker 170A.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。The receiver 170B, also referred to as "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a call or a voice message, the voice can be answered by placing the receiver 170B close to the human ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound by approaching the microphone 170C through a human mouth, and input the sound signal into the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone jack 170D is used to connect wired earphones. The earphone interface 170D may be the USB interface 130, or may be a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 180A is used to sense pressure signals, and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A may be provided on the display screen 194 . There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, and the like. The capacitive pressure sensor may be comprised of at least two parallel plates of conductive material. When a force is applied to 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 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 may also calculate the touched 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 may correspond to different operation instructions. For example, when a touch operation whose intensity is less than the first pressure threshold acts on the short message application icon, the instruction for viewing 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, the instruction to create a new short message is executed.
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖,还可以用于导航,体感游戏场景。The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100 . In some embodiments, the angular velocity of electronic device 100 about three axes (ie, x, y, and z axes) may be determined by gyro sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting, and can also be used for navigation and somatosensory game scenes.
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip machine, the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D. Further, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
加速度传感器180E可监测电子设备100在各个方向上(一般为三轴,即,x,y和z轴)加速度的大小。当电子设备100静止时可监测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can monitor the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes, ie, x, y and z axes). The magnitude and direction of gravity can be monitored when the electronic device 100 is stationary. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。Distance sensor 180F for measuring distance. The electronic device 100 can measure the distance through infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器180G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes. The light emitting diodes may be infrared light emitting diodes. The electronic device 100 emits infrared light to the outside through the light emitting diode. Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100 . When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100 . The electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. Proximity light sensor 180G can also be used in holster mode, pocket mode automatically unlocks and locks the screen.
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。The ambient light sensor 180L is used to sense ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket, so as to prevent accidental touch.
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking pictures with fingerprints, answering incoming calls with fingerprints, and the like.
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 180J is used to detect the temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J in order to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 caused by the low temperature. In some other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。Touch sensor 180K, also called "touch panel". The touch sensor 180K may be disposed on the display screen 194 , and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”. The touch sensor 180K is used to detect a touch operation 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 touch operations may be provided through display screen 194 . In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the location where the display screen 194 is located.
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,应用处理器可以基于骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率监测功能。The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the pulse of the human body and receive the blood pressure beating signal. In some embodiments, the application processor may analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M, so as to realize the function of heart rate monitoring.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。The keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100 .
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。Motor 191 can generate vibrating cues. The motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, playing audio, etc.) can correspond to different vibration feedback effects. The motor 191 can also correspond to different vibration feedback effects for touch operations on different areas of the display screen 194 . Different application scenarios (for example: time reminder, receiving information, alarm clock, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 can be an indicator light, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, and the like.
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。The SIM card interface 195 is used to connect a SIM card. The SIM card can be contacted and separated from the electronic device 100 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195 . The electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the same SIM card interface 195 at the same time. Multiple cards can be of the same type or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as call and data communication. In some embodiments, the electronic device 100 employs an eSIM, ie: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiment of the present invention takes an Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100 as an example.
图4是本申请实施例提供的电子设备100的软件结构框图。FIG. 4 is a block diagram of the software structure of the electronic device 100 provided by the embodiment of the present application.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,系统库和安卓运行时(Android runtime),以及内核层。The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer, a system library and Android runtime (Android runtime), and a kernel layer.
应用程序层可以包括一系列应用程序包。The application layer can include a series of application packages.
如图4所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,运动健康,蓝牙,音乐,视频,短信息等应用程序。例如:运动健康应用程序可以包括睡眠监测功能。当电子设备上安装有包含睡眠监测功能的运动健康应用程序时,该电子设备可以通过睡眠监测功能获取监测数据,并通过睡眠监测功能对监测数据进行分析处理,以实现对用户睡眠的监测。应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。As shown in Figure 4, the application package can include applications such as camera, gallery, calendar, call, map, navigation, sports health, bluetooth, music, video, short message and so on. For example, a sports health application can include sleep monitoring capabilities. When a sports health application including a sleep monitoring function is installed on the electronic device, the electronic device can obtain monitoring data through the sleep monitoring function, and analyze and process the monitoring data through the sleep monitoring function, so as to monitor the user's sleep. The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
如图4所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。As shown in Figure 4, the application framework layer may include window managers, content providers, view systems, telephony managers, resource managers, notification managers, and the like.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。A window manager is used to manage window programs. The window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。数据可以包括传感器模块180获取到的监测数据(如加速度传感器180E获取到的加速度数据等),视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make these data accessible to applications. The data may include monitoring data obtained by the sensor module 180 (eg, acceleration data obtained by the acceleration sensor 180E, etc.), videos, images, audios, calls made and received, browsing history and bookmarks, phonebooks, and the like.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications. A display interface can consist of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide the communication function of the electronic device 100 . For example, the management of call status (including connecting, hanging up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒(如出行消息等)等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a brief pause without user interaction. For example, the notification manager is used to notify the download completion, message reminders (such as travel messages, etc.) and so on. The notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications that appear on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the electronic device vibrates, and the indicator light flashes.
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one is the function functions that the java language needs to call, and the other is the core library of Android.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in virtual machines. 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 lifecycle management, stack management, thread management, safety and exception management, and garbage collection.
系统层可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。The system layer can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
2D图形引擎是2D绘图的绘图引擎。2D graphics engine is a drawing engine for 2D drawing.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer contains at least display drivers, camera drivers, audio drivers, and sensor drivers.
下述睡眠监测方法实施例可以在具有上述硬件结构/软件结构的电子设备上实现。The following embodiments of the sleep monitoring method may be implemented on an electronic device having the above-mentioned hardware structure/software structure.
下面对本申请实施例涉及的睡眠检测功能进行介绍。The sleep detection function involved in the embodiments of the present application will be introduced below.
电子设备上的睡眠监测功能可以设置为默认开启状态,例如,只要电子设备开机,睡眠监测功能即处于开启状态。睡眠监测功能也可以由用户自定义设置开启/关闭的时间,例如,用户自定义时间段为22:00-07:00,则睡眠监测功能在22:00开启、在次日07:00关闭。The sleep monitoring function on the electronic device may be set to be enabled by default. For example, as long as the electronic device is powered on, the sleep monitoring function is enabled. The sleep monitoring function can also be turned on/off by a user-defined time period. For example, if the user-defined time period is 22:00-07:00, the sleep monitoring function will be turned on at 22:00 and turned off at 07:00 the next day.
当电子设备中的睡眠监测功能开启后,该功能可以在前台运行,电子设备上显示睡眠监测应用程序的交互界面,交互界面上显示软件功能控件以及实时显示睡眠监测的相关信息等。参见图5,图5是本申请实施例提供的睡眠监测的应用界面示意图。如图5所示,为电子设备100的睡眠监测的应用界面50。界面50可以包括监测标识501、数据显示区域502和功能控件503。其中:When the sleep monitoring function in the electronic device is turned on, the function can run in the foreground, the electronic device displays the interactive interface of the sleep monitoring application, and the interactive interface displays software function controls and real-time display of sleep monitoring related information. Referring to FIG. 5 , FIG. 5 is a schematic diagram of an application interface of sleep monitoring provided by an embodiment of the present application. As shown in FIG. 5 , it is an application interface 50 of sleep monitoring of the electronic device 100 . Interface 50 may include monitoring indicators 501 , data display area 502 and function controls 503 . in:
监测标识501,用于表示睡眠监测功能正在进行中。监测标识可以是静态图片,也可以是动态图像,在此不做具体限定。The monitoring identifier 501 is used to indicate that the sleep monitoring function is in progress. The monitoring identification may be a static image or a dynamic image, which is not specifically limited here.
数据显示区域502,用于显示监测数据。监测数据的显示形式可以是数字形式,如图5中的(a)所示;也可以是统计图形式,如图5中的(b)所示。对于监测数据的显示形式,本申请实施例不做具体限定。The data display area 502 is used to display monitoring data. The display form of monitoring data can be in digital form, as shown in (a) in FIG. 5 ; or in the form of a statistical graph, as shown in (b) in FIG. 5 . The display form of the monitoring data is not specifically limited in the embodiment of the present application.
功能控件503,用于在用户点击/触碰时实现相应的软件功能。如图5所示,功能控件503可以为“结束”控件,当用户点击该控件时,关闭睡眠监测功能。The function control 503 is used to implement corresponding software functions when the user clicks/touches. As shown in FIG. 5 , the function control 503 may be an “end” control, and when the user clicks the control, the sleep monitoring function is turned off.
前台运行模式便于用户操作,但会占用较多的系统资源。而且当睡眠监测功能处于 前台运行模式时,用户无法操作其他应用程序。The foreground operation mode is convenient for users to operate, but it will occupy more system resources. Also, when the sleep monitoring function is in foreground mode, users cannot operate other applications.
当电子设备中的睡眠监测功能开启后,该功能也可以在后台运行。电子设备通过该功能可以实时获取传感器的监测数据、可以在后台生成消息后通过显示装置通知用户。后台运行模式可以节约系统资源。参见图6,图6是本申请实施例提供的一种主屏幕界面示意图。如图6所示,为电子设备100的主屏幕界面60。主屏幕界面60可以包括状态栏601和通知栏602。其中:When the sleep monitoring function in the electronic device is turned on, the function can also run in the background. Through this function, the electronic device can acquire the monitoring data of the sensor in real time, and can notify the user through the display device after generating a message in the background. Running in the background mode saves system resources. Referring to FIG. 6, FIG. 6 is a schematic diagram of a home screen interface provided by an embodiment of the present application. As shown in FIG. 6 , it is the main screen interface 60 of the electronic device 100 . Home screen interface 60 may include a status bar 601 and a notification bar 602 . in:
状态栏601可以包括运营商名称、时间、信号强度和当前剩余电量等信息。The status bar 601 may include information such as operator name, time, signal strength, and current remaining power.
通知栏602,用于显示应用程序的通知信息,如图6所示的,显示睡眠监测应用程序的通知信息。通知栏在主屏幕界面上的位置、显示方式和显示时长可以由用户自定义设置,在此不做具体限定。用户可以通过通知栏进入睡眠监测应用程序,如通过点击/长按通知栏所占区域等方式进入睡眠监测应用程序。The notification bar 602 is used for displaying notification information of the application program, as shown in FIG. 6 , displaying the notification information of the sleep monitoring application program. The position, display mode and display duration of the notification bar on the main screen interface can be set by the user, which is not specifically limited here. The user can enter the sleep monitoring application through the notification bar, such as by clicking/long pressing the area occupied by the notification bar to enter the sleep monitoring application.
需要说明的是,上述图5、图6实施例中所述的界面仅为示例,并不用于限定睡眠监测的应用界面和电子设备的主屏幕界面。It should be noted that the interfaces described in the above embodiments of FIG. 5 and FIG. 6 are only examples, and are not used to limit the application interface of sleep monitoring and the main screen interface of the electronic device.
下面介绍本申请实施例提供的睡眠监测方法。The sleep monitoring method provided by the embodiments of the present application is described below.
实际应用中,可以将用户的出行状态分为两种:处于交通工具上的出行状态和未处于交通工具上的出行状态。当用户位于交通工具上时,电子设备获取到的监测数据中既包括用户的状态信息,又包括交通工具相关的信息。此种情况下对用户的睡眠进行监测,交通工具相关的信息将会对用户的状态信息产生干扰,进而影响睡眠监测结果的准确性。当用户未位于交通工具上时,电子设备获取到的监测数据中包括用户的状态信息,未包括交通工具相关的信息。此种情况下,可以利用监测数据对用户的睡眠进行监测。相应的,在本申请实施例提供的睡眠监测方法中,可以提供两种睡眠监测模式。当用户位于交通工具上时,电子设备确定采用第一监测模式监测用户在交通工具上的睡眠。其中,第一监测模式指需对电子设备获取到的监测数据执行滤除与交通工具相关的信息的过程。当用户未位于交通工具上时,电子设备确定采用第二监测模式对用户的睡眠进行监测。其中,第二监测模式指无需滤除电子设备获取到的监测数据中与交通工具相关的信息。In practical applications, the user's travel state can be divided into two types: a travel state on a vehicle and a travel state not on a vehicle. When the user is on the vehicle, the monitoring data obtained by the electronic device includes both the user's state information and the vehicle-related information. In this case, when the user's sleep is monitored, the information related to the vehicle will interfere with the user's state information, thereby affecting the accuracy of the sleep monitoring result. When the user is not on the vehicle, the monitoring data acquired by the electronic device includes the state information of the user, but does not include information related to the vehicle. In this case, the monitoring data can be used to monitor the user's sleep. Correspondingly, in the sleep monitoring method provided by the embodiments of the present application, two sleep monitoring modes may be provided. When the user is on the vehicle, the electronic device determines to use the first monitoring mode to monitor the user's sleep on the vehicle. The first monitoring mode refers to a process of filtering out information related to vehicles on monitoring data acquired by the electronic device. When the user is not on the vehicle, the electronic device determines to use the second monitoring mode to monitor the sleep of the user. The second monitoring mode refers to the information related to the vehicle in the monitoring data obtained by the electronic device without filtering.
在一个应用场景中,用户可以自行选择监测模式。电子设备根据用户输入的操作指令确定采用第一监测模式或第二监测模式进行睡眠监测。示例性的,参见图7,是本申请实施例提供的监测模式选择的应用界面示意图。如图7所示,为电子设备100的睡眠检测的应用界面70。界面70可以包括选择信息区域701和选择控件702。其中:In an application scenario, the user can choose the monitoring mode by himself. The electronic device determines to use the first monitoring mode or the second monitoring mode to perform sleep monitoring according to the operation instruction input by the user. For example, referring to FIG. 7 , it is a schematic diagram of an application interface for monitoring mode selection provided by an embodiment of the present application. As shown in FIG. 7 , it is an application interface 70 of sleep detection of the electronic device 100 . Interface 70 may include selection information area 701 and selection controls 702 . in:
选择信息区域701,用于显示监测模式的名称。如图7中的(a)所示,选择信息区域701中显示有“乘坐交通工具”模式和“未乘坐交通工具”模式。其中,“乘坐交通工具”模式对应第一监测模式,“未乘坐交通工具”模式对应第二监测模式。需要说明的是,图7中所示的监测模式的名称只是示例,并不用于做具体限定,实际应用中,可以将监测模式的名称定义为其他内容,只要便于用户区分即可。Select the information area 701 for displaying the name of the monitoring mode. As shown in FIG. 7( a ), the selection information area 701 displays a mode of “taking a vehicle” and a mode of “not taking a vehicle”. Wherein, the mode of "taking a vehicle" corresponds to the first monitoring mode, and the mode of "not taking a vehicle" corresponds to the second monitoring mode. It should be noted that the names of the monitoring modes shown in FIG. 7 are only examples and are not used for specific limitations. In practical applications, the names of the monitoring modes can be defined as other content, as long as it is convenient for users to distinguish.
选择控件702,用于在用户点击/触碰时实现相应的软件功能,选择控件与上述的选择信息对应。如图7中的(a)所示,选择信息“乘坐交通工具”和“未乘坐交通工具”后边各自对应一个选择控件。例如:当用户点击/触碰“乘坐交通工具”后边对应的选择控件时,电子设备100显示如图7中的(b)所示的界面,此时,电子设备确定用户位于交通工具上,并确定采用睡眠监测功能中的第一监测模式对用户的睡眠进行检测。当用户点击/触碰“未乘坐交通工具”时,电子设备100显示如图7中的(c)所示的界面,此 时,电子设备确定用户未位于交通工具上,并确定采用睡眠监测功能中的第二监测模式对用户的睡眠进行检测。The selection control 702 is used to implement corresponding software functions when the user clicks/touches, and the selection control corresponds to the above selection information. As shown in (a) of FIG. 7 , each of the selection information “taking a vehicle” and “not taking a vehicle” corresponds to a selection control. For example: when the user clicks/touches the corresponding selection control behind "take a vehicle", the electronic device 100 displays the interface shown in (b) in FIG. 7 , at this time, the electronic device determines that the user is on the vehicle, and It is determined to use the first monitoring mode in the sleep monitoring function to detect the sleep of the user. When the user clicks/touches "not on the vehicle", the electronic device 100 displays the interface shown in (c) in FIG. 7 , at this time, the electronic device determines that the user is not on the vehicle, and determines to use the sleep monitoring function The second monitoring mode in the user's sleep is detected.
在另一个应用场景中,由电子设备判断用户是否位于交通工具上,并根据判断结果确定采用第一监测模式或第二监测模式对用户的睡眠进行监测。In another application scenario, the electronic device determines whether the user is on a vehicle, and determines to use the first monitoring mode or the second monitoring mode to monitor the user's sleep according to the determination result.
参见图8,是本申请实施例提供的睡眠监测方法的流程示意图。如图8所示,睡眠监测方法可以包括以下步骤:Referring to FIG. 8 , it is a schematic flowchart of a sleep monitoring method provided by an embodiment of the present application. As shown in Figure 8, the sleep monitoring method may include the following steps:
S801,电子设备判断用户是否位于交通工具上。S801, the electronic device determines whether the user is on a vehicle.
S802,若用户位于交通工具上,电子设备确定采用第一监测模式监测用户在交通工具上的睡眠。S802, if the user is on the vehicle, the electronic device determines to use the first monitoring mode to monitor the sleep of the user on the vehicle.
S803,若用户未位于交通工具上,电子设备确定采用第二监测模式监测用户在交通工具上的睡眠。S803, if the user is not on the vehicle, the electronic device determines to use the second monitoring mode to monitor the sleep of the user on the vehicle.
示例性的,可以将第二监测模式设置为默认监测模式,当电子设备判断出用户位于交通工具上时,电子设备将监测模式切换为第一监测模式。可选的,当电子设备确定采用第一监测模式时,还可以向用户发出提示信息,以提示用户后续将采用第一监测模式进行睡眠监测。提示信息可以是语音信息、负一屏信息或震动信号中的一个或多个等。该应用场景下,睡眠监测的智能化程度较高,用户体验较好。Exemplarily, the second monitoring mode may be set as the default monitoring mode, and when the electronic device determines that the user is on the vehicle, the electronic device switches the monitoring mode to the first monitoring mode. Optionally, when the electronic device determines to use the first monitoring mode, it may also send prompt information to the user to prompt the user to use the first monitoring mode for sleep monitoring in the future. The prompt information can be one or more of voice information, negative one-screen information, or vibration signals, etc. In this application scenario, sleep monitoring is more intelligent and user experience is better.
在本申请的一个实施例中,当电子设备判断出用户位于交通工具上时,电子设备可以提示用户是否采用第一监测模式。然后根据用户输入的操作指令确定是否采用第一监测模式。这种方式,可以有效避免由于电子设备的误判造成的监测模式的错误选择。In an embodiment of the present application, when the electronic device determines that the user is on a vehicle, the electronic device may prompt the user whether to adopt the first monitoring mode. Then, it is determined whether to adopt the first monitoring mode according to the operation instruction input by the user. In this way, the wrong selection of the monitoring mode caused by the misjudgment of the electronic device can be effectively avoided.
比如,当电子设备判断出用户位于交通工具上时,该电子设备提示用户是否采用第一监测模式,如果用户同意采用第一监测模式,则电子设备以用户指示的为准,即后续采用第一监测模式对用户的睡眠进行监测。For example, when the electronic device determines that the user is on the vehicle, the electronic device prompts the user whether to use the first monitoring mode. If the user agrees to use the first monitoring mode, the electronic device will follow the user's instruction, that is, the first monitoring mode will be used subsequently. The monitoring mode monitors the user's sleep.
可选的,如果电子设备提示用户是否采用第一监测模式之后,用户如果在指定时间内(比如,1分钟)未做出反馈,则电子设备确定采用第一监测模式对用户的睡眠进行监测。Optionally, after the electronic device prompts the user whether to adopt the first monitoring mode, if the user does not give feedback within a specified time (for example, 1 minute), the electronic device determines to use the first monitoring mode to monitor the user's sleep.
比如,当电子设备判断出用户位于交通工具上时,该电子设备提示用户是否采用第一监测模式,如果用户不同意采用第一监测模式,则电子设备以用户指示的为准,即后续采用第二监测模式对用户的睡眠进行监测。For example, when the electronic device determines that the user is on the vehicle, the electronic device prompts the user whether to adopt the first monitoring mode. If the user does not agree to adopt the first monitoring mode, the electronic device will follow the user's instruction, that is, the first monitoring mode will be adopted subsequently. The second monitoring mode monitors the user's sleep.
下面对S801中电子设备判断用户是否位于交通工具上的方法进行介绍。可以包括以下两种方法:The method for determining whether the user is on the vehicle by the electronic device in S801 will be described below. Two methods can be included:
方法一、电子设备获取用户的出行信息,电子设备根据出行信息判断用户是否位于交通工具上。Method 1: The electronic device obtains travel information of the user, and the electronic device determines whether the user is on a vehicle according to the travel information.
其中,出行信息可以包括用户所乘坐的交通工具的出发时刻、运行时间、到站时间等,如飞机的起飞/降落时间、火车的到站/出站时间等。出行信息可以从电子设备的其他应用程序中获取,例如出行提示短信、订票邮件、订票应用程序和负一屏信息(如图6所示的用户设置的事件提醒信息,“航班号CN2222”,“起飞时间2020/09/10 10:00”)等。The travel information may include the departure time, running time, arrival time, etc. of the vehicle that the user takes, such as the takeoff/landing time of an airplane, and the arrival/departure time of a train. Travel information can be obtained from other applications on the electronic device, such as travel reminder text messages, booking emails, booking applications and negative one-screen information (as shown in Figure 6, the event reminder information set by the user, "flight number CN2222" , "Departure time 2020/09/10 10:00") and so on.
电子设备根据出行信息,可以确定用户处于交通工具上的时间范围。例如,假设获取到的出行信息为飞机起飞时间为10:00,落地时间为14:00,即可确定出10:00-14:00用户处于飞机上。再例如:假设获取到的出行信息为“北京—上海,G2222”,电子设备可以根据该出行信息在互联网上查询G2222次列车的时刻表,并从查询到的时刻表中确定 出从北京到上海的时间段为10:00-17:00,那么即可确定出10:00-17:00用户处于高铁上。The electronic device can determine the time range in which the user is on the vehicle according to the travel information. For example, assuming that the obtained travel information is that the departure time of the plane is 10:00 and the landing time is 14:00, it can be determined that the user is on the plane from 10:00 to 14:00. Another example: Assuming that the obtained travel information is "Beijing-Shanghai, G2222", the electronic device can query the timetable of the G2222 train on the Internet according to the travel information, and determine the timetable from Beijing to Shanghai from the obtained timetable. The time period is 10:00-17:00, then it can be determined that the user is on the high-speed rail from 10:00-17:00.
相应的,电子设备可以根据确定出的时间范围预先设置监测模式的工作时间。例如,假设电子设备已经确定出用户乘坐交通工具的时间范围为10:00-14:00,那么电子设备可以在10:00将监测模式由第二监测模式切换为第一监测模式,在14:00将监测模式由第一监测模式切换为第二监测模式。Correspondingly, the electronic device may preset the working time of the monitoring mode according to the determined time range. For example, assuming that the electronic device has determined that the time range for the user to take the vehicle is 10:00-14:00, the electronic device can switch the monitoring mode from the second monitoring mode to the first monitoring mode at 10:00, and at 14:00: 00 switches the monitoring mode from the first monitoring mode to the second monitoring mode.
在本申请的一个实施例中,当用户从交通工具上离开时,电子设备可以从第一监测模式切换为第二监测模式。即退出第一监测模式而启用第二监测模式。在本申请的一个实施例中,电子设备可以自动离开第一监测模式,并自动启用第二监测模式。In an embodiment of the present application, when the user leaves the vehicle, the electronic device can switch from the first monitoring mode to the second monitoring mode. That is, the first monitoring mode is exited and the second monitoring mode is enabled. In one embodiment of the present application, the electronic device can automatically leave the first monitoring mode and automatically enable the second monitoring mode.
在本申请的另一个实施例中,电子设备可以自动离开第一监测模式,并在用户的指示下启用第二监测模式。In another embodiment of the present application, the electronic device can automatically leave the first monitoring mode and enable the second monitoring mode under the user's instruction.
比如,电子设备退出第一监测模式之前,可以提示用户将在n时间后进入第二监测模式。如果用户同意进入第二监测模式,则电子设备将在n时间之后进入第二监测模式。如果用户不同意进入第二监测模式,则电子设备将在n时间之后继续采用第一监测模式对用户的睡眠进行监测。或者,在电子设备提示用户的预设时间之后电子设备自动进入第二监测模式。或者在电子设备提示用户之后,如果用户未在指定时间内做出反馈,则电子设备在n时间之后进入第二监测模式。For example, before the electronic device exits the first monitoring mode, the user may be prompted to enter the second monitoring mode after n time. If the user agrees to enter the second monitoring mode, the electronic device will enter the second monitoring mode after n times. If the user does not agree to enter the second monitoring mode, the electronic device will continue to use the first monitoring mode to monitor the user's sleep after n time. Alternatively, the electronic device automatically enters the second monitoring mode after the electronic device prompts the user for a preset time. Or after the electronic device prompts the user, if the user does not give feedback within the specified time, the electronic device enters the second monitoring mode after n time.
由于用户通常会在交通工具出发前乘坐交通工具,例如,飞机起飞时间为10:00,用户于09:45登机。所以,用户实际处于交通工具上的时间范围通常会大于上述根据出行信息确定出的时间范围。为了保证监测的准确性,可以适当延长确定出的用户处于交通工具上的时间范围(即第一监测模式的工作时间)。例如:假设根据出行信息确定飞机起飞时间为10:00,电子设备可以在09:30将监测模式设置为第一监测模式。Since the user usually takes the transportation before the departure of the transportation, for example, the departure time of the plane is 10:00, and the user boards the plane at 09:45. Therefore, the time range in which the user is actually on the vehicle is usually larger than the time range determined according to the travel information above. In order to ensure the monitoring accuracy, the determined time range of the user on the vehicle (ie, the working time of the first monitoring mode) may be appropriately extended. For example, assuming that the departure time of the plane is determined to be 10:00 according to the travel information, the electronic device can set the monitoring mode to the first monitoring mode at 09:30.
当无法获取用户的出行信息时,可以采用方法二进行判断。When the travel information of the user cannot be obtained, the second method can be used for judgment.
方法二、电子设备获取用户的运动信息,电子设备根据运动信息判断用户是否处于交通工具上。Method 2: The electronic device acquires the user's motion information, and the electronic device determines whether the user is on a vehicle according to the motion information.
其中,运动信息可以包括运动数据和健康数据。The exercise information may include exercise data and health data.
例如,电子设备中的处理器可以通过安装于电子设备上的加速度传感器(如图3中所示的180E)、距离传感器(如图3中所示的180F)等获取用户的运动数据(如运动速度、运动时间、运动路线等),电子设备中的处理器可以通过安装于电子设备上的骨传导传感器(如图3中所示的180M)等获取用户的健康数据(如心率值等)。For example, the processor in the electronic device may acquire the user's movement data (such as movement of speed, exercise time, exercise route, etc.), the processor in the electronic device can obtain the user's health data (such as heart rate value, etc.) through the bone conduction sensor (180M shown in Figure 3) installed on the electronic device.
电子设备可以根据获取到的用户的运动数据确定出用户的运动速度的速度阈值。电子设备可以根据获取到的用户的健康数据确定出用户的正常心率范围(本申请实施例中的正常心率范围指用户在非运动状态下的心率值的范围)。The electronic device may determine the speed threshold of the user's movement speed according to the obtained user's movement data. The electronic device can determine the normal heart rate range of the user according to the acquired health data of the user (the normal heart rate range in this embodiment of the present application refers to the range of the user's heart rate value in a non-exercise state).
比如:电子设备可以通过运动健康应用程序监测用户的运动数据和健康数据,然后根据用户的运动数据和健康数据确定用户的运动速度的速度阈值和用户的正常心率范围,再根据确定出的速度阈值和正常心率范围判断用户是否处于交通工具上。For example, the electronic device can monitor the user's exercise data and health data through the sports health application, and then determine the speed threshold of the user's exercise speed and the user's normal heart rate range according to the user's exercise data and health data, and then according to the determined speed threshold and the normal heart rate range to determine whether the user is on a vehicle.
在一个应用场景中,用户可以自行设定允许电子设备通过睡眠监测功能获取用户的运动数据和健康数据的时间范围。例如:在电子设备中的睡眠监测功能的设置页面给出选项“始终允许”、“仅在使用期间允许”。当用户选择“始终允许”选项后,就算睡眠监测功能在前台处于关闭状态,电子设备也可以通过睡眠监测功能在后台实时获取用户的健康数据。当用户选择“仅在使用期间允许”选项后,只有当睡眠监测功能在前台处于开启状态时,电子设备才可以通过睡眠监测功能获取用户的健康数据。In one application scenario, the user can set the time range for allowing the electronic device to obtain the user's exercise data and health data through the sleep monitoring function. For example, a setting page of a sleep monitoring function in an electronic device gives options "Always allow", "Allow only during use". When the user selects the "Always Allow" option, even if the sleep monitoring function is turned off in the foreground, the electronic device can obtain the user's health data in real time in the background through the sleep monitoring function. After the user selects the "allowed during use only" option, the electronic device can obtain the user's health data through the sleep monitoring function only when the sleep monitoring function is turned on in the foreground.
通常当用户处于运动状态(如跑步)时,电子设备监测到的用户的运动速度较大、且用户的心率值超过正常心率范围。而当用户位于交通工具上时,电子设备监测到的用户的运动速度较大、但用户的心率值在正常心率范围内。Usually, when the user is in a state of exercise (such as running), the movement speed of the user monitored by the electronic device is relatively large, and the heart rate value of the user exceeds the normal heart rate range. However, when the user is on the vehicle, the movement speed of the user detected by the electronic device is relatively large, but the user's heart rate value is within the normal heart rate range.
在本申请一个实施例中,电子设备根据运动信息判断用户是否处于交通工具上的一种方式可以为:当用户的运动速度大于速度阈值、且用户的心率值超过正常心率范围时,电子设备确定用户处于交通工具上。In an embodiment of the present application, one way for the electronic device to determine whether the user is on a vehicle according to the motion information may be: when the user's motion speed is greater than the speed threshold and the user's heart rate exceeds the normal heart rate range, the electronic device determines The user is in a vehicle.
当交通工具处于静止状态或低速行驶状态时,由于电子设备获取到的用户的运动速度较小、且用户的心率值在正常心率范围内,因此,电子设备采用方法二可能无法确定出用户是否处于交通工具上,进而导致电子设备无法准确地确定出用户位于交通工具上的时间范围。When the vehicle is stationary or driving at a low speed, since the movement speed of the user obtained by the electronic device is small and the heart rate value of the user is within the normal heart rate range, the electronic device may not be able to determine whether the user is in the On the vehicle, the electronic device cannot accurately determine the time range when the user is on the vehicle.
为了提高监测的准确性,可以设置缓存机制,即保证能够缓存一段时间的数据。例如:假设根据运动信息监测出在10:00时用户处于交通工具上,缓存时长为0.5h,那么可以将09:30记为用户处于交通工具上的时间节点。相当于将第一监测模式的工作时间向前延长了0.5h。In order to improve the accuracy of monitoring, a caching mechanism can be set to ensure that data can be cached for a period of time. For example, assuming that the user is on the vehicle at 10:00 according to the motion information, and the cache duration is 0.5h, then 09:30 can be recorded as the time node when the user is on the vehicle. It is equivalent to extending the working time of the first monitoring mode forward by 0.5h.
当然,为了保证识别出的用户处于交通工具上的时间的准确性,可以将方法一和方法二进行结合,综合考虑两种方法的识别结果。Of course, in order to ensure the accuracy of the identified time when the user is on the vehicle, the first method and the second method can be combined, and the identification results of the two methods can be comprehensively considered.
下面对S802中的第一监测模式进行介绍。参见图9,是本申请实施例提供的第一监测模式下的睡眠监测方法的流程示意图。如图9所示,作为示例而非限定,当用户位于交通工具上时,电子设备确定采用第一监测模式对用户的睡眠进行检测。在第一监测模式下,具体可以包括以下步骤:The first monitoring mode in S802 will be introduced below. Referring to FIG. 9 , it is a schematic flowchart of a sleep monitoring method in a first monitoring mode provided by an embodiment of the present application. As shown in FIG. 9 , by way of example and not limitation, when the user is on the vehicle, the electronic device determines to use the first monitoring mode to detect the sleep of the user. In the first monitoring mode, the following steps may be specifically included:
S901,电子设备获取用户位于交通工具上的第一监测数据。S901, the electronic device acquires first monitoring data of the user on the vehicle.
电子设备中的处理器可以通过电子设备上安装的传感器模块实时获取多种传感器数据,如加速度数据、速度数据、心率值等等。无论用户是否处于交通工具上,电子设备均可以实时获取传感器数据。但是在第一监测模式中,用于睡眠监测的数据实际为当用户处于交通工具上时获取到的传感器数据。因此,本申请实施例中的第一监测数据为当用户处于交通工具上时监测到的数据。The processor in the electronic device can acquire various sensor data in real time through the sensor module installed on the electronic device, such as acceleration data, speed data, heart rate value, and the like. Electronic devices can acquire sensor data in real time, whether or not the user is in a vehicle. However, in the first monitoring mode, the data used for sleep monitoring is actually sensor data acquired when the user is on the vehicle. Therefore, the first monitoring data in the embodiment of the present application is the data monitored when the user is on the vehicle.
例如:电子设备中的睡眠监测功能的工作时间为06:00-22:00,电子设备在06:00-22:00这个时间段内一直在采集传感器数据。假设电子设备确定出用户在09:00-10:00这个时间段内位于交通工具上,则电子设备将09:00-10:00这个时间段内电子设备获取到的监测数据记为第一监测数据,将06:00-09:00以及10:00-22:00这两个时间段内电子设备获取到的监测数据记为第二监测数据。For example, the working time of the sleep monitoring function in the electronic device is 06:00-22:00, and the electronic device has been collecting sensor data during the time period of 06:00-22:00. Assuming that the electronic device determines that the user is on the vehicle during the time period of 09:00-10:00, the electronic device records the monitoring data obtained by the electronic device during the time period of 09:00-10:00 as the first monitoring The monitoring data obtained by the electronic device in the two time periods of 06:00-09:00 and 10:00-22:00 are recorded as the second monitoring data.
第一监测数据中既包括用户的状态信息,又包括交通工具相关的信息,还可能包括由于传感器本身的硬件配置导致的测量误差数据。其中,交通工具相关的信息可以包括由于交通工具晃动产生的加速度数据,还可以包括交通工具行驶过程中交通工具本身的加速度数据,等等。The first monitoring data includes not only the user's state information, but also the vehicle-related information, and may also include measurement error data caused by the hardware configuration of the sensor itself. Wherein, the information related to the vehicle may include acceleration data generated due to the shaking of the vehicle, and may also include acceleration data of the vehicle itself during the running of the vehicle, and so on.
由于用户位于交通工具上,因此,第一监测数据中不仅会受到用户动作的影响,还会受到交通工具相关的信息的影响。因此,需要利用下述S902中的方法从第一监测数据中滤除掉交通工具相关的信息。Since the user is on the vehicle, the first monitoring data is not only affected by the user's actions, but also by the information related to the vehicle. Therefore, it is necessary to filter out the vehicle-related information from the first monitoring data by using the method in the following S902.
S902,电子设备根据第一监测数据得到目标数据。S902, the electronic device obtains target data according to the first monitoring data.
目标数据为滤除第一监测数据中交通工具相关的信息之后得到的数据。The target data is the data obtained after filtering out the vehicle-related information in the first monitoring data.
对用户睡眠进行监测,需要用到用户自身的状态信息。所以,交通工具相关的信息 可以看作是一种噪声数据,第一监测数据可以看作是用户的状态信息与噪声数据混杂后的数据。那么,滤除第一监测数据中交通工具的状态信息的过程,可以看作是对第一监测数据进行去噪的过程。Monitoring the user's sleep requires the use of the user's own state information. Therefore, the information related to the vehicle can be regarded as a kind of noise data, and the first monitoring data can be regarded as the mixed data of the user's state information and the noise data. Then, the process of filtering out the state information of the vehicle in the first monitoring data can be regarded as a process of denoising the first monitoring data.
在一个实施例中,S902中电子设备根据第一监测数据得到目标数据的一种方式,可以包括以下步骤:In one embodiment, a way for the electronic device to obtain target data according to the first monitoring data in S902 may include the following steps:
I、电子设备获取交通工具的行驶数据。I. The electronic device obtains the driving data of the vehicle.
其中,交通工具的行驶数据可以用于表示交通工具的行驶状态,是对用户的状态信息干扰最大的数据。交通工具的行驶数据可以包括交通的速度数据和/加速度数据等。Among them, the driving data of the vehicle can be used to represent the driving state of the vehicle, and is the data that interferes the most with the user's state information. The travel data of the vehicle may include speed data and/or acceleration data of the traffic, and the like.
交通工具的行驶数据的数据属性和第一监测数据的数据属性一致。例如,假设第一监测数据中包括加速度数据,相应的交通工具的行驶数据中也包括加速度数据;假设第一监测数据中包括速度数据,相应的交通工具的行驶数据中也包括速度数据。换言之,如果需要对第一监测数据中的速度数据进行去噪,那么电子设备需要获取交通工具的速度数据。如果需要对第一监测数据中的加速度数据进行去噪,那么电子设备需要获取交通工具的加速度数据。The data attribute of the driving data of the vehicle is consistent with the data attribute of the first monitoring data. For example, assuming that the first monitoring data includes acceleration data, the corresponding vehicle driving data also includes acceleration data; assuming that the first monitoring data includes speed data, the corresponding vehicle driving data also includes speed data. In other words, if the speed data in the first monitoring data needs to be denoised, the electronic device needs to acquire the speed data of the vehicle. If the acceleration data in the first monitoring data needs to be denoised, the electronic device needs to acquire the acceleration data of the vehicle.
速度用于表征单位时间内位移的改变量,加速度用于表征单位时间内速度的改变量。相比而言,加速度数据能够更灵敏地反映出用户的动作状态。因此,本申请实施例中,交通工具的行驶数据可以为交通工具的加速度数据。Velocity is used to characterize the change in displacement per unit time, and acceleration is used to characterize the change in velocity per unit time. In contrast, acceleration data can more sensitively reflect the user's action state. Therefore, in this embodiment of the present application, the driving data of the vehicle may be acceleration data of the vehicle.
通常,加速度传感器获取到的为三轴加速度,即x轴加速度、y轴加速度和z轴加速度。所以,交通工具的行驶数据中可以包括三轴加速度。相应的,第一监测数据种也可以包括三轴加速度。Usually, the acceleration sensor obtains three-axis acceleration, that is, the x-axis acceleration, the y-axis acceleration, and the z-axis acceleration. Therefore, the three-axis acceleration may be included in the driving data of the vehicle. Correspondingly, the first monitoring data species may also include triaxial acceleration.
交通工具的行驶数据能够表示交通工具的行驶状态,而交通工具的行驶状态可以包括静止和行驶两种状态。当交通工具行驶时,由于交通工具本身加速度较大,会对用户的状态信息有较大影响。因此,交通工具的行驶数据通常指的是当交通工具行驶时的加速度数据。但是,在实际应用中,当交通工具静止时,通常也会因为交通工具本身的轻微晃动、或传感器测量误差等原因,使得交通工具本身具有一定的加速度,进而对用户的状态信息造成影响。The driving data of the vehicle can represent the driving state of the vehicle, and the driving state of the vehicle may include two states: stationary and driving. When the vehicle is running, the user's state information will be greatly affected due to the large acceleration of the vehicle itself. Therefore, the running data of the vehicle generally refers to the acceleration data when the vehicle is running. However, in practical applications, when the vehicle is stationary, the vehicle itself usually has a certain acceleration due to slight shaking of the vehicle itself or sensor measurement errors, which in turn affects the user's status information.
为了获得准确的用户的状态信息、提高监测准确度,在本申请实施例中,交通工具的行驶数据中既可以包括用于表示交通工具处于静止状态的第一加速度数据,又可以包括用于表示交通工具处于行驶状态的第二加速度数据。这样,在后续的去噪过程中,既滤除了交通工具行驶过程中造成的数据干扰,又滤除了交通工具静止时存在的数据干扰,使得滤除后得到目标数据能够更准确地反映用户自身的行动状态。In order to obtain accurate user status information and improve monitoring accuracy, in this embodiment of the present application, the driving data of the vehicle may include both first acceleration data used to indicate that the vehicle is in a stationary state, and may also include first acceleration data used to indicate that the vehicle is in a stationary state. The second acceleration data of the vehicle in a driving state. In this way, in the subsequent denoising process, not only the data interference caused by the driving process of the vehicle, but also the data interference existing when the vehicle is stationary is filtered out, so that the target data obtained after filtering can more accurately reflect the user's own Action status.
下面分别介绍第一加速度数据和第二加速度数据的获取方法。The following describes the acquisition methods of the first acceleration data and the second acceleration data respectively.
对于第一加速度数据的获取方式,可以包括但不限于以下两种方式:The acquisition methods of the first acceleration data may include but are not limited to the following two methods:
方式一、电子设备根据用户的出行信息确认交通工具的出发时刻;在交通工具的出发时刻之前的预设时间内,电子设备实时获取加速度数据,并将该加速度数据记为候选数据;电子设备对候选数据进行降噪滤波处理;电子设备根据降噪滤波处理后的候选数据判断用户是否相对静止;若用户相对静止,则电子设备将用户相对静止时对应的候选数据记为第一加速度数据。Mode 1: The electronic device confirms the departure time of the vehicle according to the travel information of the user; within a preset time before the departure time of the vehicle, the electronic device acquires acceleration data in real time, and records the acceleration data as candidate data; The candidate data is subjected to noise reduction filtering processing; the electronic device determines whether the user is relatively stationary according to the candidate data processed by the noise reduction filtering; if the user is relatively stationary, the electronic device records the candidate data corresponding to when the user is relatively stationary as the first acceleration data.
通常,用户不会处于绝对静止的状态。由于用户的呼吸、四肢的小幅度动作以及交通工具的晃动等原因,用户的身体会产生轻微动作。但是这些轻微动作不会导致电子设备获取到相对较大的加速度数据。因此,电子设备对获取到的加速度数据进行降噪滤波 处理后,能够有效滤除掉由于用户的轻微动作产生的加速度数据。Usually, the user is not in a state of absolute stillness. Due to the user's breathing, the small movements of the limbs, and the shaking of the vehicle, the user's body will produce slight movements. But these slight movements will not cause the electronic device to obtain relatively large acceleration data. Therefore, after the electronic device performs noise reduction filtering processing on the acquired acceleration data, it can effectively filter out the acceleration data generated by the slight actions of the user.
如果交通工具处于行驶状态,那么用户佩戴的电子设备获取到的加速度数据的数值相对较大。如果交通工具处于静止状态,那么用户佩戴的电子设备获取到的加速度数据的数值相对较小。If the vehicle is in a driving state, the value of the acceleration data obtained by the electronic device worn by the user is relatively large. If the vehicle is in a stationary state, the value of the acceleration data obtained by the electronic device worn by the user is relatively small.
在本申请一个实施例中,电子设备根据降噪滤波处理后的候选数据判断用户是否相对静止,可以包括:如果候选数据中任意两轴加速度的变化量小于第一预设值,则电子设备判定用户相对静止。单轴加速度的变化量较小,说明在某个方向上用户的动作幅度较小。任意两轴加速度的变化量较小,说明用户处于相对静止状态、且此时交通工具处于静止状态。第一预设值可以根据监测精度的需要预先设置。In an embodiment of the present application, the electronic device determines whether the user is relatively stationary according to the candidate data processed by noise reduction filtering, which may include: if the variation of any two-axis acceleration in the candidate data is less than the first preset value, the electronic device determines whether the user is relatively stationary. The user is relatively stationary. The change of the single-axis acceleration is small, indicating that the user's motion range is small in a certain direction. The variation of the acceleration of any two axes is small, indicating that the user is in a relatively stationary state, and the vehicle is in a stationary state at this time. The first preset value may be preset according to the needs of monitoring accuracy.
如果未能获取到用户的出行信息,则可以根据方式二获取第一加速度数据。If the travel information of the user cannot be obtained, the first acceleration data may be obtained according to the second method.
方式二、电子设备实时获取加速度数据,将该加速度数据记为候选数据,并缓存候选数据;电子设备对候选数据进行降噪滤波处理;电子设备根据降噪滤波处理后的候选数据判断交通工具是否处于行驶状态;若判定交通工具处于行驶状态,则电子设备确定交通工具的出发时刻,并获取出发时刻之前的缓存数据;电子设备根据缓存数据判断用户是否相对静止;若用户相对静止,则电子设备将用户相对静止时对应的候选数据记为第一加速度数据。Mode 2: The electronic device acquires acceleration data in real time, records the acceleration data as candidate data, and caches the candidate data; the electronic device performs noise reduction filtering processing on the candidate data; the electronic device determines whether the vehicle is a vehicle according to the candidate data after noise reduction filtering processing. is in a driving state; if it is determined that the vehicle is in a driving state, the electronic device determines the departure time of the vehicle, and obtains the cached data before the departure time; the electronic device determines whether the user is relatively stationary according to the cached data; if the user is relatively stationary, the electronic device The corresponding candidate data when the user is relatively stationary is recorded as the first acceleration data.
在本申请一个实施例中,电子设备根据降噪滤波处理后的候选数据判断交通工具是否处于行驶状态,可以包括:如果候选数据中某一轴加速度的变化量大于第二预设值,则电子设备判定交通工具处于行驶状态。第二预设值可以参考交通工具的行驶速度和用户的运动速度进行预先设置。In an embodiment of the present application, the electronic device judging whether the vehicle is in a driving state according to the candidate data processed by noise reduction filtering may include: if the variation of the acceleration of a certain axis in the candidate data is greater than the second preset value, then the electronic device The device determines that the vehicle is in a running state. The second preset value may be preset with reference to the traveling speed of the vehicle and the movement speed of the user.
可选的,电子设备还可以通过获取到的陀螺仪传感器的数据判断交通工具是否处于行驶状态。由于陀螺仪传感器可以监测出人体的重心偏移,因此,当交通工具启动时,位于交通工具上的用户的重心发生偏移。电子设备可以通过陀螺仪传感器监测到的重心偏移量来判断交通工具是否处于行驶状态。例如:如果电子设备通过陀螺仪传感器监测到持续、有规律的角度偏移,且角度偏移量大于预设偏移量,那么电子设备确定交通工具处于行驶状态。其中,通常交通工具启动时产生的陀螺仪传感器的角度偏移量,大于用户行走时产生的陀螺仪传感器的角度偏移量,因此,预设偏移量可以参考用户行走时的角度偏移量进行预先设置。Optionally, the electronic device may also determine whether the vehicle is in a driving state by using the acquired data of the gyro sensor. Since the gyro sensor can detect the shift of the center of gravity of the human body, when the vehicle is started, the center of gravity of the user on the vehicle is shifted. The electronic device can judge whether the vehicle is in a driving state through the offset of the center of gravity monitored by the gyro sensor. For example, if the electronic device detects a continuous and regular angular offset through the gyro sensor, and the angular offset is greater than the preset offset, the electronic device determines that the vehicle is in a driving state. Among them, the angular offset of the gyro sensor generated when the vehicle is started is usually greater than the angular offset of the gyro sensor generated when the user is walking. Therefore, the preset offset can refer to the angular offset when the user is walking. Make a preset.
电子设备根据缓存数据判断用户是否相对静止的方式,可以参考上述的电子设备根据降噪滤波处理后的候选数据判断用户是否相对静止的方式,在此不再赘述。For the manner in which the electronic device determines whether the user is relatively stationary according to the cached data, reference may be made to the above-mentioned manner in which the electronic device determines whether the user is relatively stationary according to the candidate data processed by noise reduction filtering, which will not be repeated here.
实际应用中,从用户乘坐交通工具的时刻到交通工具的出发时刻之间的这段时间内,用户可能一直在动作,即未存在用户相对静止的情况。这种情况下,可以将第一加速度数据设置为第一预设加速度。第一预设加速度可以为0、或较小的常数值、或随机数值等。In practical applications, during the period from the time the user takes the vehicle to the departure time of the vehicle, the user may be moving all the time, that is, there is no situation where the user is relatively stationary. In this case, the first acceleration data may be set as the first preset acceleration. The first preset acceleration may be 0, or a small constant value, or a random value, or the like.
对于第二加速度数据的获取方式,可以包括但不限于以下两种方式:The acquisition methods of the second acceleration data may include but are not limited to the following two methods:
方式一、在确定交通工具处于行驶状态后,电子设备实时获取加速度数据,并将该加速度数据记为待监测数据;电子设备根据待监测数据中变化量最大的单轴加速度确定为第二加速度。Mode 1: After determining that the vehicle is in a driving state, the electronic device acquires acceleration data in real time, and records the acceleration data as the data to be monitored; the electronic device determines the second acceleration according to the single-axis acceleration with the largest change in the data to be monitored.
由于加速和减速时交通工具的加速度变化较大,因此,这种方式较适用于交通工具加速和减速阶段。但是当交通工具匀速运动时,往往交通工具的加速度变化较小,用方式一获得的第二加速度可能会不准确。Since the acceleration of the vehicle varies greatly during acceleration and deceleration, this method is more suitable for the acceleration and deceleration phases of the vehicle. However, when the vehicle moves at a constant speed, the acceleration of the vehicle often changes little, and the second acceleration obtained in the first method may be inaccurate.
方式二、在确定交通工具处于行驶状态后,电子设备获取全球定位系统(GPS,Global Positioning System)数据;电子设备根据GPS数据计算行驶距离,并根据行驶距离计算第二加速度数据。Method 2: After determining that the vehicle is in a driving state, the electronic device obtains Global Positioning System (GPS, Global Positioning System) data; the electronic device calculates the driving distance according to the GPS data, and calculates the second acceleration data according to the driving distance.
确定交通工具是否处于行驶状态的方法,可以参考获取第一加速度数据的方法中的描述,在此不再赘述。For the method of determining whether the vehicle is in a driving state, reference may be made to the description in the method for acquiring the first acceleration data, which will not be repeated here.
实际应用中,从用户乘坐交通工具的时刻到交通工具的出发时刻之间的这段时间内,交通工具处于静止状态,即未产生第二加速度数据。这种情况下,可以将第二加速度数据设置为第二预设加速度。第二预设加速度可以为0、或较小的常数值、或随机数值等。In practical applications, during the period from the moment the user takes the vehicle to the departure time of the vehicle, the vehicle is in a stationary state, that is, the second acceleration data is not generated. In this case, the second acceleration data may be set as the second preset acceleration. The second preset acceleration may be 0, or a smaller constant value, or a random value, or the like.
另外,在实际应用中,为了提高获取到的第二加速度数据的准确性,可以综合考虑方式一和方式二这两种方式、以及其他可能实现的方式。In addition, in practical applications, in order to improve the accuracy of the acquired second acceleration data, the first and second modes, as well as other possible implementation modes, may be comprehensively considered.
II、电子设备将第一监测数据中与行驶数据匹配的数据分量确定为交通工具相关的信息。II. The electronic device determines the data components in the first monitoring data that match the driving data as vehicle-related information.
III、电子设备从第一监测数据中滤除交通工具相关的信息,得到目标数据。III. The electronic device filters out the vehicle-related information from the first monitoring data to obtain target data.
如图3所述实施例中的传感器模块,通常是以一定的采样频率获取传感器数据的。因此,第一监测数据中可以包括一个或多个传感器数据,第一监测数据中的每个传感器数据对应一个采样时刻。相应的,行驶数据中的数据与第一监测数据中的数据一一对应。示例性的,如S902中所述,第一监测数据、行驶数据均可以包括加速度数据。假设第一监测数据中包括采样时刻t1、t2各自对应的加速度数据,相应的,行驶数据中也包括采样时刻t1、t2各自对应的加速度数据。The sensor module in the embodiment shown in FIG. 3 usually acquires sensor data at a certain sampling frequency. Therefore, the first monitoring data may include one or more sensor data, and each sensor data in the first monitoring data corresponds to a sampling moment. Correspondingly, the data in the driving data is in one-to-one correspondence with the data in the first monitoring data. Exemplarily, as described in S902, both the first monitoring data and the driving data may include acceleration data. Assuming that the first monitoring data includes acceleration data corresponding to the sampling times t1 and t2, correspondingly, the driving data also includes acceleration data corresponding to the sampling times t1 and t2.
需要说明的是,与行驶数据相匹配的数据分量,包括与行驶数据对应相等的数据分量,还包括与行驶数据对应成比例的数据分量。It should be noted that the data components matched with the driving data include the data components corresponding to the driving data which are equal, and also include the data components corresponding to the driving data proportional to the driving data.
对应相等指两者在相同采样时刻对应的数据的数值相等。例如,假设行驶数据中在采样时刻t1、t2各自对应的加速度数据的数值为p、q,与行驶数据匹配的数据分量中在采样时刻t1、t2各自对应的加速度数据的数值也为p、q。Correspondingly equal means that the values of the data corresponding to the two at the same sampling time are equal. For example, it is assumed that the values of the acceleration data corresponding to the sampling times t1 and t2 in the driving data are p, q, and the values of the acceleration data corresponding to the sampling times t1 and t2 in the data components matching the driving data are also p, q .
对应成比例指两者在相同采样时刻对应的数据的数值成比例。例如,假设行驶数据中在采样时刻t1、t2各自对应的加速度数据的数值为p、q,与行驶数据匹配的数据分量中在采样时刻t1、t2各自对应的加速度数据的数值为5p、5q。Corresponding proportional means that the values of the data corresponding to the two at the same sampling time are proportional. For example, it is assumed that the values of the acceleration data corresponding to the sampling times t1 and t2 in the driving data are respectively p and q, and the values of the acceleration data corresponding to the sampling times t1 and t2 in the data components matched with the driving data are respectively 5p and 5q.
可选的,电子设备从第一监测数据中得到目标数据的一种实现方式为:Optionally, an implementation manner for the electronic device to obtain the target data from the first monitoring data is:
电子设备将第一监测数据中与行驶数据匹配的数据分量确定为交通工具相关的信息,然后将第一监测数据减去与行驶数据匹配的数据分量。第一监测数据减去与行驶数据匹配的数据分量后得到的差值数据即为目标数据。The electronic device determines the data components of the first monitoring data that match the driving data as vehicle-related information, and then subtracts the data components that match the driving data from the first monitoring data. The difference data obtained by subtracting the data components matched with the driving data from the first monitoring data is the target data.
电子设备将第一监测数据减去与行驶数据匹配的数据分量时,可以对三轴加速度分别进行处理。具体的,电子设备将第一监测数据中每个采样时刻的x轴加速度减去各自对应的与行驶数据匹配的数据分量中的x轴加速度,将第一监测数据中每个采样时刻的y轴加速度减去各自对应的与行驶数据匹配的数据分量中的y轴加速度,将第一监测数据中每个采样时刻的z轴加速度减去各自对应的与行驶数据匹配的数据分量中的z轴加速度。When the electronic device subtracts the data components matching the driving data from the first monitoring data, the three-axis acceleration can be processed separately. Specifically, the electronic device subtracts the x-axis acceleration in the corresponding data components matching the driving data from the x-axis acceleration at each sampling moment in the first monitoring data, and subtracts the y-axis acceleration at each sampling moment in the first monitoring data The acceleration subtracts the y-axis acceleration in the corresponding data components matching the driving data, and subtracts the z-axis acceleration in the corresponding data components matching the driving data from the z-axis acceleration at each sampling time in the first monitoring data. .
电子设备将第一监测数据减去与行驶数据匹配的数据分量时,也可以先对三轴加速度进行融合,再对融合后的加速度进行处理。具体的,电子设备将第一监测数据中每个采样时刻对应的x轴、y轴、z轴加速度融合为一个加速度,得到第一融合加速度;将与行驶数据匹配的数据分量中每个采样时刻对应的x轴、y轴、z轴加速度融合为一个加速 度,得到第二融合加速度;然后将每个采样时刻对应的第一融合加速度减去第二融合加速度。When the electronic device subtracts the data component matched with the driving data from the first monitoring data, the three-axis acceleration can also be fused first, and then the fused acceleration can be processed. Specifically, the electronic device fuses the x-axis, y-axis, and z-axis accelerations corresponding to each sampling moment in the first monitoring data into one acceleration to obtain the first fusion acceleration; and fuses each sampling moment in the data components matched with the driving data into one acceleration The corresponding x-axis, y-axis, and z-axis accelerations are fused into one acceleration to obtain the second fusion acceleration; then the second fusion acceleration is subtracted from the first fusion acceleration corresponding to each sampling time.
上述的电子设备从第一监测数据中得到目标数据的方式,算法复杂度较低,容易实现。但是,用户的状态信息和交通工具相关的信息通常不是简单叠加在一起的,而是混杂在一起的。如果直接用第一监测数据减去与行驶数据匹配的数据分量,得到的目标数据可能并不能准确地反映用户的动作状态。The above-mentioned method for the electronic device to obtain the target data from the first monitoring data has low algorithm complexity and is easy to implement. However, the user's status information and the vehicle-related information are usually not simply superimposed together, but mixed together. If the first monitoring data is directly used to subtract the data component matching the driving data, the obtained target data may not accurately reflect the user's action state.
为了提高监测的准确性,可选的,电子设备从第一监测数据中得到目标数据的另一种实现方式为:可以包括:In order to improve the monitoring accuracy, optionally, another implementation manner for the electronic device to obtain the target data from the first monitoring data is as follows: it may include:
电子设备根据第一加速度数据和第二加速度数据构建噪声数据矩阵;电子设备将噪声数据矩阵和第一监测数据输入到预设分解模型中,得到第一监测数据中与行驶数据匹配的数据分量;电子设备将第一监测数据中与行驶数据匹配的数据分量确定为交通工具相关的信息,电子设备将第一监测数据中与行驶数据不匹配的数据分量确定为目标数据。The electronic device constructs a noise data matrix according to the first acceleration data and the second acceleration data; the electronic device inputs the noise data matrix and the first monitoring data into a preset decomposition model, and obtains a data component of the first monitoring data that matches the driving data; The electronic device determines data components in the first monitoring data that match the driving data as vehicle-related information, and the electronic device determines data components that do not match the driving data in the first monitoring data as target data.
如I中所述,行驶数据中包括第一加速度数据和第二加速度数据。第一加速度数据和第二加速度数据中均可以包括多个数据。As described in I, the travel data includes the first acceleration data and the second acceleration data. Each of the first acceleration data and the second acceleration data may include a plurality of data.
可选的,电子设备根据第一加速度数据和第二加速度数据构建噪声数据矩阵的一种方式,可以为:将第一加速度数据和第二加速度数据中的数据作为噪声数据矩阵中的元素。Optionally, a way for the electronic device to construct the noise data matrix according to the first acceleration data and the second acceleration data may be: using the data in the first acceleration data and the second acceleration data as elements in the noise data matrix.
示例性的,假设第一加速度数据中包括(x1、y1、z1)、(x2、y2、z2)两组三轴加速度,第二加速度数据中包括(x3、y3、z3)、(x4、y4、z4)、(x5、y5、z5)三组三轴加速度。如下给出了噪声数据矩阵的示例:Exemplarily, it is assumed that the first acceleration data includes two sets of three-axis accelerations (x1, y1, z1), (x2, y2, z2), and the second acceleration data includes (x3, y3, z3), (x4, y4) , z4), (x5, y5, z5) three sets of three-axis acceleration. An example of a noisy data matrix is given below:
Figure PCTCN2021115753-appb-000001
Figure PCTCN2021115753-appb-000001
上述噪声数据矩阵只是示例,并不用于噪声数据矩阵的形式做具体限定。The above noise data matrix is only an example, and the form of the noise data matrix is not specifically limited.
可选的,电子设备根据第一加速度数据和第二加速度数据构建噪声数据矩阵的另一种方式,可以为:电子设备先分别对第一加速度数据和第二加速度数据进行数据统计,再根据统计后的数据构建噪声数据矩阵。Optionally, another way for the electronic device to construct a noise data matrix according to the first acceleration data and the second acceleration data may be: the electronic device first performs data statistics on the first acceleration data and the second acceleration data respectively, and then according to the statistics The resulting data constructs a noisy data matrix.
示例性的,假设第一加速度数据中包括(x1、y1、z1)、(x2、y2、z2)两组三轴加速度,第二加速度数据中包括(x3、y3、z3)、(x4、y4、z4)、(x5、y5、z5)三组三轴加速度。电子设备可以先将第一加速度数据中的每组三轴加速度分别融合为一个加速度值,得到a1和a2;将第二加速度数据中的每组三轴加速度分别融合为一个加速度值,得到a3、a4和a5,然后将a1、a2、a3、a4和a5构建成噪声数据矩阵。由于第一加速度中的数据量与第二加速度中的数据量不相等,可以用预设数值补齐。如下给出了噪声数据矩阵的示例:Exemplarily, it is assumed that the first acceleration data includes two sets of three-axis accelerations (x1, y1, z1), (x2, y2, z2), and the second acceleration data includes (x3, y3, z3), (x4, y4) , z4), (x5, y5, z5) three sets of three-axis acceleration. The electronic device can first fuse each group of three-axis accelerations in the first acceleration data into one acceleration value to obtain a1 and a2; and fuse each group of three-axis accelerations in the second acceleration data into one acceleration value to obtain a3, a4 and a5, then a1, a2, a3, a4 and a5 are built into a noise data matrix. Since the amount of data in the first acceleration is not equal to the amount of data in the second acceleration, a preset value may be used to make up for it. An example of a noisy data matrix is given below:
Figure PCTCN2021115753-appb-000002
Figure PCTCN2021115753-appb-000002
上述噪声数据矩阵中预设数值为0。The preset value in the above noise data matrix is 0.
上述将每组三轴加速度融合为一个加速度值的方式可以为:将每组三轴加速度的统计特征值确定为每组三轴加速度融合后的加速度值。其中,统计特征值可以为平均值、 方差、中位数、均方根等。The above method of fusing each group of three-axis accelerations into one acceleration value may be: determining the statistical characteristic value of each group of three-axis accelerations as the acceleration value after each group of three-axis accelerations is fused. Among them, the statistical eigenvalues can be mean, variance, median, root mean square, etc.
上述噪声数据矩阵只是示例,并不用于对预设数值、噪声数据矩阵的形式做具体限定。The above noise data matrix is only an example, and is not used to specifically limit the preset value and the form of the noise data matrix.
由于预设分解模型需要对噪声数据矩阵和第一监测数据进行处理,为了保证数据维度的一致性,在设定噪声数据矩阵的形式时,可以根据预设分解模型对数据处理的需要,将噪声数据矩阵的维度设置为与第一监测数据的维度相匹配。例如:假设预设分解模型中需要交噪声数据矩阵与第一监测数据相乘,第一监测数据为(x0、y0、z0)。可以将第一监测数据组成3×1的矢量,相应的,噪声数据矩阵的维度需要满足n×3(n为正整数);如果将第一监测数据组成1×3的矢量,相应的,噪声数据矩阵的维度需要满足3×n。Since the preset decomposition model needs to process the noise data matrix and the first monitoring data, in order to ensure the consistency of data dimensions, when setting the form of the noise data matrix, the noise data matrix can be set according to the needs of the preset decomposition model for data processing. The dimensions of the data matrix are set to match the dimensions of the first monitoring data. For example, it is assumed that the cross-noise data matrix needs to be multiplied by the first monitoring data in the preset decomposition model, and the first monitoring data is (x0, y0, z0). The first monitoring data can be formed into a 3×1 vector, correspondingly, the dimension of the noise data matrix needs to satisfy n×3 (n is a positive integer); if the first monitoring data is formed into a 1×3 vector, correspondingly, the noise The dimension of the data matrix needs to satisfy 3×n.
预设分解模型可以为能够实现数据去噪功能的算法模型,即将噪声数据矩阵中的数据作为噪声数据、并根据噪声数据对第一监测数据进行去噪处理。预设分解模型还可以为能够实现信号分解功能的算法模型,即将第一监测数据分解为噪声部分(即行驶数据)和非噪声部分(即目标数据),如神经网络、变分模态分解模型、经典模态分解模型等。The preset decomposition model may be an algorithm model capable of realizing a data denoising function, that is, taking the data in the noise data matrix as noise data, and performing denoising processing on the first monitoring data according to the noise data. The preset decomposition model may also be an algorithm model capable of realizing a signal decomposition function, that is, decomposing the first monitoring data into a noise part (ie, driving data) and a non-noise part (ie, target data), such as neural network, variational modal decomposition model , the classical modal decomposition model, etc.
以预设分解模型为能够实现信号分解功能的算法模型为例,参见图10,是本申请实施例提供的分解结果的示意图。如图10所示,图10中的(a)为第一监测数据拟合成的数据曲线,图10中的(b)为行驶数据拟合成的数据曲线,图10中的(c)为从第一监测数据中分解出的与行驶数据匹配的数据分量拟合成的数据曲线,图10中的(d)为目标数据拟合成的数据曲线。从图10中可见,预设分解模型将第一监测数据分解为与行驶数据相匹配的数据分量和与行驶数据不匹配的数据分量(即目标数据),实质上,就是从第一监测数据中分解出噪声部分和非噪声部分的过程。从第一监测数据中分解出与行驶数据匹配的数据分量,相当于将第一监测数据中交通工具相关的信息滤除掉。分解后得到的与行驶数据不匹配的数据分量(即目标数据),相当于滤除了交通工具相关的信息后得到的用户的状态信息。Taking the preset decomposition model as an algorithm model capable of realizing a signal decomposition function as an example, see FIG. 10 , which is a schematic diagram of a decomposition result provided by an embodiment of the present application. As shown in FIG. 10 , (a) in FIG. 10 is a data curve fitted by the first monitoring data, (b) in FIG. 10 is a data curve fitted by driving data, and (c) in FIG. 10 is A data curve fitted with data components that are decomposed from the first monitoring data and matched with the driving data, (d) in FIG. 10 is a data curve fitted by the target data. It can be seen from FIG. 10 that the preset decomposition model decomposes the first monitoring data into data components that match the driving data and data components that do not match the driving data (ie, target data). The process of decomposing out the noise part and the non-noise part. Decomposing the data components matching the driving data from the first monitoring data is equivalent to filtering out information related to vehicles in the first monitoring data. The data components (ie target data) obtained after decomposition that do not match the driving data are equivalent to the status information of the user obtained after filtering out the information related to the vehicle.
为了提高监测效率和监测准确度,可以预先训练分解模型。例如:可以获取用户未处于交通工具上时的传感器数据作为用户的状态信息的样本数据;获取交通工具的传感器数据作为行驶数据的样本数据;将行驶数据的样本数据作为噪声数据融合到用户的状态信息的样本数据中,将融合后的数据作为第一监测数据的样本数据;然后根据用户的状态信息的样本数据、行驶数据的样本数据和监测数据的样本数据对分解模型进行训练。In order to improve the monitoring efficiency and monitoring accuracy, the decomposition model can be pre-trained. For example, the sensor data when the user is not on the vehicle can be obtained as the sample data of the user's status information; the sensor data of the vehicle can be obtained as the sample data of the driving data; the sample data of the driving data can be fused into the user's status as the noise data In the sample data of the information, the fused data is used as the sample data of the first monitoring data; then the decomposition model is trained according to the sample data of the user's state information, the sample data of the driving data and the sample data of the monitoring data.
根据上述方法得到的目标数据,能够较准确地反映用户本身的动作状态。根据目标数据对用户的睡眠进行监测,能够避免交通工具本身的加速度对用户动作的影响,有效提高睡眠监测的准确度。The target data obtained according to the above method can more accurately reflect the user's own action state. Monitoring the user's sleep according to the target data can avoid the influence of the acceleration of the vehicle itself on the user's actions, and effectively improve the accuracy of sleep monitoring.
S903,电子设备根据目标数据对用户的睡眠进行监测。S903, the electronic device monitors the user's sleep according to the target data.
由于加速度数据能够较灵敏地反映出用户的动作状态,因此,当用户进行一些幅度较小的动作(如呼吸、轻微抖动等)时,加速度数据仍然能够较清楚地表征出,这将会对睡眠监测造成干扰。为了提高监测的准确度,可以对目标数据进行降噪滤波处理,滤除小幅度动作对睡眠监测的影响。进一步的,由于加速度数据的数据值繁杂,数据计算复杂,为了简化数据处理,可以对降噪滤波处理后的目标数据进行归一化处理。例如:将小于某个阈值的目标数据记为0,将大于或等于该阈值的目标数据记为1。Since the acceleration data can reflect the user's action state more sensitively, when the user performs some small movements (such as breathing, slight shaking, etc.), the acceleration data can still be more clearly represented, which will affect sleep. Monitoring interferes. In order to improve the monitoring accuracy, noise reduction filtering can be performed on the target data to filter out the influence of small amplitude movements on sleep monitoring. Further, since the data values of the acceleration data are complex and the data calculation is complicated, in order to simplify the data processing, the target data after the noise reduction filtering process can be normalized. For example, the target data less than a certain threshold is recorded as 0, and the target data greater than or equal to the threshold is recorded as 1.
在实际应用中,电子设备可以根据每个采样时刻的目标数据分别进行睡眠监测。但是这样的数据处理过于频繁,计算量较大,且根据单个采样时刻的数据得到的监测结果具有偶然性。因此,电子设备可以根据多个采样时刻的目标数据进行睡眠监测。In practical applications, the electronic device can perform sleep monitoring separately according to the target data at each sampling moment. However, such data processing is too frequent, the amount of calculation is large, and the monitoring results obtained from the data at a single sampling moment are contingent. Therefore, the electronic device can perform sleep monitoring according to the target data at multiple sampling times.
具体的,S903可以包括以下步骤:Specifically, S903 may include the following steps:
当目标数据中的数据量达到预设数量时,电子设备根据目标数据对用户的睡眠进行监测;当目标数据中的数据量未达到预设数量时,电子设备继续获取第一监测数据。When the amount of data in the target data reaches the preset amount, the electronic device monitors the user's sleep according to the target data; when the amount of data in the target data does not reach the preset amount, the electronic device continues to acquire the first monitoring data.
可选的,可以设置缓存机制。由于采样频率一定,因此,只需设置缓存时长,即相当于限制了数据量。Optionally, a caching mechanism can be set. Since the sampling frequency is fixed, only setting the cache duration is equivalent to limiting the amount of data.
相应的,S903可以包括:当缓存时长达到预设时长时,电子设备根据目标数据对用户的睡眠进行监测;当缓存时长未达到预设时长时,电子设备继续获取第一监测数据。Correspondingly, S903 may include: when the cache duration reaches the preset duration, the electronic device monitors the user's sleep according to the target data; when the cache duration does not reach the preset duration, the electronic device continues to obtain the first monitoring data.
进一步的,根据目标数据对用户的睡眠进行监测的一种实现方式,可以为:将目标数据输入到预设监测模型中,得到输出的监测结果。其中,预设监测模型可以是神经网络模型、聚类模型等,监测结果可以用于表示用户为清醒或睡眠状态。Further, an implementation manner of monitoring the user's sleep according to the target data may be: inputting the target data into a preset monitoring model to obtain an output monitoring result. The preset monitoring model may be a neural network model, a clustering model, or the like, and the monitoring result may be used to indicate that the user is in an awake or sleeping state.
如上所述,由于目标数据中包括了多个采样时刻的数据,用户可能是在某个采样时刻进入睡眠或出睡。而利用上述方法,只能监测出目标数据对应的用户的睡眠状态,而无法监测出用户具体的出入睡时间。As described above, since the target data includes data at multiple sampling moments, the user may fall asleep or fall asleep at a certain sampling moment. However, by using the above method, only the sleep state of the user corresponding to the target data can be monitored, but the specific time of going to sleep and going to sleep of the user cannot be monitored.
为了解决上述问题,可选的,电子设备根据目标数据对用户的睡眠进行监测的另一种实现方式,可以为:电子设备根据目标数据得到多组数据;电子设备根据多组数据中每组数据各自对应的统计特征值确定每组数据各自对应的第一状态标签;电子设备根据每组数据各自对应的第一状态标签确定睡眠监测结果。In order to solve the above-mentioned problem, optionally, another implementation manner in which the electronic device monitors the sleep of the user according to the target data may be: the electronic device obtains multiple sets of data according to the target data; the electronic device obtains multiple sets of data according to the multiple sets of data; The respective corresponding statistical feature values determine the respective first state labels corresponding to each group of data; the electronic device determines the sleep monitoring result according to the respective first state labels corresponding to each group of data.
电子设备根据目标数据得到多组数据,可以为,电子设备将目标数据划分为多组数据。The electronic device obtains multiple sets of data according to the target data, and the electronic device may divide the target data into multiple sets of data.
其中,统计特征值可以是中位数、均方根、平均数以及动频、频谱能量等。另外,为了使数据的统计特性更加明显,在S901中获取第一监测数据和I中获取交通工具的行驶数据之后,可以先对获取到的第一监测数据和行驶数据进行带通滤波,将极低频和极高频的部分滤除掉。Among them, the statistical eigenvalues can be median, root mean square, mean, dynamic frequency, spectral energy, etc. In addition, in order to make the statistical characteristics of the data more obvious, after acquiring the first monitoring data in S901 and the driving data of the vehicle in I, band-pass filtering can be performed on the acquired first monitoring data and driving data, and the polar Low and very high frequencies are filtered out.
其中,第一状态标签包括睡眠状态和清醒状态。睡眠监测结果包括入睡时间、出睡时间、睡眠时长等。可以利用神经网络、聚类算法或决策树算法等确定每组数据对应的第一状态标签。这样,就可以更加精准地确定出用户的出入睡时间。Wherein, the first state label includes a sleep state and an awake state. The results of sleep monitoring include the time to fall asleep, the time to fall out of sleep, and the duration of sleep. The first state label corresponding to each group of data may be determined by using a neural network, a clustering algorithm, or a decision tree algorithm. In this way, it is possible to more accurately determine the time when the user falls asleep.
示例性的,假设将目标数据划分为10组,目标数据对应10:00-10:50这个时间段。其中,第一组中包括10:00-10:05这个时间段的数据,第二组中包括10:06-10:10这个时间段的数据,依次类推,第十组中包括10:46-10:50这个时间段的数据(即按照时间将目标数据进行划分,每组数据对应5min)。电子设备分别计算每组数据各自对应的统计特征值,得到10个统计特征值。确定每个统计特征值各自对应的第一状态标签,例如,确定第一个特征值对应的第一状态标签为清醒状态,第二个特征值对应的第一状态标签为清醒状态,第三个特征值到第八个特征值对应的第一状态标签均为睡眠状态,第九个特征值和第十个特征值对应的第一状态标签均为清醒状态。那么电子设备根据第一状态标签可以确定出,用户的入睡时间为第三组数据对应的起始时刻(即10:15),用户的出睡时间为第7组数据对应的截止时刻(即10:35)。进而,电子设备可以确定出用户的睡眠时长为20min。Exemplarily, it is assumed that the target data is divided into 10 groups, and the target data corresponds to the time period of 10:00-10:50. Among them, the first group includes the data of the time period of 10:00-10:05, the second group includes the data of the time period of 10:06-10:10, and so on, the tenth group includes the data of 10:46- 10:50 data in this time period (that is, the target data is divided according to time, and each group of data corresponds to 5 minutes). The electronic device calculates the corresponding statistical characteristic values of each group of data respectively, and obtains 10 statistical characteristic values. Determine the first state label corresponding to each statistical feature value, for example, determine that the first state label corresponding to the first feature value is the awake state, the first state label corresponding to the second feature value is the awake state, and the third The first state labels corresponding to the eigenvalues to the eighth eigenvalue are all sleep states, and the first state labels corresponding to the ninth eigenvalue and the tenth eigenvalue are all awake states. Then the electronic device can determine according to the first state label that the user's falling asleep time is the start time corresponding to the third set of data (ie 10:15), and the user's falling asleep time is the end time corresponding to the seventh set of data (ie 10:15). :35). Furthermore, the electronic device may determine that the sleep duration of the user is 20 minutes.
需要说明的是,上述只是电子设备根据目标数据确定睡眠监测结果的示例,并不对目标数据的划分规则等做具体限定。当然,将目标数据划分的组数越多,监测出的出/入睡时间就越准确,但数据处理量也越大。It should be noted that, the above is only an example in which the electronic device determines the sleep monitoring result according to the target data, and does not specifically limit the division rules and the like of the target data. Of course, the more groups the target data is divided into, the more accurate the monitored out/sleep time will be, but the larger the data processing volume will be.
上述睡眠监测方法中,是利用加速度数据进行监测的。为了提高监测的准确度,进 一步的,可以综合考虑PPG数据,如脉搏波时域特征数据、脉搏波频域特征数据等。In the above sleep monitoring method, acceleration data is used for monitoring. In order to improve the monitoring accuracy, further, PPG data, such as pulse wave time domain characteristic data, pulse wave frequency domain characteristic data, etc., can be comprehensively considered.
具体的,监测方法可以包括:Specifically, monitoring methods may include:
电子设备获取用户的脉搏波数据;电子设备根据脉搏波数据和每组数据各自对应的统计特征值确定每组数据各自对应的第二状态标签;电子设备根据第一状态标签和第二状态标签确定每组数据各自对应的最终状态标签;电子设备根据每组数据各自对应的最终状态标签确定睡眠监测结果。The electronic device acquires the user's pulse wave data; the electronic device determines the second state label corresponding to each group of data according to the pulse wave data and the corresponding statistical characteristic value of each group of data; the electronic device determines according to the first state label and the second state label Each group of data has a corresponding final state label; the electronic device determines the sleep monitoring result according to the corresponding final state label of each group of data.
其中,第二状态标签包括所述睡眠状态和所述清醒状态。Wherein, the second state label includes the sleep state and the awake state.
可以利用神经网络、决策树算法、机器学习算法等对脉搏波数据和统计特征值进行分类,确定脉搏波数据和统计特征值对应的第二状态标签。为了避免单一算法的缺陷,在获得第一状态标签和第二状态标签时,可以采用不同的算法。例如:采用决策树算法获取第一状态标签,采用机器学习算法(如LightGBM模型)获取第二状态标签。A neural network, a decision tree algorithm, a machine learning algorithm, etc. can be used to classify the pulse wave data and the statistical feature values, and determine the second state label corresponding to the pulse wave data and the statistical feature values. In order to avoid the defects of a single algorithm, different algorithms can be used when obtaining the first state label and the second state label. For example, the decision tree algorithm is used to obtain the first state label, and the machine learning algorithm (such as the LightGBM model) is used to obtain the second state label.
在获得第一状态标签和第二状态标签后,可以根据不同的权重将第一状态标签和第二状态标签融合成最终状态标签。After obtaining the first state label and the second state label, the first state label and the second state label may be fused into a final state label according to different weights.
示例性的,假设将清醒状态量化为1,将睡眠状态量化为0,第一状态标签的权重为0.8,第二状态标签的权重为0.2。当第一状态标签为1,第二状态标签为0时,计算出最终状态标签的量化值为1×0.8+0×0.2=0.8。假设最终状态标签的量化阈值为0.5(即大于或等于0.5时为清醒状态,小于0.5时为睡眠状态),相应的,最终确定的最终状态标签为清醒状态。Exemplarily, it is assumed that the awake state is quantized as 1, the sleep state is quantized as 0, the weight of the first state label is 0.8, and the weight of the second state label is 0.2. When the first state label is 1 and the second state label is 0, the quantization value of the final state label is calculated as 1×0.8+0×0.2=0.8. Assuming that the quantification threshold of the final state label is 0.5 (that is, when it is greater than or equal to 0.5, it is an awake state, and when it is less than 0.5, it is a sleep state), correspondingly, the final state label finally determined is the awake state.
需要说明的是,上述只是确定最终状态标签的示例,并不对权重值、量化阈值、确定方式等做具体限定。It should be noted that the above is only an example of determining the final state label, and does not specifically limit the weight value, quantization threshold, and determination method.
下面对S803中的第二监测模式进行介绍。当用户未位于交通工具上时,电子设备确定采用第二监测模式对用户的睡眠进行检测。在第二监测模式下,具体可以包括:电子设备根据获取到的第二监测数据对用户的睡眠进行监测。The second monitoring mode in S803 is introduced below. When the user is not on the vehicle, the electronic device determines to use the second monitoring mode to detect the sleep of the user. In the second monitoring mode, it may specifically include: the electronic device monitors the sleep of the user according to the acquired second monitoring data.
其中,第二监测数据为电子设备获取到的用户未位于交通工具上时的监测数据。The second monitoring data is the monitoring data obtained by the electronic device when the user is not on the vehicle.
当用户未位于交通工具上时,由于第二监测数据中包括用户的状态信息,未包括交通工具相关的信息。因此,无需对第二监测数据进行去噪处理,根据第二监测数据进行睡眠监测即可。When the user is not on the vehicle, since the second monitoring data includes the user's state information, the vehicle-related information is not included. Therefore, it is not necessary to perform denoising processing on the second monitoring data, and it is sufficient to perform sleep monitoring according to the second monitoring data.
通过上述实施例提供的两种睡眠监测模式,电子设备可以对用户在不同状态时的睡眠进行监测。具体来说,电子设备不仅可以对用户位于交通工具上时的睡眠进行监测,还可以对用户未位于交通工具上时的睡眠进行监测。从而解决了用户在交通工具上的睡眠不记录或少记录的问题,提升了用户体验。Through the two sleep monitoring modes provided by the above embodiments, the electronic device can monitor the sleep of the user in different states. Specifically, the electronic device can not only monitor the sleep of the user when the user is on the vehicle, but also monitor the sleep of the user when the user is not on the vehicle. Thus, the problem of not recording or less recording of the user's sleep on the vehicle is solved, and the user experience is improved.
基于上述实施例提供的睡眠监测方法,下面介绍该方法的应用场景。应用场景可以包括离线监测场景、在线监测场景和融合监测场景。Based on the sleep monitoring method provided by the above embodiment, the application scenarios of the method are described below. Application scenarios may include offline monitoring scenarios, online monitoring scenarios, and fusion monitoring scenarios.
在一个离线监测场景中,电子设备获取传感器数据,并缓存获取到的传感器数据。当确定用户处于交通工具上时对应的时间节点之后,根据该时间节点确定传感器数据中的第一监测数据(即电子设备在用户处于交通工具上时监测到的数据)。然后滤除第一监测数据中的交通工具相关的信息,得到目标数据,并根据目标数据对用户的睡眠进行监测。其中,在滤除交通工具相关的信息时,电子设备可以从缓存的传感器数据中获取交通工具的行驶数据。In an offline monitoring scenario, electronic devices acquire sensor data and cache the acquired sensor data. After the time node corresponding to when the user is on the vehicle is determined, the first monitoring data in the sensor data (that is, the data monitored by the electronic device when the user is on the vehicle) is determined according to the time node. Then, the vehicle-related information in the first monitoring data is filtered out to obtain target data, and the user's sleep is monitored according to the target data. Wherein, when filtering out the information related to the vehicle, the electronic device may acquire the driving data of the vehicle from the buffered sensor data.
在此应用场景中,电子设备需要缓存大量的传感器数据,对电子设备的存储空间有较高要求。为了缓解电子设备的存储压力,在一个应用场景中,电子设备可以先将获取 到的传感器数据上传到云服务器等第三方存储空间中,当需要执行睡眠监测方法时,再从存储有传感器数据的第三方存储空间中获取相关数据。在另一个应用场景中,采集传感器数据的电子设备和执行睡眠监测方法的电子设备可以是不同的电子设备。示例性的,用于采集传感器数据的电子设备可以为运动手环,执行睡眠监测方法的电子设备可以为手机。运动手环采集传感器数据后,将传感器数据传输给手机,由手机执行本申请实施例提供的睡眠监测方法。In this application scenario, the electronic device needs to cache a large amount of sensor data, which has high requirements on the storage space of the electronic device. In order to relieve the storage pressure of electronic devices, in an application scenario, the electronic device can first upload the acquired sensor data to a third-party storage space such as a cloud server, and when the sleep monitoring method needs to be executed, the sensor data is stored in the storage space. Obtain relevant data from third-party storage space. In another application scenario, the electronic device that collects sensor data and the electronic device that executes the sleep monitoring method may be different electronic devices. Exemplarily, the electronic device for collecting sensor data may be a sports bracelet, and the electronic device for executing the sleep monitoring method may be a mobile phone. After the sports bracelet collects the sensor data, the sensor data is transmitted to the mobile phone, and the mobile phone executes the sleep monitoring method provided by the embodiment of the present application.
离线监测需要在电子设备获取到全部监测数据后再进行数据的分析处理,监测结果的延迟性较高,用户无法及时掌握睡眠情况。但是由于离线监测获取到的数据更全面,所以离线监测的监测结果准确度较高。因此,离线监测较适用于对监测的及时性要求较低、对监测结果的准确性要求较高的情况。Offline monitoring needs to analyze and process the data after the electronic device has obtained all the monitoring data. The delay of the monitoring results is high, and the user cannot grasp the sleep situation in time. However, since the data obtained by offline monitoring is more comprehensive, the monitoring results of offline monitoring are more accurate. Therefore, offline monitoring is more suitable for situations where the timeliness of monitoring is low and the accuracy of monitoring results is high.
在一个在线监测场景中,电子设备实时获取传感器数据。当确定用户处于交通工具上时,电子设备将后续获取到的传感器数据记为第一监测数据,并进入到第一监测模式。然后电子设备滤除第一监测数据中的交通工具相关的信息,得到目标数据,并根据目标数据对用户的睡眠进行监测。In an online monitoring scenario, electronic devices acquire sensor data in real time. When it is determined that the user is on the vehicle, the electronic device records the subsequently acquired sensor data as the first monitoring data, and enters the first monitoring mode. Then, the electronic device filters out the vehicle-related information in the first monitoring data, obtains target data, and monitors the user's sleep according to the target data.
在线监测需要对监测数据进行实时处理,监测结果的延迟性较低。但是在滤除交通工具相关的信息时,由于获取到的实时监测数据并不全面,导致获取到的交通工具的行驶数据可能并不准确,进而导致最终得到的睡眠监测结果可能出现误差。因此,相较于离线监测,在线监测较适用于对监测的及时性要求较高、允许监测结果存在误差的情况。Online monitoring requires real-time processing of monitoring data, and the delay of monitoring results is low. However, when filtering out information related to vehicles, since the acquired real-time monitoring data is not comprehensive, the acquired driving data of vehicles may be inaccurate, which may lead to errors in the final sleep monitoring results. Therefore, compared with offline monitoring, online monitoring is more suitable for situations where the timeliness of monitoring is higher and the monitoring results are allowed to have errors.
为了避免在线监测可能出现误差的情况,在一个融合监测场景中,当确定用户处于交通工具上时,电子设备可以先缓存部分监测数据,以保证能够获取到较准确的交通工具的行驶数据。换言之,电子设备在获取到部分监测数据后,再开始进行睡眠监测。这样,虽然在进入到第一监测模式的初始阶段,监测结果会有一小段时间的延迟,但是可以保证监测结果的较高准确度。相较于离线监测,融合监测具有较低的延迟性;而相较于在线监测,融合监测又具有较高的准确度。In order to avoid possible errors in online monitoring, in a fusion monitoring scenario, when it is determined that the user is on a vehicle, the electronic device can first cache part of the monitoring data to ensure that more accurate vehicle driving data can be obtained. In other words, the electronic device starts sleep monitoring after acquiring part of the monitoring data. In this way, although the monitoring result will be delayed for a short period of time at the initial stage of entering the first monitoring mode, the high accuracy of the monitoring result can be guaranteed. Compared with offline monitoring, fusion monitoring has lower latency; and compared with online monitoring, fusion monitoring has higher accuracy.
对应于上文实施例所述的睡眠检测方法,图11是本申请实施例提供的睡眠监测装置的结构框图。为了便于说明,仅示出了与本申请实施例相关的部分。参见图11,该装置包括:Corresponding to the sleep detection method described in the above embodiments, FIG. 11 is a structural block diagram of a sleep monitoring apparatus provided by an embodiment of the present application. For the convenience of description, only the parts related to the embodiments of the present application are shown. Referring to Figure 11, the device includes:
判断单元111,电子设备判断用户是否位于交通工具上。In the determination unit 111, the electronic device determines whether the user is on the vehicle.
第一确定单元112,若用户位于交通工具上,电子设备确定采用第一监测模式监测用户在交通工具上的睡眠。In the first determining unit 112, if the user is on the vehicle, the electronic device determines to use the first monitoring mode to monitor the sleep of the user on the vehicle.
第二确定单元113,若用户未位于交通工具上,电子设备确定采用第二监测模式监测用户在交通工具上的睡眠。In the second determining unit 113, if the user is not on the vehicle, the electronic device determines to use the second monitoring mode to monitor the sleep of the user on the vehicle.
可选的,该装置还包括:Optionally, the device further includes:
第一监测单元114,用于若用户位于交通工具上,电子设备获取用户位于交通工具上的第一监测数据,第一监测数据中包括交通工具相关的信息;电子设备根据第一监测数据得到目标数据,目标数据为滤除第一监测数据中交通工具相关的信息之后得到的数据;电子设备根据目标数据对用户的睡眠进行监测。The first monitoring unit 114 is used for obtaining the first monitoring data of the user on the vehicle if the user is on the vehicle, and the first monitoring data includes information related to the vehicle; the electronic device obtains the target according to the first monitoring data The target data is the data obtained after filtering out the vehicle-related information in the first monitoring data; the electronic device monitors the user's sleep according to the target data.
第二监测单元115,用于若用户未位于交通工具上,则电子设备根据获取到的第二监测数据对用户的睡眠进行监测,第二监测数据中包括用户的状态信息。The second monitoring unit 115 is configured to monitor the sleep of the user according to the second monitoring data obtained by the electronic device if the user is not on the vehicle, and the second monitoring data includes the state information of the user.
可选的,第一监测单元114还用于:Optionally, the first monitoring unit 114 is also used for:
电子设备获取交通工具的行驶数据;电子设备将第一监测数据中与行驶数据匹配的 数据分量确定为交通工具相关的信息;电子设备从第一监测数据中滤除交通工具相关的信息,得到目标数据。The electronic device obtains the driving data of the vehicle; the electronic device determines the data component in the first monitoring data that matches the driving data as the vehicle-related information; the electronic device filters out the vehicle-related information from the first monitoring data to obtain the target data.
可选的,行驶数据中包括交通工具处于静止状态时的第一加速度数据和交通工具处于行驶状态时的第二加速度数据。Optionally, the driving data includes first acceleration data when the vehicle is in a stationary state and second acceleration data when the vehicle is in a driving state.
进一步的,第一监测单元114还用于:Further, the first monitoring unit 114 is also used for:
电子设备根据第一加速度数据和第二加速度数据构建噪声数据矩阵;电子设备将噪声数据矩阵和第一监测数据输入到预设分解模型中,得到第一监测数据中与行驶数据匹配的数据分量;电子设备将第一监测数据中与行驶数据匹配的数据分量确定为交通工具相关的信息。The electronic device constructs a noise data matrix according to the first acceleration data and the second acceleration data; the electronic device inputs the noise data matrix and the first monitoring data into a preset decomposition model, and obtains a data component of the first monitoring data that matches the driving data; The electronic device determines a data component of the first monitoring data that matches the driving data as vehicle-related information.
可选的,第一监测单元114还用于:Optionally, the first monitoring unit 114 is also used for:
当目标数据中的数据量达到预设数量时,电子设备根据目标数据对用户的睡眠进行监测;当目标数据中的数据量未达到预设数量时,电子设备继续获取第一监测数据。When the amount of data in the target data reaches the preset amount, the electronic device monitors the user's sleep according to the target data; when the amount of data in the target data does not reach the preset amount, the electronic device continues to acquire the first monitoring data.
可选的,第一监测单元114还用于:Optionally, the first monitoring unit 114 is also used for:
电子设备根据目标数据得到多组数据;电子设备根据多组数据中每组数据各自对应的统计特征值确定每组数据各自对应的第一状态标签;电子设备根据每组数据各自对应的第一状态标签确定睡眠监测结果。The electronic device obtains multiple sets of data according to the target data; the electronic device determines a first state label corresponding to each set of data according to the corresponding statistical characteristic value of each set of data in the multiple sets of data; the electronic device determines the corresponding first state according to each set of data Labels identify sleep monitoring results.
其中,第一状态标签包括睡眠状态和清醒状态。Wherein, the first state label includes a sleep state and an awake state.
可选的,第一监测单元114还用于:Optionally, the first monitoring unit 114 is also used for:
电子设备获取用户的脉搏波数据;电子设备根据脉搏波数据和每组数据各自对应的统计特征值确定每组数据各自对应的第二状态标签;电子设备根据第一状态标签和第二状态标签确定每组数据各自对应的最终状态标签;电子设备根据每组数据各自对应的最终状态标签确定睡眠监测结果。The electronic device acquires the user's pulse wave data; the electronic device determines the second state label corresponding to each group of data according to the pulse wave data and the corresponding statistical characteristic value of each group of data; the electronic device determines according to the first state label and the second state label Each group of data has a corresponding final state label; the electronic device determines the sleep monitoring result according to the corresponding final state label of each group of data.
其中,第二状态标签包括睡眠状态和清醒状态。Wherein, the second state label includes a sleep state and an awake state.
可选的,判断单元111还用于:Optionally, the judging unit 111 is also used for:
电子设备获取用户的出行信息和/或运动信息,根据出行信息和/或运动信息判断用户是否位于交通工具上;The electronic device obtains the travel information and/or exercise information of the user, and determines whether the user is on a vehicle according to the travel information and/or exercise information;
或者,电子设备在显示屏上显示提示信息,提示信息用于提示用户选择用户是否位于交通工具上;电子设备监测用户输入的第一操作指令;电子设备根据第一操作指令确定用户是否位于交通工具上。Alternatively, the electronic device displays prompt information on the display screen, and the prompt information is used to prompt the user to select whether the user is on the vehicle; the electronic device monitors the first operation instruction input by the user; the electronic device determines whether the user is on the vehicle according to the first operation instruction superior.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. Module completion, that is, dividing the internal structure of the device into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment may be integrated in one processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit, and the above-mentioned integrated units may adopt hardware. It can also be realized in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing from each other, and are not used to limit the protection scope of the present application. For the specific working processes of the units and modules in the above-mentioned system, reference may be made to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
本申请实施例还提供了一种计算机可读存储介质,包括计算机指令,当计算机指令在计算机或处理器上运行时,使得计算机或处理器执行如上述各个睡眠监测方法实施例中的步骤。Embodiments of the present application further provide a computer-readable storage medium, including computer instructions, when the computer instructions are executed on a computer or a processor, the computer or processor can execute the steps in the above-mentioned embodiments of the sleep monitoring methods.
本申请实施例提供了一种计算机程序产品,当计算机程序产品在计算机或处理器上运行时,使得计算机或处理器执行时实现可实现上述各个睡眠监测方法实施例中的步骤。The embodiments of the present application provide a computer program product, when the computer program product runs on a computer or a processor, the computer or processor can implement the steps in the above-mentioned embodiments of the sleep monitoring methods.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者通过所述计算机可读存储介质进行传输。所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented in software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer may be a general purpose computer, special purpose computer, computer network, or other programmable device. The computer instructions may be stored in or transmitted over a computer-readable storage medium. The computer instructions can be sent from one website site, computer, server or data center to another website site, computer, server or data center for transmission. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes an integration of one or more available media. The usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media (eg, solid state disks (SSDs)), and the like.
本申请实施例还提供了一种芯片系统,其特征在于,芯片系统包括处理器,处理器与存储器耦合,处理器执行存储器中存储的计算机程序,以实现上述各个睡眠监测方法实施例中的步骤。芯片系统可以为单个芯片,或者多个芯片组成的芯片模组。An embodiment of the present application further provides a chip system, which is characterized in that the chip system includes a processor, the processor is coupled to a memory, and the processor executes a computer program stored in the memory to implement the steps in each of the above sleep monitoring method embodiments . The chip system may be a single chip, or a chip module composed of multiple chips.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the foregoing embodiments, the description of each embodiment has its own emphasis. For parts that are not described or described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及方法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that the units and method 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. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
最后应说明的是:以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。Finally, it should be noted that: the above are only the specific embodiments of the present application, but the protection scope of the present application is not limited to this, and any changes or replacements within the technical scope disclosed in the present application should be included in the present application. within the scope of protection of the application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims (12)

  1. 一种睡眠监测方法,其特征在于,应用于电子设备中,所述方法包括:A sleep monitoring method, characterized in that, applied to an electronic device, the method comprising:
    所述电子设备判断用户是否位于交通工具上;The electronic device determines whether the user is on a vehicle;
    若用户位于交通工具上,所述电子设备获取用户位于所述交通工具上的第一监测数据,所述第一监测数据中包括所述交通工具相关的信息;If the user is on a vehicle, the electronic device acquires first monitoring data of the user on the vehicle, where the first monitoring data includes information related to the vehicle;
    所述电子设备根据所述第一监测数据得到目标数据,所述目标数据为滤除所述第一监测数据中所述交通工具相关的信息之后得到的数据;The electronic device obtains target data according to the first monitoring data, and the target data is data obtained after filtering out the information related to the vehicle in the first monitoring data;
    所述电子设备根据所述目标数据对用户的睡眠进行监测。The electronic device monitors the user's sleep according to the target data.
  2. 如权利要求1所述的睡眠监测方法,其特征在于,在所述电子设备获取用户位于所述交通工具上的第一监测数据之前,所述方法还包括:The sleep monitoring method according to claim 1, wherein before the electronic device acquires the first monitoring data of the user on the vehicle, the method further comprises:
    所述电子设备确定采用第一监测模式监测用户在所述交通工具上的睡眠,所述第一监测模式指需对所述电子设备获取到的监测数据执行滤除与所述交通工具相关的信息的过程。The electronic device determines to use a first monitoring mode to monitor the sleep of the user on the vehicle, where the first monitoring mode refers to the need to filter out information related to the vehicle on the monitoring data obtained by the electronic device the process of.
  3. 如权利要求1或2所述的睡眠监测方法,其特征在于,所述电子设备根据所述第一监测数据得到目标数据,包括:The sleep monitoring method according to claim 1 or 2, wherein the electronic device obtains target data according to the first monitoring data, comprising:
    所述电子设备获取所述交通工具的行驶数据;obtaining, by the electronic device, driving data of the vehicle;
    所述电子设备将所述第一监测数据中与所述行驶数据匹配的数据分量确定为所述交通工具相关的信息;The electronic device determines a data component of the first monitoring data that matches the driving data as information related to the vehicle;
    所述电子设备从所述第一监测数据中滤除所述交通工具相关的信息,得到所述目标数据。The electronic device filters out the vehicle-related information from the first monitoring data to obtain the target data.
  4. 如权利要求3所述的睡眠监测方法,其特征在于,所述行驶数据中包括所述交通工具处于静止状态时的第一加速度数据和所述交通工具处于行驶状态时的第二加速度数据;The sleep monitoring method according to claim 3, wherein the driving data includes first acceleration data when the vehicle is in a stationary state and second acceleration data when the vehicle is in a driving state;
    所述电子设备将所述第一监测数据中与所述行驶数据匹配的数据分量确定为所述交通工具相关的信息,包括:The electronic device determines a data component of the first monitoring data that matches the driving data as information related to the vehicle, including:
    所述电子设备根据所述第一加速度数据和所述第二加速度数据构建噪声数据矩阵;The electronic device constructs a noise data matrix according to the first acceleration data and the second acceleration data;
    所述电子设备将所述噪声数据矩阵和所述第一监测数据输入到预设分解模型中,得到所述第一监测数据中与所述行驶数据匹配的数据分量;The electronic device inputs the noise data matrix and the first monitoring data into a preset decomposition model to obtain a data component of the first monitoring data that matches the driving data;
    所述电子设备将所述第一监测数据中与所述行驶数据匹配的数据分量确定为所述交通工具相关的信息。The electronic device determines a data component of the first monitoring data that matches the driving data as information related to the vehicle.
  5. 如权利要求1至4任一项所述的睡眠监测方法,其特征在于,所述电子设备根据所述目标数据对用户的睡眠进行监测,包括:The sleep monitoring method according to any one of claims 1 to 4, wherein the electronic device monitors the user's sleep according to the target data, comprising:
    当所述目标数据中的数据量达到预设数量时,所述电子设备根据所述目标数据对用户的睡眠进行监测;When the amount of data in the target data reaches a preset amount, the electronic device monitors the user's sleep according to the target data;
    当所述目标数据中的数据量未达到预设数量时,所述电子设备继续获取所述第一监测数据。When the amount of data in the target data does not reach a preset amount, the electronic device continues to acquire the first monitoring data.
  6. 如权利要求5所述的睡眠监测方法,其特征在于,所述电子设备根据所述目标数据对用户的睡眠进行监测,包括:The sleep monitoring method according to claim 5, wherein the electronic device monitors the user's sleep according to the target data, comprising:
    所述电子设备根据所述目标数据得到多组数据;The electronic device obtains multiple sets of data according to the target data;
    所述电子设备根据所述多组数据中每组数据各自对应的统计特征值确定所述每组数据各自对应的第一状态标签,其中,所述第一状态标签包括睡眠状态和清醒状态;The electronic device determines a first state label corresponding to each group of data according to the corresponding statistical feature value of each group of data in the multiple groups of data, wherein the first state label includes a sleep state and an awake state;
    所述电子设备根据所述每组数据各自对应的第一状态标签确定睡眠监测结果。The electronic device determines the sleep monitoring result according to the first state label corresponding to each set of data.
  7. 如权利要求6所述的睡眠监测方法,其特征在于,所述电子设备根据所述每组数据各自对应的第一状态标签确定睡眠监测结果,包括:The sleep monitoring method according to claim 6, wherein the electronic device determines the sleep monitoring result according to the first state label corresponding to each set of data, comprising:
    所述电子设备获取用户的脉搏波数据;The electronic device acquires the user's pulse wave data;
    所述电子设备根据所述脉搏波数据和所述每组数据各自对应的统计特征值确定所述每组数据各自对应的第二状态标签,其中,所述第二状态标签包括所述睡眠状态和所述清醒状态;The electronic device determines a second state label corresponding to each group of data according to the pulse wave data and the corresponding statistical characteristic value of each group of data, wherein the second state label includes the sleep state and the sleep state. the awake state;
    所述电子设备根据所述第一状态标签和所述第二状态标签确定所述每组数据各自对应的最终状态标签;The electronic device determines a final state label corresponding to each set of data according to the first state label and the second state label;
    所述电子设备根据所述每组数据各自对应的最终状态标签确定睡眠监测结果。The electronic device determines the sleep monitoring result according to the final state label corresponding to each set of data.
  8. 根据权利要求1至7任一项所述的睡眠监测方法,其特征在于,所述电子设备判断用户是否位于交通工具上,包括:The sleep monitoring method according to any one of claims 1 to 7, wherein the electronic device determines whether the user is on a vehicle, comprising:
    所述电子设备获取用户的出行信息和/或运动信息,根据所述出行信息和/或所述运动信息判断用户是否位于所述交通工具上;The electronic device acquires travel information and/or movement information of the user, and determines whether the user is on the vehicle according to the travel information and/or the movement information;
    或者,or,
    所述电子设备在显示屏上显示提示信息,所述提示信息用于提示用户选择用户是否位于所述交通工具上;The electronic device displays prompt information on the display screen, the prompt information is used to prompt the user to select whether the user is on the vehicle;
    所述电子设备监测用户输入的第一操作指令;The electronic device monitors the first operation instruction input by the user;
    所述电子设备根据所述第一操作指令确定用户是否位于所述交通工具上。The electronic device determines whether the user is on the vehicle according to the first operation instruction.
  9. 如权利要求1至8任一项所述的睡眠监测方法,其特征在于,所述方法还包括:The sleep monitoring method according to any one of claims 1 to 8, wherein the method further comprises:
    若用户未位于交通工具上,则所述电子设备根据获取到的第二监测数据对用户的睡眠进行监测,所述第二监测数据中包括用户的状态信息。If the user is not on the vehicle, the electronic device monitors the sleep of the user according to the acquired second monitoring data, where the second monitoring data includes the state information of the user.
  10. 如权利要求9所述的睡眠监测方法,其特征在于,所述电子设备根据获取到的第二监测数据对用户的睡眠进行监测之前,所述方法还包括:The sleep monitoring method according to claim 9, wherein before the electronic device monitors the sleep of the user according to the acquired second monitoring data, the method further comprises:
    所述电子设备确定采用第二监测模式对用户的睡眠进行监测,所述第二监测模式指无需滤除所述电子设备获取到的监测数据中与所述交通工具相关的信息。The electronic device determines to use a second monitoring mode to monitor the sleep of the user, where the second monitoring mode means that information related to the vehicle in the monitoring data acquired by the electronic device does not need to be filtered out.
  11. 一种电子设备,其特征在于,所述电子设备包括处理器,所述处理器用于运行存储器中存储的计算机程序,以实现如权利要求1至10任一项所述的方法。An electronic device, characterized in that, the electronic device comprises a processor, and the processor is configured to run a computer program stored in a memory to implement the method according to any one of claims 1 to 10.
  12. 一种计算机可读存储介质,包括计算机指令,当所述计算机指令在计算机或处理器上运行时,使得所述计算机或处理器执行如权利要求1至10任一项所述的方法。A computer-readable storage medium comprising computer instructions which, when executed on a computer or processor, cause the computer or processor to perform the method of any one of claims 1 to 10.
PCT/CN2021/115753 2020-10-29 2021-08-31 Sleep monitoring method and apparatus, and electronic device and computer-readable storage medium WO2022088938A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011185682.XA CN114424927A (en) 2020-10-29 2020-10-29 Sleep monitoring method and device, electronic equipment and computer readable storage medium
CN202011185682.X 2020-10-29

Publications (1)

Publication Number Publication Date
WO2022088938A1 true WO2022088938A1 (en) 2022-05-05

Family

ID=81309428

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/115753 WO2022088938A1 (en) 2020-10-29 2021-08-31 Sleep monitoring method and apparatus, and electronic device and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN114424927A (en)
WO (1) WO2022088938A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115040092A (en) * 2022-06-13 2022-09-13 天津大学 Heart rate monitoring method and respiratory event detection method based on channel state information
WO2024051790A1 (en) * 2022-09-09 2024-03-14 荣耀终端有限公司 Sleep state detection method, electronic devices, and system

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116616721B (en) * 2023-07-24 2023-10-13 北京中科心研科技有限公司 Work and rest information determining method and device based on PPG (program G) signal and wearable equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104905795A (en) * 2015-06-15 2015-09-16 深圳市奋达科技股份有限公司 Method for monitoring Bluetooth low energy (BLE) networking sleeping
US20160176409A1 (en) * 2014-12-17 2016-06-23 Honda Motor Co., Ltd. System and method for dynamic vehicle control affecting sleep states of vehicle occupants
CN205379309U (en) * 2015-12-09 2016-07-13 深圳市新元素医疗技术开发有限公司 Sleep guardianship device
CN106897562A (en) * 2017-02-28 2017-06-27 镇江市高等专科学校 A kind of method of work of personal health terminal of travelling
CN111655135A (en) * 2017-12-22 2020-09-11 瑞思迈传感器技术有限公司 Apparatus, system, and method for physiological sensing in a vehicle

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101159793B (en) * 2007-11-06 2011-12-07 西安电子科技大学 Mobile phone wireless medical treatment health detection tutelage system
CN100536766C (en) * 2008-01-31 2009-09-09 杨杰 Method and apparatus for monitoring and awakening fatigue doze
CN106419841A (en) * 2016-09-13 2017-02-22 深圳市迈迪加科技发展有限公司 Method, device and system for evaluating sleep
CN110151137B (en) * 2019-05-28 2022-03-11 深圳如一探索科技有限公司 Sleep state monitoring method, device, equipment and medium based on data fusion

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160176409A1 (en) * 2014-12-17 2016-06-23 Honda Motor Co., Ltd. System and method for dynamic vehicle control affecting sleep states of vehicle occupants
CN104905795A (en) * 2015-06-15 2015-09-16 深圳市奋达科技股份有限公司 Method for monitoring Bluetooth low energy (BLE) networking sleeping
CN205379309U (en) * 2015-12-09 2016-07-13 深圳市新元素医疗技术开发有限公司 Sleep guardianship device
CN106897562A (en) * 2017-02-28 2017-06-27 镇江市高等专科学校 A kind of method of work of personal health terminal of travelling
CN111655135A (en) * 2017-12-22 2020-09-11 瑞思迈传感器技术有限公司 Apparatus, system, and method for physiological sensing in a vehicle

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115040092A (en) * 2022-06-13 2022-09-13 天津大学 Heart rate monitoring method and respiratory event detection method based on channel state information
WO2024051790A1 (en) * 2022-09-09 2024-03-14 荣耀终端有限公司 Sleep state detection method, electronic devices, and system

Also Published As

Publication number Publication date
CN114424927A (en) 2022-05-03

Similar Documents

Publication Publication Date Title
WO2020211701A1 (en) Model training method, emotion recognition method, related apparatus and device
WO2022088938A1 (en) Sleep monitoring method and apparatus, and electronic device and computer-readable storage medium
WO2022127787A1 (en) Image display method and electronic device
WO2021052139A1 (en) Gesture input method and electronic device
WO2021209047A1 (en) Sensor adjustingt method, appratus and electronic device
CN113747527B (en) Network link switching method based on electronic equipment state and electronic equipment
CN111316199A (en) Information processing method and electronic equipment
WO2022028362A1 (en) Device positioning method and related device therefor
CN114449599A (en) Network link switching method based on electronic equipment position and electronic equipment
WO2022160991A1 (en) Permission control method and electronic device
CN115589051B (en) Charging method and terminal equipment
WO2022022335A1 (en) Method and apparatus for displaying weather information, and electronic device
CN110058729B (en) Method and electronic device for adjusting sensitivity of touch detection
WO2023207667A1 (en) Display method, vehicle, and electronic device
CN114548141A (en) Method and device for generating waveform file, electronic equipment and readable storage medium
CN113744874A (en) Risk early warning method, risk behavior information acquisition method and electronic equipment
WO2022170856A1 (en) Method for establishing connection, and electronic device
WO2022100141A1 (en) Plug-in management method, system and apparatus
WO2022166435A1 (en) Picture sharing method and electronic device
CN113380240B (en) Voice interaction method and electronic equipment
WO2022007757A1 (en) Cross-device voiceprint registration method, electronic device and storage medium
WO2022017270A1 (en) Appearance analysis method, and electronic device
WO2020233581A1 (en) Height measuring method and electronic device
CN115022807A (en) Express delivery information reminding method and electronic equipment
CN114637392A (en) Display method and electronic equipment

Legal Events

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

Ref document number: 21884670

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21884670

Country of ref document: EP

Kind code of ref document: A1