CN113520305B - Method and device for determining working mode of photoelectric sensor - Google Patents

Method and device for determining working mode of photoelectric sensor Download PDF

Info

Publication number
CN113520305B
CN113520305B CN202010304171.9A CN202010304171A CN113520305B CN 113520305 B CN113520305 B CN 113520305B CN 202010304171 A CN202010304171 A CN 202010304171A CN 113520305 B CN113520305 B CN 113520305B
Authority
CN
China
Prior art keywords
heart rate
period
motion
photoelectric sensor
mode
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010304171.9A
Other languages
Chinese (zh)
Other versions
CN113520305A (en
Inventor
关楠
陈秋林
夏培勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202010304171.9A priority Critical patent/CN113520305B/en
Publication of CN113520305A publication Critical patent/CN113520305A/en
Application granted granted Critical
Publication of CN113520305B publication Critical patent/CN113520305B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/02Detecting, measuring or recording pulse, heart rate, blood pressure or blood flow; Combined pulse/heart-rate/blood pressure determination; Evaluating a cardiovascular condition not otherwise provided for, e.g. using combinations of techniques provided for in this group with electrocardiography or electroauscultation; Heart catheters for measuring blood pressure
    • A61B5/024Detecting, measuring or recording pulse rate or heart rate
    • A61B5/02416Detecting, measuring or recording pulse rate or heart rate using photoplethysmograph signals, e.g. generated by infrared radiation
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/02Detecting, measuring or recording pulse, heart rate, blood pressure or blood flow; Combined pulse/heart-rate/blood pressure determination; Evaluating a cardiovascular condition not otherwise provided for, e.g. using combinations of techniques provided for in this group with electrocardiography or electroauscultation; Heart catheters for measuring blood pressure
    • A61B5/024Detecting, measuring or recording pulse rate or heart rate
    • A61B5/02438Detecting, measuring or recording pulse rate or heart rate with portable devices, e.g. worn by the patient
    • 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/1118Determining activity level
    • 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

Landscapes

  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Medical Informatics (AREA)
  • Molecular Biology (AREA)
  • Veterinary Medicine (AREA)
  • Biophysics (AREA)
  • Pathology (AREA)
  • Engineering & Computer Science (AREA)
  • Biomedical Technology (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Cardiology (AREA)
  • Physics & Mathematics (AREA)
  • Surgery (AREA)
  • Animal Behavior & Ethology (AREA)
  • General Health & Medical Sciences (AREA)
  • Public Health (AREA)
  • Physiology (AREA)
  • Dentistry (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Measuring Pulse, Heart Rate, Blood Pressure Or Blood Flow (AREA)

Abstract

A method and a device for determining the working mode of a photoelectric sensor are used for reducing the power consumption of electronic equipment. The method comprises the following steps: the method comprises the steps of obtaining motion data and a heart rate, calculating s motion parameters according to the motion data, and if the s motion parameters and the heart rate meet preset conditions, determining a working mode of a photoelectric sensor in each first period of m first periods according to the heart rate, wherein the working mode of the photoelectric sensor is a sampling mode or a sleep mode; and if the s motion parameters and the heart rate do not meet the preset conditions, determining the working mode of the photoelectric sensor in the first period according to the motion parameters and/or the heart rate of the previous first period. According to the motion parameters and the heart rate, whether the photoelectric sensor is in the sampling mode or the sleep mode is determined, and compared with a scheme that the photoelectric sensor is always in the sampling mode, the power consumption of the photoelectric sensor can be reduced, so that the power consumption of the electronic equipment is reduced.

Description

Method and device for determining working mode of photoelectric sensor
Technical Field
The present application relates to the field of terminal technologies, and in particular, to a method and an apparatus for determining a working mode of a photoelectric sensor.
Background
Along with the popularization of intelligent wearable equipment, intelligent wearable equipment such as intelligent bracelets and intelligent watches have become the basic accessory of everyone. Meanwhile, with the increase of information demands of people on aspects of monitoring sports, health and the like, a motion sensor for monitoring sports and a photoelectric sensor for monitoring heart rate become standard configurations of each intelligent wearable device.
In an existing implementation manner, when the intelligent wearable device is in a power-on state, the photoelectric sensor continuously samples, and when the intelligent wearable device is in a power-off state, the photoelectric sensor finishes sampling. In the intelligent wearable device, the photoelectric sensor needs to emit LED light into human skin during sampling, and the electric quantity consumed by emitting the LED light is the most power-consuming part of the intelligent wearable device. For example, under the same working voltage, the working current of the motion sensor does not exceed 20 milliamperes, and the working current of the photoelectric sensor can reach 200 milliamperes at most. However, since the photoelectric sensor is always in the sampling mode in this way, the power consumption of the photoelectric sensor is large, resulting in large power consumption of the smart wearable device.
Disclosure of Invention
The application provides a method and a device for determining a working mode of a photoelectric sensor, which are used for determining whether the photoelectric sensor is in a sampling mode or a sleep mode according to motion parameters and a heart rate.
In a first aspect, the present application provides a method for determining an operating mode of a photoelectric sensor, which may be applied to an electronic device, and the method includes: the method comprises the steps of obtaining motion data and heart rate, calculating s motion parameters according to the motion data, and determining the working mode of the photoelectric sensor in each first period of m first periods according to the heart rate if the s motion parameters and the heart rate meet preset conditions; if the s exercise parameters and the heart rate do not meet preset conditions, determining the working mode of the photoelectric sensor in the 1 st first period of the m first periods according to the s exercise parameters and/or the heart rate, and determining the working mode of the photoelectric sensor in the first period according to the exercise parameters and/or the heart rate in the last first period of the first period aiming at one first period from the 2 nd first period to the mth first period of the m first periods. Wherein s is a positive integer and m is an integer greater than 1. Wherein, photoelectric sensor's mode of operation includes: a sampling mode and a sleep mode.
Wherein the preset conditions include: for each of the s exercise parameters, the exercise parameter is smaller than a first threshold corresponding to the exercise parameter, and the heart rate is not smaller than a first heart rate threshold. Alternatively, the preset conditions include: at least one motion parameter exists in the s motion parameters, the motion parameter is not smaller than a second threshold corresponding to the motion parameter, and the heart rate is smaller than a second heart rate threshold. For each motion parameter in the s motion parameters, the second threshold corresponding to the motion parameter is not less than the first threshold corresponding to the motion parameter, and the first heart rate threshold is not less than the second heart rate threshold.
Based on the scheme, whether the photoelectric sensor is in the sampling mode or the sleep mode is determined according to the motion parameters and the heart rate, so that the photoelectric sensor does not need to be in the sampling mode all the time, the power consumption of the photoelectric sensor can be reduced, and the power consumption of the electronic equipment is reduced. And under the condition that the motion parameters and the heart rate do not meet preset conditions, the work mode of the photoelectric sensor in the next first period is determined by using the motion parameters and/or the heart rate of the previous first period, so that the influence of the motion conditions and/or the heart rate conditions of the user in the previous period on the heart rate conditions of the user in the next first period is considered in the work mode, and the determined work mode can better meet the actual condition whether the user needs to monitor the heart rate.
In one possible design, if the s motion parameters and the heart rate satisfy the preset conditions, determining the operating mode of the photoelectric sensor in each of the m first cycles according to the heart rate includes: and if each motion parameter in the s motion parameters is smaller than the first threshold corresponding to each motion parameter and the heart rate is not smaller than the first heart rate threshold, determining that the working mode of the photoelectric sensor in each first period in the m first periods is a sampling mode.
Through the design, when each motion parameter is smaller than the first threshold corresponding to each motion parameter and the heart rate is not smaller than the first heart rate threshold, the user may sit still or exercise not violently, but the heart rate of the user is larger due to poor physical state, and in the scene, the heart rate of the user is monitored, so that more perfect heart rate monitoring information can be provided for the user with poor physical state.
In one possible design, if at least one of the s motion parameters is not less than the second threshold corresponding to the motion parameter, and the heart rate is less than the second heart rate threshold, for m first cycles: and determining that the working mode of the photoelectric sensor from 1 st first period to i-1 st first period is a sleep mode, the working mode in the ith first period is a sampling mode, and i is an integer larger than 1 and not larger than m.
Through the design, when at least one motion parameter is not smaller than a second threshold value corresponding to the motion parameter and the heart rate is smaller than the second heart rate threshold value, the motion data acquired by the motion sensor is large in fluctuation, but the motion of a user is not violent and the heart rate is smaller, under the scene, the photoelectric sensor is arranged to work in a mode of sleeping in i-1 first periods and sampling 1 first periods, on one hand, more first periods can be dormant as much as possible, the power consumption of the photoelectric sensor is reduced, and on the other hand, the heart rate can be acquired in each i first periods.
In one possible design, when the working mode of the photoelectric sensor is a sampling mode, the photoelectric sensor samples at a preset frequency; when the working mode of the photoelectric sensor is the sleep mode, the photoelectric sensor does not execute sampling.
In one possible design, the duration corresponding to the i first periods is less than a preset value. Therefore, the electronic equipment can acquire the heart rate of the user within the duration of each preset value, on one hand, the heart rate information subsequently displayed for the user can be more comprehensive, and on the other hand, whether the abnormal heart rate phenomenon occurs in the duration of each preset value of the user can be judged, so that the monitoring error of the abnormal heart rate can not exceed the duration of the preset value, and the monitoring capability of the abnormal heart rate can be improved.
In one possible design, acquiring motion data and heart rate includes: and under the condition that the electric quantity of the electronic equipment is determined to be not less than the set electric quantity, acquiring the motion data and the heart rate. Therefore, under the condition that the electric quantity of the electronic equipment is not less than the set electric quantity, whether sampling of the photoelectric sensor is conducted or whether the photoelectric sensor is in a dormant state is determined according to the motion data and the heart rate of the user, and the working mode of the photoelectric sensor can be comprehensively determined based on the motion data, the heart rate and the electric quantity of the electronic equipment.
In one possible design, before acquiring the motion data and the heart rate, the method further includes: in a case where it is determined that the amount of power of the electronic device is less than the set amount of power, for m first periods: and determining that the working mode of the photoelectric sensor from 1 st first period to i-1 st first period is a sleep mode, the working mode in the ith first period is a sampling mode, and i is an integer larger than 1 and not larger than m. Therefore, the service life of the electronic equipment can be prolonged as far as possible, and even under the condition that the electric quantity of the electronic equipment is smaller than the set electric quantity, the photoelectric sensor can acquire the heart rate within the duration of each i first periods.
In one possible design, determining the operation mode of the photoelectric sensor in the 1 st first period of the m first periods according to the s motion parameters and/or the heart rate comprises: if each motion parameter in the s motion parameters is smaller than a third threshold corresponding to each motion parameter, and/or the heart rate is smaller than a third heart rate threshold, determining that the working mode of the photoelectric sensor in the 1 st first period is a sleep mode; and if at least one of the s motion parameters is not less than a third threshold corresponding to the motion parameter and/or the heart rate is not less than a third heart rate threshold, determining that the working mode of the photoelectric sensor in the 1 st first period is a sampling mode.
Through the design, the s motion parameters and/or the heart rate can indicate the possible condition of the heart rate of the user in the first period, for example, indicate that the heart rate of the user in the first period is not smaller than a third heart rate threshold or smaller than the third heart rate threshold, and the work mode of the photoelectric sensor in the first period is determined based on the s motion parameters and/or the heart rate, so that the determined work mode can better meet the real condition whether the heart rate of the user needs to be monitored.
In one possible design, the method further includes: predicting a first relation according to the motion parameters and the heart rates acquired in the kth second period, wherein the first relation is the relation between the heart rate in the (k + 1) th second period and a third heart rate threshold; determining a second relation according to the heart rate acquired in the (k + 1) th second period, wherein the second relation is the relation between the heart rate acquired in the (k + 1) th second period and a third heart rate threshold value; and when the first relation is not matched with the second relation, adjusting a third threshold value and a third heart rate threshold value corresponding to the motion parameter according to the motion parameter and the heart rate acquired in the kth second period. Wherein k is a positive integer.
Through the design, the exercise parameter, the heart rate of the kth second period, the exercise parameter and the heart rate of the (k + 1) th second period are all obtained based on the collected data of the user, so that the threshold value obtained by adjusting based on the parameters can accord with the current physical health state of the user. In this way, the threshold adjustment process can be completed based on the acquired motion parameters and heart rate of the user, and the user can not be depended on actively inputting sensitive information such as body health data, so that the risk of revealing privacy information of the user can be reduced, and the user experience is improved.
In a second aspect, the present application provides an electronic device comprising: one or more processors; a memory; and one or more computer programs; wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions that, when executed by the one or more processors, cause the electronic device to perform the steps of: the method comprises the steps of obtaining motion data and heart rate, calculating s motion parameters according to the motion data, and determining the working mode of the photoelectric sensor in each first period of m first periods according to the heart rate if the s motion parameters and the heart rate meet preset conditions; if the s exercise parameters and the heart rate do not meet preset conditions, determining the working mode of the photoelectric sensor in the 1 st first period of the m first periods according to the s exercise parameters and/or the heart rate, and determining the working mode of the photoelectric sensor in the first period according to the exercise parameters and/or the heart rate in the last first period of the first period aiming at one first period from the 2 nd first period to the mth first period of the m first periods. Wherein s is a positive integer and m is an integer greater than 1. Wherein, photoelectric sensor's mode of operation includes: a sampling mode and a sleep mode.
Wherein the preset conditions include: aiming at each motion parameter in the s motion parameters, the motion parameter is smaller than a first threshold corresponding to the motion parameter, and the heart rate is not smaller than a first heart rate threshold; or; at least one motion parameter exists in the s motion parameters, the motion parameters are not smaller than a second threshold corresponding to the motion parameters, and the heart rate is smaller than a second heart rate threshold. For each motion parameter in the s motion parameters, the second threshold corresponding to the motion parameter is not less than the first threshold corresponding to the motion parameter, and the first heart rate threshold is not less than the second heart rate threshold.
In one possible design, the processor is specifically configured to: and if each motion parameter in the s motion parameters is smaller than the first threshold corresponding to each motion parameter and the heart rate is not smaller than the first heart rate threshold, determining that the working mode of the photoelectric sensor in each first period in the m first periods is a sampling mode.
In one possible design, the processor is further configured to: if at least one of the s motion parameters is not less than the second threshold corresponding to the motion parameter and the heart rate is less than the second heart rate threshold, for m first periods: and determining that the working mode of the photoelectric sensor from the 1 st first period to the (i-1) th first period is a sleep mode, the working mode in the ith first period is a sampling mode, and i is an integer greater than 1 and not greater than m.
In one possible design, when the working mode of the photoelectric sensor is a sampling mode, the photoelectric sensor samples at a preset frequency; when the working mode of the photoelectric sensor is the sleep mode, the photoelectric sensor does not perform sampling.
In one possible design, the duration corresponding to the i first periods is less than a preset value.
In one possible design, the processor is specifically configured to: and under the condition that the electric quantity of the electronic equipment is determined to be not less than the set electric quantity, acquiring the motion data and the heart rate.
In one possible design, the processor is specifically configured to: in a case where it is determined that the amount of power of the electronic device is less than the set amount of power, for m first periods: and determining that the working mode of the photoelectric sensor from the 1 st first period to the (i-1) th first period is a sleep mode, the working mode in the ith first period is a sampling mode, and i is an integer greater than 1 and not greater than m.
In one possible design, the processor is specifically configured to: if each motion parameter in the s motion parameters is smaller than a third threshold corresponding to each motion parameter, and/or the heart rate is smaller than a third heart rate threshold, determining that the working mode of the photoelectric sensor in the 1 st first period is a sleep mode; and if at least one of the s motion parameters is not less than a third threshold corresponding to the motion parameter and/or the heart rate is not less than a third heart rate threshold, determining that the working mode of the photoelectric sensor in the 1 st first period is a sampling mode.
In one possible design, the processor is further configured to: predicting a first relation according to the motion parameters and the heart rate acquired in the kth second period, wherein the first relation is the relation between the heart rate in the kth +1 second period and a third heart rate threshold value; determining a second relation according to the heart rate acquired in the (k + 1) th second period, wherein the second relation is the relation between the heart rate acquired in the (k + 1) th second period and a third heart rate threshold; and when the first relation is not matched with the second relation, adjusting a third threshold value and a third heart rate threshold value corresponding to the motion parameter according to the motion parameter and the heart rate acquired in the kth second period. Wherein k is a positive integer.
In a third aspect, the present application also provides an apparatus comprising means for performing the method of any one of the possible designs of any one of the above aspects. These modules/units may be implemented by hardware, or by hardware executing corresponding software.
In a fourth aspect, the present application also provides a computer-readable storage medium storing computer-executable instructions that, when invoked by a computer, cause the computer to perform any one of the possible design methods of any of the above aspects.
In a fifth aspect, the present application further provides a method comprising a computer program product, which, when run on a terminal, causes the electronic device to perform any one of the possible designs of any one of the above aspects.
These and other aspects of the present application will be more readily apparent from the following description of the embodiments.
Drawings
FIG. 1 is a schematic diagram of an electronic device;
fig. 2 is a schematic structural diagram of an electronic device to which the embodiment of the present application is applied;
fig. 3 is a schematic flow chart illustrating a method for determining an operation mode of a photoelectric sensor according to an embodiment of the present application;
fig. 4 is a schematic flowchart illustrating a method for adjusting a threshold according to an embodiment of the present application;
fig. 5 schematically illustrates a structural diagram of an electronic device provided in an embodiment of the present application;
fig. 6 schematically illustrates a structural diagram of another electronic device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the description of the embodiments of the present application, the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.
Various embodiments disclosed herein may be applied to an electronic device. In some embodiments of the present application, the electronic device may be a portable electronic device, such as a wearable device (e.g., a smart watch) with wireless communication capabilities, that incorporates functionality such as a personal digital assistant and/or a music player. Exemplary embodiments of the portable electronic device include, but are not limited to, a mount
Figure BDA0002455108390000041
Figure BDA0002455108390000042
Or other operating system.
Fig. 1 schematically shows a structure of an electronic device 100.
It should be understood that the illustrated electronic device 100 is merely an example, and that the electronic device 100 may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
As shown in fig. 1, 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 charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identification Module (SIM) card interface 195, and the like. 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, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
The following describes the components of the electronic device 100 in detail with reference to fig. 1:
the processor 110 may include one or more processing units, for example, the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), and/or the like. Wherein, the different processing units may be independent devices or may be integrated in one or more processors. The controller may be, among other things, a neural center and a command center of the electronic device 100. The controller can generate an operation control signal according to the instruction operation code and the time sequence signal to finish the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory, so that repeated access can be avoided, the waiting time of the processor 110 can be reduced, and the efficiency of the system can be improved.
In some embodiments, processor 110 may include one or more interfaces. For example, the interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc.
It should be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only an illustration, and does not limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The power management module 141 is used to connect 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 charge management module 140, and supplies power to the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be disposed 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, a modem processor, a baseband processor, and the like.
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The electronic device 100 may implement a shooting function through the ISP, the camera 193, the video codec, the GPU, the display 194, the application processor, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The storage data area may store data (such as audio data, phone book, etc.) created during use of the electronic device 100, and the like. In addition, the internal memory 121 may include a high speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a Universal Flash Storage (UFS), and the like. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
The electronic device 100 may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The pressure sensor 180A is used for sensing a pressure signal, and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A can be of a variety of types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic apparatus 100 may also calculate the touched position from the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but different touch operation intensities may correspond to different operation instructions.
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 (i.e., the x, y, and z axes) may be determined by gyroscope sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. The gyroscope sensor 180B may also be used for navigation, somatosensory gaming scenes.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may 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 phone, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the opening and closing state of the leather sheath or the opening and closing state of the flip cover, the automatic unlocking of the flip cover is set.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. The method can also be used for identifying the posture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and the like.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light to the outside through the light emitting diode. The electronic device 100 detects infrared reflected light from nearby objects using a photodiode. 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 are no objects near the electronic device 100. The electronic device 100 may also detect loss of infrared light using the proximity light sensor 180G to measure heart rate variation of the user.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The electronic apparatus 100 may receive a key input, and generate a key signal input related to user setting and function control of the electronic apparatus 100.
Although not shown in fig. 1, the electronic apparatus 100 may further include a bluetooth device, a positioning device, a flash, a micro-projection device, a Near Field Communication (NFC) device, and the like, which are not described in detail herein.
Fig. 2 is a schematic structural diagram of an electronic device to which the embodiment of the present application is applicable, where the electronic device 200 may be an intelligent wearable device having a heart rate monitoring function and a motion monitoring function, such as an intelligent bracelet, an intelligent watch, an intelligent helmet, an intelligent headset, a health armband, and the like.
Some descriptions of the terms involved in the embodiments of the present application are given below based on the contents of fig. 1 and fig. 2.
(1) Motion sensor
In the embodiment of the application, a motion sensor may be disposed on the electronic device, and the motion sensor may include one or more of an acceleration sensor, a geomagnetic sensor, and a gyroscope sensor.
The motion sensor may acquire one or more items of motion data, such as acceleration, angle, etc., at a first preset frequency. Wherein the first preset frequency may be set empirically by a person skilled in the art, for example when set at 25Hz, the motion sensor may acquire 1500 accelerations and/or 1500 angles per minute.
In the embodiment of the present application, each piece of motion data may correspond to one or more of the following motion parameters:
a first standard deviation, a first differential absolute value, a second standard deviation, and a second differential absolute value.
In the embodiment of the present application, motion data is taken as an example of acceleration, how each motion parameter corresponding to one motion data is calculated is described, and the calculation processes of the motion parameters corresponding to other motion data are similar to that described above, and are not described again.
Illustratively, assume that the motion sensor acquires n accelerations (i.e., a) in one cycle 1 、a 2 、……、a n ) Then, the first standard deviation corresponding to the acceleration collected in the period can be calculated by the following formula (1):
Figure BDA0002455108390000071
in equation (1), n is the number of accelerations acquired during a cycle, a 1 、a 2 、……、a n For the n accelerations collected by the motion sensor during this period,
Figure BDA0002455108390000075
is the average of n accelerations in the period, std 11 And the first standard deviation corresponding to the acceleration acquired in the period.
The first difference absolute value corresponding to the acceleration acquired in the period can be calculated by the following formula (2):
Figure BDA0002455108390000072
in the formula (2), std 12 A first standard deviation, abs, corresponding to the acceleration acquired in the previous cycle of the cycle 11 And the first difference absolute value is corresponding to the acceleration acquired in the period.
The calculation mode of the second standard deviation corresponding to the acceleration acquired in the period is as follows: and performing Fourier transform on the n accelerations acquired in the period to convert the n accelerations into n frequency amplitudes, and calculating the standard deviation of the n frequency amplitudes. The second standard deviation corresponding to the acceleration collected in the period can be calculated by the following formula (3):
Figure BDA0002455108390000073
in the formula (3), b 1 、b 2 、……、b n Respectively the acceleration a collected by the motion sensor in the period 1 、a 2 、……、a n The corresponding frequency-domain amplitude is set to,
Figure BDA0002455108390000076
is the average of the n frequency amplitudes in the period, std 21 And the second standard deviation is the corresponding acceleration acquired in the period.
The second difference absolute value corresponding to the acceleration acquired in the period can be calculated by the following formula (4):
Figure BDA0002455108390000074
in the formula (4), std 22 A second standard deviation, abs, corresponding to the acceleration acquired in the previous one of the periods 21 Second corresponding to the acceleration collected in the periodThe absolute value of the difference.
The embodiment of the application can be provided with three parameter thresholds for each motion parameter. For convenience of subsequent citation, in the embodiment of the present application, three parameter thresholds of each motion parameter are written as a first threshold corresponding to the motion parameter, a second threshold corresponding to the motion parameter, and a third threshold corresponding to the motion parameter.
In the embodiment of the present application, for each motion parameter, the second threshold corresponding to the motion parameter is not less than the first threshold corresponding to the motion parameter, and the first threshold corresponding to the motion parameter and the second threshold corresponding to the motion parameter may be calculated based on historical motion data, or may be set by a person skilled in the art according to experience. Regarding the value problem of the third threshold corresponding to the motion parameter, the following content will be described in detail, and will not be described here first.
(2) Photoelectric inductor
In the embodiment of the application, the electronic equipment can be further provided with a photoelectric sensor, the photoelectric sensor is used for collecting the heart rate of a user, and the heart rate is the heartbeat frequency per minute.
Illustratively, the photosensor may be a photoplethysmography (PPG) based photosensor. The PPG photoelectric sensor is provided with a Light Emitting Diode (LED), the PPG photoelectric sensor irradiates LED Light into the skin of a user during each sampling, and receives the LED Light reflected back through skin tissues, the absorption of the artery to the LED Light is changed due to blood flow, and the absorption of other tissues to the LED Light is basically unchanged, so that an analog signal corresponding to the heartbeat in the sampling can be calculated based on the absorbance of the attenuated LED Light and the blood, the analog signal is converted into a digital signal by the PPG photoelectric sensor through an analog-to-digital converter, the heart rate is calculated based on the digital signal, and the heart rate can represent the heartbeat condition during the sampling.
In the embodiment of the present application, in consideration of the influence of motion on acquiring the heart rate (for example, the skin is shifted due to the movement of the wrist, so that the frequency of the heart rate is covered up), to ensure the accuracy of heart rate acquisition, a possible acquisition manner of the heart rate is: the method comprises the steps of acquiring heart rate and motion data acquired within a period of time, performing Fourier transform on the heart rate and the motion data respectively to obtain a heart rate spectrum and a motion spectrum, removing noise of the heart rate spectrum based on the motion spectrum, searching for the frequency with the largest occurrence frequency from the heart rate spectrum with the noise removed, wherein the frequency is the heart rate frequency, and calculating to obtain the heart rate based on the heart rate frequency. By using the motion spectrum to perform denoising processing on the heart rate spectrum, the influence of motion on acquisition of the heart rate by the photoelectric sensor can be removed, and the accuracy of acquiring the heart rate is improved.
The embodiment of the application can be provided with three heart rate threshold values, namely a first heart rate threshold value, a second heart rate threshold value and a third heart rate threshold value. The first heart rate threshold is not less than the second heart rate threshold, and the first heart rate threshold and the second heart rate threshold may be calculated based on a historical heart rate, or may be set by a person skilled in the art based on experience. For example, when the heart rate of the user is not less than 100, the heart rate of the user is generally considered to be abnormal, so the first heart rate threshold may be set to 100, and when the heart rate of the user is less than 90, the heart rate of the user is generally considered to be normal, so the second heart rate threshold may be set to 90. Regarding the value of the third heart rate threshold, the following description will be detailed, and will not be described herein.
(3) Power saving mode and non-power saving mode
In the embodiment of the application, the electronic device may include two operating modes, which are a power saving mode and a non-power saving mode. In the embodiment of the application, a user can select whether the electronic equipment uses a power-saving mode or a non-power-saving mode. For example, the selection is performed by touching a display screen of the electronic device, or by pressing a key of the electronic device, or by voice control, or by remote control instruction, or by sending a control instruction through the terminal device, and the like, without limitation.
When the electronic equipment is in a non-power-saving mode, as long as the electronic equipment is in a starting state, the motion sensor and the photoelectric sensor of the electronic equipment always perform sampling.
When the electronic equipment is in a power-saving mode, if the electronic equipment is in a starting state, a motion sensor of the electronic equipment performs sampling, and a photoelectric sensor performs sampling or dormancy. Specifically, the electronic device may determine whether the photoelectric sensor performs sampling or hibernation according to one or more of the motion parameter, the heart rate, and the power of the electronic device. Because the photoelectric sensor does not need to perform sampling all the time when the electronic equipment is in a starting state, the power consumption of the photoelectric sensor can be saved, and the service life of the electronic equipment is prolonged.
(4) The photoelectric sensor comprises two working modes: sampling mode and sleep mode
In the embodiment of the application, when the photoelectric sensor is in the sleep mode, the photoelectric sensor does not perform sampling.
When the photoelectric sensor is in the sampling mode, the photoelectric sensor may perform sampling at a second preset frequency. The second preset frequency may be set empirically by one skilled in the art, such as when set at 40HZ, the photosensor collects heart rate every 25 milliseconds.
(5) Intermittent mode
In the embodiment of the present application, a mode in which the photosensors operate alternately in a manner of sleeping for one or more periods and sampling for one period may be referred to as an intermittent mode. For example, when the photoelectric sensor operates in an intermittent mode in m periods, the photoelectric sensor sleeps from 1 st period to i-1 st period, performs sampling in the i-th period, sleeps from i +1 st period to 2i-1 st period, and performs sampling in the 2 i-th period, … ….
In the embodiments of the present application, "at least one" means one or more, "and" a plurality "means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone, wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or multiple.
And, unless specifically stated otherwise, the embodiments of the present application refer to the ordinal numbers "first", "second", "third", etc., for distinguishing between a plurality of objects, and do not limit the sequence, timing, priority, or importance of the plurality of objects. For example, the first period and the second period are only for distinguishing different periods, and do not indicate a difference in priority or importance between the two periods. The period durations of the first period and the second period may be default durations, or may be set by a user in a user-defined manner, without limitation.
Based on fig. 1 or fig. 2, fig. 3 exemplarily shows a flowchart of a method for determining an operating mode of a photoelectric sensor, which may be executed by an electronic device, for example, the electronic device 100 in fig. 1 described above, or the electronic device 200 in fig. 2 described above. As shown in fig. 3, the method includes:
step 301, the electronic device determines whether the electronic device is in a power saving mode or a non-power saving mode; if the power saving mode is not the power saving mode, step 302 is executed, and if the power saving mode is the power saving mode, step 303 is executed.
Step 302, the electronic device sets a motion sensor and a photoelectric sensor of the electronic device to be in a continuous sampling state.
In step 302, if the user selects that the electronic device is in the non-power saving mode, it indicates that the user desires that the electronic device is in the continuous sampling state, and it is not necessary to cause the lack of heart rate sampling in order to save the power of the electronic device, so the electronic device can provide various schemes for the user to flexibly select.
The schemes provided in steps 301 and 302 in the embodiment of the present application are optional, and in a specific implementation, the electronic device may also directly perform step 303 described below, and it is not necessarily required to "determine that the electronic device is in the power saving mode".
In step 303, the electronic device determines whether the power of the electronic device is less than a set power, if so, step 304 is executed, and if not, step 305 is executed.
Step 304, the electronic device determines that the photoelectric sensors work in turn according to the mode of sleeping i-1 first cycles and sampling 1 first cycles.
In the embodiment of the application, when the electric quantity of the electronic equipment is smaller than the set electric quantity, the photoelectric sensor works in turn according to the mode of sleeping in the i-1 first periods and sampling the 1 first periods, the service time of the electronic equipment can be prolonged as far as possible, and the heart rate can be acquired in each i first periods. In a possible implementation manner, the duration of the i first periods is set to be smaller than a preset value. The preset value can be a default value or can be set by a user according to the requirement in a self-defined mode. For example, the preset value is 1 minute. So, even electronic equipment is in the intermittent type mode, but also can acquire user's rhythm of the heart in every minute, so, can make follow-up show for user's rhythm of the heart information more comprehensive on the one hand, on the other hand, can avoid not gathering user's rhythm of the heart data for a long time, because can both acquire user's rhythm of the heart per minute, consequently can judge whether user's rhythm of the heart is unusual in every minute has appeared, make the monitoring error to unusual rhythm of the heart can not exceed 1 minute, thereby improve the monitoring capability to unusual rhythm of the heart as far as possible.
In step 305, the electronic device obtains motion data and heart rate.
In step 306, the electronic device calculates S motion parameters according to the motion data, where S is a positive integer.
In a possible embodiment, the motion data collected in step 305 may be filtered, and S motion parameters may be calculated in step 306 according to the filtered motion data. The filtering may be performed in a variety of ways, such as removing maximum motion data and minimum motion data, or by inputting to a kalman filter, without limitation.
Step 307, the electronic device judges whether the S exercise parameters and the heart rate meet a preset first condition or a preset second condition;
if the first condition is satisfied, go to step 308;
if the second condition is satisfied, go to step 309;
if neither the first condition nor the second condition is satisfied, go to step 310.
In step 308, the electronic device determines that the photosensor samples in each of m first cycles.
In step 308, the S exercise parameters and the heart rate satisfying the preset first condition are:
each motion parameter in the S motion parameters is smaller than a first threshold corresponding to each motion parameter; and:
the heart rate is not less than the first heart rate threshold.
The first condition in the embodiment of the present application is used to filter out a first scenario, where the first scenario may be: the user sits still or does not exercise vigorously, and the user has a greater heart rate due to a less than good physical condition (e.g., the user may be older, have poor cardiac function, etc.). In such a scenario, because the physical state of the user is poor, the heart rate of the user needs to be monitored, so that more complete heart rate monitoring information can be provided for the user with a poor physical state. In such a scenario, if the photosensor is set to sleep mode or intermittent mode simply because the user is not moving so vigorously, heart rate monitoring for the user may be missed, which may not be desirable to the user.
Step 309, the electronic device determines that the photoelectric sensors work in turn in the m first cycles according to the sleep mode of i-1 first cycles and the sampling mode of 1 first cycle.
In step 309, the S exercise parameters and the heart rate satisfying the preset second condition are:
each motion parameter in the S motion parameters is not less than a second threshold corresponding to each motion parameter, and:
the heart rate is less than a second heart rate threshold.
The second condition in the embodiment of the present application is used to filter out a second scenario, where the second scenario may be: the motion data collected by the motion sensor fluctuates greatly, the user does not exercise vigorously and the heart rate is small (e.g., the user rides a bicycle, rides a battery car, or drives). In this scenario, since the user does not actually move violently and the heart rate thereof is normal, the heart rate of the user does not need to be monitored all the time, and thus the power consumption of the photoelectric sensor can be reduced for the user who does not move violently. In such a scenario, if the photoelectric sensor is set to the sampling mode only because the motion data acquired by the motion sensor fluctuates greatly, the photoelectric sensor may have large power consumption, which affects the use duration of the electronic device, and may not be desired by the user; and if the direct photoelectric sensor is set to sleep mode, the user's emergency may not be detected, which may not be desirable by the user. Therefore, the photoelectric sensor is set to work in an intermittent mode of sleeping for i-1 periods and sampling for 1 period, on one hand, more first periods can be dormant as far as possible, power consumption of the photoelectric sensor is reduced, and on the other hand, the heart rate can be acquired in each i first periods.
In the above steps 308 and 309, in a possible embodiment, the first threshold corresponding to one motion parameter may be equal to or not equal to the second threshold corresponding to the motion parameter. Optionally, the first heart rate threshold and the second heart rate threshold may be equal or unequal. The embodiment of the application provides a possible implementation mode: and setting the second threshold value corresponding to each motion parameter to be larger than the first threshold value corresponding to each motion parameter, wherein the first heart rate threshold value is larger than the second heart rate threshold value.
Taking the motion data as the acceleration and the motion parameter as the first standard deviation as an example, the judgment condition of the first scene is illustrated.
In a first mode, the first standard deviation is less than 0.5m/s 2 (0.5m/s 2 A second threshold corresponding to the first standard deviation), and a user with a heart rate not less than 90 (90 being the second heart rate threshold) confirms that: a user in the first scenario (a user whose physical state is not good).
Mode two, the first standard deviation is less than 0.25m/s 2 (0.25m/s 2 A first threshold corresponding to the first standard deviation), and the heart rate is not less than 100 (100 is the first heart rate threshold)Values) as: a user in the first scenario (a user whose physical state is not good).
Since the smaller the first standard deviation is, the less strenuous the exercise state of the user is displayed, and in the case that the less strenuous the exercise state of the user is, the larger the heart rate of the user is, the lower the actual heart function of the user may be. And the user classified into the first scene is the user whose estimated physical state of the user is not good. Based on this, it can be seen that in the second mode, the motion parameter is smaller than the smaller first threshold (0.25 m/s) corresponding to the motion parameter 2 ) And the actual physical state of the user with a heart rate greater than the larger first heart rate threshold (100) may be less favorable. Based on this, in the embodiment of the present application, when determining the first scene, the adopted determination condition is: if the motion parameter is smaller than the first threshold corresponding to the motion parameter and the heart rate is not smaller than the first heart rate threshold, the probability that the physical state of the user classified into the first scene is consistent with the actual physical state can be increased.
Taking the motion data as the acceleration and the motion parameter as the first standard deviation as an example, the judgment condition of the second scene is illustrated.
In a first mode, the first standard deviation is not less than 0.25m/s 2 (0.25m/s 2 A first threshold corresponding to the first standard deviation), and a user with a heart rate less than 100 (100 being the first heart rate threshold) confirms that: a user in the second scene (a user with less intense motion).
Mode two, the first standard deviation is not less than 0.5m/s 2 (0.5m/s 2 A second threshold corresponding to the first standard deviation), and a user with a heart rate less than 90 (90 being the second heart rate threshold) confirms that: a user in the second scene (a user with less intense motion).
In this case, if it is determined that the user is actually in a state of intense motion only according to the collected motion data, it may be determined that a false determination may occur. The smaller the heart rate of the user, the more the actual movement of the user may be indicatedIt is not violent. It can be seen that, in the embodiment of the application, even if the collected motion data of the user fluctuates greatly, the user with large motion data fluctuation and small heart rate can be classified into a scene (a second scene) with non-violent motion, so that the photoelectric sensor does not need to monitor the heart rate of the user all the time, and the power consumption of the photoelectric sensor can be reduced. Further, based on this, it can be seen that, in the second mode, the motion parameter is not less than the second larger threshold (0.5 m/s) corresponding to the motion parameter 2 ) And the user's motion with a heart rate less than the second, smaller heart rate threshold (90) may be less intense. Based on this, in the embodiment of the present application, when determining the second scenario, the determination conditions are: the motion parameter is not less than the second threshold corresponding to the motion parameter, and the heart rate is less than the second heart rate threshold, then the probability that the motion state of the user classified into the second scene is consistent with the actual motion state can be improved.
In step 310, the electronic device executes the following for a jth first cycle, where j is a positive integer not greater than m:
determining whether the motion parameters and/or the heart rate in the (j-1) th first period meet a preset third condition, if so, executing step 311, and if not, executing step 312;
when j is 1, determining the working mode in the 1 st first period according to the s motion parameters and the heart rate calculated in the step 306. That is, when j is 1, the exercise parameters and the heart rate in the j-1 th first cycle are the s exercise parameters and the heart rate calculated in the previous step 306.
In step 310, if the photo sensor is in the sampling mode in the j-1 th first period, it is determined whether the exercise parameter and the heart rate in the j-1 th first period satisfy a preset third condition, and if the photo sensor is in the sleep mode in the j-1 th first period, it is determined whether the exercise parameter in the j-1 th first period satisfies a preset third condition.
In step 311, the electronic device determines that the photosensor samples in the jth first cycle.
In step 311, the exercise parameter and/or the heart rate in the (j-1) th first cycle satisfy the preset third condition:
at least one motion parameter in the (j-1) th first period is not less than a third threshold corresponding to the motion parameter, or the heart rate is not less than a third heart rate threshold.
In the embodiment of the application, when one motion parameter in the motion parameters of the j-1 th first period is not smaller than the third threshold corresponding to the motion parameter, or the heart rate is not smaller than the third heart rate threshold, the user may be in a state of relatively intense motion, which indicates that the heart rate of the user in the j-1 th first period may be relatively large. In this case, the heart rate of the user in the exercise state can be better detected by sampling in the kth first period, and the heart rate monitoring capability is improved.
In step 312, the electronic device determines that the photosensor is asleep in the jth first cycle.
In step 312, the exercise parameter and/or the heart rate in the (j-1) th first cycle do not satisfy the preset third condition:
and each motion parameter in the (j-1) th first period is smaller than a third threshold corresponding to each motion parameter, or if the heart rate is acquired in the (j-1) th first period and is also smaller than the third heart rate threshold.
In the embodiment of the application, when all the exercise parameters of the j-1 th first period are smaller than the third threshold corresponding to each exercise parameter, and/or the heart rate is smaller than the third heart rate threshold, the user may be in a state of not exercising vigorously and having a smaller heart rate, which indicates that the heart rate of the user in the j-th first period may also be smaller. In this case, the sleep in the kth first period can better reduce the power consumption of the photoelectric sensor and improve the service life of the electronic device.
In the embodiment of the application, the exercise parameter and/or the heart rate of the user in the last first period can indicate the possible condition of the heart rate of the user in the first period, for example, indicate that the heart rate of the user in the first period is not less than a third heart rate threshold or less than the third heart rate threshold, and the determined working mode can better meet the real condition of whether the heart rate of the user needs to be monitored by deciding the working mode of the photoelectric sensor in the first period based on the exercise data and/or the heart rate in the last first period.
For example, in step 312, if it is determined that the photo sensor is sleeping in the jth first period, before the photo sensor performs the sleeping, the number of first periods in which the photo sensor has been sleeping continuously may be further determined, when the number of the first periods in which the photo sensor has been sleeping continuously is less than i-1, the photo sensor is made to sleep in the first period, and when the number of the first periods in which the photo sensor has been sleeping continuously is not less than i-1, the photo sensor performs sampling in the first period, so that the photo sensor can acquire the heart rate in each i first period, and the heart rate monitoring for the user is not missed as much as possible. In addition, the heart rate can be acquired in the duration of each i first periods, so that whether the abnormal heart rate phenomenon occurs in the duration of each i first periods can be judged by the method, the monitoring error of the abnormal heart rate can not exceed the duration of the i first periods, and the monitoring capability of the abnormal heart rate can be improved as much as possible.
In a possible implementation manner, in each first cycle in step 308 or step 311, the electric quantity of the electronic device may also be determined, if the electric quantity is not less than the set electric quantity, sampling or sleeping is performed in the first cycle according to the determined operation mode, and if the electric quantity is less than the set electric quantity, the photoelectric sensors are set to alternately operate in the first cycle of sleeping i-1 first cycles and sampling 1 first cycle, so as to reduce the power consumption of the photoelectric sensors as much as possible when the electric quantity of the electronic device is small, and improve the service life of the electronic device.
In the embodiment of the application, according to motion parameter and heart rate, determine whether the photoelectric sensor is in sampling mode or sleep mode, compare in the scheme that the photoelectric sensor is in sampling mode all the time, can reduce the consumption of photoelectric sensor to reduce electronic equipment's consumption. And under the condition that the motion parameters and the heart rate do not meet preset conditions, the work mode of the photoelectric sensor in the next first period is determined by using the motion parameters and/or the heart rate of the previous first period, so that the influence of the motion conditions and/or the heart rate conditions of the user in the previous period on the heart rate conditions of the user in the next first period is considered in the work mode, and the determined work mode can better meet the actual condition whether the user needs to monitor the heart rate.
In this embodiment of the application, the third threshold and the third heart rate threshold corresponding to each exercise parameter may be set based on the physical health state of the user, and for users in different physical health states, the third threshold and the third heart rate threshold corresponding to each exercise parameter may also be different. For example, taking the third heart rate threshold value as 100 as an example, for a user with a good physical health status, the heart rate recovery capability is fast, when the heart rate of the user in the last first period is not less than 100, the heart rate of the user in the first period is most likely to have recovered below 100, the first period does not need to be sampled, however, the operation mode of the photo sensor in the first period is determined to be a sampling mode based on the third heart rate threshold value 100, and therefore, the third heart rate threshold value 100 is not applicable to the user. For a user with a poor health state, the heart rate recovery capability of the user is slow, when the heart rate of the user in the last first period is not less than 100, the heart rate of the user in the first period is also more than 100 in a probability, the first period needs to be sampled, and the working mode of the photoelectric sensor in the first period is determined to be a sampling mode based on the third heart rate threshold 100, so that the third heart rate threshold 100 is suitable for the user.
Fig. 4 exemplarily illustrates a flowchart of a threshold adjustment method provided in an embodiment of the present application, where the method may be executed by an electronic device, for example, the electronic device 100 in fig. 1 described above, or the electronic device 200 in fig. 2 described above. As shown in fig. 4, the method includes:
step 401, predicting a first relationship according to the exercise parameters and the heart rate acquired in the kth second period, where the first relationship is a relationship between the heart rate in the (k + 1) th second period and a third heart rate threshold, and k is a positive integer.
In this embodiment of the application, if at least one of the motion parameters acquired in the kth second period is not less than the third threshold corresponding to the motion parameter, or the heart rate is not less than the third heart rate threshold, it is predicted that the first relationship is: the heart rate in the (k + 1) th second period is not less than the third heart rate threshold.
If each motion parameter of the motion parameters acquired in the kth second period is smaller than a third threshold corresponding to each motion parameter, and the heart rate is smaller than a third heart rate threshold, predicting that the first relationship is: the heart rate in the (k + 1) th second cycle is less than the third heart rate threshold.
Step 402, determining a second relationship according to the heart rate obtained in the (k + 1) th second period, where the second relationship is a relationship between the heart rate obtained in the (k + 1) th second period and the third heart rate threshold.
In the embodiment of the present application, the second relationship is: the heart rate acquired in the (k + 1) th second period is not less than a third heart rate threshold, or the heart rate acquired in the (k + 1) th second period is less than the third heart rate threshold.
Step 403, determining whether the first relationship and the second relationship are matched, if not, executing step 404, and if so, executing step 405.
In an embodiment of the present application, in a possible implementation manner, matching the first relationship and the second relationship includes: and predicting that the heart rate in the (k + 1) th second period is smaller than a third heart rate threshold value, and predicting that the heart rate acquired in the (k + 1) th second period is smaller than the third heart rate threshold value. Alternatively, in another possible embodiment, the matching of the first relation and the second relation includes: and predicting that the heart rate in the (k + 1) th second period is not less than a third heart rate threshold value, and predicting that the heart rate obtained in the (k + 1) th second period is not less than the third heart rate threshold value.
In an embodiment of the present application, in a possible implementation manner, the first relationship and the second relationship are not matched, including: and predicting that the heart rate in the (k + 1) th second period is smaller than a third heart rate threshold, and the heart rate acquired in the (k + 1) th second period is not smaller than the third heart rate threshold. Alternatively, in another possible embodiment, the first relationship and the second relationship do not match, including: and predicting that the heart rate in the (k + 1) th second period is not less than a third heart rate threshold value, and the heart rate acquired in the (k + 1) th second period is less than the third heart rate threshold value.
And step 404, adjusting a third threshold and a third heart rate threshold corresponding to the motion parameter according to the motion parameter and the heart rate acquired in the kth second period.
In this embodiment of the present application, the third threshold and the third heart rate threshold corresponding to each motion parameter may be adjusted, or only the third threshold and/or the third heart rate threshold corresponding to the motion parameter for which the first relationship is decided may be adjusted. Taking the latter as an example, the adjustment manner may include: and adjusting a third threshold corresponding to the motion parameter for which the first relationship is decided to be a value slightly larger than the motion parameter acquired in the kth second period, and/or adjusting a third heart rate threshold for which the first relationship is decided to be a value slightly larger than the heart rate acquired in the kth second period.
For example: if the third heart rate threshold value is 100 and the heart rate acquired in the kth second period is 110, predicting that the heart rate in the (k + 1) th second period is also greater than 100; if the heart rate acquired in the (k + 1) th second cycle is 95, it is predicted that the heart rate of the (k + 1) th second cycle is not matched with the heart rate acquired in the (k + 1) th second cycle, and the threshold value of the misjudgment first relation includes the third heart rate threshold value, so that the third heart rate threshold value may be updated to a value slightly larger than the heart rate acquired in the (k + 1) th second cycle, for example, 111. Accordingly, if the first standard deviation of the acceleration acquired in the kth second period is not smaller than the third threshold corresponding to the first standard deviation of the acceleration, and the other motion parameters are smaller than the third thresholds corresponding to the other motion parameters, the threshold of the first relationship is determined by mistake and further includes the third threshold corresponding to the first standard deviation of the acceleration, so that the third threshold corresponding to the first standard deviation of the acceleration may be updated to a value slightly larger than the first standard deviation of the acceleration acquired in the kth second period.
Step 405, determining whether a threshold adjustment ending condition is met, if yes, executing step 406, and if not, executing step 407.
In the embodiment of the present application, the ending condition of the threshold adjustment may be set by a person skilled in the art according to experience, for example, the number of second cycles for which the first relationship and the second relationship are continuously matched may be set to be not less than a preset matching number, the number of second cycles for performing the threshold adjustment may also be set to be not less than a threshold adjustment number, and the number of executed second cycles may also be set to be not less than the execution number, which is not limited.
In step 406, the threshold adjustment is completed.
Illustratively, if the method of threshold adjustment is performed before step 304, after the threshold adjustment is finished, step 301 may be performed again, so that the motion parameters and the heart rate used for classifying the scene can have better real-time performance.
Step 407, update k to k +1, execute step 401.
In the embodiment of the application, the heart rate situation of the (k + 1) th second cycle is predicted by the exercise parameter based on the (k) th second cycle, the heart rate, the third threshold corresponding to the exercise parameter and the third heart rate threshold, the predicted heart rate situation is compared with the real heart rate of the (k + 1) th second cycle, and then the third threshold and the third heart rate threshold corresponding to the exercise parameter are adjusted based on the comparison result, closed-loop adjustment of the third threshold and the third heart rate threshold corresponding to the exercise parameter can be realized, because the exercise parameter of the (k) th second cycle, the heart rate, the exercise parameter of the (k + 1) th second cycle and the heart rate are obtained based on collected data of a user, the threshold obtained based on the adjustment of the parameters can accord with the current physical health state of the user. In addition, in this way, the process of threshold adjustment can be completed based on the acquired motion parameters and heart rate of the user, and the user can not rely on actively inputting sensitive information such as body health data, so that the risk of revealing privacy information of the user can be reduced, and the user experience is improved.
In step 403, the first relation and the second relation are matched, or alternatively, the predicted operation mode and the actual operation mode may be matched. The predicted operating mode may be determined according to the motion parameters and the heart rate acquired in the kth second cycle in step 401, when at least one motion parameter of the motion parameters acquired in the kth second cycle is not less than a first threshold corresponding to the motion parameter, or the heart rate is less than a first heart rate threshold, the predicted operating mode is a sampling mode, and when each motion parameter of the motion parameters acquired in the kth second cycle is less than a second threshold corresponding to each motion parameter, and the heart rate is less than a second heart rate threshold, the predicted operating mode is a sleep mode. The actual working mode may be determined according to the heart rate obtained in the (k + 1) th second cycle in step 402, and if the heart rate obtained in the (k + 1) th second cycle is not less than the third heart rate threshold, the actual working mode is the sampling mode, and if the heart rate obtained in the (k + 1) th second cycle is less than the third heart rate threshold, the actual working mode is the sleep mode.
According to the foregoing method, fig. 5 is a schematic structural diagram of an electronic device provided in the embodiment of the present application, and as shown in fig. 5, the electronic device may be a chip or a circuit, such as a chip or a circuit that can be disposed on the electronic device.
Further, the electronic device 1401 may further comprise a bus system, wherein the processor 1402, the memory 1404 and the communication interface 1403 may be connected via the bus system.
It should be understood that the processor 1402 may be a chip. For example, the processor 1402 may be a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), a system on chip (SoC), a Central Processing Unit (CPU), a Network Processor (NP), a digital signal processing circuit (DSP), a Microcontroller (MCU), a Programmable Logic Device (PLD), or other integrated chips.
In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 1402. The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in a hardware processor, or in a combination of hardware and software modules within the processor 1402. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 1404, and the processor 1402 reads the information in the memory 1404 and, in combination with its hardware, performs the steps of the above-described method.
It should be noted that the processor 1402 in the embodiment of the present application may be an integrated circuit chip having signal processing capability. In implementation, the steps of the above method embodiments may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The processor described above may be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and combines hardware thereof to complete the steps of the method.
It will be appreciated that the memory 1404 in embodiments of the subject application can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. The non-volatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an electrically Erasable EPROM (EEPROM), or a flash memory. Volatile memory can be Random Access Memory (RAM), which acts as external cache memory. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), synchronous Dynamic Random Access Memory (SDRAM), double data rate SDRAM, enhanced SDRAM, SLDRAM, synchronous Link DRAM (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In a possible implementation manner, the processor 1402 is configured to obtain exercise data and a heart rate, calculate s exercise parameters according to the exercise data, determine an operation mode of the photo sensor in each first cycle of m first cycles according to the heart rate if the s exercise parameters and the heart rate satisfy a preset condition, determine an operation mode of the photo sensor in a 1 st first cycle of the m first cycles according to the s exercise parameters and/or the heart rate if the s exercise parameters and the heart rate do not satisfy the preset condition, and determine an operation mode of the photo sensor in the first cycle with the exercise parameters and/or the heart rate in a first cycle that is previous to the first cycle for one first cycle of the m first cycles. Wherein s is a positive integer, and m is an integer greater than 1. Wherein, the working mode of the photoelectric sensor comprises: a sampling mode and a sleep mode.
Wherein the preset conditions include: for each motion parameter in the s motion parameters, the motion parameter is smaller than a first threshold corresponding to the motion parameter; and the heart rate is not less than the first heart rate threshold. Or; at least one motion parameter exists in the s motion parameters, and the motion parameter is not less than a second threshold value corresponding to the motion parameter; and the heart rate is less than a second heart rate threshold. For each motion parameter in the s motion parameters, a second threshold corresponding to the motion parameter is not less than a first threshold corresponding to the motion parameter, and the first heart rate threshold is not less than the second heart rate threshold.
In one possible implementation, the processor 1402 is specifically configured to: if each of the s motion parameters is smaller than a first threshold corresponding to each motion parameter, and the heart rate is not smaller than the first heart rate threshold, determining that the working mode of the photoelectric sensor in each first period of the m first periods is a sampling mode.
In one possible implementation, the processor 1402 is further configured to: if at least one of the s motion parameters is not less than a second threshold corresponding to the motion parameter, and the heart rate is less than the second heart rate threshold, for the m first periods: determining that the working mode of the photoelectric sensor from 1 st first period to i-1 st first period is a sleep mode, and the working mode of the photoelectric sensor in the ith first period is a sampling mode, wherein i is an integer greater than 1 and not greater than m.
In a possible implementation manner, when the working mode of the photoelectric sensor is a sampling mode, the photoelectric sensor samples at a preset frequency; and when the working mode of the photoelectric sensor is the sleep mode, the photoelectric sensor does not execute sampling.
In a possible implementation manner, the duration corresponding to the i first periods is less than a preset value.
In one possible implementation, the processor 1402 is specifically configured to: and under the condition that the electric quantity of the electronic equipment is determined to be not less than the set electric quantity, acquiring the motion data and the heart rate.
In one possible implementation, the processor 1402 is specifically configured to: in a case where it is determined that the amount of power of the electronic device is less than the set amount of power, for the m first periods: determining that the working mode of the photoelectric sensor from 1 st first period to i-1 st first period is a sleep mode, and the working mode of the photoelectric sensor in the ith first period is a sampling mode, wherein i is an integer greater than 1 and not greater than m.
In one possible implementation, the processor 1402 is specifically configured to: if each motion parameter in the s motion parameters is smaller than a third threshold corresponding to each motion parameter, and/or the heart rate is smaller than a third heart rate threshold, determining that the working mode of the photoelectric sensor in the 1 st first period is a sleep mode; and if at least one of the s motion parameters is not less than a third threshold corresponding to the motion parameter and/or the heart rate is not less than a third heart rate threshold, determining that the working mode of the photoelectric sensor in the 1 st first period is a sampling mode.
In one possible implementation, the processor 1402 is further configured to: predicting a first relation according to the motion parameters and the heart rate acquired in the kth second period, wherein the first relation is the relation between the heart rate in the kth +1 second period and the third heart rate threshold; determining a second relation according to the heart rate acquired in the (k + 1) th second period, wherein the second relation is the relation between the heart rate acquired in the (k + 1) th second period and the third heart rate threshold; and when the first relation and the second relation are not matched, adjusting the third motion parameter threshold value and the third heart rate threshold value according to the motion parameters and the heart rates acquired in the kth second period. Wherein k is a positive integer.
For the concepts, explanations, and detailed descriptions and other steps related to the technical solutions provided in the embodiments of the present application related to the electronic device, reference is made to the foregoing methods or descriptions related to these contents in other embodiments, which are not described herein again.
Based on the above embodiments and the same concept, fig. 6 is a schematic diagram of an electronic device provided in an embodiment of the present application, and as shown in fig. 6, the electronic device 1501 may be a chip or a circuit, such as a chip or a circuit that may be disposed in the electronic device.
As shown in fig. 6, the electronic device 1501 may include an acquisition unit 1502 and a processing unit 1503.
In one possible implementation, an obtaining unit 1502 for obtaining motion data and heart rate; the processing unit 1503 is configured to calculate s exercise parameters according to the exercise data, determine, if the s exercise parameters and the heart rate satisfy a preset condition, a working mode of the photoelectric sensor in each first cycle of m first cycles according to the heart rate, determine, if the s exercise parameters and the heart rate do not satisfy the preset condition, a working mode of the photoelectric sensor in a 1 st first cycle of the m first cycles according to the s exercise parameters and/or the heart rate, and determine, for one first cycle of the 2 nd to the m th first cycles of the m first cycles, a working mode of the photoelectric sensor in the first cycle with the exercise parameters and/or the heart rate in a previous first cycle of the first cycle. Wherein s is a positive integer, and m is an integer greater than 1. Wherein, the working mode of the photoelectric sensor comprises: a sampling mode and a sleep mode.
Wherein the preset conditions include: for each motion parameter in the s motion parameters, the motion parameter is smaller than a first threshold corresponding to the motion parameter; and the heart rate is not less than the first heart rate threshold. Or; at least one motion parameter exists in the s motion parameters, and the motion parameter is not less than a second threshold value corresponding to the motion parameter; and the heart rate is less than a second heart rate threshold. For each of the s motion parameters, a second threshold corresponding to the motion parameter is not less than a first threshold corresponding to the motion parameter, and the first heart rate threshold is not less than the second heart rate threshold.
For the concepts, explanations, details and other steps related to the technical solutions provided in the embodiments of the present application related to the electronic device, please refer to the descriptions of the foregoing methods or other embodiments, which are not repeated herein.
It is to be understood that the functions of the units in the electronic device 1501 can refer to the implementation of the corresponding method embodiments, and are not described herein again.
It should be understood that the above division of the units of the electronic device is only a division of logical functions, and the actual implementation may be wholly or partially integrated into one physical entity or may be physically separated. In this embodiment of the application, the obtaining unit 1502 and the processing unit 1503 may be implemented by the processor 1402 in fig. 5.
According to the method provided by the embodiment of the present application, the present application further provides a computer program product, which includes: computer program code which, when run on a computer, causes the computer to perform the method of any one of the embodiments shown in figures 1 to 4.
According to the method provided by the embodiment of the present application, the present application further provides a computer-readable storage medium storing program code, which when run on a computer, causes the computer to execute the method of any one of the embodiments shown in fig. 1 to 4.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may 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. The processes or functions according to the embodiments of the present application are generated in whole or in part when the computer instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a Digital Video Disk (DVD)), or a semiconductor medium (e.g., a Solid State Disk (SSD)), among others.
The electronic device in each of the above device embodiments corresponds to the electronic device in the method embodiment, and the corresponding module or unit executes the corresponding steps, for example, the communication unit (transceiver) executes the step of receiving or transmitting in the method embodiment, and other steps besides transmitting and receiving may be executed by the processing unit (processor). The functions of the specific elements may be referred to in the respective method embodiments. The number of the processors may be one or more.
As used in this specification, the terms "component," "module," "system," and the like are intended to refer to a computer-related entity, either hardware, firmware, a combination of hardware and software, or software in execution. For example, a component may be, but is not limited to being, a process running on a processor, an object, an executable, a thread of execution, a program, and/or a computer. By way of illustration, both an application running on a computing device and the computing device can be a component. One or more components can reside within a process and/or thread of execution and a component may be localized on one computer and/or distributed between two or more computers. In addition, these components can execute from various computer readable media having various data structures stored thereon. The components may communicate by way of local and/or remote processes such as in accordance with a signal having one or more data packets (e.g., data from two components interacting with one another at a local system, distributed system, and/or across a network such as the internet with other systems by way of the signal).
Those of ordinary skill in the art will appreciate that the various illustrative logical blocks and steps (step) described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (15)

1. A method for determining the working mode of a photoelectric sensor is characterized by comprising the following steps:
acquiring exercise data and heart rate;
calculating s motion parameters according to the motion data; s is a positive integer;
if each motion parameter in the s motion parameters is smaller than a first threshold corresponding to each motion parameter, and the heart rate is not smaller than a first heart rate threshold, determining that the working mode of the photoelectric sensor in each first period in m first periods is a sampling mode; alternatively, the first and second electrodes may be,
if at least one of the s exercise parameters is not less than a second threshold corresponding to the exercise parameter and the heart rate is less than a second heart rate threshold, for the m first periods:
determining that the working mode of the photoelectric sensor from 1 st first period to i-1 st first period is a sleep mode, and the working mode of the photoelectric sensor in the ith first period is a sampling mode, wherein i is an integer larger than 1 and not larger than m, and m is an integer larger than 1; wherein, the working mode of the photoelectric sensor comprises: a sampling mode and a sleep mode;
if the s exercise parameters and the heart rate do not meet preset conditions, determining an operating mode of the photoelectric sensor in a 1 st first cycle of the m first cycles according to the s exercise parameters and/or the heart rate, and determining the operating mode of the photoelectric sensor in the first cycle with the exercise parameters and/or the heart rate in a last first cycle of the first cycles for one first cycle from a 2 nd first cycle to an m th first cycle of the m first cycles;
wherein the preset conditions include:
for each motion parameter in the s motion parameters, the motion parameter is smaller than a first threshold corresponding to the motion parameter; and the heart rate is not less than the first heart rate threshold;
or;
at least one motion parameter exists in the s motion parameters, and the motion parameter is not less than a second threshold value corresponding to the motion parameter; and the heart rate is less than the second heart rate threshold; for each of the s motion parameters, a second threshold corresponding to the motion parameter is not less than a first threshold corresponding to the motion parameter, and the first heart rate threshold is not less than the second heart rate threshold.
2. The method of claim 1, wherein when the operation mode of the photo sensor is a sampling mode, the photo sensor samples at a predetermined frequency;
and when the working mode of the photoelectric sensor is a sleep mode, the photoelectric sensor does not perform sampling.
3. The method of claim 1, wherein the duration corresponding to the i first periods is less than a preset value.
4. The method of any one of claims 1 to 3, wherein the acquiring motion data and heart rate comprises:
and under the condition that the electric quantity of the electronic equipment is determined to be not less than the set electric quantity, acquiring the motion data and the heart rate.
5. The method of claim 4, wherein prior to acquiring the motion data and the heart rate, further comprising:
in a case where it is determined that the power amount of the electronic device is less than the set power amount, for the m first periods:
determining that the working mode of the photoelectric sensor from 1 st first period to i-1 st first period is a sleep mode, and the working mode of the photoelectric sensor in the ith first period is a sampling mode, wherein i is an integer greater than 1 and not greater than m.
6. The method according to any one of claims 1 to 3, wherein said determining an operation mode of said photosensor in a 1 st first cycle of said m first cycles from said s motion parameters and/or said heart rate comprises:
if each motion parameter in the s motion parameters is smaller than a third threshold corresponding to each motion parameter, and/or the heart rate is smaller than a third heart rate threshold, determining that the working mode of the photoelectric sensor in the 1 st first period is a sleep mode;
and if at least one of the s motion parameters is not less than a third threshold corresponding to the motion parameter and/or the heart rate is not less than a third heart rate threshold, determining that the working mode of the photoelectric sensor in the 1 st first period is a sampling mode.
7. The method of claim 6, wherein the method further comprises:
predicting a first relation according to the exercise parameters and the heart rates acquired in the kth second period, wherein the first relation is the relation between the heart rate in the (k + 1) th second period and the third heart rate threshold; k is a positive integer;
determining a second relation according to the heart rate acquired in the (k + 1) th second period, wherein the second relation is the relation between the heart rate acquired in the (k + 1) th second period and the third heart rate threshold;
and when the first relation is not matched with the second relation, adjusting a third threshold value and a third heart rate threshold value corresponding to the motion parameter according to the motion parameter and the heart rate acquired in the kth second period.
8. An electronic device, comprising: one or more processors; a memory; and one or more computer programs;
wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions that, when executed by the one or more processors, cause the electronic device to perform the steps of:
acquiring motion data and heart rate, and calculating s motion parameters according to the motion data; s is a positive integer; if each of the s motion parameters is smaller than a first threshold corresponding to each motion parameter and the heart rate is not smaller than a first heart rate threshold, determining that the working mode of the photoelectric sensor in each first cycle of m first cycles is a sampling mode; or, if at least one of the s motion parameters is not less than a second threshold corresponding to the motion parameter, and the heart rate is less than a second heart rate threshold, for the m first periods: determining that the working mode of the photoelectric sensor from 1 st first period to i-1 st first period is a sleep mode, and the working mode of the photoelectric sensor in the ith first period is a sampling mode, wherein i is an integer larger than 1 and not larger than m, and m is an integer larger than 1; wherein, the working mode of the photoelectric sensor comprises: a sampling mode and a sleep mode; if the s exercise parameters and the heart rate do not meet preset conditions, determining an operating mode of the photoelectric sensor in a 1 st first cycle of the m first cycles according to the s exercise parameters and/or the heart rate, and determining the operating mode of the photoelectric sensor in the first cycle with the exercise parameters and/or the heart rate in a last first cycle of the first cycles for one first cycle from a 2 nd first cycle to an m th first cycle of the m first cycles;
wherein the preset conditions include:
for each motion parameter in the s motion parameters, the motion parameter is smaller than a first threshold corresponding to the motion parameter; and the heart rate is not less than a first heart rate threshold;
or;
at least one motion parameter exists in the s motion parameters, and the motion parameter is not less than a second threshold value corresponding to the motion parameter; and the heart rate is less than a second heart rate threshold; for each motion parameter in the s motion parameters, a second threshold corresponding to the motion parameter is not less than a first threshold corresponding to the motion parameter, and the first heart rate threshold is not less than the second heart rate threshold.
9. The electronic device of claim 8, wherein when the operation mode of the photo sensor is a sampling mode, the photo sensor samples at a predetermined frequency;
and when the working mode of the photoelectric sensor is the sleep mode, the photoelectric sensor does not execute sampling.
10. The electronic device of claim 8, wherein the duration corresponding to the i first periods is less than a preset value.
11. The electronic device of any of claims 8-10, wherein the processor is specifically configured to:
and under the condition that the electric quantity of the electronic equipment is determined to be not less than the set electric quantity, acquiring the motion data and the heart rate.
12. The electronic device of claim 11, wherein the processor is specifically configured to:
in a case where it is determined that the amount of power of the electronic device is less than the set amount of power, for the m first periods:
determining that the working mode of the photoelectric sensor from the 1 st first period to the (i-1) th first period is a sleep mode, and the working mode in the ith first period is a sampling mode, wherein i is an integer greater than 1 and not greater than m.
13. The electronic device of any of claims 8-10, wherein the processor is specifically configured to:
if each motion parameter in the s motion parameters is smaller than a third threshold corresponding to each motion parameter, and/or the heart rate is smaller than a third heart rate threshold, determining that the working mode of the photoelectric sensor in the 1 st first period is a sleep mode;
and if at least one of the s motion parameters is not less than a third threshold corresponding to the motion parameter and/or the heart rate is not less than a third heart rate threshold, determining that the working mode of the photoelectric sensor in the 1 st first period is a sampling mode.
14. The electronic device of claim 13, wherein the processor is further configured to:
predicting a first relation according to the exercise parameters and the heart rates acquired in the kth second period, wherein the first relation is the relation between the heart rate in the (k + 1) th second period and the third heart rate threshold; k is a positive integer;
determining a second relation according to the heart rate acquired in the (k + 1) th second period, wherein the second relation is the relation between the heart rate acquired in the (k + 1) th second period and the third heart rate threshold;
and when the first relation is not matched with the second relation, adjusting a third threshold value corresponding to the motion parameter and a third heart rate threshold value according to the motion parameter and the heart rate acquired in the kth second period.
15. A computer-readable storage medium having stored thereon computer-executable instructions which, when invoked by a computer, cause the computer to perform the method of any of claims 1 to 7.
CN202010304171.9A 2020-04-17 2020-04-17 Method and device for determining working mode of photoelectric sensor Active CN113520305B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010304171.9A CN113520305B (en) 2020-04-17 2020-04-17 Method and device for determining working mode of photoelectric sensor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010304171.9A CN113520305B (en) 2020-04-17 2020-04-17 Method and device for determining working mode of photoelectric sensor

Publications (2)

Publication Number Publication Date
CN113520305A CN113520305A (en) 2021-10-22
CN113520305B true CN113520305B (en) 2022-11-25

Family

ID=78093471

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010304171.9A Active CN113520305B (en) 2020-04-17 2020-04-17 Method and device for determining working mode of photoelectric sensor

Country Status (1)

Country Link
CN (1) CN113520305B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114209298A (en) * 2021-12-06 2022-03-22 深圳市爱都科技有限公司 PPG sensor control method and device and electronic equipment

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101493865A (en) * 2009-02-03 2009-07-29 杭州义盛祥通信技术有限公司 Electricity saving device and method for sport wrist-watch
CN104955139A (en) * 2015-06-26 2015-09-30 Tcl移动通信科技(宁波)有限公司 Intelligent power-saving method and system for mobile terminal
CN105425940A (en) * 2015-10-23 2016-03-23 安徽华米信息科技有限公司 Method and apparatus for determining wearing state of wristband, and wearable device
CN105726004A (en) * 2014-12-26 2016-07-06 卡西欧计算机株式会社 Biological information measuring device and driving control method of the same
WO2016192189A1 (en) * 2015-06-01 2016-12-08 中兴通讯股份有限公司 Method and apparatus for reducing power consumption of terminal device
CN106556424A (en) * 2016-10-18 2017-04-05 上海斐讯数据通信技术有限公司 A kind of intelligent wearable device and its energy-saving operating method
WO2017088154A1 (en) * 2015-11-26 2017-06-01 华为技术有限公司 Profile mode switching method
CN106802708A (en) * 2016-11-28 2017-06-06 国网北京市电力公司 The control method and device of wearable device
CN107205642A (en) * 2014-11-14 2017-09-26 英特尔公司 The continuous heart rate sensing of ultra low power in wearable device
CN107708192A (en) * 2017-10-11 2018-02-16 普联技术有限公司 A kind of method and device of automatic switchover bluetooth mode of operation
WO2018137197A1 (en) * 2017-01-25 2018-08-02 华为技术有限公司 Method and device for reducing power consumption of electronic apparatus
CN108475100A (en) * 2016-03-15 2018-08-31 深圳迈瑞生物医疗电子股份有限公司 Working mode switching method, wireless sensor and system
WO2018176955A1 (en) * 2017-03-31 2018-10-04 上海掌门科技有限公司 Energy-saving switching method with heart rate detection function, and smart watch
CN109152542A (en) * 2016-04-18 2019-01-04 皇家飞利浦有限公司 The system and method being worn for detecting when sensor

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100041349A1 (en) * 1989-08-03 2010-02-18 Broadcom Corporation Remote radio data communication system with data rate switching
KR20090044872A (en) * 2007-11-01 2009-05-07 엘지전자 주식회사 Portable computer and method for controlling power saving mode thereof
US8751838B2 (en) * 2010-08-23 2014-06-10 Nokia Corporation Method, apparatus and computer program product for presentation of information in a low power mode
US9383833B2 (en) * 2013-04-09 2016-07-05 Pixart Imaging Inc. Navigation device and power saving method thereof
US20150374310A1 (en) * 2014-06-26 2015-12-31 Salutron, Inc. Intelligent Sampling Of Heart Rate
JP6413574B2 (en) * 2014-10-01 2018-10-31 セイコーエプソン株式会社 Activity state information detection apparatus and control method for activity state information detection apparatus
US9826938B2 (en) * 2014-10-29 2017-11-28 Microsoft Technology Licensing, Llc Motion compensation for optical heart rate sensors
CN104375623B (en) * 2014-11-28 2017-08-15 北京华网汇通技术服务有限公司 A kind of wearable intelligent equipment and its power-saving control method
KR20160101497A (en) * 2015-02-17 2016-08-25 삼성전자주식회사 Wearable device and method for operating thereof
CN106900052A (en) * 2015-12-21 2017-06-27 深圳富泰宏精密工业有限公司 Power adjusts module and the object wearing device of module is adjusted with the power
CN108778111B (en) * 2016-09-12 2020-12-15 华为技术有限公司 Heart rate detection method and device
US11504040B2 (en) * 2016-12-30 2022-11-22 Inventec Appliances (Jiangning) Corporation Wearable heart monitoring device, heart monitoring system and method
TWI757265B (en) * 2017-01-25 2022-03-11 原相科技股份有限公司 Light sensing method, physiological parameter computing method and light sensing system
CN108886749B (en) * 2017-06-09 2022-04-22 荣耀终端有限公司 Management method and device of wearable intelligent equipment
US10667724B2 (en) * 2017-08-09 2020-06-02 Samsung Electronics Co., Ltd. System and method for continuous background heartrate and heartbeat events detection using a motion sensor

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101493865A (en) * 2009-02-03 2009-07-29 杭州义盛祥通信技术有限公司 Electricity saving device and method for sport wrist-watch
CN107205642A (en) * 2014-11-14 2017-09-26 英特尔公司 The continuous heart rate sensing of ultra low power in wearable device
CN105726004A (en) * 2014-12-26 2016-07-06 卡西欧计算机株式会社 Biological information measuring device and driving control method of the same
WO2016192189A1 (en) * 2015-06-01 2016-12-08 中兴通讯股份有限公司 Method and apparatus for reducing power consumption of terminal device
CN104955139A (en) * 2015-06-26 2015-09-30 Tcl移动通信科技(宁波)有限公司 Intelligent power-saving method and system for mobile terminal
CN105425940A (en) * 2015-10-23 2016-03-23 安徽华米信息科技有限公司 Method and apparatus for determining wearing state of wristband, and wearable device
WO2017088154A1 (en) * 2015-11-26 2017-06-01 华为技术有限公司 Profile mode switching method
CN108475100A (en) * 2016-03-15 2018-08-31 深圳迈瑞生物医疗电子股份有限公司 Working mode switching method, wireless sensor and system
CN109152542A (en) * 2016-04-18 2019-01-04 皇家飞利浦有限公司 The system and method being worn for detecting when sensor
CN106556424A (en) * 2016-10-18 2017-04-05 上海斐讯数据通信技术有限公司 A kind of intelligent wearable device and its energy-saving operating method
WO2018072453A1 (en) * 2016-10-18 2018-04-26 上海斐讯数据通信技术有限公司 Smart wearable device and energy-saving operation method thereof
CN106802708A (en) * 2016-11-28 2017-06-06 国网北京市电力公司 The control method and device of wearable device
WO2018137197A1 (en) * 2017-01-25 2018-08-02 华为技术有限公司 Method and device for reducing power consumption of electronic apparatus
WO2018176955A1 (en) * 2017-03-31 2018-10-04 上海掌门科技有限公司 Energy-saving switching method with heart rate detection function, and smart watch
CN107708192A (en) * 2017-10-11 2018-02-16 普联技术有限公司 A kind of method and device of automatic switchover bluetooth mode of operation

Also Published As

Publication number Publication date
CN113520305A (en) 2021-10-22

Similar Documents

Publication Publication Date Title
US11717188B2 (en) Automatic detection of user's periods of sleep and sleep stage
KR102463383B1 (en) Method for measuring bio-signal and wearable electronic device
CN108496143B (en) Electronic device and control method thereof
US10001386B2 (en) Automatic track selection for calibration of pedometer devices
CN114983432A (en) System and method for obtaining bodily function measurements using a mobile device
US9866941B2 (en) Multi-point multiple sensor array for data sensing and processing system and method
CN108366742B (en) Biological signal acquisition method, device, electronic equipment and system
US20190175016A1 (en) Calculate Physiological State and Control Smart Environments via Wearable Sensing Elements
CN114366062B (en) Wearable device, wearing detection method and medium thereof
KR20130126760A (en) Apparatus and method for textile-type interface in human wearing band
Chu et al. Dynamic heart rate monitors algorithm for reflection green light wearable device
CN113520305B (en) Method and device for determining working mode of photoelectric sensor
CN114762588A (en) Sleep monitoring method and related device
CN111698939B (en) Method of generating heart rate fluctuation information associated with external object and apparatus therefor
CN113365550A (en) Method for calculating recovery index based on REM sleep stage and electronic device thereof
US10178975B2 (en) Detecting system and mobile electronic apparatus, and method for detecting physiological characteristic thereof method thereof
EP4372521A1 (en) Wearable electronic device and method by which wearable electronic device provides brushing teeth information
Zhu et al. CHAR: Composite Head-body Activities Recognition with A Single Earable Device
CN116887748A (en) Electronic device for providing personalized guidance based on blood pressure related information and method thereof
CN117958746A (en) Sleep monitoring method and electronic equipment
CN117770758A (en) Signal denoising method and electronic equipment
CN117711565A (en) Motion recovery time determining method and electronic equipment
CN114881066A (en) Wearing state identification method and device
CN113693556A (en) Method and device for detecting muscle fatigue degree after exercise and electronic equipment

Legal Events

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