Sensor control method and electronic equipment

By uniformly scheduling the data acquisition parameters of the sensor, the problem of sensor consumption too fast in multiple application scenarios is solved, and the device battery life is extended.

CN120343674APending Publication Date: 2025-07-18HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410063804.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-16
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

Sensors in electronic devices continue to work when acquiring a variety of health data, resulting in too fast power consumption and affecting the battery life of the device.

Method used

By uniformly scheduling the data acquisition parameters of the sensor, the minimum period, maximum frequency and maximum duration strategy is adopted to reduce the working time and power consumption of the sensor, and realize multiple data sharing.

Benefits of technology

It effectively reduces the working time and power consumption of the sensor and extends the battery life of electronic devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120343674A_ABST
    Figure CN120343674A_ABST
Patent Text Reader

Abstract

The invention provides a sensor control method. The method is applied to electronic equipment. When a plurality of applications need to call a first sensor to collect data, a plurality of data collection parameters of the first sensor to collect data are called according to the plurality of applications, a first parameter is determined, and then the first sensor is called to collect data according to the first parameter. And then, distributing the acquired data to the plurality of applications. Compared with the mode that the first sensor is called by a plurality of applications respectively, the collected data are distributed to all the applications, the number of times that the first sensor is called is reduced, the working duration of the first sensor is shortened, and the effects of reducing power consumption and prolonging the endurance time of the device are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the technical field of terminals, and particularly to a sensor control method and an electronic device. Background Art

[0002] Electronic devices such as smart phones, smart watches, and sports bracelets can rely on sensors to obtain data reflecting the health status of users, such as heart rate, blood oxygen, stress level, body temperature, sleep status, and female menstrual cycle. Users of electronic devices can understand their own health levels and exercise conditions based on these health data, and then reasonably arrange their activities.

[0003] Currently, with the continuous update of electronic devices, the types of health data that can be obtained are becoming more and more abundant. However, the sensors in electronic devices need electrical energy to support normal operation. Moreover, in order to obtain real-time and accurate health data, sensors need to continuously collect data. In the case of a large number of types of health data to be obtained and a high device load, the sensors in the electronic device will always be in a working state, resulting in continuous power consumption of the device and a short battery life of the device. Summary of the Invention

[0004] Embodiments of the present invention provide a sensor control method and an electronic device. Implementing this method can reduce the power consumption of the sensor and improve the battery life of the device.

[0005] In a first aspect, embodiments of the present invention provide a sensor control method. This method is applied to an electronic device and includes: when multiple applications all need to call a first sensor to collect data, obtaining multiple data collection parameters of the multiple applications calling the first sensor to collect data. Determining a first parameter according to the multiple data collection parameters of the multiple applications, and then calling the first sensor to collect data according to the first parameter. Distributing the data collected by the first sensor to the multiple applications.

[0006] Among them, the power consumption of calling the first sensor to collect data according to the first parameter is less than the sum of the power consumptions of calling the first sensor to collect data respectively according to the multiple data collection parameters of the multiple applications.

[0007] For the first sensor, compared with being called multiple times by multiple health applications respectively, when it works according to the corresponding sensor energy-saving parameters, the working duration of the first sensor can be greatly reduced, and the power consumption can also be reduced, thereby improving the battery life of the electronic device.

[0008] In combination with the first aspect, in some embodiments, the multiple data collection parameters of the multiple applications include one or more of the following parameters: period, frequency, duration.

[0009] Combined with the previous embodiment, in some embodiments, to determine the first parameter according to the multiple data acquisition parameters of the multiple applications, specifically including: determining the period parameter in the first parameter according to the period parameters among the multiple data acquisition parameters of the multiple applications; determining the frequency parameter in the first parameter according to the frequency parameters among the multiple data acquisition parameters of the multiple applications; determining the duration parameter in the first parameter according to the duration parameters among the multiple data acquisition parameters of the multiple applications.

[0010] In some embodiments, the period parameter in the first parameter is the minimum value of the periods among the multiple data acquisition parameters of the multiple applications; and / or the frequency parameter in the first parameter is the maximum value of the frequencies among the multiple data acquisition parameters of the multiple applications; and / or the duration parameter in the first parameter is the maximum value of the durations among the multiple data acquisition parameters of the multiple applications.

[0011] Since in the process of data acquisition, the smaller the sampling period of the sensor, the larger the sampling frequency and the longer the sampling duration, the better the real-time performance and accuracy of the data collected by the sensor. Therefore, adopting this strategy to determine the period parameter, frequency parameter and duration parameter in the first parameter can comprehensively improve the real-time performance and accuracy of the data collected by the sensor when it works according to the first parameter subsequently.

[0012] In some embodiments, the period parameter in the first parameter is the maximum value of the period parameters among the multiple data acquisition parameters of the multiple applications; and / or the frequency parameter in the first parameter is the minimum value of the frequency parameters among the multiple data acquisition parameters of the multiple applications; and / or the duration parameter in the first parameter is the minimum value of the duration parameters among the multiple data acquisition parameters of the multiple applications.

[0013] Since in the process of data acquisition, the larger the sampling period of the sensor, the smaller the sampling frequency and the shorter the sampling duration, the less working time and energy consumption of the sensor. Therefore, adopting this strategy to determine the period parameter, frequency parameter and duration parameter in the first parameter can effectively reduce the energy consumption of the sensor when it works according to the first parameter subsequently and improve the battery life of the device.

[0014] In some embodiments, to determine the first parameter according to the multiple data acquisition parameters of the multiple applications, specifically including: determining the first parameter only according to the data acquisition parameters among the multiple data acquisition parameters of the multiple applications whose period is less than or equal to the first value; and / or determining the first parameter only according to the data acquisition parameters among the multiple data acquisition parameters of the multiple applications whose frequency is greater than or equal to the second value; and / or determining the first parameter only according to the data acquisition parameters among the multiple data acquisition parameters of the multiple applications whose duration is greater than or equal to the third value.

[0015] Since the real-time requirements of some applications are not high, the period parameter in the data acquisition parameters of these applications may be large, the frequency parameter may be small, and the duration parameter may be small. Based on the above strategy, the interference of the data acquisition parameters of these applications with low real-time requirements on the first parameter can be reduced, preventing the finally determined first parameter from not meeting the real-time and accuracy requirements of all applications that need to call the first sensor.

[0016] In some embodiments, distributing the data collected by the first sensor to the multiple applications includes: distributing the data collected by the first sensor to the applications among the multiple applications whose period in the data acquisition parameters is less than or equal to a first value, and / or, the frequency among the data acquisition parameters of the multiple applications is greater than or equal to a second value, and / or, the duration among the data acquisition parameters of the multiple applications is greater than or equal to a third value.

[0017] In combination with the first aspect, in some embodiments, the method further includes: in response to enabling the power-saving mode, obtaining the identifiers of the sensors required to be called by each application. According to the identifiers of the sensors required to be called by each of the above applications, determining whether there are multiple applications that all need to call the first sensor to collect data.

[0018] In combination with the first aspect, in some embodiments, the method further includes: when detecting that several applications are running, obtaining the identifiers of the sensors required to be called by each of the several applications. According to the identifiers of the sensors required to be called by each of the several applications, determining whether there are multiple applications that all need to call the first sensor to collect data.

[0019] In combination with the first aspect, in some embodiments, the identifier of the sensor required to be called by the first application includes the identifier of the first sensor. In response to running the first application, obtaining the identifiers of the sensors required to be called by each application. According to the identifiers of the sensors required to be called by each of the above applications, determining whether there are multiple applications that all need to call the first sensor to collect data.

[0020] In combination with the first aspect, in some embodiments, when multiple applications all need to call the first sensor to collect data, obtaining the multiple data acquisition parameters for the multiple applications to call the first sensor to collect data specifically includes: when the first sensor includes multiple acquisition modes, respectively determining the data acquisition parameters corresponding to each acquisition mode in the multiple acquisition modes.

[0021] In combination with the first aspect, in some embodiments, the first sensor may be a sensor inside the electronic device. In other embodiments, the first sensor may be a sensor outside the electronic device.

[0022] In combination with the first aspect, in some embodiments, the electronic device can be implemented as a terminal device, such as a smart watch, a smart bracelet, etc. In some other embodiments, the electronic device can also be implemented as a server.

[0023] In the second aspect, an embodiment of the present application provides a sensor control method. The method is applied to an electronic device and includes: when the electronic device is in a power-saving mode, acquiring first data according to a first parameter, where the first parameter is determined according to a second parameter and a third parameter, the second parameter is a default parameter for a first application to acquire second data, the third parameter is a default parameter for a second application to acquire third data, and the first data, the second data, and the third data are all data acquired by a first sensor.

[0024] Among them, the power consumption of acquiring the first data is less than the sum of the power consumption of the first application acquiring the second data and the second application acquiring the third data.

[0025] By adopting this method, the electronic device compresses the original two acquisition processes into one acquisition process, reducing the power, and thus improving the battery life of the electronic device.

[0026] In combination with the second aspect, in some embodiments, the first parameter, the second parameter, and the third parameter include one or more of the following parameters: period, frequency, duration.

[0027] In combination with the previous embodiment, in some embodiments, before acquiring the first data according to the first parameter, the method further includes: obtaining the second parameter corresponding to the first application and the third parameter corresponding to the second application. Determining the first parameter according to the second parameter and the third parameter.

[0028] In some embodiments, determining the first parameter according to the second parameter and the third parameter specifically includes: determining the period parameter in the first parameter according to the period parameter in the second parameter and the period parameter in the third parameter; and / or determining the frequency parameter in the first parameter according to the frequency parameter in the second parameter and the frequency parameter in the third parameter; and / or determining the duration parameter in the first parameter according to the duration parameter in the second parameter and the duration parameter in the third parameter.

[0029] In some embodiments, the period parameter in the first parameter is the smaller value of the period parameter in the second parameter and the period parameter in the third parameter; and / or the frequency parameter in the first parameter is the larger value of the frequency parameter in the second parameter and the frequency parameter in the third parameter; and / or the duration parameter in the first parameter is the larger value of the duration parameter in the second parameter and the duration parameter in the third parameter.

[0030] Since during the data acquisition process, the smaller the sampling period of the sensor, the larger the sampling frequency and the longer the sampling duration, the better the real-time performance and accuracy of the data collected by the sensor. Therefore, using this strategy to determine the period parameter, frequency parameter, and duration parameter in the first parameter can overall improve the real-time performance and accuracy of the data collected by the sensor when it operates according to the first parameter subsequently.

[0031] In some embodiments, the period parameter in the first parameter is the larger value of the period parameter in the second parameter and the period parameter in the third parameter; and / or the frequency parameter in the first parameter is the smaller value of the frequency parameter in the second parameter and the frequency parameter in the third parameter; and / or the duration parameter in the first parameter is the smaller value of the duration parameter in the second parameter and the duration parameter in the third parameter.

[0032] Since during the data acquisition process, the larger the sampling period of the sensor, the smaller the sampling frequency and the shorter the sampling duration, the less working time and energy consumption of the sensor. Therefore, using this strategy to determine the period parameter, frequency parameter, and duration parameter in the first parameter can effectively reduce the energy consumption of the sensor when it operates according to the first parameter subsequently and improve the battery life of the device.

[0033] In some embodiments, the period parameter in the second parameter and the period parameter in the third parameter are both less than the first value; and / or the frequency parameter in the second parameter and the frequency parameter in the third parameter are both greater than the second value; and / or the duration parameter in the second parameter and the duration parameter in the third parameter are both greater than the third value.

[0034] Since the real-time requirements of some applications are not high, the period parameter in the data acquisition parameters of these applications may be larger, the frequency parameter may be smaller, and the duration parameter may be smaller. Based on the above strategy, it is possible to reduce the interference of the data acquisition parameters of these applications with low real-time requirements on the first parameter and prevent the finally determined first parameter from not meeting the real-time and accuracy requirements of all applications that need to call the first sensor.

[0035] In combination with the second aspect, in some embodiments, the operating states of the above-mentioned sensors include a first state and a second state. When the above-mentioned electronic device collects the above-mentioned first data, second data, and third data, the above-mentioned first sensor is in the above-mentioned first state.

[0036] In some embodiments, the above-mentioned first state is the state where the electronic device is in the power-saving mode, and the second state is the state where the electronic device is in the intelligent mode.

[0037] In some other embodiments, the above-mentioned first state is the state where the electronic device is running the first application and the second application simultaneously, and the second state is the state where the electronic device is running only the first application or only the second application.

[0038] In a third aspect, an embodiment of the present application provides an electronic device, which includes a memory, a processor, and a sensor. The memory is used to store a computer program, and the processor is used to call the computer program so that the electronic device executes the method of the first aspect or the method of the second aspect.

[0039] In a fourth aspect, an embodiment of the present application provides a computer program product containing instructions. When the computer program product runs on an electronic device, it causes the above-mentioned electronic device to execute the method of the first aspect or the method of the second aspect.

[0040] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, including instructions. When the above-mentioned instructions run on an electronic device, it causes the above-mentioned electronic device to execute the method of the first aspect or the method of the second aspect. Description of the Drawings

[0041] Figure 1 It is a schematic diagram of a sensor control method provided by an embodiment of the present invention;

[0042] Figure 2 It is a schematic structural diagram of the electronic device 100 provided by an embodiment of the present invention;

[0043] Figure 3A It is a software structure block diagram of an electronic device 100 provided by an embodiment of the present invention;

[0044] Figure 3B It is another software structure block diagram of the electronic device 100 provided by an embodiment of the present invention;

[0045] Figures 4A to 4F It is a schematic diagram of a scenario where some electronic devices 100 provided by an embodiment of the present invention turn on the power-saving mode;

[0046] Figures 5A to 5DSchematic diagram of a scenario where some electronic devices 100 provided in an embodiment of the present invention turn on an intelligent energy-saving mode for data collection;

[0047] Figure 6 Schematic flowchart of a sensor control method provided in an embodiment of the present invention;

[0048] Figure 7A Shows the ideal sensor data of some PPG sensors provided in an embodiment of the present invention;

[0049] Figure 7B Shows the sensor energy-saving parameters of some PPG sensors provided in an embodiment of the present invention;

[0050] Figure 7C Shows the sensor energy-saving parameters of some other PPG sensors provided in an embodiment of the present invention;

[0051] Figure 8A Shows the ideal sensor parameters of some ECG sensors provided in an embodiment of the present invention;

[0052] Figure 8B Shows the sensor energy-saving parameters of some ECG sensors provided in an embodiment of the present invention;

[0053] Figure 9A Shows the ideal sensor parameters of some barometric pressure sensors provided in an embodiment of the present invention;

[0054] Figure 9B Shows the sensor energy-saving parameters of the barometric pressure sensors provided in an embodiment of the present invention;

[0055] Figure 10 Schematic diagram of adjusting the timing measurement time of health data provided in an embodiment of the present invention;

[0056] Figure 11 Schematic diagram of a PPG sensor operating according to sensor energy-saving parameters provided in an embodiment of the present invention;

[0057] Figures 12A to 12B Schematic flowchart of another sensor control method provided in an embodiment of the present invention. Detailed implementation manners

[0058] Next, the technical solutions in the embodiments of the present invention will be clearly described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art belong to the scope of protection of the present invention.

[0059] Multiple health applications can be installed in an electronic device. When running any health application, the electronic device needs to call one or more sensors to collect data, and process and analyze the collected data to finally obtain health data that can represent the health status of the device user.

[0060] The normal operation of multiple health applications in an electronic device may require the same sensor to be called for data collection. Currently, since the calls to sensors by various health applications in electronic devices are independent of each other, in the scenario where multiple health applications need to call the same sensor, a queue will occur. For example, Figure 1 As shown, the electronic device can run the following three health applications at the same time: Service 1, Service 2 and Service 3. These three health applications all need to periodically call the optical heart rate sensor to collect data. Since the optical heart rate sensor can use photoplethysmography to realize data acquisition, in the embodiment of the present application, the aforementioned optical heart rate sensor may include a photoplethysmographic (PPG) sensor. The subsequent embodiments of the present application will be explained by taking the PPG sensor as an example. It can be understood that the embodiment of the present application does not limit the implementation method of the optical heart rate sensor, and the optical heart rate sensor can also be implemented as other types of sensors.

[0061] Depend on Figure 1 It can be seen that based on the alternating calls of these three health applications, within 2T, the total working time of the PPG sensor can reach t*2+t+2t*2=7t. Obviously, when the above method is used to control the sensor to work, the sensor will be busy for a long time, resulting in continuous power consumption and a shorter battery life of the electronic device.

[0062] Figure 2 A partial structural schematic diagram of an electronic device 100 related to an embodiment of the present invention is shown. The electronic device 100 may be implemented as a wearable device, such as a smart watch, a smart bracelet, etc. In some implementations, the electronic device 100 may also be implemented as a server.

[0063] like Figure 2As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, 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, a headphone jack 170D, a sensor module 180, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a PPG sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0064] It can be understood that the structure schematically shown in the embodiments of this application does not constitute a specific limitation on the electronic device 100. In some other embodiments of this application, the electronic device 100 may include more or fewer components than shown, or combine certain components, or split certain components, or have different component arrangements. The components shown may be implemented in hardware, software, or a combination of software and hardware.

[0065] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a microcontroller unit (MCU), a modulation and demodulation 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), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0066] In some implementation manners of the embodiments of this application, the working performance of the MCU is weaker than that of the AP, but the power consumption during operation is less than that of the AP.

[0067] Among them, the controller may be the nerve center and command center of the electronic device 100. The controller may generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching instructions and executing instructions.

[0068] A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can directly call it from the said memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0069] In some embodiments, the processor 110 may include one or more interfaces. The 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.

[0070] The charging management module 140 is configured to receive a charging input from a charger. The charger may be a wireless charger or a wired charger. In some embodiments of wired charging, the charging management module 140 may receive the charging input from the wired charger through the USB interface 130. In some embodiments of wireless charging, the charging management module 140 may receive the wireless charging input through the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 may also supply power to the electronic device through the power management module 141.

[0071] 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 the inputs from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, the wireless communication module 160, etc. The power management module 141 can also be used to monitor parameters such as the battery capacity, the number of battery cycles, and the battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be disposed in the processor 110. In some other embodiments, the power management module 141 and the charging management module 140 can also be disposed in the same device.

[0072] The wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, and the baseband processor, etc.

[0073] The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example, the antenna 1 can be multiplexed as the diversity antenna of the wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0074] The mobile communication module 150 can provide solutions for wireless communications such as 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 can include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves by the antenna 1, filter and amplify the received electromagnetic waves, and then transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves through the antenna 1 for radiation. In some embodiments, at least some functional modules of the mobile communication module 150 can be disposed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 can be disposed in the same device.

[0075] The modulation and demodulation processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. Subsequently, the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays an image or video through the display screen 194. In some embodiments, the modulation and demodulation processor may be an independent device. In other embodiments, the modulation and demodulation processor may be independent of the processor 110 and be disposed in the same device as the mobile communication module 150 or other functional modules.

[0076] The wireless communication module 160 may provide solutions for wireless communications applied to the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite systems (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive the signals to be transmitted from the processor 110, perform frequency modulation and amplification on them, and convert them into electromagnetic waves through the antenna 2 for radiation.

[0077] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, such that electronic device 100 can communicate with a network and other devices through wireless communication technologies. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS), and / or satellite based augmentation systems (SBAS).

[0078] Electronic device 100 implements a display function through a GPU, display screen 194, and an application processor, etc. The GPU is a microprocessor for image processing, and is connected to display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.

[0079] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can adopt a liquid crystal display (LCD). The display panel can also adopt an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniLED, a microLED, a micro-OLED, a quantum dot light-emitting diode (QLED), etc. to manufacture. In some embodiments, the electronic device may include one or N display screens 194, where N is a positive integer greater than 1.

[0080] The external memory interface 120 can be used to connect to an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to achieve the data storage function. For example, files such as music and videos are saved in the external memory card.

[0081] The internal memory 121 can be used to store computer-executable program code, and the executable program code includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.). The data storage area can store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.). In addition, the internal memory 121 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0082] In the embodiment of the present application, the internal memory 121 stores the ideal parameters of the sensor. The ideal parameters of the sensor are provided by various health applications installed in the electronic device 100, and are used to indicate the working mode of the sensor. For the description of the ideal parameters of the sensor, please refer to the relevant description in the embodiments described later in this application, which will not be described in detail here. In addition, the internal memory 121 can also store the data collected by each sensor in the sensor module 180 at a historical time.

[0083] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0084] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.

[0085] The gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.

[0086] The barometric pressure sensor 180C is used to measure barometric pressure. In some embodiments, the electronic device 100 calculates the altitude based on the barometric pressure value measured by the barometric pressure sensor 180C to assist in positioning and navigation.

[0087] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip based on the magnetic sensor 180D. Furthermore, according to the detected opening and closing state of the leather case or the flip, features such as automatic flip unlocking can be set.

[0088] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three - axis). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal - vertical screen switching and pedometers.

[0089] The distance sensor 180F is used to measure distance. The electronic device 100 can measure distance through infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure distance to achieve fast focusing.

[0090] The proximity light sensor 180G can include, for example, a light - emitting diode (LED) and a light detector, such as a photodiode. The light - emitting diode can be an infrared light - emitting diode. The electronic device 100 emits infrared light outward through the light - emitting diode. The electronic device 100 uses the photodiode to detect the infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect when the user holds the electronic device 100 close to the ear for a call, so as to automatically turn off the screen to achieve the purpose of power saving. The proximity light sensor 180G can also be used for automatic unlocking and locking of the leather case mode and pocket mode.

[0091] The PPG sensor 180H includes a light source and a photodetector. Among them, the light source can be used to emit one or more light signals of specific wavelengths, such as infrared light, red light, and green light. When the light signals emitted by the light source penetrate the human skin tissue and blood, absorption, reflection, and refraction will occur. The photodetector can be used to collect the light signals emitted by the light source and reflected back, and convert the light signals into electrical signals, that is, PPG signals. In the embodiments of the present application, based on the processing and analysis of the PPG signals, the electronic device 100 can determine health data such as heart rate, blood oxygen, heart rate variability, and sleep quality.

[0092] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 utilizes the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J in order to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 caused by low temperature. In still other embodiments, when the temperature is lower than yet another threshold, the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.

[0093] The touch sensor 180K, also known as the "touch panel". The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also known as the "touch screen". The touch sensor 180K is used to detect touch operations acting thereon or nearby. 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 the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, at a different position from the display screen 194.

[0094] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the sensed ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance during photography. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touch.

[0095] The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signals of the vibrating bone mass of the human vocal part. The bone conduction sensor 180M can also contact the human pulse to receive the blood pressure pulsation signal. In some embodiments, the bone conduction sensor 180M can also be disposed in the earphone to form a bone conduction earphone. The audio module 170 can parse out the voice signal based on the vibration signals of the vibrating bone mass of the vocal part acquired by the bone conduction sensor 180M to implement the voice function. The application processor can parse the heart rate information based on the blood pressure pulsation signal acquired by the bone conduction sensor 180M to implement the heart rate detection function.

[0096] The SIM card interface 195 is used to connect to the SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation from the electronic device 100. The electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 simultaneously. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communication. In some embodiments, the electronic device 100 uses an eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0097] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. Exemplarily, Figure 3A is a software structure block diagram of an electronic device 100 provided by an embodiment of the present application.

[0098] The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the software system of the electronic device 100 is divided into four layers, from top to bottom: the application layer, the application framework layer, the system library, and the kernel layer.

[0099] The application layer can include a series of application packages.

[0100] As Figure 3A shown, the application packages can include health applications such as heart rate service, body temperature service, sleep service, stress service, blood oxygen service, menstrual cycle, electrocardiogram, etc. In the case where the electronic device 100 is implemented as a dual-core architecture, the health applications in the application packages can be managed by the AP and the MCU respectively, that is, some health applications are managed by the AP and some health applications are managed by the MCU. Exemplarily, as Figure 3A shown, the four health applications of heart rate service, body temperature service, blood oxygen service, and menstrual cycle are managed by the AP, and the health applications such as sleep service, stress service, and electrocardiogram are managed by the MCU.

[0101] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions.

[0102] As Figure 3AAs shown in the figure, the application framework layer includes a health service, a data storage service, etc. Among them:

[0103] The health service includes a service interface, a sensor configuration table, a service control unit, and a data distribution unit.

[0104] The service interface is used to implement the interaction between the health service and each application in the application layer.

[0105] The sensor configuration table can store ideal sensor parameters. The ideal sensor parameters are provided by each health application in the application layer and are data used to indicate the working mode of the sensor. For the description of the ideal sensor parameters, reference can be made to the relevant descriptions in the subsequent embodiments of this application, and no detailed description will be given here for the time being.

[0106] The service control unit can determine the sensor energy-saving parameters according to the ideal sensor parameters stored in the sensor configuration table. For the specific manner in which the service control unit executes the above process, reference can be made to the relevant descriptions in the subsequent embodiments of this application, and no detailed description will be given here for the time being. In addition, the service control unit can also send the sensor energy-saving parameters to the sensor driver in the kernel layer to instruct the sensors in the electronic device 100 to work according to the above sensor energy-saving parameters.

[0107] The data storage service includes a data synchronization module and a data storage module. Among them:

[0108] The data synchronization module is used to support the data synchronization process between the electronic device 100 and other devices. In the embodiments of this application, the data synchronized in this process can include the data collected by the sensors of the electronic device 100 and / or the health data corresponding to each health application. The data storage module can be used to store the data collected by the sensors in the electronic device 100 and / or the health data corresponding to each health application.

[0109] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0110] The system library can include multiple functional modules. For example: surface manager, Media Libraries, 3D graphics processing library (e.g., OpenGL ES), 2D graphics engine (e.g., SGL), etc.

[0111] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0112] The media library supports the playback and recording of a variety of common audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video coding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0113] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc.

[0114] The 2D graphics engine is a graphics engine for 2D drawing.

[0115] The kernel layer is the layer between hardware and software. The kernel layer includes sensor drivers, display drivers, audio drivers, etc.

[0116] Figure 3B It is a software structure block diagram of another electronic device 100 provided by the embodiments of the present application. As Figure 3B shown, in some implementation manners, each application in the application layer can provide its own service interface. Each application can interact with the application framework layer through its own service interface. In addition, for Figure 3B the descriptions of other parts shown, reference can be made to the relevant descriptions in the foregoing embodiments, and details will not be repeated here.

[0117] Next, an exemplary description will be given of the user interface involved in the sensor control process provided by the embodiments of the present application.

[0118] Figure 4A Exemplarily shown is the user interface 410 displayed when the electronic device 100 runs the settings application. As Figure 4A shown, the user interface 410 includes a battery bar 411.

[0119] Detecting an input operation (such as a touch operation) by the user on the battery bar 411, in response to the above input operation, the electronic device 100 can display the user interface 420 as Figure 4B shown. The user interface 420 is a page for the user to view and manage the battery usage of the electronic device 100. As Figure 4BAs shown, the user interface 420 includes a switch 421. The switch 421 can be used to trigger the electronic device 100 to enable or disable the power-saving mode. The power-saving mode is an operating mode in which the electronic device 100 reduces power consumption to extend the device's battery life. The power consumption of the electronic device 100 when the power-saving mode is enabled is less than that when the mode is turned off. In the case of enabling the power-saving mode, the ways for the electronic device 100 to reduce power consumption can specifically include: adjusting the display strategy, enabling the intelligent energy-saving mode for health applications, turning off some non-essential functions, etc. Among them, the intelligent energy-saving mode is a sensor control mode in which the electronic device 100 uniformly controls the invocation of sensors to achieve one-time acquisition and multi-source sharing of sensor data. The embodiments of this application will describe in detail the control method of the sensors by the electronic device 100 in the intelligent energy-saving mode later, and no specific description will be made here for the time being.

[0120] In the case where the electronic device 100 has not enabled the power-saving mode, when an input operation (such as a touch operation) by the user on the switch 421 is detected, in response to the above input operation, the electronic device 100 can display Figure 4C the user interface 430 as shown. The user interface 430 is an introduction page for the power-saving mode. As Figure 4C shown, the user interface 430 includes a prompt message 431, a prompt message 432, a button 433, and a button 434. Among them, the prompt message 431 can be used to prompt the user about the meaning and characteristics of the power-saving mode. The prompt message 432 can be used to trigger the electronic device 100 to display the introduction information about the intelligent energy-saving mode. The prompt message 431 and the prompt message 432 can be implemented in the form of text, pictures, audio and video, etc. The button 433 can be used to trigger the electronic device 100 to enable the power-saving mode, and the button 434 can be used to trigger the electronic device 100 to return to Figure 4B the user interface 420 as shown.

[0121] When an input operation (such as a touch operation) by the user on the prompt message 432 is detected, in response to the above input operation, the electronic device 100 can display Figure 4D the user interface 440 as shown. The user interface 440 is an introduction page for the intelligent energy-saving mode. As Figure 4D shown, the user interface 440 includes a prompt message 441 and a button 442. Among them, the prompt message 441 can be used to prompt the user about the meaning and characteristics of the intelligent energy-saving mode. The prompt message 442 can be implemented in the form of text, pictures, audio and video, etc. The button 442 can be used to trigger the electronic device 100 to return to Figure 4C the user interface 430 as shown.

[0122] In some implementations, the user can actively set the scheduled measurement of health data according to their own needs. Specifically, based on the user's settings, the electronic device 100 can enable one or some sensors to collect data at the selected time by the user, and process and analyze the collected data, so as to obtain a certain type of health data selected by the user (for example, the user sets to enable the PPG sensor to emit red light for data collection at 7:55 every day, and determines the blood oxygen according to the collected data).

[0123] In the case of enabling the power saving mode, for any sensor, the electronic device 100 can determine the sensor energy saving parameter of the sensor, and call it to collect data according to the sensor energy saving parameter. For the specific method for the electronic device 100 to determine the sensor energy saving parameter, reference can be made to the relevant descriptions in the subsequent embodiments of this application, and no detailed description will be given here for the time being. For a certain type of health data, if the user sets a scheduled measurement for this type of health data, and the time when the sensor used to determine this health data collects data according to its sensor energy saving parameter does not include the time of the above scheduled measurement, then the electronic device 100 can display a query page to ask the user whether to modify the time of the scheduled measurement, so as to change the above non-inclusive relationship to an inclusive relationship, thereby reducing the extra working time of the sensor and realizing the reduction of the operating power consumption of the sensor.

[0124] Figure 4E Exemplarily shows the above query page. As Figure 4E shown, the user interface 450 includes a prompt message 451 and buttons 452, 453. Among them, the prompt message 451 is used to prompt the user about the content of the change. The button 452 is used to trigger the electronic device 100 to update its setting of the scheduled measurement, and the button 453 is used to trigger the electronic device 100 to close this query page.

[0125] In some implementations, the electronic device 100 can continuously monitor the battery power. When the battery power of the electronic device 100 is less than a preset value, such as 20%, and the electronic device 100 has not enabled the power saving mode, the electronic device 100 can display a user interface 460 as Figure 4F shown. The user interface 460 can include a prompt message 461 and buttons 462, 463. Among them, the prompt message 461 can be used to prompt the user that the battery power of the current electronic device 100 is insufficient. The prompt message 461 can be implemented in the form of text, picture, audio and video, etc. The button 462 can be used to trigger the electronic device 100 to enable the power saving mode, and the button 463 can be used to trigger the electronic device 100 to close this page. In some implementations, if an input operation (such as a touch operation) of the user acting on the button 462 is detected, in response to the above input operation, the electronic device 100 can also jump to display as Figure 4CThe user interface 430 shown.

[0126] Figure 5A Exemplarily shown is the user interface 510. The user interface 510 is an application list interface, which includes a plurality of application icons. As Figure 5A shown, among the above-mentioned plurality of application icons, there is an icon 511 of the application "Pulse Wave Arrhythmia Analysis". "Pulse Wave Arrhythmia Analysis" belongs to the health application described above in the embodiments of the present application.

[0127] When it is detected that the user performs an input operation (such as a touch operation) on the icon 511, in response to the above input operation, the electronic device 100 can run the application "Pulse Wave Arrhythmia Analysis". When the electronic device 100 runs this application for the first time, the electronic device 100 can display as Figure 5B shown the user interface 520. The user interface 520 is an introduction page of the application "Pulse Wave Arrhythmia Analysis". As Figure 5B shown, the user interface 520 includes a prompt message 521, a button 522 and a button 523. Among them, the prompt message 521 can be used to prompt the user about the functions of the application "Pulse Wave Arrhythmia Analysis" and the permissions required to run this application. The prompt message 521 can be implemented in forms such as text, pictures, audio and video. The button 522 can be used to trigger the electronic device 100 to grant the permissions required for this application, and the button 523 can be used to trigger the electronic device 100 to stop running the application "Pulse Wave Arrhythmia Analysis" and return to Figure 5A the user interface 510 shown.

[0128] When it is detected that the user performs an input operation (such as a touch operation) on the button 522, in response to the above input operation, the electronic device 100 can display as Figure 5C shown the user interface 530.

[0129] In some implementation manners, if there are multiple health applications that all need to call the same sensor to collect data, and the electronic device 100 has not enabled the intelligent energy-saving mode for sensor data collection for all health applications, then, when it is detected that the user performs an input operation (such as a touch operation) on the button 522, in response to the above input operation, the electronic device 100 can display as Figure 5C shown the user interface 530. The user interface 530 is used to ask the user whether to permit the electronic device 100 to enable the intelligent energy-saving mode for all the health applications installed on it. As Figure 5C shown, the user interface 530 includes a prompt message 531, a prompt message 532, a button 533 and a button 534. Among them, the prompt message 531 can be used to ask the user whether to agree to enable the intelligent energy-saving mode. The prompt message 532 is used to trigger the electronic device 100 to display the introduction information about the intelligent energy-saving mode, for example, trigger the electronic device 100 to display the foregoingFigure 4D The user interface 440 shown. The prompt message 531 and the prompt message 532 can be implemented as text, pictures, audio and video, etc. respectively. The button 533 can be used to trigger the electronic device 100 to enable the intelligent energy-saving mode for sensor data acquisition, and the button 534 can be used to trigger the electronic device 100 to close this page.

[0130] In some other implementation manners, if there are one or more health applications that also need to call the PPG sensor like the application "Pulse Wave Arrhythmia Analysis", and the electronic device 100 has not enabled the intelligent energy-saving mode for sensor data acquisition for the application "Pulse Wave Arrhythmia Analysis", then, upon detecting an input operation (such as a touch operation) of the user on the button 522, in response to the above input operation, the electronic device 100 can display as Figure 5D the user interface 540 shown. The user interface 540 is used to ask the user whether to permit the electronic device 100 to enable the intelligent energy-saving mode for a group of health applications among all health applications. The above-mentioned group of health applications includes the application "Pulse Wave Arrhythmia Analysis" and also includes other health applications that also need to call the PPG sensor.

[0131] As Figure 5D shown, the user interface 440 includes a prompt message 541, a prompt message 542, a button 543 and a button 544. Among them, the prompt message 541 can be used to ask the user whether to agree to enable the intelligent energy-saving mode. The prompt message 542 is used to trigger the electronic device 100 to display the introduction information about the intelligent energy-saving mode, for example, trigger the electronic device 100 to display the Figure 4D user interface 440 shown. The prompt message 541 and the prompt message 542 can be implemented as text, pictures, audio and video, etc. respectively. The button 543 can be used to trigger the electronic device 100 to enable the intelligent energy-saving mode for data acquisition for the PPG sensor, and the button 544 can be used to trigger the electronic device 100 to close this page.

[0132] Figure 6 is a flowchart of a sensor control method provided by an embodiment of the present invention. As Figure 6 shown, the method includes:

[0133] Step S101, obtain the ideal sensor parameters corresponding to multiple health applications.

[0134] During the running of any health application, the way the electronic device 100 calls the sensor for data acquisition is controlled by one or more groups of ideal sensor parameters corresponding to the health application. The ideal sensor parameters are usually parameters preset and provided by the developer of the health application. One group of ideal sensor parameters includes at least the following data items: sensor identifier, ideal sampling period, ideal sampling frequency, ideal sampling duration.

[0135] In some implementations, a set of ideal sensor parameters may also include data items related to sensor characteristics. For example, since an optical heart rate sensor has multiple operating states and can emit light of different wavelengths in different operating states, based on the principle of photoplethysmography, a photoplethysmography (PPG) signal is collected. Therefore, for the ideal sensor parameters of a sensor labeled as an optical heart rate sensor, it may also include a data item "emitting color", and the value can be green light, red light, etc. For another example, since an electrocardiogram (ECG) sensor may include multiple electrodes, different electrodes may be used in the process of data collection using different methods. Therefore, for the ideal sensor parameters of a sensor labeled as an ECG sensor, it may also include a data item "used electrodes", and the value can be the identifier of one or more electrodes.

[0136] In some implementations, after powering on, the electronic device 100 will obtain multiple ideal sensor parameters corresponding to all the health applications installed therein.

[0137] In some implementations, when a user operation triggering the electronic device 100 to enable the power-saving mode is detected, in response to the above user operation, the electronic device 100 can obtain multiple ideal sensor parameters corresponding to all the health applications installed therein. The above user operation triggering the electronic device 100 to enable the power-saving mode can be, for example, a touch operation on the switch 421 of the user interface 420 described above, a touch operation on the button 433 of the user interface 430 described above, or a touch operation on the button 462 of the user interface 460 described above. For the description of the power-saving mode, reference can be made to the relevant description in the foregoing embodiments, and details are not described herein again. Figure 4B in the user interface 420, a touch operation on the button 433 of the user interface 430 described above, or a touch operation on the button 462 of the user interface 460 described above. For the description of the power-saving mode, reference can be made to the relevant description in the foregoing embodiments, and details are not described herein again. Figure 4C in the user interface 430, a touch operation on the button 462 of the user interface 460 described above. For the description of the power-saving mode, reference can be made to the relevant description in the foregoing embodiments, and details are not described herein again. Figure 4F in the user interface 460. For the description of the power-saving mode, reference can be made to the relevant description in the foregoing embodiments, and details are not described herein again.

[0138] In some implementations, when it is detected that several health applications are running, the electronic device 100 can obtain the identifiers of the sensors that the several health applications need to call respectively. If, based on the identifiers of the sensors that the several health applications need to call respectively, it can be determined that multiple health applications all need to call the same sensor to collect data, then the electronic device 100 can obtain multiple sensor collection parameters corresponding to the multiple health applications.

[0139] In some implementations, when it is detected that a certain health application is run for the first time and the electronic device 100 has not enabled the intelligent energy-saving mode for all health applications to collect sensor data, the electronic device 100 can ask the user whether to enable the intelligent energy-saving mode for all health applications by displaying a user interface. When a user operation for permission enabling is detected, such as a touch operation on the button 533 of the user interface 530 described above, the electronic device 100 can obtain a plurality of ideal sensor parameters corresponding to all the health applications installed therein. Figure 5C After detecting a touch operation on the button 533 of the user interface 530 in Figure 5C , the electronic device 100 can obtain a plurality of ideal sensor parameters corresponding to all the health applications installed therein.

[0140] In some implementations, when it is detected that a certain health application is run for the first time, the electronic device 100 can determine the identifiers of the sensors that the health application needs to call. After that, the electronic device 100 can obtain the identifiers of the sensors that all the other health applications installed therein need to call except this health application. If there is one or more health applications that, like the first application, all need to call the first sensor to collect data, then the electronic device 100 can obtain this health application and a plurality of sensor acquisition parameters corresponding to the aforementioned one or more applications.

[0141] In some implementations, the above embodiments are described by taking the example of obtaining a plurality of ideal sensor parameters corresponding to all the health applications installed in the electronic device 100. It can be understood that the electronic device 100 can also obtain a plurality of ideal sensor parameters corresponding to some of the health applications installed therein, or can also obtain some of the sensor ideal parameters corresponding to all the health applications. The above-mentioned some health applications and some sensor ideal parameters can be determined by the electronic device 100 or specified by the user.

[0142] Step S102: Determine the sensor energy-saving parameters of each sensor according to the above ideal sensor parameters

[0143] Since the electronic device 100 may include multiple sensors and the working modes of various sensors have different characteristics. Therefore, below, three methods for determining the sensor energy-saving parameters will be introduced respectively according to the types of sensors.

[0144] 1. For sensors with multiple working states, the electronic device 100 can determine the sensor energy-saving parameters for different working states of the sensors respectively.

[0145] The above-mentioned sensors with multiple working states can be, for example, PPG sensors. Figure 7A Exemplarily shows a series of ideal sensor data with the sensor identifier being PPG. As Figure 7AAs shown, the ideal parameters of this series of sensors are the ideal parameters of the sensors corresponding to the four health applications of heart rate, blood oxygen, pressure, and vascular health research respectively. Any set of ideal sensor data includes the following five data items: sensor identification, emission color, ideal sampling period, ideal sampling frequency, and ideal sampling duration. Based on the description of the PPG sensor in the foregoing embodiments, it can be understood that the "emission color" is the data item used to indicate the working state of the PPG sensor.

[0146] Since there are two values, green light and red light, for the emission color among the ideal parameters of this series of sensors, the electronic device 100 can determine the sensor energy-saving parameters of the PPG sensor for these two working states respectively.

[0147] Specifically, in one implementation, for any working state, the electronic device 100 can determine the minimum value among all the ideal sampling periods corresponding to this working state as the energy-saving sampling period for this working state. The electronic device 100 can determine the maximum value among all the ideal sampling frequencies as the energy-saving sampling frequency for this working state. The electronic device 100 can determine the maximum value among all the ideal sampling durations as the energy-saving sampling duration for this working state.

[0148] Taking Figure 7A the series of ideal sensor parameters shown as an example: for the working state where the PPG sensor emits green light, the values of all the ideal sampling periods in this state are: 10 minutes, 30 minutes, and 10 minutes. Therefore, the electronic device 100 can determine the minimum value of 10 minutes among them as the energy-saving sampling period for this state. Similarly, the electronic device 100 can determine that the energy-saving sampling frequency of the PPG sensor in the working state of emitting green light is 25 MHz, and the energy-saving sampling duration is 45 seconds.

[0149] Figure 7B shows that the electronic device 100 determines the sensor energy-saving parameters of the PPG sensor based on the above strategy according to Figure 7A the series of ideal sensor parameters shown. Since during the process of collecting data, the smaller the sampling period of the sensor, the larger the sampling frequency, and the longer the sampling duration, the better the real-time performance and accuracy of the data collected by the sensor. Therefore, using this strategy to determine the sensor energy-saving parameters can comprehensively improve the real-time performance and accuracy of the data collected by the sensor when it works according to these parameters subsequently.

[0150] In addition, the electronic device 100 can also adopt other strategies to determine the sensor energy-saving parameters. Specifically, in another implementation, for any working state, the electronic device 100 can determine the maximum value among all the ideal sampling periods corresponding to the working state as the energy-saving sampling period in the working state. The electronic device 100 can determine the minimum value among all the ideal sampling frequencies as the energy-saving sampling frequency in the working state. The electronic device 100 can determine the minimum value among all the ideal sampling durations as the energy-saving sampling duration in the working state.

[0151] Taking Figure 7A a series of ideal sensor parameters shown as an example: for the working state of the PPG sensor emitting green light, the values of all the ideal sampling periods in this state are respectively: 10 minutes, 30 minutes, 10 minutes. Therefore, the electronic device 100 can determine the maximum value of 30 minutes among them as the energy-saving sampling period in this state. Similarly, the electronic device 100 can determine that the energy-saving sampling frequency of the PPG sensor in the working state of emitting green light is 25 MHz, and the energy-saving sampling duration is 40 seconds.

[0152] Figure 7C Figure shows the electronic device 100 determining the sensor energy-saving parameters of the PPG sensor based on the above strategy according to Figure 7A a series of ideal sensor parameters shown. Since during the process of collecting data, the larger the sampling period of the sensor, the smaller the sampling frequency and the shorter the sampling duration, the less the working time of the sensor and the lower the energy consumption. Therefore, adopting this strategy to determine the sensor energy-saving parameters can effectively reduce the energy consumption of the sensor when working according to these parameters subsequently, and improve the battery life of the device.

[0153] In some implementations, since the real-time requirements of some health applications are not high, therefore, among the ideal sensor parameters corresponding to these health applications, the ideal sampling period may be long, the ideal sampling frequency may be small, and the ideal sampling duration may be short. To reduce the interference of these ideal sensor parameters on the sensor energy-saving parameters and prevent the finally determined sensor energy-saving parameters from not meeting the real-time and accuracy requirements of other health applications, when the electronic device 100 determines the sensor energy-saving parameters of a certain sensor, it can screen all the ideal sensor parameters corresponding to the sensor, so that the ideal sensor parameters corresponding to the health applications with low real-time requirements do not participate in the process of determining the sensor energy-saving parameters.

[0154] Exemplarily, for any one sensor, the electronic device 100 may determine the sensor energy-saving parameter of the sensor only according to the ideal sensor parameters corresponding to it, where the ideal sampling period is less than a first value, the ideal sampling frequency is greater than a second value, and the ideal sampling duration is greater than a third value. For example, the first value may be 1 hour, the second value may be 1 MHz, and the third value may be 30 seconds.

[0155] In addition, for any one sensor, the electronic device 100 may also determine the median of all the ideal sampling periods corresponding to the sensor. The electronic device 100 may determine the sensor energy-saving parameter of the sensor only according to the ideal sampling parameters corresponding to it, where the difference between the ideal sampling period and the median is less than the first value. This strategy may also be applied to the ideal sampling frequency and the ideal sampling duration in the same way, and will not be described in detail here.

[0156] If the ideal sensor parameters corresponding to the health applications with low real-time requirements do not participate in the determination process of the sensor energy-saving parameters, then, for such health applications with low real-time requirements, in some implementation manners, such health applications may still call the sensor to collect data according to the ideal sensor parameters corresponding to them. Since the real-time requirements of such sensors are not high, the power consumption of calling the sensor to collect data itself is not high, and not too much power resource will be used. In some implementation manners, the electronic device 100 may further determine the second sensor energy-saving parameter of the sensor according to the ideal sensor parameters corresponding to such health applications. Thus, for the sensor, it may correspond to two sensor energy-saving parameters. The sensor corresponding to two sensor energy-saving parameters may collect data according to the above two parameters simultaneously. If there is a conflict in the collection time indicated by the two sensor energy-saving parameters, the sensor may first collect data according to the sensor energy-saving parameter and then collect data according to the second sensor energy-saving parameter. By adopting this method, the electronic device 100 can meet the requirements of health applications with different real-time requirements for sensor data collection. In other implementation manners, in response to the electronic device 100 enabling the power-saving mode, the applications with low real-time requirements may suspend calling the sensor to collect data and wait until the electronic device 100 exits the power-saving mode and then start calling the sensor to collect data again. Since the health applications with low real-time requirements have low requirements for sensor data collection, the impact of suspending calling the sensor to collect data is small, and the device power consumption can also be reduced.

[0157] 2. For a sensor including multiple modules and the operations of the modules are independent of each other, the electronic device 100 may determine the sensor energy-saving parameters for different modules of the sensor respectively.

[0158] The above sensor including multiple modules may be, for example, an ECG sensor. Figure 8AExemplarily shown are a series of ideal parameters of sensors labeled as ECG. As Figure 8A shown, this series of ideal parameters of sensors are respectively 1 set of ideal parameters of sensors corresponding to single-lead electrocardiogram and 3 sets of ideal parameters of sensors corresponding to multi-lead electrocardiogram. Any set of ideal parameters of sensors includes the following 5 data items: sensor label, electrode label, ideal sampling period, ideal sampling frequency, and ideal sampling duration.

[0159] Since among this series of ideal parameters of sensors, there are three values, namely electrode 1, electrode 2, and electrode 3, for the electrode label, the electronic device 100 can respectively determine the sensor energy-saving parameters of the ECG sensor for these three modules. Specifically, in one implementation, for any one electrode, the electronic device 100 can determine the minimum value among all the ideal sampling periods corresponding to this electrode as the energy-saving sampling period in this working state. The electronic device 100 can determine the maximum value among all the ideal sampling frequencies as the energy-saving sampling frequency in this working state. The electronic device 100 can determine the maximum value among all the ideal sampling durations as the energy-saving sampling duration in this working state. Specifically, as Figure 8A shown, for electrode 1, since the two ideal sampling periods corresponding to this electrode are both 1 day, 1 day can be determined as the energy-saving sampling period of electrode 1. Since the two ideal sampling frequencies corresponding to this electrode are both 25 MHz, 25 MHz can be determined as the energy-saving sampling frequency of electrode 1. Since the two ideal sampling durations corresponding to this electrode are 60 seconds and 30 seconds respectively, the maximum value of 60 seconds can be determined as the energy-saving sampling duration of electrode 1.

[0160] Similarly, by adopting the same strategy, the energy-saving sampling period, energy-saving sampling frequency, and energy-saving sampling duration respectively corresponding to electrode 2 and electrode 3 can also be determined. Thus, the electronic device 100 can obtain the sensor energy-saving parameters of the ECG sensor as shown in Figure 8B shown. In addition, for other methods of the electronic device 100 to determine the sensor energy-saving parameters of the ECG sensor, reference can be made to the relevant descriptions in the foregoing embodiments, which will not be elaborated here.

[0161] 3. For sensors that can only operate as a whole in one working state, the electronic device 100 can directly determine the sensor energy-saving parameters for them.

[0162] The above-mentioned sensors that can only operate as a whole in one working state can be, for example, barometric pressure sensors. Figure 9A Exemplarily shown are a series of ideal data of sensors labeled as barometric pressure sensors. As Figure 9AAs shown, the ideal parameters of this series of sensors are respectively the ideal parameters of the sensors corresponding to the two health applications of altitude care and blood oxygen. Any set of sensor ideal data includes the following four data items: sensor identification, ideal sampling period, ideal sampling frequency, and ideal sampling duration.

[0163] For such a sensor, the electronic device 100 can directly determine the sensor energy-saving parameters based on the ideal parameters of the sensor. Specifically, in one implementation, the electronic device 100 can determine the minimum value among all the ideal sampling periods corresponding to the barometric pressure sensor as the energy-saving sampling period. The electronic device 100 can determine the maximum value among all the ideal sampling frequencies as the energy-saving sampling frequency. The electronic device 100 can determine the maximum value among all the ideal sampling durations as the energy-saving sampling duration. Specifically, as Figure 9A shown, since the two ideal sampling periods corresponding to the barometric pressure sensor are 30 minutes and 10 minutes respectively, the minimum value of the two, which is 10 minutes, can be determined as the sensor energy-saving parameter corresponding to the barometric pressure sensor. Since the two ideal sampling frequencies corresponding to the barometric pressure sensor are both 25 MHz, and the two corresponding ideal sampling durations are both 30 seconds, 25 MHz can be determined as the energy-saving sampling frequency of the barometric pressure sensor, and 30 seconds can be determined as the energy-saving sampling duration of the barometric pressure sensor.

[0164] Thus, the electronic device 100 can obtain the sensor energy-saving parameters of the barometric pressure sensor as shown in Figure 9B shown.

[0165] In addition, for other ways for the electronic device 100 to determine the sensor energy-saving parameters of the barometric pressure sensor, reference can be made to the relevant descriptions in the foregoing embodiments, which will not be elaborated here.

[0166] In some implementations, the user can actively set the timing measurement of health data based on their own needs. For the description of timing measurement, reference can be made to the relevant descriptions in the foregoing embodiments, which will not be elaborated here. For a certain type of health data, if the user sets a timing measurement for this type of health data, and the time when the sensor used to determine this health data collects data according to its sensor energy-saving parameters does not include the time of the above-mentioned timing measurement, then the electronic device 100 can display a query page to ask the user whether to modify the time of the timing measurement so that the above non-inclusion relationship becomes an inclusion relationship, thereby reducing the extra working time of the sensor and achieving a reduction in the operating power consumption of the sensor.

[0167] Exemplarily, as Figure 10As shown, the user can actively set the electronic device 100 to enable the PPG sensor to emit red light for data collection at 7:55 every day, and obtain the blood oxygen value based on the collected data. The ideal sensor parameters determined by the electronic device 100 for the working state of the PPG sensor emitting red light indicate that the PPG sensor emits red light for data collection at time points such as 6:10, 6:20, …, 7:50, 8:00, …. Obviously, in this case, the time when the PPG sensor emits red light to collect data according to the sensor energy-saving parameters does not include the time when the PPG sensor participates in the above-mentioned timed measurement. Therefore, the electronic device 100 can display the user interface 450 as shown in the foregoing embodiment Figure 4E to ask the user whether to modify the time of the timed measurement.

[0168] In some implementation manners, the above-mentioned inquiry page may display the new timed measurement time determined by the electronic device 100. For the determination method of the new timed measurement time, exemplarily, in some implementation manners, the electronic device 100 may determine the time closest to the user's active setting among all the times when the sensor collects data according to the sensor energy-saving parameters as the new timed measurement time.

[0169] Step S103: Call each sensor to collect data according to the sensor energy-saving parameters

[0170] For a certain sensor that needs to be called by multiple health applications, compared with being called separately by multiple health applications multiple times, when it works according to the corresponding sensor energy-saving parameters, the working duration of the sensor can be greatly reduced.

[0171] Exemplarily, Figure 11 shows the process of the PPG sensor working according to the sensor energy-saving parameters. As Figure 11 shown, both Application 1 and Application 3 need to call the PPG sensor to collect data in the mode of emitting green light. By using the method provided in the embodiment of the present application, the PPG sensor can collect data once in the mode of emitting green light for the two applications, and the health data corresponding to Application 1 and Application 3 can be obtained respectively. In this case, by using the two strategies for determining the sensor energy-saving parameters described in the foregoing embodiment, the total working duration of the PPG sensor within 2T time is 2t * 2 + t = 5t, or t * 2 + t = 3t respectively. Obviously, compared with the 7t working duration required for each health application to independently call the sensor, the working duration of the PPG sensor is significantly reduced, the power consumption is reduced, and the battery life of the electronic device 100 is extended.

[0172] As described above, in some implementations, the electronic device 100 may include two processors. One of the processors is an AP, and the other is an MCU. The working performance of the MCU is weaker than that of the AP, but the power consumption during operation is less than that of the AP. When the electronic device 100 enables the power-saving mode, the electronic device 100 may instruct the AP therein to go into sleep, while the MCU works. Due to performance limitations, the MCU may need to rely on the AP to process the data collected by the sensors. Therefore, after data collection, the sensors need to send the collected data to the AP and wake up the AP again to process the data. Since there are multiple sensors in the electronic device 100, and different sensors collect data according to their corresponding sensor energy-saving parameters, and the times of obtaining data and sending data to the processor are different, in this case, the AP will still be continuously woken up to process data, and the power consumption is still high.

[0173] In view of this situation, the embodiments of the present application provide a solution: when the AP in the electronic device 100 is in sleep and the MCU is working, the electronic device 100 can unify the times for multiple sensors therein to send data to the AP. Specifically, the electronic device 100 can determine the data sending period of the sensors. The duration of the data sending period may be, for example, the maximum value among the ideal sampling periods of all sensors. The electronic device 100 can instruct the multiple sensors therein to uniformly send data to the processor according to the above data sending period. In this way, the sensors in the electronic device 100 can orderly send the data they have collected to the processor. The AP can centrally process these data. Compared with each sensor immediately sending data to the AP after data collection, and the AP being frequently woken up to process various data, this method can ensure the working efficiency of the electronic device 100 and reduce power consumption.

[0174] In some implementations, the electronic device 100 may include a processor, and this sensor is responsible for processing sensor data. At this time, the electronic device 100 can also unify the times for multiple sensors therein to send data to this processor. For the manner in which the electronic device 100 implements the above process, reference can be made to the relevant descriptions in the foregoing embodiments, and details are not described herein again. Since there is also power consumption in the data transceiver process, it can be understood that adopting the above method to unify the data sending times of the sensors can also ensure the working efficiency of the electronic device 100 and reduce power consumption.

[0175] In some implementations, the electronic device 100 includes multiple processors. Different processors are respectively responsible for processing and analyzing data collected by different sensors. In such a case, for any one processor, the electronic device 100 can unify the time when all sensors corresponding to the processor send data to it. For the manner in which the electronic device 100 implements the above process, reference can be made to the relevant descriptions in the foregoing embodiments, which will not be elaborated here. It can be understood that by adopting the above method, the working efficiency of the electronic device 100 can be ensured and the power consumption can be reduced.

[0176] In some implementations, the sensors invoked by the electronic device 100 can be sensors inside the electronic device 100. In some other implementations, the electronic device 100 can also invoke external sensors for data collection according to sensor energy-saving parameters.

[0177] Step S104: Process and analyze the collected data to obtain the health data corresponding to each of the above-mentioned multiple health applications.

[0178] The health data corresponding to different health applications is different. For different health data, the determination methods of the electronic device 100 may also be different. Specifically, in some implementations, the electronic device 100 can determine the health data corresponding to a certain health application only based on the data collected by one sensor. Exemplarily, the electronic device 100 can determine the heart rate value only based on the data collected by the PPG sensor. In some implementations, the electronic device 100 needs to collect data from multiple sensors to determine the health data corresponding to a certain health application. Exemplarily, for the health data of the physiological cycle, the electronic device 100 needs to collect data from two sensors, namely the PPG sensor and the temperature sensor, to determine.

[0179] Figure 12A and Figure 12B shows a flowchart of another sensor control method provided by an embodiment of the present invention. This method is the internal implementation process of the sensor control method described in the foregoing embodiment at the software system level of the electronic device 100. This method includes two steps: sensor data collection (step S210) and sensor data processing (step S210). Specifically, the following will be combined with Figure 12A and Figure 12B , and this method will be specifically described.

[0180] Figure 12A shows the process of the electronic device 100 executing step S210.

[0181] As Figure 12A shown, the sensor data collection (step S210) includes the following steps:

[0182] S211. Each health application provides the ideal sensor parameters to the service control unit in the health service.

[0183] For the description of the ideal sensor parameters, reference can be made to the relevant descriptions in the foregoing embodiments, which will not be elaborated here.

[0184] S212. The service control unit determines the sensor energy-saving parameters of each sensor according to the above ideal sensor parameters.

[0185] For the specific manner in which the service control unit executes this step, reference can be made to the relevant descriptions in the foregoing embodiments, which will not be elaborated here.

[0186] S213. The service control unit updates the sensor configuration table.

[0187] In some implementation manners, if the service control unit determines the sensor energy-saving parameters of each sensor for the first time, then the service control unit can directly store the determined sensor energy-saving parameters in the sensor configuration table. If the service control unit is not determining the sensor energy-saving parameters of each sensor for the first time, then the sensor energy-saving parameters have already been stored in the sensor configuration table. Therefore, the service control unit needs to update the data in the sensor configuration table and update the previously stored sensor energy-saving parameters to the newly determined sensor energy-saving parameters.

[0188] S214. The service control unit instructs each sensor to perform data acquisition according to the above sensor energy-saving parameters.

[0189] The service control unit can send an instruction to the sensor driver in the kernel layer. The above instruction includes the sensor energy-saving parameters corresponding to each sensor. After that, the sensor driver can drive each sensor to work based on the above sensor energy-saving parameters.

[0190] Figure 12B Shows the process of the electronic device 100 executing step S220.

[0191] As Figure 12B shown, the sensor data processing (step S220) includes the following steps:

[0192] S221. The sensor returns the data collected by the sensor to the data distribution unit of the health service.

[0193] S222. The data distribution unit stores the data collected by the sensor in the data storage service.

[0194] In some implementation manners, after receiving the data sent by the sensor, the data distribution unit can store the received data in the data storage service for subsequent query and reading.

[0195] S223. The data distribution unit sends the sensor data to each health application

[0196] The data distribution unit can send the sensor data to each health application through the service interface in the health service.

[0197] In some implementation manners, before sending the sensor data to each health application, the data distribution unit can first perform some preprocessing on the sensor data, such as data cleaning. During the data cleaning process, the data distribution unit can determine which sensor-collected data each health application needs, and only send the sensor data that each health application needs to it during the subsequent sending process.

[0198] Among them, if a health application can obtain its corresponding health data only based on the data collected by one sensor. Then, after receiving the sum of the data collected by the aforementioned sensor, the data distribution unit can directly send the sensor data to the health application. In some other implementation manners, if a health application needs to perform comprehensive processing and analysis on the data collected by multiple sensors to obtain its corresponding health data. Then, the data distribution unit can send it to the health application centrally after the aforementioned multiple sensors all send the sensor data to it.

[0199] S224. The health application obtains health data according to the sensor data

[0200] The health application can receive the sensor data sent by the data distribution unit to it, and then call the processor to process and analyze the sensor data, so as to obtain the health data corresponding to the health application.

[0201] In some implementation manners, if the electronic device 100 is implemented as a dual-core architecture, that is, it includes two processors, one of which is the main processor, such as the AP, and the other processor is a low-power processor, such as the MCU. As mentioned above, the two processors can be in charge of different health applications. When the electronic device 100 enables the power-saving mode, the electronic device 100 can instruct the main processor therein to go to sleep, while the low-power processor works. At this time, for the health applications managed by the main processor, after receiving the sensor data sent by the data distribution unit, it needs to wake up the main processor and then call it to process the sensor data, so as to obtain the corresponding health data. When there are many health applications managed by the main processor and there are many types of sensor data to be processed, since the sensor data required by each health application may be different, the time points for each health application managed by the main processor to call the main processor may also be different. Therefore, when the power-saving mode is enabled, the main processor may be continuously woken up and the power consumption is still high.

[0202] In view of this situation, the embodiments of the present application provide a solution: when the electronic device 100 enables the power-saving mode, that is, the main processor sleeps and the low-power processor works, the electronic device 100 can unify the time for all health applications managed by the main processor to call the main processor. Specifically, the electronic device 100 can determine the period for all health applications managed by the main processor to call the main processor to send data. The duration of the above period can be, for example, the maximum value of the ideal sampling periods of multiple sensors that all health applications managed by the main processor need to call. In this way, the sensors in the electronic device 100 can unify the time to call the main processor, and the main processor can centrally process the sensor data. Compared with each health application calling the main processor separately, and the main processor being frequently awakened to process various data, this method can ensure the working efficiency of the electronic device 100 and reduce power consumption.

[0203] In some implementation manners, the electronic device 100 may include a processor, and the sensor is responsible for processing sensor data. At this time, the electronic device 100 can also unify the time for multiple health applications therein to call the processor to process data. For the manner in which the electronic device 100 implements the above process, reference can be made to the relevant descriptions in the foregoing embodiments, which will not be elaborated here. Since there is also a certain amount of power consumption during the data transceiver process, it can be understood that adopting the above method to unify the time for health applications to call the processor can unify multiple calls into one call, and can also ensure the working efficiency of the electronic device 100 and reduce power consumption.

Claims

1. A sensor control method, characterized in that, The method is applied to an electronic device, and the method includes: When multiple applications all need to call a first sensor to collect data, obtain multiple data collection parameters of the multiple applications for calling the first sensor to collect data; Determine a first parameter according to the multiple data collection parameters of the multiple applications; Call the first sensor to collect data according to the first parameter; Distribute the data collected by the first sensor to the multiple applications; Wherein, the power consumption of calling the first sensor to collect data according to the first parameter is less than the sum of the power consumptions of calling the first sensor to collect data respectively according to the multiple data collection parameters of the multiple applications.

2. The method according to claim 1, wherein The multiple data collection parameters of the multiple applications include one or more of the following parameters: period, frequency, duration.

3. The method according to claim 2, wherein Determining the first parameter according to the multiple data collection parameters of the multiple applications specifically includes: Determine the period parameter in the first parameter according to the period parameters in the multiple data collection parameters of the multiple applications; Determine the frequency parameter in the first parameter according to the frequency parameters in the multiple data collection parameters of the multiple applications; Determine the duration parameter in the first parameter according to the duration parameters in the multiple data collection parameters of the multiple applications.

4. The method according to claim 3, wherein The period parameter in the first parameter is the minimum value of the periods in the multiple data collection parameters of the multiple applications; and / or The frequency parameter in the first parameter is the maximum value of the frequencies in the multiple data collection parameters of the multiple applications; and / or The duration parameter in the first parameter is the maximum value of the durations in the multiple data collection parameters of the multiple applications.

5. The method according to claim 3, wherein The period parameter in the first parameter is the maximum value of the period parameters in the multiple data collection parameters of the multiple applications; and / or The frequency parameter in the first parameter is the minimum value of the frequency parameters in the multiple data collection parameters of the multiple applications; and / or The duration parameter in the first parameter is the minimum value of the duration parameters in the multiple data collection parameters of the multiple applications.

6. The method according to claim 2, wherein Determining the first parameter according to the multiple data collection parameters of the multiple applications specifically includes: Determine the first parameter only according to the data collection parameters among the multiple data collection parameters of the multiple applications whose period is less than or equal to a first value; and / or Determine the first parameter only according to the data collection parameters among the multiple data collection parameters of the multiple applications whose frequency is greater than or equal to a second value; and / or Determine the first parameter only according to the data collection parameters among the multiple data collection parameters of the multiple applications whose duration is greater than or equal to a third value.

7. For the method according to claim 6, the distributing the data collected by the first sensor to the multiple applications includes: Distribute the data collected by the first sensor to the applications among the multiple applications whose data collection parameters have a period less than or equal to a first value, and / or whose data collection parameters have a frequency greater than or equal to a second value, and / or whose data collection parameters have a duration greater than or equal to a third value.

8. The method according to any one of claims 1-7, the method further comprising: In response to enabling the power saving mode, obtain the identifiers of the sensors that each of all applications needs to call; Determine whether there are any of the multiple applications that all need to call the first sensor to collect data according to the identifiers of the sensors that each of all applications needs to call.

9. The method according to any one of claims 1-7, the method further comprising: In response to detecting that several applications are running, obtain the identifiers of the sensors that each of the several applications needs to call; Determine whether there are any of the multiple applications that all need to call the first sensor to collect data according to the identifiers of the sensors that each of the several applications needs to call.

10. The method according to any one of claims 1-7, the method further comprising: The identifier of the sensor that the first application needs to call includes the identifier of the first sensor; In response to running the first application, obtain the identifiers of the sensors that each of all applications needs to call; Determine whether there are any of the multiple applications that all need to call the first sensor to collect data according to the identifiers of the sensors that each of all applications needs to call.

11. The method according to any one of claims 1-6, characterized in that, When multiple applications all need to call the first sensor to collect data, obtaining the multiple data collection parameters for the multiple applications to call the first sensor to collect data specifically includes: When the first sensor includes multiple collection modes, respectively determine the data collection parameters corresponding to each collection mode in the multiple collection modes.

12. A sensor control method, characterized in that, The method is applied to an electronic device, and the method includes: When the electronic device is in the power saving mode, collect first data according to a first parameter, where the first parameter is determined according to a second parameter and a third parameter, the second parameter is the default parameter for the first application to collect second data, and the third parameter is the default parameter for the second application to collect third data, and the first data, the second data, and the third data are all data collected by the first sensor; Wherein, the power consumption of the electronic device for collecting the first data is less than the sum of the power consumption of the first application for collecting the second data and the power consumption of the second application for collecting the third data.

13. The method according to claim 12, wherein The first parameter, the second parameter, and the third parameter include one or more of the following parameters: period, frequency, duration.

14. The method according to claim 13, wherein Before collecting the first data according to the first parameter, the method further comprises: Obtain the second parameter corresponding to the first application and the third parameter corresponding to the second application; Determine the first parameter according to the second parameter and the third parameter.

15. The method according to claim 14, wherein Determining the first parameter according to the second parameter and the third parameter specifically includes: Determine the period parameter in the first parameter according to the period parameter in the second parameter and the period parameter in the third parameter; and / or Determine the frequency parameter in the first parameter according to the frequency parameter in the second parameter and the frequency parameter in the third parameter; and / or Determine the duration parameter in the first parameter according to the duration parameter in the second parameter and the duration parameter in the third parameter.

16. The method according to claim 15, wherein The period parameter in the first parameter is the smaller value among the period parameter in the second parameter and the period parameter in the third parameter; and / or The frequency parameter in the first parameter is the larger value among the frequency parameter in the second parameter and the frequency parameter in the third parameter; and / or The duration parameter in the first parameter is the larger value among the duration parameter in the second parameter and the duration parameter in the third parameter.

17. The method according to claim 15, wherein The period parameter in the first parameter is the larger value among the period parameter in the second parameter and the period parameter in the third parameter; and / or The frequency parameter in the first parameter is the smaller value among the frequency parameter in the second parameter and the frequency parameter in the third parameter; and / or The duration parameter in the first parameter is the smaller value among the duration parameter in the second parameter and the duration parameter in the third parameter.

18. The method according to any one of claims 15-17, wherein The period parameter in the second parameter and the period parameter in the third parameter are both less than a first value; and / or The frequency parameter in the second parameter and the frequency parameter in the third parameter are both greater than a second value; and / or The duration parameter in the second parameter and the duration parameter in the third parameter are both greater than a third value.

19. The method according to any one of claims 12-18, characterized in that, The working state of the sensor includes a first state and a second state; When the electronic device collects the first data, the second data and the third data, the first sensor is in the first state.

20. An electronic device, characterized in that, The electronic device includes a memory, a processor and a sensor. The memory is used to store a computer program, and the processor is used to call the computer program so that the electronic device executes the method according to any one of claims 1-11, or the method according to any one of claims 12-19.

21. A computer program product comprising instructions, characterized in that, When the computer program product runs on the electronic device, the electronic device executes the method according to any one of claims 1-11, or the method according to any one of claims 12-19.

22. A computer-readable storage medium, comprising instructions, characterized in that, When the instruction runs on the electronic device, the electronic device executes the method according to any one of claims 1-11, or the method according to any one of claims 12-19.