A service execution method and related apparatus
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2023-09-15
- Publication Date
- 2026-08-07
AI Technical Summary
[0003]但是,可穿戴设备在执行一些业务(例如睡眠监测业务等)时需要PPG模组长时间保持工作状态,这样会增加可穿戴设备的功耗
Smart Images

Figure CN119645216B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic technology, and in particular to a business execution method and related apparatus. Background Technology
[0002] With the development of electronic technology, wearable devices are being used more and more frequently in daily life. When wearing wearable devices, users can perform sports and health-related services through photoplethysmography (PPG) modules, and monitor their health or exercise status in real time.
[0003] However, wearable devices require the PPG module to remain operational for extended periods when performing certain tasks (such as sleep monitoring), which increases the power consumption of the wearable device. Summary of the Invention
[0004] This application provides a service execution method and related apparatus, which realizes the provision of different voltages to the photoplethysmography (PPG) module based on the executed service, thereby reducing the power consumption of the PPG module and improving the battery life of the electronic device.
[0005] In a first aspect, this application provides a service execution method applied to an electronic device, the electronic device including a processor, a power controller, and a photoplethysmography (PPG) module, the PPG module including an infrared device and a green light device; the method includes: when executing a first service, controlling the power controller to provide a first voltage to the PPG module; controlling the processor to send a first control signal to the PPG module; controlling the PPG module to turn on the green light device in response to the first control signal; when executing a second service, controlling the power controller to provide a second voltage to the PPG module; controlling the processor to send a second control signal to the PPG module; controlling the PPG module to turn on the infrared device in response to the second control signal.
[0006] In this way, without using the green light device in the PPG module, a lower voltage can be provided to the PPG module, reducing the power consumption of the PPG module and improving the battery life of electronic devices.
[0007] In one possible implementation, the electronic device further includes a first circuit and a second circuit; the first circuit is used to convert the battery voltage into a first voltage; the first circuit is also used to provide the first voltage to a power controller; the second circuit is used to convert the battery voltage into a second voltage; the second circuit is also used to provide the second voltage to the power controller; controlling the power controller to provide the first voltage to the PPG module specifically includes: controlling the processor to send a first signal to the power controller; controlling the power controller to provide the first voltage to the PPG module in response to the first signal; controlling the power controller to provide the second voltage to the PPG module specifically includes: controlling the processor to send a second signal to the power controller; controlling the power controller to provide the second voltage to the PPG module in response to the second signal.
[0008] In this way, two different voltages can be provided by one battery.
[0009] After being converted by the circuit, the voltage can be the same as that of the battery or a different voltage.
[0010] In one possible implementation, the first circuit includes a boost device and the second circuit includes a voltage regulator.
[0011] In this way, a first voltage higher than the battery voltage can be obtained through a boost device, and a second voltage that is the same as or close to the battery voltage can be obtained through a voltage regulator.
[0012] In one possible implementation, the electronic device further includes a first battery and a second battery; the first battery is used to provide a first voltage to the power controller; the second battery is used to provide a second voltage to the power controller; controlling the power controller to provide the first voltage to the PPG module specifically includes: controlling the processor to send a first signal to the power controller; controlling the power controller to provide the first voltage to the PPG module in response to the first signal; controlling the power controller to provide the second voltage to the PPG module specifically includes: controlling the processor to send a second signal to the power controller; controlling the power controller to provide the second voltage to the PPG module in response to the second signal.
[0013] In this way, two different voltages can be provided by two batteries respectively.
[0014] In one possible implementation, the method further includes: determining that the execution count of the first service is a single occurrence before the power controller supplies a first voltage to the PPG module, the execution count indicating whether the service ends after a single occurrence; determining that the execution count of the third service is multiple occurrences when the third service is executed; controlling the power controller to supply a second voltage to the PPG module; controlling the processor to send a first control signal to the PPG module; and controlling the PPG module to turn on the green light device in response to the first control signal.
[0015] Therefore, for services that require the use of green light devices and are executed only once, a higher voltage can be provided to the PPG module during the execution of such services. For services that require the use of green light devices and are executed multiple times, a lower voltage can be provided to the PPG module during the execution of such services.
[0016] In one possible implementation, the method further includes, during the execution of the second service: when the first service is executed, controlling the power controller to switch the input voltage of the PPG module from the second voltage to the first voltage; controlling the processor to send a first control signal to the PPG module; and controlling the PPG module to respond to the first control signal and turn on the green light device.
[0017] In this way, when the PPG module is powered by a low voltage, if there is a service that requires a higher voltage, the input voltage of the PPG module can be switched to a high voltage.
[0018] In one possible implementation, after executing the second service, the method further includes: when executing the first service, if controlling the power controller to supply the first voltage to the PPG module fails, controlling the power controller to supply the second voltage to the PPG module.
[0019] In this way, if the PPG module cannot be powered by the first voltage, it can be powered by the second voltage.
[0020] In one possible implementation, the method further includes, after executing the first service, the method further comprising: when executing the second service, if controlling the power controller to supply the second voltage to the PPG module fails, controlling the power controller to supply the first voltage to the PPG module.
[0021] In this way, if the PPG module cannot be powered by the second voltage, it can be powered by the first voltage.
[0022] Secondly, this application provides an electronic device, including: one or more processors, one or more memories, and a PPG module. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, which includes computer instructions. When the one or more processors execute the computer instructions, the electronic device performs a business execution method in any possible implementation of any of the above aspects.
[0023] Thirdly, embodiments of this application provide a computer storage medium including computer instructions, which, when executed on an electronic device, cause the electronic device to perform the business execution method in any of the possible implementations of any of the above aspects.
[0024] Fourthly, embodiments of this application provide a computer program product that, when run on an electronic device, causes the electronic device to execute the business execution method in any of the possible implementations of any of the above aspects.
[0025] The beneficial effects of the second to fourth aspects can be referenced from the beneficial effects of the first aspect. Attached Figure Description
[0026] Figure 1A This is a schematic diagram of the device configuration of an electronic device 100 provided in an embodiment of this application;
[0027] Figure 1B A schematic diagram of the hardware structure of an electronic device 100 provided in an embodiment of this application;
[0028] Figure 2A A schematic diagram of the power supply circuit for a photoplethysmography (PPG) module provided in this application embodiment;
[0029] Figure 2B A schematic diagram illustrating the relationship between the signal output by the CPU to the power switch and the voltage output by the power switch, provided in an embodiment of this application;
[0030] Figure 3 A flowchart illustrating a business execution method provided in an embodiment of this application;
[0031] Figure 4A This application provides a schematic flowchart of a method for configuring power supply 1 for a PPG module.
[0032] Figure 4B This application provides a schematic flowchart of a method for configuring a power supply 2 for a PPG module.
[0033] Figure 5 This application provides another method flowchart for configuring power to a PPG module and executing service 1.
[0034] Figure 6 This application provides a schematic flowchart of a method for executing service 1 after the PPG module is powered on, as provided in an embodiment of the present application.
[0035] Figure 7 A schematic diagram of the software architecture of an electronic device 100 provided in an embodiment of this application;
[0036] Figure 8 This is a flowchart illustrating a business execution method provided in an embodiment of this application. Detailed Implementation
[0037] The technical solutions in the embodiments of this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; the word "and / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0038] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0039] The term "user interface (UI)" used in the following embodiments of this application refers to the medium interface through which an application or operating system interacts and exchanges information with the user. It realizes the conversion between the internal form of information and the form that the user can accept. The user interface is source code written in a specific computer language such as Java or Extensible Markup Language (XML). The interface source code is parsed and rendered on the electronic device, ultimately presenting content that the user can recognize. A common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be visible interface elements such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets displayed on the screen of an electronic device.
[0040] Figure 1A This illustration shows a schematic diagram of the device configuration of an electronic device 100 provided in an embodiment of this application.
[0041] like Figure 1AAs shown, the electronic device 100 may include a watch body and a watch band. Optionally, the watch body may also have one or more buttons. The front of the electronic device 100 may be the side with a display screen, and the back of the electronic device 100 may be the side that is in close contact with the user's skin when the user wears the electronic device 100. One or more light-emitting diodes (LEDs) may be provided on the back of the watch body. These LEDs may emit green light, infrared light, etc. In this way, when the user wears the electronic device 100, the electronic device 100 can emit infrared light and / or green light towards the user's skin through these one or more LEDs. In other embodiments, the aforementioned one or more LEDs may be replaced with other types of signal transmitters that can be used to emit green light and / or infrared light.
[0042] Understandable Figure 1A The illustrated embodiment is merely an example; in the embodiments of this application, the electronic device 100 may be... Figure 1A The watch shown can also be a bracelet, ring, smart glasses or other wearable devices. This application does not limit the specific type of electronic device 100.
[0043] Figure 1B A schematic diagram of the hardware structure of the electronic device 100 is shown.
[0044] The electronic device 100 can be a wearable device such as a watch, bracelet, ring, or smart glasses. This application embodiment does not impose any special restrictions on the specific type of the electronic device.
[0045] Electronic device 100 may include a processor 110, internal memory 121, charging management module 140, power management module 141, battery 142, wireless communication module 160, sensor module 180, buttons 190, motor 191, indicator 192, display screen 194, and photoplethysmography (PPG) module 195, etc. The sensor module 180 may include a touch sensor 180K, and optionally may also include one or more of the following sensors: pressure sensor, gyroscope sensor, barometric pressure sensor, magnetic sensor, accelerometer, distance sensor, proximity sensor, fingerprint sensor, temperature sensor, ambient light sensor, bone conduction sensor, etc.
[0046] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0047] Processor 110 may include one or more processing units, such as a central processing unit (CPU), application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU). In some embodiments, processor 110 may also include a microcontroller unit (MCU). The different processing units may be independent devices or integrated into one or more processors.
[0048] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.
[0049] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0050] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0051] The GPIO interface can be configured via software. It can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the display screen 194, the wireless communication module 160, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0052] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.
[0053] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, internal memory 121, display screen 194, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.
[0054] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module.
[0055] Electronic device 100 implements display functions through a GPU, a display screen 194, and an 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 and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0056] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), or it can be manufactured using organic light-emitting diodes (OLEDs), active-matrix organic light-emitting diodes (AMOLEDs), flexible light-emitting diodes (FLEDs), minimized LEDs, microLEDs, micro-OLEDs, quantum dot light-emitting diodes (QLEDs), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.
[0057] Internal memory 121 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM). The RAM can be directly read and written by the processor 110 and can be used to store executable programs (e.g., machine instructions) of the operating system or other running programs, as well as user and application data. The NVM can also store executable programs and user and application data, and can be pre-loaded into the RAM for direct read and write operations by the processor 110.
[0058] Touch sensor 180K, also known as a "touch device," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touchscreen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of electronic device 100, in a different position than display screen 194.
[0059] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.
[0060] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. For example, different vibration feedback effects can correspond to touch operations performed on different applications (such as taking photos, playing audio, etc.). Motor 191 can also correspond to different vibration feedback effects for touch operations performed on different areas of the display screen 194. Different application scenarios (such as time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customized.
[0061] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.
[0062] In some embodiments, the PPG module 195 may include an infrared (IR) device and a green light device. The IR device may include an IR transmitter and an IR receiver; the IR transmitter emits infrared signals, and the IR receiver receives reflected infrared signals. The green device may include a green transmitter and a green receiver (e.g., a photosensor); the green transmitter emits green light, and the green receiver receives reflected green light. In some embodiments, the PPG module 195 may also include a red light device, which emits red light and receives reflected red light. The PPG module 195 can perform health monitoring services, measuring multiple physiological data of the user, such as body temperature, heart rate, blood pressure, blood oxygen, sleep duration, and sleep quality. The PPG module 195 can also perform wear monitoring, monitoring whether the user is wearing the electronic device 100. In some embodiments, the PPG module 195 may include the above-described... Figure 1A The one or more LEDs shown can serve as green emitters and IR emitters.
[0063] The working principle of the photoplethysmography (PPG) module is described below.
[0064] When light passes through skin tissue, it is absorbed by bones, skin pigment, and venous and arterial blood. Furthermore, different wavelengths of light attenuate to varying degrees. Red and near-infrared light penetrate skin tissue more easily than other wavelengths, while most of the green light is absorbed by red blood cells in the blood, and green light is also absorbed by oxygenated hemoglobin and deoxygenated hemoglobin. Therefore, based on the emitted infrared light and the detected attenuated infrared light, several physiological parameters of a user can be determined, such as heart rate, body temperature, and blood pressure. Similarly, based on the emitted green light and the detected attenuated green light, the levels of oxygenated hemoglobin and deoxygenated hemoglobin in the user's blood, or the red blood cell count, can be determined.
[0065] According to the above Figure 1B As shown in the embodiment, the PPG module 195 may include an IR device and a green device. Based on the characteristics of infrared light and green light, the PPG module 195 can perform monitoring services such as wear monitoring and sleep monitoring through the IR device, and can perform blood oxygen monitoring and breathing training services through the green device.
[0066] It should be noted that the longer the light wave, the lower its energy. Infrared light has a longer wavelength than green light. Therefore, the energy required to generate infrared light is less than the energy required to generate green light. In other words, the power consumption of the IR device in PPG module 195 is less than the power consumption of the green device.
[0067] This application provides a service execution method applied to an electronic device 100. The electronic device 100 includes a processor, a power controller, and a PPG module. The PPG module includes an infrared device and a green light device. The method includes: when executing a first service, controlling the power controller to provide a first voltage to the PPG module; controlling the processor to send a first control signal to the PPG module; controlling the PPG module to turn on the green light device in response to the first control signal; when executing a second service, controlling the power controller to provide a second voltage to the PPG module; controlling the processor to send a second control signal to the PPG module; and controlling the PPG module to turn on the infrared device in response to the second control signal.
[0068] Since IR devices consume less power than green devices, supplying the PPG module with a low-voltage power supply will not affect the monitoring results of the IR devices when IR devices are needed but green devices are not. This saves power consumption in the PPG module, thereby improving the battery life of the electronic device 100.
[0069] The following describes a power supply circuit for a PPG module provided in an embodiment of this application.
[0070] like Figure 2A As shown, the power supply circuit of the PPG module may include a battery B1, a power module E1, a central processing unit (CPU), a low dropout regulator (LDO) Q1, a power switch K1, a light-emitting diode D1, and a current-controlled current source A1.
[0071] Battery B1 can be connected to the input port of power module E1.
[0072] Power module E1 may include one input port C0 and multiple output ports, including output port C1 and output port C2. The power module may have a built-in boost circuit that allows output port C1 to output a voltage higher than that of input port C0. Another output port C2 of the power module may output the same voltage as input port C0. For example, output port C1 may output +5.0V, and output port C2 may output +3.8V. The voltage output by output port C1 can serve as power supply U1, and the voltage output by output port C2 can serve as power supply U2.
[0073] Power supply U1 can be connected to input port in1 of power switch K1, and power supply U2 can be connected to input port in2 of power switch K1 via low-dropout linear regulator Q1. Power supply U2 can also be connected to the CPU and other modules via low-dropout linear regulator Q1 to supply power to the CPU and other modules.
[0074] The low-dropout linear regulator Q1 can be used to stabilize voltage; that is, when the voltage at the input port of the low-dropout linear regulator Q1 is within a certain voltage range (e.g., 3.8V-4.2V), the voltage at the output port remains stable (e.g., 3.6V). Moreover, the voltage difference between the input and output ports of the low-dropout linear regulator Q1 is very small. Figure 2A The low-dropout linear regulator Q1 shown is a P-type LDO, constructed from PMOS transistors. Q1 can include three ports: input port P1, output port P2, and output port P3. Input port P1 can be connected to power supply U2; output port P2 can be connected to the input port in2 of power switch K1; and output port P3 can be connected to the CPU to power it. Output port P3 can also be connected to other modules to power them.
[0075] Power switch K1 may include multiple input ports and multiple output ports. The multiple input ports of power switch K1 may include in0, in1, and in2. Among these input ports, in0 can be connected to the CPU via a bus. Power switch K1 can receive signals output by the CPU through this bus. These signals can be used to control the output of power switch K1. The specific method by which the CPU controls power switch K1 through the output signals is described below. Figure 2B The relevant descriptions in the illustrated embodiment are not detailed here. in1 can be connected to power supply U1, making power supply U1 a power input of power switch K1. in2 can be connected to power supply U2 through a low-dropout linear regulator Q1, making power supply U2 another power input of power switch K1. Multiple output ports of power switch K1 can include out1 and out2, both of which can be connected to the positive terminal of light-emitting diode D1. The voltage output by out1 can be the same as the voltage of power supply U1, and the voltage output by out2 can be close to the voltage of power supply U2.
[0076] Both LED D1 and current source A1 are components in the PPG module. LED D1 can include a positive and a negative terminal. The positive terminal can be connected to the output ports out1 and out2 of the power switch K1, and the negative terminal can be grounded through the current source A1. The current source A1 can also include an input port and an output port. The input port of the current source A1 can be connected to the negative terminal of LED D1, and the input port of the current source A1 can be grounded. The current source A1 is used to control the current flowing through LED D1, preventing excessive current from burning out the LED D1.
[0077] The CPU can be connected to the output port P3 of the low-dropout linear regulator Q1, allowing power supply U2 to power the CPU. The CPU can also be connected to the input port in0 of power switch K1 via a bus, and send signals to power switch K1 to control its output. In some embodiments, the CPU can be replaced by a microcontroller unit (MCU).
[0078] It is understandable that the above Figure 2A The circuit diagram shown is only one example provided in this application. In the embodiments of this application, the power supply U1 and power supply U2 may also use different voltages than those in the above embodiments. In addition, the circuit diagram for powering the PPG module may include more, fewer, or different devices than those in the above embodiments, or may use a different circuit diagram than those in the above embodiments. This application does not limit this.
[0079] In other embodiments, power supply U1 and power supply U2 may also be provided by two different batteries, which is not limited herein.
[0080] The following describes the voltage changes provided by power switch K1 to the PPG module before and after the signal output from the CPU to power switch K1 is switched.
[0081] like Figure 2B As shown, the horizontal axis represents time, and the vertical axis represents voltage value. During the time interval from t1 to t2, the CPU can send signal 1 to power switch K1 via the bus; during the time interval from t3 to t4, the CPU can send signal 2 to power switch K1 via the bus. The voltage of signal 1 is higher than the voltage of signal 2.
[0082] During the time interval from time t1 to time t2, power switch K1 can receive and respond to signal 1, outputting a voltage of +5.0V through out1, while out2 does not output. During the time interval from time t3 to time t4, power switch K1 can receive and respond to signal 2, outputting a voltage of +3.6V through out2, while out1 does not output.
[0083] In this way, power switch K1 can switch the power supply for the PPG module based on the signal output by the CPU.
[0084] Understandable, Figure 2B The embodiment shown is just an example. In some embodiments of this application, the voltage of signal 2 may be greater than the voltage of signal 1. In other embodiments, signal 1 and signal 2 may be distinguished by other parameters. This application does not limit this.
[0085] The following describes the flow of a business execution method provided in an embodiment of this application.
[0086] like Figure 3 As shown, the specific process of a business execution method provided in this application embodiment may include the following steps:
[0087] S301, when the PPG module is not powered on, the electronic device 100 detects that the execution conditions of service 1 are met. Service 1 is the service executed by the electronic device 100 through the PPG module.
[0088] The PPG module refers to the PPG module in the electronic device 100, i.e., the one mentioned above. Figure 1B The PPG module 195 is shown. "PPG module not powered" means that electronic device 100 is not supplying power to the PPG module.
[0089] Different services can correspond to different execution conditions, and the electronic device 100 can store the correspondence between different services and execution conditions. For example, if service 1 is a wearable monitoring service, the execution condition for service 1 could be that the electronic device 100 is powered on; if service 1 is a sleep monitoring service, the execution condition for service 1 could be that the electronic device 100 receives an operation from the user to enable sleep monitoring within the sports and health application. As another example, if service 1 is a heart rate monitoring service, the execution condition for service 1 could be receiving an operation from the user to enable heart rate monitoring, or it could be detecting that the electronic device 100 is powered on and in intelligent heart rate monitoring mode, etc. It is understood that the embodiments here are merely examples. In the embodiments of this application, service 1 can also be a different service from the above embodiments, and the execution conditions of service 1 can also be different from the above embodiments. This application does not limit the scope of the application.
[0090] When the execution conditions of Service 1 are detected to be met, the electronic device 100 may execute the following step S302.
[0091] S302, Electronic device 100 determines whether service 1 needs to use the green device in the PPG module.
[0092] In some embodiments, the electronic device 100 may store a correspondence between services and devices in the PPG module required by the services.
[0093] For example, Table 1 shows the correspondence between a service and the devices required for the service provided in an embodiment of this application.
[0094] Table 1
[0095] Business Name Required components in the PPG module Wearable monitoring IR devices Sleep monitoring IR devices Blood oxygen monitoring green devices Breathing training green devices
[0096] As shown in Table 1, the devices required in the PPG module may differ when the electronic device 100 performs different services through the PPG module. For example, when the electronic device 100 performs wearable monitoring or sleep monitoring services, only the IR device in the PPG module needs to be used; when the electronic device 100 performs blood oxygen monitoring or breathing training services, only the green device in the PPG module needs to be used.
[0097] It is understood that the embodiments shown in Table 1 are merely examples. In the embodiments of this application, the services that the electronic device 100 can perform may include more, fewer, or different services than those in the above embodiments, and this application does not limit them here.
[0098] Electronic device 100 can determine whether service 1 needs to use the green device in the PPG module based on the correspondence between the service and the device in the PPG module required by the service.
[0099] If the devices in the PPG module required for performing service 1 include IR devices but not green devices, then electronic device 100 can perform the following step S305 to configure power supply 2 for the PPG module.
[0100] In some embodiments, if the devices in the PPG module required for performing service 1 include green devices, the electronic device 100 may perform the following step S304 to configure power supply 1 for the PPG module.
[0101] In some other embodiments, if the devices in the PPG module required to perform service 1 include green devices, then electronic device 100 may also perform the following step S303.
[0102] S303, Electronic device 100 determines whether the execution count of service 1 is a single instance.
[0103] Step S303 is an optional step.
[0104] The number of times a service can be executed can be single or multiple. The number of executions indicates whether the service ends after a single execution. If the number of executions is single, the electronic device 100 can end the service after a single execution once the execution conditions are detected. If the number of executions is multiple, the electronic device 100 can execute the service multiple times after the execution conditions are detected.
[0105] In some embodiments, the electronic device 100 may store a correspondence between service names and the number of times a service is executed. For example, the wearable monitoring service is executed multiple times, while the breathing training service is executed once. After detecting that the execution conditions of a service are met, the electronic device 100 may determine whether the number of times the service is executed is once based on the service name.
[0106] In some embodiments, service 1 may correspond to different execution conditions, including execution condition 1 and execution condition 2. When execution condition 1 is met, service 1 may be executed multiple times; when execution condition 2 is met, service 1 may be executed only once. In this case, electronic device 100 may store the correspondence between service name, execution condition, and execution count.
[0107] For example, Table 2 shows the correspondence between a service name, execution conditions and execution count stored in electronic device 100.
[0108] Table 2
[0109] Business Name Execution conditions Execution count Heart rate monitoring Enable intelligent heart rate monitoring mode repeatedly Heart rate monitoring Received user's request to measure heart rate single
[0110] As shown in Table 2, the electronic device 100 can store the correspondence between service name, execution conditions, and execution count. For example, activating the intelligent heart rate monitoring mode and receiving a user's heart rate measurement operation can both trigger the electronic device 100 to execute the heart rate monitoring service. Specifically, when the intelligent heart rate monitoring mode is activated, the heart rate monitoring service can be executed multiple times; when a user's heart rate measurement operation is received, the heart rate monitoring service can be executed only once.
[0111] It is understood that Table 2 is just an example. In the embodiments of this application, the electronic device 100 may also store more, fewer, or different service names, execution conditions, and correspondences with the number of executions from the above embodiments. This application does not limit these information.
[0112] The electronic device 100 can determine whether the execution count of the service 1 to be executed is a single time based on the correspondence between the execution conditions and the number of executions of the stored service 1, as well as the execution conditions detected in step S301.
[0113] If the execution of service 1 is a single occurrence, then electronic device 100 may execute the following step S304.
[0114] If the number of times service 1 is executed is not a single time, then electronic device 100 can execute the following step S305.
[0115] S304, Electronic device 100 configures power supply 1 for PPG module.
[0116] The voltage of power supply 1 is higher than that of power supply 2. In some embodiments, power supply 1 may be a constant voltage power supply (e.g., a 5V constant voltage power supply), and power supply 2 may be a low voltage power supply (e.g., a dynamic low voltage power supply from 3.6V to 4.2V).
[0117] In some embodiments, power source 1 and power source 2 may be two power sources supplied by the same battery in electronic device 100. For example, power source 1 may be as described above. Figure 2A In the illustrated embodiment, power supply U1 and power supply 2 can be as described above. Figure 2A The power supply U2 in the illustrated embodiment. In some embodiments, the voltage of power supply 2 can be the same as the battery voltage of electronic device 100, which can power multiple devices such as the processor in electronic device 100. Moreover, the voltage of power supply 2 will dynamically change according to the battery level. For example, when the battery level is 100%, the voltage supplied by power supply 2 to the PPG module is 4.2V; when the battery level is almost depleted, the voltage supplied by power supply 2 to the PPG module is 3.6V, and so on. Power supply 1 can power devices such as the PPG module and the NFC module.
[0118] In other embodiments, power source 1 and power source 2 may also be two independent power sources, such as power sources provided by two different batteries in electronic device 100.
[0119] Figure 4A This paper illustrates a flowchart of how an electronic device 100 configures a power supply 1 for a PPG module according to an embodiment of this application.
[0120] like Figure 4A As shown, electronic device 100 may include a central processing unit (CPU), general-purpose input / output (GPIO), a power switch, power supply 1, power supply 2, and a PPG module. During the process of electronic device 100 configuring power supply 1 for the PPG module, the specific interaction flow between the various devices may include the following steps:
[0121] S401a, the central processing unit sends instruction 1 to GPIO, instruction 1 is used to instruct GPIO to output signal 1.
[0122] S402a, GPIO outputs signal 1 to the power switch. Signal 1 is used to instruct the power switch to set the power supply of the PPG module to power supply 1.
[0123] S403a, the power switch sets the power supply of the PPG module to power supply 1.
[0124] S404a, Power Supply 1 supplies power to the PPG module.
[0125] It should be noted that, Figure 4A In the illustrated embodiment, the circuit connections between the CPU, power switch, power supply 1, power supply 2, and PPG module of the electronic device 100 can refer to the above description. Figure 2A The relevant descriptions in the illustrated embodiments.
[0126] S305, Electronic device 100 provides power supply 2 for PPG module.
[0127] Figure 4B This paper illustrates a flowchart of how an electronic device 100 configures a power supply 2 for a PPG module according to an embodiment of this application.
[0128] like Figure 4B As shown, electronic device 100 may include a central processing unit (CPU), general-purpose input / output (GPIO), a power switch, power supply 1, power supply 2, and a PPG module. During the process of electronic device 100 configuring power supply 2 for the PPG module, the specific interaction process between the various devices may include the following steps:
[0129] S401b, the central processing unit sends instruction 2 to GPIO, instruction 2 is used to instruct GPIO to output signal 2.
[0130] S402b, GPIO outputs signal 2 to the power switch. Signal 2 is used to instruct the power switch to set the power supply of the PPG module to power supply 2.
[0131] S403b, the power switch sets the power supply for the PPG module to power supply 2.
[0132] S404b, Power Supply 2 supplies power to the PPG module.
[0133] It should be noted that, Figure 4B In the illustrated embodiment, the circuit connections between the CPU, power switch, power supply 1, power supply 2, and PPG module of the electronic device 100 can refer to the above description. Figure 2A The relevant descriptions in the illustrated embodiments.
[0134] S306, Electronic device 100 executes service 1 through PPG module and determines the monitoring result of service 1.
[0135] In this embodiment, the electronic device 100 executes service 1 through the PPG module, which means that it collects raw data related to service 1 through the PPG module. Determining the monitoring result of service 1 means that the CPU of the electronic device 100 uses the stored algorithms related to service 1 to determine the monitoring result of service 1 based on the raw data of service 1.
[0136] If Service 1 is executed multiple times, the electronic device 100 can execute Service 1 multiple times through the PPG module after the PPG module is powered on, and determine the monitoring result of the monitoring after each execution.
[0137] If Service 1 is executed only once, the electronic device 100 can execute Service 1 once through the PPG module after the PPG module is powered on, and determine the monitoring result of Service 1.
[0138] After obtaining the monitoring results of Service 1, the electronic device 100 can store the monitoring results of Service 1 and output the monitoring results of Service 1 when the output conditions of Service 1 are met (e.g., detecting that a user has viewed the monitoring results of Service 1, or detecting that the current time is the preset output time, etc.).
[0139] Using the service execution method provided in this application, electronic device 100 can configure a low-voltage power supply for the PPG module when only IR devices are needed, thus saving power consumption. Optionally, electronic device 100 can also configure a low-voltage power supply for the PPG module when the executed service is a background, always-on service, thereby saving power consumption. This improves the battery life of electronic device 100.
[0140] In some embodiments, when configuring power to the PPG module, the electronic device 100 may fail to configure the power supply due to reasons such as internal instruction execution errors, water ingress, or damage to some components. In the event of a power configuration failure, the electronic device 100 can perform multiple power configurations or configure another power supply for the PPG module.
[0141] For example, Figure 5 This paper illustrates a flowchart of a method for configuring power and performing services for a PPG module using an electronic device 100 provided in an embodiment of this application.
[0142] like Figure 5 As shown, when the PPG module is not powered on and the execution conditions of Service 1 are met, the specific process by which electronic device 100 configures power to the PPG module and executes Service 1 may include the following steps:
[0143] S501, Electronic device 100 configures power supply 1 for PPG module based on service 1.
[0144] If the execution conditions of Service 1 are met, the electronic device 100 can determine the power supply configured for the PPG module based on Service 1. After determining that the power supply configured for Service 1 is Power Supply 1, the electronic device 100 can configure Power Supply 1 for the PPG module. The execution conditions of Service 1 and the specific steps for determining the configured power supply based on Service 1 can be found above. Figure 3 The relevant steps in the illustrated embodiment. The method by which electronic device 100 configures power supply 1 for the PPG module can be referred to the above. Figure 4A The relevant steps in the illustrated embodiment.
[0145] S502, Electronic device 100 determines whether the configuration of power supply 1 is successful.
[0146] A configuration failure of Power Supply 1 means that during the configuration process of Power Supply 1, the CPU (or MCU) receives an error reported by the device. In this case, Power Supply 1 cannot supply power to the PPG module, and the PPG module fails to power on.
[0147] Power configuration failure can be caused by either software or hardware errors. Software errors refer to errors in instruction execution during the power configuration process, such as failures due to incomplete configuration of other related modules. Hardware errors refer to errors in instruction execution during the initialization process of the power supply and related components such as the PPG module by electronic device 100 after power configuration, caused by hardware problems (such as hardware manufacturing defects or hardware damage). For example, if the hardware manufacturing process of some components is inadequate, there is a certain probability (e.g., one in a thousand) that instruction execution will fail during initialization. Similarly, if electronic device 100 is exposed to water or some related components are damaged, the instructions during initialization will also fail.
[0148] Regardless of whether a hardware error or a software error occurs, in the event of a power supply 1 configuration failure, the CPU (or MCU) of the electronic device 100 can receive the error code reported by the device, and the electronic device 100 can determine whether the power supply 1 configuration has failed based on whether the error code has been received.
[0149] If the electronic device 100 determines that the power supply 1 is configured successfully, the electronic device 100 may perform the following step S503.
[0150] If the electronic device 100 determines that the power supply 1 configuration has failed, the electronic device 100 may perform the following step S504.
[0151] S503, when power is supplied to the PPG module through power supply 1, electronic device 100 executes service 1 through the PPG module and determines the monitoring result of service 1.
[0152] Thus, with power supply 1 successfully configured, electronic device 100 can execute service 1 through the PPG module and determine the monitoring results of service 1.
[0153] S504, Electronic device 100 determines whether the number of configuration failures of power supply 1 is greater than threshold 1.
[0154] Threshold 1 can be a preset number of times, such as 3 or 5 times.
[0155] If the number of configuration failures of power supply 1 is less than or equal to threshold 1, electronic device 100 may perform the following step S505.
[0156] If the number of configuration failures of power supply 1 exceeds the threshold 1, electronic device 100 may perform the following step S506.
[0157] S505, Electronic device 100 reconfigures power supply 1 for PPG module.
[0158] After executing step S505, the electronic device 100 can execute the above step S502 to determine whether the configuration of the power supply 1 is successful.
[0159] S506, Electronic device 100 configures power supply 2 for PPG module.
[0160] The specific steps for configuring power supply 2 for PPG module in electronic device 100 can be found above. Figure 4B The relevant steps of the illustrated embodiment.
[0161] S507, Electronic device 100 determines whether the configuration of power supply 2 is successful.
[0162] The method by which electronic device 100 determines whether power supply 2 has been successfully configured can refer to the method for determining whether power supply 1 has been successfully configured in step S502 above.
[0163] If the electronic device 100 determines that the power supply 2 is configured successfully, the electronic device 100 may perform the following step S508.
[0164] If electronic device 100 determines that power supply 2 configuration has failed, electronic device 100 may perform the following step S509.
[0165] S508, when power is supplied to the PPG module through power supply 2, electronic device 100 executes service 1 through the PPG module and determines the monitoring result of service 1.
[0166] Thus, with power supply 2 successfully configured, electronic device 100 can execute service 1 through the PPG module and determine the monitoring results of service 1.
[0167] S509, Electronic device 100 determines whether the number of configuration failures of power supply 2 is greater than threshold 1.
[0168] If the number of configuration failures of power supply 1 is less than or equal to threshold 1, electronic device 100 can perform the above step S506.
[0169] If the number of configuration failures of power supply 1 exceeds the threshold 1, electronic device 100 may perform the following step S510.
[0170] S510, Electronic device 100 outputs a failure message, which is used to notify the user that service 1 has failed to execute.
[0171] Failure notifications can be displayed using one or more methods, such as text, images, animations, vibrations, and sounds.
[0172] In some embodiments, the failure message can also be used to prompt the user to remeasure, or to prompt the user to tighten the strap and remeasure.
[0173] In some embodiments, after outputting a failure message, the electronic device 100 may receive and respond to the user's remeasurement operation, reconfigure the power supply to the PPG module, and execute service 1.
[0174] Using the service execution method provided in this application embodiment, in the event of a power configuration failure, the electronic device 100 can temporarily configure another power supply for the PPG module to ensure the normal execution of services and avoid affecting the user's use.
[0175] Understandable, Figure 5 The illustrated embodiments are merely illustrative. In the event of a PPG module power configuration failure, the electronic device 100 can configure another power source for the PPG module. In this embodiment, if the power source corresponding to service 1 is power source 2, and power source 2 configuration fails, the electronic device 100 can also configure power source 1 for the PPG module. For details, please refer to [reference needed]. Figure 5 The steps described in the illustrated embodiments are not limited herein.
[0176] In some embodiments, after power configuration is completed, if the power supply configured by electronic device 100 for the PPG module does not match service 1, electronic device 100 can, after detecting that the execution conditions of another service (e.g., service 2) are met, re-determine whether to switch the power supply of the PPG module based on service 2. For example, if executing service 1 requires the use of an IR device but not a green device, and after power configuration is completed, electronic device 100 configures the power supply of the PPG module as power supply 1, then electronic device 100 can, after detecting that the execution conditions of another service (e.g., service 2) are met, re-determine whether to switch the power supply of the PPG module based on service 2. It should be noted that the matching relationship between service and power supply can be referred to the above. Figure 3 Or the following Figure 6 The relevant description in step S602 is shown.
[0177] In other embodiments, after the power configuration is completed, if the power configured by the electronic device 100 for the PPG module does not match service 1, and service 1 is executed multiple times, the electronic device 100 may switch the power of the PPG module again based on service 1 the next time service 1 is executed (or when the time since the last power configuration is detected to be greater than a preset time).
[0178] The following describes a method flow for an electronic device 100 to perform service 1 when the PPG module is powered on, provided by an embodiment of this application.
[0179] like Figure 6 As shown, when the PPG module is powered on, the specific process of electronic device 100 executing service 1 may include the following steps:
[0180] S601, when the PPG module is powered on, the electronic device 100 detects that the execution conditions of service 1 are met.
[0181] Electronic device 100 needs to use the PPG module when performing business 1.
[0182] The execution conditions for business 1 can be referred to the above. Figure 3 The relevant content in step S301 shown.
[0183] S602, Electronic device 100 determines whether the power supply matched by service 1 is power supply 2.
[0184] For details regarding power supply 1 and power supply 2, please refer to the relevant descriptions in the above embodiments.
[0185] In some embodiments, the electronic device 100 determines whether the power supply matched for service 1 is power supply 1 based on whether service 1 requires the use of the green device in the PPG module. If service 1 requires the use of the green device in the PPG module, then the power supply matched for service 1 is determined to be power supply 1; if service 1 requires the use of the IR device in the PPG module and does not require the use of the green device, then the power supply matched for service 1 is determined to be power supply 2.
[0186] In other embodiments, the electronic device 100 may also determine the power supply matched for service 1 based on the devices in the PPG module used to perform service 1 and whether service 1 is performed only once. If performing service 1 requires the use of IR devices in the PPG module but does not require the use of green devices, then the power supply matched for service 1 is determined to be power supply 2; if performing service 1 requires the use of green devices in the PPG module and service 1 is performed only once, then the power supply matched for service 1 is determined to be power supply 1; if performing service 1 requires the use of green devices in the PPG module and service 1 is performed multiple times, then the power supply matched for service 1 is determined to be power supply 2. The method for determining whether the execution count of service 1 is performed only once can be referred to the above. Figure 3 The relevant descriptions in the illustrated embodiments will not be repeated here.
[0187] If the power supply matched with service 1 is power supply 2, then electronic device 100 can perform the following step S603.
[0188] If the power supply matched for service 1 is not power supply 2, then electronic device 100 can perform the following step S608.
[0189] S603, Electronic device 100 determines whether there is a service 2 that requires the use of the PPG module.
[0190] Business 2 refers to business that is about to be executed or is currently being executed.
[0191] If there is a service 2 that requires the use of the PPG module, the electronic device 100 can perform the following step S604.
[0192] If there is no service 2 that requires the use of the PPG module, the electronic device 100 can perform the following step S605.
[0193] S604, Electronic device 100 determines whether the power supply matched by service 2 is power supply 2.
[0194] The specific method by which electronic device 100 determines the power supply matched to service 2 can be found in the relevant content of step S602 above.
[0195] If the power supply matched with service 2 is power supply 2, then electronic device 100 can perform the following step S605.
[0196] If the power supply matched for service 2 is not power supply 2, then electronic device 100 can perform the following step S608.
[0197] S605, Electronic device 100 determines whether the current power supply for the PPG module is power supply 2.
[0198] If the power supply currently powering the PPG module is not power supply 2, then electronic device 100 can perform the following step S606.
[0199] If the current power supply for the PPG module is power supply 2, then electronic device 100 can perform the following step S607.
[0200] S606, Electronic device 100 switches the power supply of the PPG module to power supply 2.
[0201] S607, when power is supplied to the PPG module via power supply 2, electronic device 100 performs service 1.
[0202] If there are other services that need to be executed through the PPG module at this time, the electronic device 100 can also execute these services during the execution of service 1.
[0203] S608, Electronic device 100 determines whether the current power supply is power supply 1.
[0204] If the power supply currently powering the PPG module is not power supply 1, then electronic device 100 can perform the following step S609.
[0205] If the current power supply for the PPG module is power supply 1, then the electronic device 100 can perform the following step S610.
[0206] S609, Electronic device 100 switches the power supply of the PPG module to power supply 1.
[0207] S610, when power is supplied to the PPG module via power supply 1, electronic device 100 performs service 1.
[0208] If there are other services that need to be executed through the PPG module at this time, the electronic device 100 can also execute these services during the execution of service 1.
[0209] The following describes the software architecture of an electronic device 100 provided in an embodiment of this application.
[0210] For example, such as Figure 7As shown, the software system of electronic device 100 can adopt a layered architecture, which divides the software into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the software architecture of electronic device 100 may include four layers, from top to bottom: the application layer, the application framework layer, the runtime and system libraries, and the kernel layer.
[0211] The application layer can include a series of application packages, such as sports and health, gallery, calendar, map, navigation, Bluetooth, music, and SMS applications.
[0212] The application framework layer can include business modules, which may include device configuration modules, power configuration modules, and algorithm modules. The application framework layer may also include a window manager, content providers, a view system, a resource manager, a notification manager, etc.
[0213] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.
[0214] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.
[0215] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.
[0216] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.
[0217] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.
[0218] The runtime includes the core libraries and the virtual machine. The runtime is responsible for the scheduling and management of the operating system.
[0219] The core library consists of two parts: one part is the functionalities that the Java language needs to call, and the other part is the core library of the operating system (such as Android).
[0220] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0221] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.
[0222] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.
[0223] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
[0224] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0225] A 2D graphics engine is a graphics engine for 2D drawing.
[0226] The kernel layer is the layer between hardware and software. The kernel layer can contain driver modules, which can include one or more drivers, such as display drivers, audio drivers, sensor drivers, hardware I / O management modules, etc.
[0227] The software modules of electronic device 100 can interact with the hardware modules of electronic device 100 through the kernel layer. The hardware modules of electronic device 100 may include a power switch, power supply 1, power supply 2, and PPG module, etc.
[0228] When the business execution method provided in the embodiments of this application is executed, the sports and health application (hereinafter referred to as the application and health application) in the application layer can receive and respond to the user's operation, determine the business 1 to be executed, and send the business execution instruction to the business module. The business execution instruction instructs the business module to configure the devices to be used in the PPG module and the power supply to power the PPG module based on the business 1.
[0229] The business module in the application framework layer can receive business execution instructions sent by the sports and health application. After receiving these instructions, the device configuration module within the business module can determine the devices in the PPG module required for executing business 1 and send configuration instructions to the sensor driver in the kernel layer. These configuration instructions can include the devices in the PPG module required for business 1 and instruct the sensor driver to configure the required devices in the PPG module. The device configuration module can also determine the devices in the PPG module required for business 1, and optionally, whether business 1 is executed only once. The device configuration module can then send the determination result to the power configuration module. The power configuration module can determine the power supply configured for the PPG module based on the determination result sent by the device configuration module. For example, if business 1 requires the use of the IR device in the PPG module but does not require the green device, the power configuration module will configure power supply 2 for the PPG module; if business 1 requires the use of the green device in the PPG module, the power configuration module will configure power supply 1 for the PPG module, and so on. After determining the power supply configured for the PPG module, the power configuration module can send a power configuration command to the hardware I / O management module in the kernel layer. This command instructs the hardware I / O management module to configure the specified power supply for the PPG module. The algorithm module can store algorithms for one or more services, such as sleep monitoring, wearability monitoring, and heart rate monitoring algorithms. The algorithm module can receive data from service 1 sent by the sensor driver and, based on this data, use the algorithm for service 1 to determine the monitoring result of service 1.
[0230] The sensor driver in the kernel layer can receive and respond to configuration commands sent by the device configuration module to configure the devices required in the PPG module. The sensor driver can also receive data for Service 1 sent by the PPG module and send the data to the algorithm module. The hardware I / O management module can receive and respond to power configuration commands sent by the power configuration module to configure the power supply specified in the power configuration command for the PPG module. In some embodiments, if the power configuration command instructs the hardware I / O management module to configure power supply 1 for the PPG module, the hardware I / O management module can send a high-level signal to the power switch; if the power configuration command instructs the hardware I / O management module to configure power supply 2 for the PPG module, the hardware I / O management module can send a low-level signal to the power switch, and so on. The hardware I / O management module can be as described above. Figure 4A and Figure 4B GPIO in the illustrated embodiment.
[0231] Understandable Figure 7 The illustrated embodiment is merely an example. In the embodiments of this application, the software architecture of the electronic device 100 may also include more, fewer, or more [specific elements]. Figure 7 The embodiments shown may use different modules, or combine some modules, or split some modules, or use different module arrangements, etc., which are not limited in this application.
[0232] Figure 8 A flowchart illustrating a business execution method provided in an embodiment of this application is shown.
[0233] like Figure 8 As shown, the specific process of the business execution method may include the following steps:
[0234] S801, when electronic device 100 performs the first service, electronic device 100 controls the power controller to provide a first voltage to PPG module.
[0235] The first business could be as described above. Figure 3 The illustrated embodiment requires the use of green devices in the PPG module for its services.
[0236] In some embodiments, the first service may be as described above. Figure 3 The embodiment shown requires the use of the green device in the PPG module, and the service is executed only once.
[0237] The first voltage can be the voltage of power supply 1 in the above embodiment.
[0238] The power controller can be the power switch in the above embodiments.
[0239] S802, Electronic device 100 control processor sends the first control signal to PPG module.
[0240] The first control signal can be used to control the PPG module to turn on the green device.
[0241] S803, Electronic device 100 controls the PPG module to turn on the green light device in response to the first control signal.
[0242] S804, when the electronic device 100 performs the second service, controls the power controller to provide a second voltage to the PPG module.
[0243] The second business can be as described above. Figure 3 The illustrated embodiment does not require the use of the green device in the PPG module, but requires the use of the IR device for the service.
[0244] The second voltage can be the voltage of power supply 2 in the above embodiment.
[0245] S805, Electronic Device 100 control processor sends a second control signal to PPG module.
[0246] The first control signal can be used to control the PPG module to turn on the IR device.
[0247] S806, Electronic device 100 controls the PPG module to activate the infrared device in response to the second control signal.
[0248] By using the business execution method provided in this application, a lower voltage can be provided to the PPG module without using the green light device in the PPG module, thereby reducing the power consumption of the PPG module and improving the battery life of the electronic device.
[0249] In one possible implementation, the electronic device further includes a first circuit and a second circuit; the first circuit is used to convert the battery voltage into a first voltage; the first circuit is also used to provide the first voltage to a power controller; the second circuit is used to convert the battery voltage into a second voltage; the second circuit is also used to provide the second voltage to the power controller; controlling the power controller to provide the first voltage to the PPG module specifically includes: controlling the processor to send a first signal to the power controller; controlling the power controller to provide the first voltage to the PPG module in response to the first signal; controlling the power controller to provide the second voltage to the PPG module specifically includes: controlling the processor to send a second signal to the power controller; controlling the power controller to provide the second voltage to the PPG module in response to the second signal.
[0250] In this way, two different voltages can be provided by one battery.
[0251] After being converted by the circuit, the voltage can be the same as that of the battery or a different voltage.
[0252] In this embodiment, the first signal may be signal 1 in the above embodiment.
[0253] In one possible implementation, the first circuit includes a boost device and the second circuit includes a voltage regulator.
[0254] In this way, a first voltage higher than the battery voltage can be obtained through a boost device, and a second voltage that is the same as or close to the battery voltage can be obtained through a voltage regulator.
[0255] In one possible implementation, the electronic device further includes a first battery and a second battery; the first battery is used to provide a first voltage to the power controller; the second battery is used to provide a second voltage to the power controller; controlling the power controller to provide the first voltage to the PPG module specifically includes: controlling the processor to send a first signal to the power controller; controlling the power controller to provide the first voltage to the PPG module in response to the first signal; controlling the power controller to provide the second voltage to the PPG module specifically includes: controlling the processor to send a second signal to the power controller; controlling the power controller to provide the second voltage to the PPG module in response to the second signal.
[0256] In this way, two different voltages can be provided by two batteries respectively.
[0257] In this embodiment, the second signal may be signal 2 in the above embodiment.
[0258] In one possible implementation, the method further includes: determining that the execution count of the first service is a single occurrence before the power controller supplies a first voltage to the PPG module, the execution count indicating whether the service ends after a single occurrence; determining that the execution count of the third service is multiple occurrences when the third service is executed; controlling the power controller to supply a second voltage to the PPG module; controlling the processor to send a first control signal to the PPG module; and controlling the PPG module to turn on the green light device in response to the first control signal.
[0259] Therefore, for services that require the use of green light devices and are executed only once, a higher voltage can be provided to the PPG module during the execution of such services. For services that require the use of green light devices and are executed multiple times, a lower voltage can be provided to the PPG module during the execution of such services.
[0260] In one possible implementation, the method further includes, during the execution of the second service: when the first service is executed, controlling the power controller to switch the input voltage of the PPG module from the second voltage to the first voltage; controlling the processor to send a first control signal to the PPG module; and controlling the PPG module to respond to the first control signal and turn on the green light device.
[0261] In this way, when the PPG module is powered by a low voltage, if there is a service that requires a higher voltage, the input voltage of the PPG module can be switched to a high voltage.
[0262] In one possible implementation, after executing the second service, the method further includes: when executing the first service, if controlling the power controller to supply the first voltage to the PPG module fails, controlling the power controller to supply the second voltage to the PPG module.
[0263] In this way, if the PPG module cannot be powered by the first voltage, it can be powered by the second voltage.
[0264] In one possible implementation, the method further includes, after executing the first service, the method further comprising: when executing the second service, if the control power controller fails to supply a second voltage to the PPG module, controlling the power controller to supply a first voltage to the PPG module.
[0265] In this way, if the PPG module cannot be powered by the second voltage, it can be powered by the first voltage.
[0266] The various embodiments of this application can be combined arbitrarily to achieve different technical effects.
[0267] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0268] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
[0269] In summary, the above description is merely an embodiment of the technical solution of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made according to the disclosure of the present invention should be included within the scope of protection of the present invention.
Claims
1. A business execution method, characterized in that, The method is applied to an electronic device, which includes a processor, a power controller, and a photoplethysmography (PPG) module, wherein the PPG module includes infrared devices and green light devices; the method includes: The execution count of the first service is determined to be a single execution, and the execution count is used to indicate whether the service ends after a single execution. When performing the first service, the power controller is controlled to provide a first voltage to the PPG module; The processor is controlled to send a first control signal to the PPG module; The PPG module is controlled to respond to the first control signal and turn on the green light device; When performing the second service, the power controller is controlled to provide a second voltage to the PPG module; The processor is controlled to send a second control signal to the PPG module; The PPG module is controlled to respond to the second control signal and turn on the infrared device; When executing a third service, the number of times the third service is executed is determined to be multiple. The power controller is controlled to provide a second voltage to the PPG module; The power controller is controlled to send the first control signal to the PPG module; The PPG module is controlled to respond to the first control signal and turn on the green light device; Wherein, the first voltage is higher than the second voltage.
2. The method according to claim 1, characterized in that, The electronic device further includes a first circuit and a second circuit; the first circuit is used to convert the battery voltage into a first voltage; the first circuit is also used to provide the first voltage to the power controller; the second circuit is used to convert the battery voltage into a second voltage; the second circuit is also used to provide the second voltage to the power controller. The control of the power controller to provide a first voltage to the PPG module specifically includes: The processor is controlled to send a first signal to the power controller; The power controller is controlled to respond to the first signal and provide a first voltage to the PPG module; The control of the power controller to provide a second voltage to the PPG module specifically includes: The processor is controlled to send a second signal to the power controller; The power controller is controlled to respond to the second signal and provide a second voltage to the PPG module.
3. The method according to claim 2, characterized in that, The first circuit includes a boost converter, and the second circuit includes a voltage regulator.
4. The method according to claim 1, characterized in that, The electronic device further includes a first battery and a second battery; the first battery is used to provide a first voltage to the power controller; the second battery is used to provide a second voltage to the power controller; The control of the power controller to provide a first voltage to the PPG module specifically includes: The processor is controlled to send a first signal to the power controller; The power controller is controlled to respond to the first signal and provide a first voltage to the PPG module; The control of the power controller to provide a second voltage to the PPG module specifically includes: The processor is controlled to send a second signal to the power controller; The power controller is controlled to respond to the second signal and provide a second voltage to the PPG module.
5. The method according to any one of claims 1-4, characterized in that, In the process of performing the second service, the method further includes: When the first service is executed, the power controller is controlled to switch the input voltage of the PPG module from the second voltage to the first voltage; The processor is controlled to send a first control signal to the PPG module; The PPG module is controlled to respond to the first control signal and turn on the green light device.
6. The method according to any one of claims 1-5, characterized in that, After performing the second service, the method further includes: When performing the first service, if the power controller fails to supply the first voltage to the PPG module, the power controller is controlled to supply the second voltage to the PPG module.
7. The method according to any one of claims 1-6, characterized in that, After performing the first service, the method further includes: When performing the second service, if the power controller fails to supply the second voltage to the PPG module, the power controller is controlled to supply the first voltage to the PPG module.
8. An electronic device, characterized in that, include: One or more processors, one or more memories, and a PPG module; the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, the computer program code including computer instructions, which, when the one or more processors execute the computer instructions, cause the electronic device to perform the method of any one of claims 1-7.
9. A computer-readable storage medium comprising computer instructions, characterized in that, When the computer instructions are executed on the electronic device, the electronic device causes the electronic device to perform the method of any one of claims 1-7.
Citation Information
Patent Citations
PPG control method and device and electronic equipment
CN114983353A
Light-emitting device driving circuit, PPG sensor and electronic equipment
CN115604883A
Method and apparatus for measuring biological condition
US20040193063A1