CN114449622A - Method for calculating Wi-Fi power consumption and electronic equipment - Google Patents

Method for calculating Wi-Fi power consumption and electronic equipment Download PDF

Info

Publication number
CN114449622A
CN114449622A CN202011197195.5A CN202011197195A CN114449622A CN 114449622 A CN114449622 A CN 114449622A CN 202011197195 A CN202011197195 A CN 202011197195A CN 114449622 A CN114449622 A CN 114449622A
Authority
CN
China
Prior art keywords
power consumption
electronic device
electronic equipment
reference information
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011197195.5A
Other languages
Chinese (zh)
Inventor
王晶
万江
郭玉华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202011197195.5A priority Critical patent/CN114449622A/en
Publication of CN114449622A publication Critical patent/CN114449622A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0212Power saving arrangements in terminal devices managed by the network, e.g. network or access point is master and terminal is slave
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0225Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal
    • H04W52/0248Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal dependent on the time of the day, e.g. according to expected transmission activity
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The application discloses a method and electronic equipment for calculating Wi-Fi power consumption, wherein the method comprises the following steps: the method comprises the steps that the electronic equipment acquires first reference information from a Wi-Fi chip, wherein the first reference information comprises the working time length of the electronic equipment working in various Wi-Fi digital circuit states and various Wi-Fi analog circuit states in a calculation cycle; the electronic equipment calculates first Wi-Fi power consumption according to the first reference information and the first power consumption information, wherein the first power consumption information is used for indicating power consumption of the electronic equipment when the electronic equipment works in multiple Wi-Fi digital circuit states and multiple Wi-Fi analog circuit states. In this way, the electronic device may improve the accuracy of calculating Wi-Fi power consumption.

Description

Method for calculating Wi-Fi power consumption and electronic equipment
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a method for calculating Wi-Fi power consumption and an electronic device.
Background
With the rapid development of intelligent technology, electronic devices (such as mobile phones, computers, earphones and the like) become indispensable tools in people's daily life. Moreover, with the continuous development of the manufacturing technology of the electronic device, the functions of the electronic device are more and more, such as various instant messaging application programs, game software, and the like, and in the using process of a user, the duration of the electronic device is a critical factor influencing the user experience.
In order to prolong the endurance of the electronic equipment and guarantee the endurance experience of the user, the electronic equipment can calculate the power consumption and output prompt information or execute power consumption management and control based on the power consumption. The Wireless local area network (Wi-Fi) is used as an important power consumption part of the electronic equipment, and the electronic equipment can calculate the Wi-Fi power consumption, output prompt information about the Wi-Fi power consumption and execute power utilization management and control according to the Wi-Fi power consumption.
Therefore, how to accurately calculate the Wi-Fi power consumption is a problem which needs to be solved at present.
Disclosure of Invention
The embodiment of the application provides a method for calculating Wi-Fi power consumption and electronic equipment, and the method can improve the accuracy of calculating the Wi-Fi power consumption of the electronic equipment.
In a first aspect, a method for calculating Wi-Fi power consumption is provided, which is applied to an electronic device including a Wi-Fi chip, and includes: the method comprises the steps that the electronic equipment acquires first reference information from a Wi-Fi chip, wherein the first reference information comprises the working time length of the electronic equipment working in various Wi-Fi digital circuit states and various Wi-Fi analog circuit states in a calculation cycle; the electronic equipment calculates first Wi-Fi power consumption according to the first reference information and the first power consumption information, wherein the first power consumption information is used for indicating power consumption of the electronic equipment when the electronic equipment works in multiple Wi-Fi digital circuit states and multiple Wi-Fi analog circuit states.
Therefore, when the electronic equipment calculates the Wi-Fi power consumption, first reference information including the working time length of the electronic equipment working in various Wi-Fi digital circuit states and various Wi-Fi analog circuit states in a calculation period is obtained, and the first Wi-Fi power consumption is calculated according to the first reference information and the first power consumption information. Therefore, the calculated Wi-Fi power consumption distinguishes the Wi-Fi power consumption difference under various Wi-Fi digital circuit states and various Wi-Fi analog circuit states, and the accuracy of calculating the Wi-Fi power consumption can be improved.
With reference to the first aspect, in one possible implementation manner, the plurality of Wi-Fi digital circuit states include that the Wi-Fi digital circuit operates at a plurality of frequency points; the plurality of Wi-Fi analog circuit states comprise: the Wi-Fi analog circuit operates at a plurality of bandwidths, and the Wi-Fi analog circuit operates in one or more of a plurality of radio frequency states.
With reference to the first aspect, in one possible implementation manner, the electronic device further includes a power amplifier, and the method further includes:
the electronic equipment acquires second reference information from the Wi-Fi chip, wherein the second reference information comprises the working time of the power amplifier working in various states or the number of frames for sending data frames in a calculation period, and the number of data packets received by the electronic equipment; and the electronic equipment calculates second Wi-Fi power consumption according to second reference information and second power consumption information, wherein the second power consumption information is used for indicating the power consumption of the power amplifier in multiple states and the power consumption of the electronic equipment for receiving a single data packet. When the electronic equipment calculates the Wi-Fi power consumption, the power consumption difference of the data packet sending state and the data packet receiving state is considered, and the accuracy of calculating the Wi-Fi power consumption can be improved.
With reference to the first aspect, in one possible implementation manner, the plurality of states include that the power amplifier operates at a plurality of transmission powers or that the power amplifier operates at a plurality of transmission rates.
With reference to the first aspect, in a possible implementation manner, the method further includes: the electronic equipment acquires third reference information from the Wi-Fi chip, wherein the third reference information comprises the working time length of the electronic equipment in a Wi-Fi light sleep (light sleep) state and a Wi-Fi deep sleep (deep sleep) state in a calculation cycle; and the electronic equipment calculates third Wi-Fi power consumption according to the third reference information and the third power consumption information, wherein the third power consumption information is used for indicating the power consumption of the electronic equipment in a Wi-Fi light sleep state and a Wi-Fi deep sleep state. When the electronic equipment calculates the Wi-Fi power consumption, the power consumption difference in the sleep state is considered, and the accuracy of calculating the Wi-Fi power consumption can be improved.
With reference to the first aspect, in a possible implementation manner, the method further includes:
the electronic device determines a total amount of power consumed by the Wi-Fi during the computing period according to the first Wi-Fi power consumption, the second Wi-Fi power consumption and the third Wi-Fi power consumption.
With reference to the first aspect, in a possible implementation manner, the method further includes:
if the ratio of the second power consumption to the total power consumption of the Wi-Fi is smaller than a preset value, the electronic equipment outputs prompt information, and the prompt information is used for prompting the user that the power consumption of the Wi-Fi is abnormal; and/or the electronic equipment executes the operation of cleaning the process or the application of the abnormal access Wi-Fi chip; and/or the electronic equipment reports the power consumption abnormal event of the Wi-Fi to the server. Exception handling may be performed in the event that a Wi-Fi power consumption exception is identified.
With reference to the first aspect, in a possible implementation manner, the method further includes:
the electronic equipment acquires a first data volume of a data packet sent and/or received by an application through Wi-Fi in a calculation period; the electronic equipment calculates the ratio of the first data volume to the total data volume, wherein the total data volume is the data volume of data packets sent and/or received by the electronic equipment through Wi-Fi in a calculation period; the electronic equipment determines the Wi-Fi power consumption applied in the calculation period according to the ratio of the first data amount to the total data amount and the total power consumption of the Wi-Fi.
In a second aspect, embodiments of the present application provide an electronic device, including one or more memories and one or more processors, the one or more memories being coupled to the one or more processors, the one or more memories storing computer program code, the computer program code including computer instructions that, when executed by the one or more processors, cause the electronic device to perform operations comprising:
acquiring first reference information from a Wi-Fi chip, wherein the first reference information comprises working time length of the electronic equipment working in various Wi-Fi digital circuit states and various Wi-Fi analog circuit states in a calculation cycle; and calculating first Wi-Fi power consumption according to the first reference information and the first power consumption information, wherein the first power consumption information is used for indicating the power consumption of the electronic equipment in various Wi-Fi digital circuit states and various Wi-Fi analog circuit states.
With reference to the second aspect, in one possible implementation manner, the plurality of Wi-Fi digital circuit states include that the Wi-Fi digital circuit operates at a plurality of frequency points; the plurality of Wi-Fi analog circuit states comprise: the Wi-Fi analog circuit works in a plurality of bandwidths, and the Wi-Fi analog circuit works in one or more radio frequency states.
With reference to the second aspect, in one possible implementation manner, the electronic device further includes a power amplifier, and the computer instructions, when executed by the one or more processors, cause the electronic device to further perform the following operations:
acquiring second reference information from the Wi-Fi chip, wherein the second reference information comprises the working time of the power amplifier working in various states or the number of frames for sending data frames in a calculation period, and the number of data packets received by the electronic equipment;
and calculating second Wi-Fi power consumption according to second reference information and second power consumption information, wherein the second power consumption information is used for indicating the power consumption of the power amplifier in multiple states and the power consumption of the electronic equipment for receiving a single data packet. When the electronic equipment calculates the Wi-Fi power consumption, the power consumption difference of the data packet sending state and the data packet receiving state is considered, and the accuracy of calculating the Wi-Fi power consumption can be improved.
With reference to the second aspect, in one possible implementation manner, the plurality of states include that the power amplifier operates at a plurality of transmission powers or that the power amplifier operates at a plurality of transmission rates.
With reference to the second aspect, in one possible implementation manner, the computer instructions, when executed by the one or more processors, cause the electronic device to further perform the following operations: acquiring third reference information from the Wi-Fi chip, wherein the third reference information comprises the working time length of the electronic equipment working in a Wi-Lighting sleep state and a Wi-Fideep sleep state in a calculation period; and calculating third Wi-Fi power consumption according to the third reference information and the third power consumption information, wherein the third power consumption information is used for indicating the power consumption of the electronic equipment in a Wi-Fi light sleep state and a Wi-Fi deep sleep state. When the electronic equipment calculates the Wi-Fi power consumption, the power consumption difference in the sleep state is considered, and the accuracy of calculating the Wi-Fi power consumption can be improved.
With reference to the second aspect, in one possible implementation manner, the computer instructions, when executed by the one or more processors, cause the electronic device to further perform the following operations:
and determining the total power consumption of the Wi-Fi in the calculation period according to the first Wi-Fi power consumption, the second Wi-Fi power consumption and the third Wi-Fi power consumption.
With reference to the second aspect, in one possible implementation manner, the computer instructions, when executed by the one or more processors, cause the electronic device to further perform the following operations:
if the ratio of the second power consumption to the total power consumption of the Wi-Fi is smaller than a preset value, outputting prompt information, wherein the prompt information is used for prompting a user that the power consumption of the Wi-Fi is abnormal; and/or executing the operation of cleaning the process or application of the abnormal access Wi-Fi chip; and/or reporting the power consumption abnormal event of the Wi-Fi to a server. Exception handling may be performed in the event that a Wi-Fi power consumption exception is identified.
With reference to the second aspect, in one possible implementation manner, the computer instructions, when executed by the one or more processors, cause the electronic device to further perform the following operations:
acquiring a first data volume of a data packet sent and/or received by an application through Wi-Fi in a calculation period; calculating a ratio of the first data volume to the total data volume, wherein the total data volume is the data volume of a data packet sent and/or received by the electronic equipment through Wi-Fi in a calculation period; and determining the Wi-Fi power consumption of one application in the calculation period according to the ratio of the first data amount to the total data amount and the total power consumption of the Wi-Fi.
In a third aspect, a computer storage medium is provided, which includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method according to the first aspect or any possible implementation manner of the first aspect.
In a fourth aspect, a computer program product is provided, which, when run on a computer, causes the computer to perform the method according to the first aspect or any of its possible implementations.
In the embodiment of the application, the electronic equipment acquires first reference information including working time of the electronic equipment working in various Wi-Fi digital circuit states and various Wi-Fi analog circuit states in a calculation period from a Wi-Fi chip, and calculates first Wi-Fi power consumption according to the first reference information and first power consumption information. By the mode, the electronic equipment considers the power consumption difference of various Wi-Fi digital circuit states and/or various Wi-Fi analog circuit states when calculating the Wi-Fi power consumption, so that the accuracy of calculating the Wi-Fi power consumption is effectively improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the embodiments of the present application will be described below.
Fig. 1A is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 1B is a block diagram of a software structure of an electronic device according to an embodiment of the present application;
FIG. 2 is a schematic flowchart of a method for calculating Wi-Fi power consumption according to an embodiment of the present disclosure;
3A-3C are schematic diagrams of a user interface for obtaining access rights to a Wi-Fi chip according to an embodiment of the present disclosure;
FIG. 4 is a schematic flowchart of another method for calculating Wi-Fi power consumption according to an embodiment of the present disclosure;
5A-5B are schematic diagrams of a user interface for visualizing prompt information provided by an embodiment of the application;
FIG. 6 is a schematic flowchart of another method for calculating Wi-Fi power consumption according to an embodiment of the present disclosure;
fig. 7A to 7E are schematic diagrams of a user interface for displaying power consumption according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described in detail and clearly with reference to the accompanying drawings. In the description of the embodiments herein, "/" means "or" unless otherwise specified, for example, a/B may mean a or B; "and/or" in the text is only an association relationship describing an associated object, and means that three relationships may exist, for example, a and/or B may mean: three cases of a alone, a and B both, and B alone exist, and in addition, "a plurality" means two or more than two in the description of the embodiments of the present application.
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as implying or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of embodiments of the application, unless stated otherwise, "plurality" means two or more.
In the embodiment of the application, a wireless fidelity (Wi-Fi) module is included in the electronic equipment, and the Wi-Fi module can provide a solution of wireless communication including a Wi-Fi network applied to the electronic equipment. The Wi-Fi module comprises Wi-Fi digital circuits and Wi-Fi analog circuits. The Wi-Fi digital circuit can refer to a microprocessor running Wi-Fi related tasks in the electronic equipment, and can also be called a Wi-Fi chip. Wi-Fi's analog circuitry refers to hardware circuitry that performs Wi-Fi-related tasks. Such as a Physical layer (PHY), a data link layer, radio frequency circuitry, Power Amplifiers (PA), and so forth.
To calculate Wi-Fi power consumption in an electronic device, embodiments of the present application propose a method for calculating Wi-Fi power consumption, which refers to the amount of power consumed by the electronic device to run Wi-Fi-related tasks. In the method, the electronic equipment acquires first reference information including working time of the electronic equipment working in a plurality of Wi-Fi digital circuit states and a plurality of Wi-Fi analog circuit states in a calculation cycle from a Wi-Fi chip, and calculates the first Wi-Fi power consumption according to the first reference information and first power consumption information. The first power consumption information is used for indicating the power consumption of the electronic equipment in various Wi-Fi digital circuit states and various Wi-Fi analog circuit states. In the method, the electronic equipment distinguishes power consumption differences generated by the plurality of Wi-Fi digital circuit states and the plurality of Wi-Fi analog circuit states, and accuracy of calculating the power consumption of Wi-Fi can be improved.
Wi-Fi in an electronic device may be in multiple overall states. Wherein the overall state of the Wi-Fi is related to the on or off state of the digital circuit of the Wi-Fi and the analog circuit of the Wi-Fi. In one possible implementation, Wi-Fi is active when digital circuitry of the Wi-Fi and analog circuitry of the Wi-Fi are turned on. When the digital circuit of the Wi-Fi is turned on and the analog circuit of the Wi-Fi is turned off, the Wi-Fi is in a light sleep state. When the digital circuit of the Wi-Fi is closed and the analog circuit of the Wi-Fi is closed, the Wi-Fi is in a deep sleep (deep sleep) state.
The following explains concepts (e.g., Wi-Fi digital circuit status, Wi-Fi analog circuit status, various power amplifier statuses) related to the embodiments of the present application.
(1) Wi-Fi digital circuit state
The Wi-Fi digital circuit state comprises a frequency point at which the Wi-Fi digital circuit works, and correspondingly, the plurality of Wi-Fi digital circuit states comprises a plurality of frequency points at which the Wi-Fi digital circuit works.
The number of frequency points of the Wi-Fi digital circuit in the electronic equipment is related to the configuration of software and hardware, and the number of frequency points of the Wi-Fi digital circuit of the electronic equipment with different software and hardware configurations is different. For example, the Wi-Fi digital circuits in electronic devices of different manufacturers have different frequency points. Generally, the number of frequency bins of the Wi-Fi digital circuit supported by the electronic device may be 1, 2, 3, 4, 5, 6 or other positive integers, which is not limited herein.
Wherein one frequency point corresponds to the frequency of one frequency band. For example, in a GSM network, the frequency intervals are all 200 KHz. Thus, 125 frequency bands are divided from 890MHz, 890.2MHz, 890.4MHz, 890.6MHz, 890.8MHz, 891MHz … 915MHz according to the frequency interval of 200 KHz. The frequency of the electronic device in the GSM network is 3, that is to say the electronic device carrier will receive signals at 890.4MHz and transmit signals at 935.4 MHz.
For electronic equipment with the frequency point number larger than 1, the Wi-Fi digital circuits can work at different frequency points, and the power consumption of the Wi-Fi digital circuits working at different frequency points is different. Within the same time, the higher the frequency corresponding to the working frequency point of the Wi-Fi digital circuit is, the more the power consumption of the Wi-Fi is.
(2) Wi-Fi analog circuit state
The Wi-Fi analog circuit state includes a bandwidth and/or radio frequency state of the Wi-Fi analog circuit. Accordingly, the plurality of Wi-Fi analog circuit states includes the Wi-Fi analog circuit operating at a plurality of bandwidths and the Wi-Fi analog circuit operating at one or more of a plurality of radio frequency states.
The bandwidth of the Wi-Fi analog circuit in the electronic equipment is related to the configuration of software and hardware, and the bandwidth of the Wi-Fi analog circuit of the electronic equipment with different software and hardware configurations is different. Typically, the bandwidth of the Wi-Fi analog circuits supported by the electronic device may be one or more of 20M, 40M, 80M, 160M. Other bandwidths are possible and not limited herein. For an electronic device supporting multiple bandwidths of Wi-Fi analog circuits, the Wi-Fi analog circuits can work in different bandwidths and the power consumption of the Wi-Fi analog circuits is different when the Wi-Fi analog circuits work in different bandwidths. The larger the bandwidth of the Wi-Fi analog circuit in the same time, the faster the data transmission rate of the physical layer and/or the data link layer of the Wi-Fi analog circuit, and the more the Wi-Fi consumes power.
The radio frequency state of a Wi-Fi analog circuit in the electronic equipment is related to the configuration of software and hardware, and the radio frequency state of a Wi-Fi digital circuit supported by the electronic equipment with different software and hardware configurations is different. Generally, the radio frequency state of the Wi-Fi analog circuits supported by the electronic device may be one or more of a single radio frequency state, a dual radio frequency state. Aiming at an electronic device supporting multiple radio frequency states of a Wi-Fi analog circuit, the Wi-Fi analog circuit can work in different radio frequency states, and the power consumption of the Wi-Fi analog circuit is different when the Wi-Fi analog circuit works in different radio frequency states. In the same time, the larger the number of radio frequency channels in the radio frequency state of the Wi-Fi analog circuit is, the larger the power consumption of Wi-Fi is. For example, the power consumption of Wi-Fi in which the Wi-Fi analog circuit operates in a dual radio frequency state is greater than the power consumption of Wi-Fi in which the Wi-Fi analog circuit operates in a single radio frequency state at the same time.
(3) Multiple states of a power amplifier
Wi-Fi analog circuitry in an electronic device includes a power amplifier that amplifies a transmit signal sent by the electronic device over Wi-Fi that contains a data packet. The state of a power amplifier of a Wi-Fi analog circuit in an electronic device is related to a transmit power of the power amplifier or a transmit rate of the power amplifier. The plurality of states of the power amplifier include the power amplifier operating at a plurality of transmit powers or the power amplifier operating at a plurality of transmit rates. The power amplifier of the Wi-Fi analog circuit can work in different states, and the power consumption of the power amplifier is different when the power amplifier works in different states. When the data packet is transmitted through the Wi-Fi, the higher the transmitting power of the power amplifier is, the more the power consumption of the Wi-Fi is. Or, the faster the transmission rate of the power amplifier is, the more the Wi-Fi consumes power in the same time. Or, in the process of sending the same data frame, the higher the transmission power of the power amplifier is, the more the power consumption of the Wi-Fi is. Or, the faster the transmission rate of the power amplifier is, the more the Wi-Fi power consumption is during the transmission of the same data frame.
An exemplary electronic device 100 provided in an embodiment of the present application is described below, where the electronic device 100 includes a Wi-Fi chip.
Fig. 1A shows a schematic structural diagram of an electronic device 100.
The following describes an embodiment specifically by taking the electronic device 100 as an example. It should be understood that electronic device 100 may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
The electronic device 100 may include: the mobile terminal includes a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identity Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the illustrated structure of the embodiment of the present application does not specifically limit the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
The controller may be, among other things, a neural center and a command center of the electronic device 100. The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc.
The I2C interface is a bi-directional synchronous serial bus that includes a serial data line (SDA) and a Serial Clock Line (SCL). In some embodiments, processor 110 may include multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces, respectively. For example: the processor 110 may be coupled to the touch sensor 180K via an I2C interface, such that the processor 110 and the touch sensor 180K communicate via an I2C bus interface to implement the touch functionality of the electronic device 100.
The I2S interface may be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may communicate audio signals to the wireless communication module 160 via the I2S interface, enabling answering of calls via a bluetooth headset.
The PCM interface may also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled by a PCM bus interface. In some embodiments, the audio module 170 may also transmit the audio signal to the wireless communication module 160 through the PCM interface, so as to implement the function of answering a call through the bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus used for asynchronous communications. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a bluetooth headset.
The MIPI interface may be used to connect the processor 110 with peripheral devices such as the display screen 194, the camera 193, and the like. The MIPI interface includes a Camera Serial Interface (CSI), a Display Serial Interface (DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the capture functionality of electronic device 100. The processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal and may also be configured as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, and the like.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transmit data between the electronic device 100 and a peripheral device. And the earphone can also be used for connecting an earphone and playing audio through the earphone. The interface may also be used to connect other electronic devices, such as AR devices and the like.
It should be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only an illustration, and does not limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charging management module 140, and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred 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 modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like. 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 electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves. The wireless communication module 160 includes a Wi-Fi module.
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 so that electronic device 100 can communicate with networks and other devices through wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), General Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), Wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), Long Term Evolution (LTE), LTE, BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The ISP is used to process the data fed back by the camera 193. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments, the electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor that processes input information quickly by using a biological neural network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. Applications such as intelligent recognition of the electronic device 100 can be implemented by the NPU, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The storage data area may store data (such as audio data, phone book, etc.) created during use of the electronic device 100, and the like. In addition, the internal memory 121 may include a high speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a Universal Flash Storage (UFS), and the like.
The electronic device 100 may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal. The electronic apparatus 100 can listen to music through the speaker 170A or listen to a handsfree call.
The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into an acoustic signal. When the electronic apparatus 100 receives a call or voice information, it can receive voice by placing the receiver 170B close to the ear of the person.
The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can input a voice signal to the microphone 170C by speaking the user's mouth near the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C to achieve a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further include three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, perform directional recording, and so on.
The headphone interface 170D is used to connect a wired headphone. The headset interface 170D may be the USB interface 130, or may be a 3.5mm open mobile electronic device platform (OMTP) standard interface, a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used for sensing a pressure signal, and converting the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A can be of a wide variety, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic apparatus 100 may also calculate the touched position from the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but different touch operation intensities may correspond to different operation instructions. For example: and when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for viewing the short message. And when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.
The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., the x, y, and z axes) may be determined by gyroscope sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects a shake angle of the electronic device 100, calculates a distance to be compensated for by the lens module according to the shake angle, and allows the lens to counteract the shake of the electronic device 100 through a reverse movement, thereby achieving anti-shake. The gyroscope sensor 180B may also be used for navigation, somatosensory gaming scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude, aiding in positioning and navigation, from barometric pressure values measured by barometric pressure sensor 180C.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the opening and closing state of the leather sheath or the opening and closing state of the flip cover, the automatic unlocking of the flip cover is set.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity may be detected when the electronic device 100 is stationary. The method can also be used for recognizing the posture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, taking a picture of a scene, electronic device 100 may utilize range sensor 180F to range for fast focus.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light to the outside through the light emitting diode. The electronic device 100 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there are no objects near the electronic device 100. The electronic device 100 can utilize the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear for talking, so as to automatically turn off the screen to achieve the purpose of saving power. The proximity light sensor 180G may also be used in a holster mode, a pocket mode automatically unlocks and locks the screen.
The ambient light sensor 180L is used to sense the ambient light level. Electronic device 100 may adaptively adjust the brightness of display screen 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust the white balance when taking a picture. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 can utilize the collected fingerprint characteristics to unlock the fingerprint, access the application lock, photograph the fingerprint, answer an incoming call with the fingerprint, and so on.
The temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 100 implements a temperature processing strategy using the temperature detected by temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 performs a reduction in performance of a processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, the electronic device 100 heats the battery 142 when the temperature is below another threshold to avoid the low temperature causing the electronic device 100 to shut down abnormally. In other embodiments, when the temperature is lower than a further threshold, the electronic device 100 performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
The touch sensor 180K is also referred to as a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on a surface of the electronic device 100, different from the position of the display screen 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, the bone conduction sensor 180M may acquire a vibration signal of the human vocal part vibrating the bone mass. The bone conduction sensor 180M may also contact the human pulse to receive the blood pressure pulsation signal. In some embodiments, the bone conduction sensor 180M may also be disposed in a headset, integrated into a bone conduction headset. The audio module 170 may analyze a voice signal based on the vibration signal of the bone mass vibrated by the sound part acquired by the bone conduction sensor 180M, so as to implement a voice function. The application processor can analyze heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, so as to realize the heart rate detection function.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The electronic apparatus 100 may receive a key input, and generate a key signal input related to user setting and function control of the electronic apparatus 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations applied to different areas of the display screen 194. Different application scenes (such as time reminding, receiving information, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card can be brought into and out of contact with the electronic apparatus 100 by being inserted into the SIM card interface 195 or being pulled out of the SIM card interface 195. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support a Nano SIM card, a Micro SIM card, a SIM card, etc. The same SIM card interface 195 can be inserted with multiple cards at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
The software system of the electronic device 100 may employ a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes an Android system with a layered architecture as an example, and exemplarily illustrates a software structure of the electronic device 100.
Fig. 1B is a block diagram of a software structure of an electronic device 100 according to an embodiment of the present disclosure.
The layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, an application layer, an application framework layer, an Android runtime (Android runtime) and system library, and a kernel layer from top to bottom.
The application layer may include a series of application packages.
As shown in fig. 1B, the application package may include applications such as camera, gallery, calendar, phone call, map, navigation, WLAN, bluetooth, music, video, short message, settings, etc.
The setting is an application of the electronic device 100. The user can customize the selection of various function options of the electronic device 100 by setting, for example, bluetooth, gps (global positioning system), Wi-Fi, and the like. The user can also make customized modification to various setting options of the electronic device through setting, such as display screen brightness, volume size, display font size and the like. Optionally, in some embodiments of the present application, the electronic device may display the power level of the battery through the setting. Optionally, in some embodiments of the present application, a user may perform a customized selection on the battery by setting, for example, whether to turn on the power saving mode or not may be selected. Optionally, in some embodiments of the present application, the user may display the power consumption ranks of the hardware and the power consumption ranks of the software by setting. Optionally, in some embodiments of the present application, a user may perform customized selection on software and hardware by setting, for example, whether to turn on Wi-Fi, select an operation permission of a software application, and the like.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application of the application layer. The application framework layer includes some predefined functions.
As shown in FIG. 1B, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
The view system includes visual controls such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures. In the embodiment of the application, a view of the total Wi-Fi power consumption in the calculation period can be displayed, a view of Wi-Fi power consumption in the calculation period applied by each application can be displayed, and a view of prompt information comprising characters or pictures can also be displayed.
The phone manager is used to provide communication functions of the electronic device 100. Such as management of call status (including on, off, etc.).
The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so forth.
The notification manager enables applications to display notification information in a status bar, can be used to convey notification-type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as a notification manager used to inform download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scroll bar text at the top status bar of the system, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, text information is prompted in the status bar, a prompt tone is given, the intelligent terminal vibrates, and the indicator light flickers.
The Android Runtime comprises a core library and a virtual machine. The Android runtime is responsible for scheduling and managing an Android system.
The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. And executing java files of the application layer and the application framework layer into a binary file by the virtual machine. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface managers (surface managers), Media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), daemons, and the like.
The surface manager is used to manage the display subsystem and provide a fusion of 2D and 3D layers for multiple applications.
The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats, such as MPEG4, g.264, MP3, AAC, AMR, JPG, PNG, and the like.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The daemon process comprises processes of polling reading, energy calculation, abnormal power consumption and the like. In some embodiments of the present application, the electronic device may obtain the reference information from the Wi-Fi chip by polling reading. Optionally, after the reference information is obtained, the electronic device may obtain the Wi-Fi power consumption corresponding to the reference information through energy calculation. Optionally, the electronic device may perform anomaly detection on the Wi-Fi power consumption amount by using the power consumption anomaly, and the like.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver, a sensor driver and a calculation driver.
The software system shown in fig. 1B relates to application presentation (e.g., gallery, file manager) using sharing capability, an instant sharing module providing sharing capability, print service (print service) and print background service (print spooner) providing printing capability, and an application framework layer providing print framework, WLAN service, bluetooth service, and a kernel and an underlying layer providing WLAN bluetooth capability and basic communication protocol.
The computing driver has a connection relationship with the wireless communication module 160. Under the condition that the electronic device is allowed to access the Wi-Fi chip, the computing driver can detect a control instruction issued by polling in the daemon process, and acquire reference information including the Wi-Fi digital circuit state and the Wi-Fi analog circuit state from the Wi-Fi chip of the Wi-Fi module in the wireless communication module 160.
The workflow of the software and hardware of the electronic device 100 is illustrated below in connection with a scenario in which Wi-Fi power consumption is calculated.
When the touch sensor 180A receives a touch operation, a corresponding hardware interrupt is issued to the kernel layer. The kernel layer processes the touch operation into an original input event (including touch coordinates, a time stamp of the touch operation, and other information). The raw input events are stored at the kernel layer. And the application framework layer acquires the original input event from the kernel layer and identifies the control corresponding to the input event. Taking the touch operation as a touch operation, and taking a control corresponding to the touch operation as a power consumption ranking control as an example, calling a kernel layer to start a calculation drive of a Wi-Fi chip, acquiring reference information in the Wi-Fi chip, calculating to obtain Wi-Fi power consumption, and displaying a view comprising the Wi-Fi power consumption through a display interface.
A method for calculating Wi-Fi power consumption according to an embodiment of the present application is described below with reference to the accompanying drawings. Fig. 2 is a schematic flowchart of a method for calculating Wi-Fi power consumption according to an embodiment of the present disclosure. Referring to fig. 2, an embodiment of the present application provides a method for calculating Wi-Fi power consumption, including steps S201 to S202:
s201: the electronic equipment acquires first reference information from the Wi-Fi chip.
In one possible implementation, after the electronic device obtains the access right to the Wi-Fi chip, the electronic device can obtain the first reference information from the Wi-Fi chip. The first reference information comprises the working time of the electronic equipment working in various Wi-Fi digital circuit states and various Wi-Fi analog circuit states in a calculation cycle. For example, the first reference information includes one or more of a working time of the Wi-Fi digital circuit working at the first frequency point, a working time of the Wi-Fi digital circuit working at the second frequency point, a working time of the Wi-Fi digital circuit working at the third frequency point, a working time of the Wi-Fi analog circuit working at the first bandwidth, a working time of the Wi-Fi analog circuit working at the second bandwidth, a working time of the Wi-Fi analog circuit working at the third bandwidth, a working time of the Wi-Fi analog circuit working at the fourth bandwidth, a working time of the Wi-Fi analog circuit working at the single radio frequency state, and a working time of the Wi-Fi analog circuit working at the double radio frequency state.
In another possible implementation, the electronic device may obtain the first reference information from the Wi-Fi chip after the electronic device obtains the right to access the Wi-Fi chip in response to a user operation. As exemplarily shown in fig. 3A-3B, the embodiments of the present application provide user interface diagrams of some electronic devices for obtaining access rights to a Wi-Fi chip.
Fig. 3A is a schematic diagram of a user interface (i.e., user interface 31) for obtaining an authority to access a Wi-Fi chip according to an embodiment of the present application. In the user interface 31 shown in fig. 3A, the user interface 31 may include: one or more signal strength indicators 301 of mobile communication signals (which may also be referred to as cellular signals), signal strength indicators 302 of wireless network communication signals, battery status indicators 303, time indicators 304 and 305, a touch control 306 for power-on, a popup window 307 for outputting permission request information, and controls 308 and 309.
Specifically, in response to a user action on the touch control 306, the electronic device turns to the on state and displays the user interface 31. In the user interface 31, the electronic device outputs request information containing the permission to access the Wi-Fi chip through the popup window 307, and in response to the click operation of the user on the control 309, the electronic device obtains the permission to access the Wi-Fi chip. The electronic device may obtain the first reference information from the Wi-Fi chip.
Fig. 3B is a schematic diagram of another user interface (i.e., the user interface 32) for obtaining the authority to access the Wi-Fi chip according to the embodiment of the present application. In the user interface 32 shown in FIG. 3B, the user interface 32 may include: icons of a plurality of application programs, for example, an icon 311 of an instant messaging application "WeChat", a popup 312 that outputs permission request information, a control 313, and a control 314. When the electronic device displays the user interface 32 for the first time, the electronic device can output request information containing the permission to access the Wi-Fi chip through the pop-up window 312, and in response to the click operation of the user on the control 313, the electronic device obtains the permission to access the Wi-Fi chip. The electronic device may obtain the first reference information from the Wi-Fi chip.
Fig. 3C is a schematic diagram of another user interface (i.e., user interface 33) for obtaining the authority to access the Wi-Fi chip according to the embodiment of the present application. The user interface 33 includes a control 321, a popup 322 for outputting the right request information, a control 323, and a control 324. When the electronic device receives a user operation on the control 321, the electronic device may output a popup 322 containing permission request information in response to the user operation, and in response to a click operation on the control 313 by the user, the electronic device obtains permission to access the Wi-Fi chip. The electronic device may obtain the first reference information from the Wi-Fi chip.
Optionally, the electronic device may obtain the first reference information from the Wi-Fi chip in each calculation cycle. Wherein the calculation period may be a pre-stored period. The period may be 1 hour, 90 minutes, 12 hours, etc. The calculation cycle may be a pre-stored time period, such as 12: 00-24: 00. 9 of each day: 00-24: 00, and so on. The calculation cycle may also be a cycle or period of time set according to user habits.
S202: the electronic equipment calculates the first Wi-Fi power consumption according to the first reference information and the first power consumption information.
The first power consumption information is used for indicating the power consumption of the electronic equipment in various Wi-Fi digital circuit states and various Wi-Fi analog circuit states. The first power consumption information corresponds to the first reference information. If the first reference information includes the working time length of the electronic equipment working in various Wi-Fi digital circuit states and various Wi-Fi analog circuit states in the calculation period, correspondingly, the first power consumption information includes the power consumption of the electronic equipment working in various Wi-Fi digital circuit states and various Wi-Fi analog circuit states in unit time. Optionally, the first power consumption information is pre-stored in the electronic device. The pre-stored first power consumption information may be set empirically or may be measured by technical means.
In one possible implementation, the first Wi-Fi power consumption comprises a product of a duration of operation in a plurality of Wi-Fi digital circuit states and a power consumption in the plurality of Wi-Fi digital circuit states, and a sum of the duration of operation in the plurality of Wi-Fi analog circuit states and the power consumption in the plurality of Wi-Fi analog circuit states. For convenience of illustration, the working time periods of the various Wi-Fi digital circuit states in the embodiments of the present application include the working time periods (using T) of the Wi-Fi digital circuit working at multiple frequency pointscpuExpressed), power consumption in various Wi-Fi digital circuit states includes power consumption (expressed as P) of the Wi-Fi digital circuit operating at multiple frequency points per unit timecpuRepresentation). Working under various Wi-Fi analog circuit statesThe duration comprises the working duration (T is used) of the Wi-Fi analog circuit working at a plurality of bandwidthsbandExpressed), the working time of the Wi-Fi analog circuit working in each radio frequency state (T is used forRFRepresents); power consumption in various Wi-Fi analog circuit states includes power consumption per unit time (with P) for the Wi-Fi analog circuit to operate in multiple bandwidthsbandExpressed), power consumption per unit time (denoted by P) of Wi-Fi analog circuits operating in various radio frequency statesRFRepresentation). Based on this, the first Wi-Fi power consumption E can be calculated by the following formula 1-11
Figure BDA0002754369670000151
In the embodiment of the application, the electronic equipment acquires first reference information from a Wi-Fi chip, wherein the first reference information comprises working time lengths of the electronic equipment working in various Wi-Fi digital circuit states and various Wi-Fi analog circuit states in a calculation cycle. And then calculating to obtain first Wi-Fi power consumption according to the first reference information and the first power consumption information, wherein the first power consumption information is used for indicating the power consumption of the electronic equipment in various Wi-Fi digital circuit states and various Wi-Fi analog circuit states. The power consumption difference of various Wi-Fi digital circuit states and/or various Wi-Fi analog circuit states is considered when the Wi-Fi power consumption is calculated, so that the accuracy of calculating the Wi-Fi power consumption can be effectively improved.
When the Wi-Fi of the electronic device is in a working state, the electronic device can send and/or receive data packets through the Wi-Fi. Wi-Fi consumes power when an electronic device sends and/or receives data packets over the Wi-Fi. Thus, during the calculation cycle, a second Wi-Fi power consumption is also calculated for sending and/or receiving data packets over Wi-Fi. Based on this, the embodiment of the application provides another method for calculating the power consumption of Wi-Fi. Fig. 4 is a schematic flowchart of another method for calculating Wi-Fi power consumption according to an embodiment of the present disclosure. Referring to fig. 4, an embodiment of the present application provides a method for calculating Wi-Fi power consumption, including steps S401 to S403:
s401: the electronic equipment acquires the first reference information and the second reference information from the Wi-Fi chip.
After the electronic device obtains the authority to access the Wi-Fi chip, the electronic device can obtain second reference information from the Wi-Fi chip. The method for the electronic device to obtain the second reference information from the Wi-Fi chip is similar to the method for the electronic device to obtain the first reference information from the Wi-Fi chip. The specific operation of the electronic device to obtain the first reference information from the Wi-Fi chip may refer to step S201, which is not described herein again.
In order to send the data packet through Wi-Fi, the electronic equipment comprises a power amplifier which is used for amplifying a transmission signal sent by the electronic equipment through Wi-Fi and containing the data packet.
The second reference information comprises the working time of the power amplifier working in various states or the number of frames for sending data frames in the calculation period, and the number of data packets received by the electronic equipment. For example, the second reference information includes an operating time length of a power amplifier in the Wi-Fi analog circuit operating at the first transmission power, an operating time length of a power amplifier in the Wi-Fi analog circuit operating at the second transmission power, an operating time length of a power amplifier in the Wi-Fi analog circuit operating at the third transmission power, and a number of data packets received by the electronic device. For another example, the second reference information includes an operating time period during which a power amplifier in the Wi-Fi analog circuit operates at the first transmission rate, an operating time period during which a power amplifier in the Wi-Fi analog circuit operates at the second transmission rate, an operating time period during which a power amplifier in the Wi-Fi analog circuit operates at the third transmission rate, and the number of the electronic device receiving the data packets. For another example, the second reference information includes a number of frames of the data frames transmitted by the power amplifier in the Wi-Fi analog circuit operating at the first transmission power, a number of frames of the data frames transmitted by the power amplifier in the Wi-Fi analog circuit operating at the second transmission power, a number of frames of the data frames transmitted by the power amplifier in the Wi-Fi analog circuit operating at the third transmission power, and a number of packets received by the electronic device. For another example, the second reference information includes a number of frames of the data frames transmitted by the Wi-Fi analog circuit when the power amplifier operates at the first transmission rate, a number of frames of the data frames transmitted by the Wi-Fi analog circuit when the power amplifier operates at the second transmission rate, a number of frames of the data frames transmitted by the Wi-Fi analog circuit when the power amplifier operates at the third transmission rate, and a number of packets received by the electronic device.
S402: the electronic device calculates a first Wi-Fi power consumption amount according to the first reference information and the first power consumption information, and calculates a second Wi-Fi power consumption amount according to the second reference information and the second power consumption information.
Step S202 may be referred to by the electronic device for calculating the first Wi-Fi power consumption according to the first reference information and the first power consumption information, which is not described herein again.
Wherein the second power consumption information is used for indicating the power consumption of the power amplifier working in a plurality of states and the power consumption of the electronic equipment receiving a single data packet. If the second reference information includes the operation time length of the power amplifier operating in the plurality of states in the calculation period, correspondingly, the second power consumption information includes the power consumption of the power amplifier operating in the plurality of states in the unit time. If the second reference information includes the number of frames for transmitting data frames in which the power amplifier operates in multiple states within the calculation period, the second power consumption information includes power consumption used by the power amplifier to transmit unit frames in which the power amplifier operates in multiple states, accordingly. Optionally, the second power consumption information is pre-stored in the electronic device. The pre-stored second power consumption information may be set empirically or may be measured by technical means.
In one possible implementation, the second Wi-Fi power consumption comprises a product of a length of time of operation in a plurality of states of the power amplifier and a power consumption in the plurality of states of the power amplifier, and a sum of a number of data packets received by the electronic device multiplied by a power consumption of the electronic device for receiving a single data packet.
For example, the operation duration of the power amplifier in the plurality of states of the embodiment of the present application includes the operation duration of the power amplifier in a plurality of transmission powers (using T)PA-pExpressed), power consumption in the various states of the power amplifier includes power consumption per unit time (expressed as P) for the power amplifier operating at multiple transmit powersPA-pRepresentation). Number of data packets received by electronic device (using N)rxPresentation) and electronPower consumption (by P) for a device receiving a single packetrxRepresentation). Based on this, the second Wi-Fi power consumption E can be calculated by the following formula 2-12
Figure BDA0002754369670000171
For example, the operation duration of the power amplifier in the plurality of states of the embodiment of the present application includes the operation duration of the power amplifier in a plurality of transmission rates (using T @)PA-vExpressed), power consumption in the various states of the power amplifier includes power consumption per unit time (in P) for the power amplifier operating at multiple transmission ratesPA-vRepresentation). Number of data packets received by electronic device (using N)rxRepresentation) and power consumption (in P) of an electronic device receiving a single data packetrxRepresentation). Based on this, the second Wi-Fi power consumption amount E can be calculated by the following formula 2-22
Figure BDA0002754369670000172
In another possible implementation, the second Wi-Fi power consumption comprises a sum of a number of frames of data frames transmitted in multiple states of the power amplifier multiplied by a power consumption of the power amplifier in the multiple states, and a number of packets received by the electronic device multiplied by a power consumption of the electronic device for receiving a single packet.
Illustratively, the number of frames for transmitting data frames in the plurality of states of the power amplifier of the embodiment of the present application includes the number of frames for transmitting data frames (using F) for which the power amplifier operates at a plurality of transmission powersPA-pRepresentation), power consumption in the plurality of states of the power amplifier includes power consumption (in P ') for the power amplifier to operate at a plurality of transmit powers in a unit frame'PA-pIndicated). Number of data packets received by electronic device (using N)rxRepresentation) and power consumption (in P) of an electronic device receiving a single data packetrxRepresentation). Based on this, the second Wi-Fi power consumption E can be calculated by the following equations 2-32
Figure BDA0002754369670000173
Illustratively, the number of frames for transmitting data frames in the plurality of states of the power amplifier of the embodiment of the present application includes the number of frames for transmitting data frames (using F) for which the power amplifier operates at a plurality of transmission ratesPA-vRepresentation), power consumption in the plurality of states of the power amplifier includes power consumption (in P ') for operating the power amplifier at a plurality of transmission rates in a unit frame'PA-vRepresentation). Number of data packets received by electronic device (using N)rxRepresentation) and power consumption (in P) of an electronic device receiving a single data packetrxRepresentation). Based on this, the second Wi-Fi power consumption E can be calculated by the following equations 2 to 42
Figure BDA0002754369670000174
S403: and the electronic equipment judges whether the ratio of the second Wi-Fi power consumption to the sum of the first Wi-Fi power consumption and the second Wi-Fi power consumption is smaller than a preset value or not, if so, abnormal processing operation is executed, and if not, the step is ended.
Wherein the second Wi-Fi power consumption characterizes power consumption of the electronic device to transmit and/or receive data over Wi-Fi. If the ratio of the second Wi-Fi power consumption to the sum of the first Wi-Fi power consumption and the second Wi-Fi power consumption is smaller than a preset value, the electronic equipment can detect that the electronic equipment does not transmit and/or receive data power consumption through Wi-Fi when the Wi-Fi power consumption is very high, and then the electronic equipment can determine that the Wi-Fi is abnormal. The preset value may be a percentage preset according to experience or traffic.
The abnormal processing operation comprises outputting prompt information, executing operation of cleaning processes or applications of abnormal access Wi-Fi chips, and reporting power consumption abnormal events of Wi-Fi to one or more of the servers.
In some possible embodiments, the output prompt message is used for prompting the user of power consumption abnormity of Wi-Fi in the electronic equipment. The prompting message may include one or more of a visual message, a voice message, a vibration message on the display screen.
When the prompt is visual on the display screen, there may be a variety of user interfaces. As exemplarily shown in fig. 5A-5B, the diagrams are schematic diagrams of visual prompt information output by an electronic device through a display screen according to an embodiment of the present application.
Fig. 5A is a schematic diagram of a user interface (i.e., a user interface 51) for visualizing prompt information according to an embodiment of the present application. Specifically, in the user interface 51, the user interface 51 may include a notification bar 501. If the electronic device finds a power consumption abnormality of Wi-Fi, the electronic device can output a prompt message, which can be a text message (e.g., "power consumption abnormality of Wi-Fi!"), through the notification bar 501 in the user interface 51. The electronic device may jump to the user interface 50 in response to a user clicking on the notification bar 501. The electronic device may output the power consumption abnormal event and a prompt message for processing the power consumption abnormal event through the user interface 50. For example, the prompt message for handling the power consumption exception event is used to prompt the user to turn off Wi-Fi. The electronic device may turn off Wi-Fi directly in response to user manipulation of the user on control 502.
Fig. 5B is a schematic diagram of another user interface (i.e., user interface 52) for visualizing prompt information provided in the embodiment of the present application. In some embodiments, if the electronic device discovers a power consumption anomaly for Wi-Fi, the electronic device may display indication information in the user interface 52 indicating the Wi-Fi power consumption anomaly. For example, as exemplarily shown in fig. 5B, the indication information may be a red circular indicator 504 displayed at the upper right corner of the Wi-Fi icon 503, and for example, as exemplarily shown in fig. 5B, the indication information may also display text information "abnormal" in a red font below the Wi-Fi icon 503, indicating that power consumption of Wi-Fi is abnormal. These examples are just some implementations provided in the present application, and may also be different in practical applications, for example, power consumption abnormality of Wi-Fi may also be represented by setting a display state of Wi-Fi, such as a Wi-Fi icon showing a red color, a Wi-Fi icon showing an animation effect similar to a heartbeat, and the like, which should not be limited.
Similarly, the electronic device may jump to the user interface 50 in response to a user clicking on the Wi-Fi icon 503. The electronic device may output the power consumption abnormal event and a prompt message for processing the power consumption abnormal event through the user interface 50.
In the embodiment of the application, the electronic equipment acquires first reference information including the working time of the electronic equipment working in various Wi-Fi digital circuit states and various Wi-Fi analog circuit states in a calculation period, and second reference information including the working time of a power amplifier working in various states in the calculation period or the number of frames for sending data frames and the number of data packets received by the electronic equipment from a Wi-Fi chip. And then calculating to obtain first Wi-Fi power consumption according to the first reference information and the first power consumption information, and calculating to obtain second Wi-Fi power consumption according to the second reference information and the second power consumption information. And performing anomaly detection on the Wi-Fi according to the second Wi-Fi power consumption and the sum of the first Wi-Fi power consumption and the second Wi-Fi power consumption. The power consumption difference of various Wi-Fi digital circuit states and/or various Wi-Fi analog circuit states and the power consumption difference of various states of the power amplifier when a data packet is sent are considered when the Wi-Fi power consumption is calculated, and the accuracy of calculating the Wi-Fi power consumption is effectively improved. The Wi-Fi is also subjected to abnormity detection and abnormity processing operation, management and control are effectively performed on the electronic equipment, the endurance time of the electronic equipment is prolonged, and user experience is improved.
The Wi-Fi of the electronic device can also be in a light sleep state or a deep sleep state during a computing cycle. Based on the method, the embodiment of the application also provides another method for calculating the power consumption of the Wi-Fi. Fig. 6 is a schematic flowchart of another method for calculating Wi-Fi power consumption according to an embodiment of the present disclosure. Referring to fig. 6, an embodiment of the present application provides a method for calculating Wi-Fi power consumption, including steps S601-S606:
s601: the electronic equipment acquires the first reference information, the second reference information and the third reference information from the Wi-Fi chip.
After the electronic device obtains the authority to access the Wi-Fi chip, the electronic device can obtain the first reference information, the second reference information and the third reference information from the Wi-Fi chip. The method for the electronic equipment to acquire the second reference information and the third reference information from the Wi-Fi chip is similar to the method for the electronic equipment to acquire the first reference information from the Wi-Fi chip. The specific operation of the electronic device to obtain the first reference information from the Wi-Fi chip may refer to step S201, which is not described herein again.
The third reference information comprises the working time of the electronic equipment in the Wi-bright sleep state and the Wi-Fideep sleep state in the calculation period.
Table 1 exemplarily shows the first reference information, the second reference information, and the third reference information in one case. Table 1 is merely for illustrating the examples of the present application and should not be construed as limiting.
TABLE 1
Figure BDA0002754369670000191
S602: the electronic device calculates first Wi-Fi power consumption according to the first reference information and the first power consumption information, calculates second Wi-Fi power consumption according to the second reference information and the second power consumption information, and calculates third Wi-Fi power consumption according to the third reference information and the third power consumption information.
And the third power consumption information is used for indicating the power consumption of the electronic equipment in a Wi-Fi light sleep state and a Wi-Fi deep sleep state.
In one possible implementation, the third Wi-Fi power consumption comprises a sum of a product of an operating time period of the electronic device in the Wi-Fi light sleep state and a power consumption of the electronic device in the Wi-Fi light sleep state and a product of an operating time period of the electronic device in the Wi-Fi deep sleep state and a power consumption of the electronic device in the Wi-Fi deep sleep state.
For example, the working duration of Wi-fly sleep state in the embodiments of the present application is TlightP represents power consumption of Wi-Lighting sleep state per unit timelightAnd (4) showing. Working duration of Wi-Fideep sleep state is TdeepP represents power consumption of Wi-Fideep sleep state per unit timedeepIndicate thatThe third Wi-Fi power consumption E is calculated by the following formula 3-13
E3=Tlight*Plight+Tdeep*Pdeep 3-1
S603: the electronic device determines a total amount of power consumed by the Wi-Fi during the computing period based on the first Wi-Fi power consumption, the second Wi-Fi power consumption, and the third Wi-Fi power consumption.
In one possible embodiment, the sum of the first Wi-Fi power consumption, the second Wi-Fi power consumption, and the third Wi-Fi power consumption is taken as the total Wi-Fi power consumption.
In another possible implementation, the sum of the weights of the first Wi-Fi power consumption, the second Wi-Fi power consumption, and the third Wi-Fi power consumption may be taken as the total amount of power consumed by Wi-Fi. The weight of the first Wi-Fi power consumption, the weight of the second Wi-Fi power consumption and the weight of the third Wi-Fi power consumption can be set according to business requirements or experience.
S604: the electronic equipment judges whether the ratio of the power consumption of the second Wi-Fi to the total power consumption of the Wi-Fi is smaller than a preset value or not, and if yes, abnormal processing operation is executed.
The exception handling operation may refer to step S403, which is not described in detail herein.
S605: the electronic equipment obtains a first data quantity of data packets sent and/or received by an application through Wi-Fi in a calculation period, and calculates the ratio of the first data quantity to the total data quantity.
In some possible embodiments, a first data amount of a data packet sent and/or received by an application through Wi-Fi and a total data amount of the data packet sent and/or received by the electronic device through Wi-Fi may be obtained from the operating system, and then a ratio of the first data amount to the total data amount may be calculated.
S606: the electronic equipment determines Wi-Fi power consumption applied in the calculation period according to the ratio of the first data amount to the total data amount and the total Wi-Fi power consumption.
In one possible implementation, the electronic device may obtain the Wi-Fi power consumption of each application in the calculation cycle by using steps S605 and S606.
Illustratively, assume that the total amount of Wi-Fi power consumption determined from the first, second, and third Wi-Fi power consumption is E. The electronic equipment obtains a first data volume S of a data packet sent and/or received by an application through Wi-Fi1And the total amount of data acquired is S. Then the Wi-Fi power consumption E' for an application can be calculated by equation 4-1.
Figure BDA0002754369670000201
And the power consumption row is used as an interface for carrying out endurance information interaction between the electronic equipment and the user. The electronic device may display information related to power consumption scheduling through the user interface. Fig. 7A is a schematic diagram of a user interface (i.e., a user interface 71) for displaying power consumption ranks provided in an embodiment of the present application. Control 701 and control 702 are included in user interface 71. The electronic device may display the power consumption of each hardware during a computing cycle by responding to user operations on controls 701, such as user interface 72 shown in fig. 7B. As shown in fig. 7B, the power consumption of the screen, the power consumption of the voice call, the power consumption of the signal standby, the power consumption of the mobile phone standby, the power consumption of the wireless network (i.e., Wi-Fi power consumption), and the power consumption of the bluetooth are displayed in the user interface 72. The electronic device may display the power consumption of each application in the calculation cycle by responding to the user operation on the control 702, for example, as shown in fig. 7C, the power consumption of hundreds of degrees, the power consumption of WeChat, the power consumption of drip travel, the power consumption of the system user interface, the power consumption of the dial-up service, the power consumption of the telephone, and the power consumption of the cell phone keeper are displayed in the user interface 73. Wherein the power consumption in the calculation cycle may also be referred to simply as power consumption.
Under the condition that the electronic equipment calculates the Wi-Fi power consumption of each application in the calculation period, the electronic equipment can output the Wi-Fi power consumption of each application in the calculation period in a Wi-Fi related user interface. In one possible implementation, the electronic device may receive a user action by the user on the Wi-Fi icon 703 of the user interface 72 and display the user interface 74 in response to the action. Wi-Fi power consumption for each application during a computing cycle is displayed in the user interface 74. Alternatively, the electronic device may jump to the user interface 74 in response to a user clicking on the notification bar 501. As shown in FIG. 7D, there are hundreds of Wi-Fi power consumptions, WeChat Wi-Fi power consumptions, and dribble Wi-Fi power consumptions displayed in the user interface 74. And are not limited herein.
In another possible implementation, the electronic device may output the Wi-Fi power consumption over a computing period in a user interface associated with each application. For example, the electronic device may receive a user operation by the user on the hundred degree icon 704 of the user interface 73 and display the user interface 75 in response to the operation. The user interface 75 is used to display hundreds of degrees of power consumption information. Wherein, the user interface 75 displays the Wi-Fi power consumption of hundreds of degrees, for example, as shown in fig. 7E, the electronic device may partially show "the Wi-Fi power consumption of hundreds of degrees is 20%" through 705. It should be understood that fig. 7E is merely exemplary, and the electronic device may display the Wi-Fi power consumption of the application in the application-related user interface in other manners.
In the embodiment of the application, the electronic equipment acquires first reference information including the working time of the electronic equipment working in various Wi-Fi digital circuit states and various Wi-Fi analog circuit states in a calculation period from a Wi-Fi chip, and second reference information including the working time of a power amplifier working in various states or the number of frames for sending data frames in the calculation period, the number of data packets received by the electronic equipment and third reference information including a sleep state. The power consumption difference of various Wi-Fi digital circuit states and/or various Wi-Fi analog circuit states and the power consumption difference of various states of the power amplifier when a data packet is sent are considered when the Wi-Fi power consumption is calculated, the power consumption difference of a sleep state is also considered, and the accuracy of calculating the Wi-Fi power consumption can be effectively improved. In addition, the Wi-Fi power consumption of each application can be calculated, abnormal detection can be carried out on Wi-Fi, management and control can be effectively carried out on the electronic equipment, the duration of the electronic equipment is prolonged, and user experience is improved.
Embodiments of an electronic device, a user interface for such an electronic device, and for using such an electronic device are described above. In some embodiments, the electronic device may be a portable electronic device that also includes other functionality such as a personal digital assistant and/or has a display function, such as a cell phone, a tablet, a laptop, a wearable electronic device with Wi-Fi communication functionality (e.g., a smart watch, a smart bracelet, a smart wristband), and so forth. The portable electronic device may also be other portable electronic devices such as a Laptop computer (Laptop) with a touch sensitive surface or touch panel, etc. It should also be understood that in other embodiments, the electronic device may be a desktop computer with a touch-sensitive surface or touch panel.
The present application also provides a computer-readable storage medium comprising a computer program or instructions which, when run on an electronic device, cause the electronic device to perform the method for calculating Wi-Fi power consumption as introduced in the above embodiments.
The present application also provides a computer program product comprising a computer program or instructions for causing an electronic device to perform the method for calculating Wi-Fi power consumption as described in the above embodiments, when said computer program or instructions are run on the electronic device.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and these modifications or substitutions do not depart from the scope of the technical solutions of the embodiments of the present application.

Claims (18)

1. A method for calculating Wi-Fi power consumption for wireless fidelity, applied to an electronic device comprising a Wi-Fi chip, the method comprising:
the electronic equipment acquires first reference information from the Wi-Fi chip, wherein the first reference information comprises working time of the electronic equipment working in various Wi-Fi digital circuit states and various Wi-Fi analog circuit states in a calculation cycle;
the electronic equipment calculates first Wi-Fi power consumption according to the first reference information and first power consumption information, wherein the first power consumption information is used for indicating the power consumption of the electronic equipment when the electronic equipment works in the plurality of Wi-Fi digital circuit states and the plurality of Wi-Fi analog circuit states.
2. The method of claim 1, wherein the plurality of Wi-Fi digital circuit states comprise Wi-Fi digital circuits operating at a plurality of frequency bins; the plurality of Wi-Fi analog circuit states comprise: the Wi-Fi analog circuit operates at a plurality of bandwidths, and the Wi-Fi analog circuit operates in one or more of a plurality of radio frequency states.
3. The method of claim 1 or 2, wherein the electronic device further comprises a power amplifier, the method further comprising:
the electronic equipment acquires second reference information from the Wi-Fi chip, wherein the second reference information comprises the working time of the power amplifier working in multiple states or the number of frames for sending data frames in the calculation period, and the number of data packets received by the electronic equipment;
and the electronic equipment calculates second Wi-Fi power consumption according to the second reference information and second power consumption information, wherein the second power consumption information is used for indicating the power consumption of the power amplifier in the multiple states and the power consumption of the electronic equipment for receiving a single data packet.
4. The method of claim 3, wherein the plurality of states comprise the power amplifier operating at a plurality of transmit powers or the power amplifier operating at a plurality of transmit rates.
5. The method according to claim 3 or 4, characterized in that the method further comprises:
the electronic equipment acquires third reference information from the Wi-Fi chip, wherein the third reference information comprises the working time length of the electronic equipment working in a Wi-Fi light sleep state and a Wi-Fi deep sleep state in the calculation period;
and the electronic equipment calculates third Wi-Fi power consumption according to the third reference information and third power consumption information, wherein the third power consumption information is used for indicating the power consumption of the electronic equipment in the Wi-Fi light sleep state and the Wi-Fi deep sleep state.
6. The method of claim 5, further comprising:
the electronic device determines a total amount of power consumed by the Wi-Fi during the computing period according to the first Wi-Fi power consumption, the second Wi-Fi power consumption, and the third Wi-Fi power consumption.
7. The method of claim 6, further comprising:
if the ratio of the second power consumption to the total power consumption of the Wi-Fi is smaller than a preset value, the electronic equipment outputs prompt information, and the prompt information is used for prompting a user that the power consumption of the Wi-Fi is abnormal;
and/or the presence of a gas in the gas,
the electronic equipment executes operation of cleaning processes or applications which access the Wi-Fi chip abnormally;
and/or the presence of a gas in the gas,
and the electronic equipment reports the power consumption abnormal event of the Wi-Fi to the server.
8. The method according to claim 6 or 7, characterized in that the method further comprises:
the electronic equipment acquires a first data volume of data packets sent and/or received by an application through the Wi-Fi in the calculation period;
the electronic equipment calculates the ratio of the first data volume to the total data volume, wherein the total data volume is the data volume of data packets sent and/or received by the electronic equipment through the Wi-Fi in the calculation period;
and the electronic equipment determines the Wi-Fi power consumption of the application in the calculation period according to the ratio of the first data amount to the total data amount and the total power consumption of the Wi-Fi.
9. An electronic device, comprising one or more memories and one or more processors, the one or more memories coupled with the one or more processors, the one or more memories to store computer program code, the computer program code comprising computer instructions that, when executed by the one or more processors, cause the electronic device to:
acquiring first reference information from a Wi-Fi chip, wherein the first reference information comprises working time of the electronic equipment working in various Wi-Fi digital circuit states and various Wi-Fi analog circuit states in a calculation cycle;
and calculating first Wi-Fi power consumption according to the first reference information and first power consumption information, wherein the first power consumption information is used for indicating the power consumption of the electronic equipment in the plurality of Wi-Fi digital circuit states and the plurality of Wi-Fi analog circuit states.
10. The electronic device of claim 9, wherein the plurality of Wi-Fi digital circuit states comprises Wi-Fi digital circuits operating at a plurality of frequency bins; the plurality of Wi-Fi analog circuit states comprise: the Wi-Fi analog circuit operates at a plurality of bandwidths, and the Wi-Fi analog circuit operates in one or more of a plurality of radio frequency states.
11. The electronic device of claim 9 or 10, further comprising a power amplifier that, when executed by the one or more processors, causes the electronic device to further:
acquiring second reference information from the Wi-Fi chip, wherein the second reference information comprises the working time of the power amplifier working in multiple states or the number of frames for sending data frames in the calculation period, and the number of data packets received by the electronic equipment;
and calculating second Wi-Fi power consumption according to the second reference information and second power consumption information, wherein the second power consumption information is used for indicating the power consumption of the power amplifier in the multiple states and the power consumption of the electronic equipment for receiving a single data packet.
12. The electronic device of claim 11, wherein the plurality of states comprise the power amplifier operating at a plurality of transmit powers or the power amplifier operating at a plurality of transmit rates.
13. The electronic device of claim 11 or 12, wherein the computer instructions, when executed by the one or more processors, cause the electronic device to further perform operations comprising:
acquiring third reference information from the Wi-Fi chip, wherein the third reference information comprises the working time of the electronic equipment working in a Wi-live sleep state and a Wi-live sleep state in the calculation period;
and calculating third Wi-Fi power consumption according to the third reference information and the third power consumption information, wherein the third power consumption information is used for indicating the power consumption of the electronic equipment in the Wi-Fi light sleep state and the Wi-Fi deep sleep state.
14. The electronic device of claim 13, wherein the computer instructions, when executed by the one or more processors, cause the electronic device to further perform the following:
determining a total amount of power consumed by the Wi-Fi during the computing period according to the first Wi-Fi power consumption, the second Wi-Fi power consumption, and the third Wi-Fi power consumption.
15. The electronic device of claim 14, wherein the computer instructions, when executed by the one or more processors, cause the electronic device to further perform the following:
if the ratio of the second power consumption to the total power consumption of the Wi-Fi is smaller than a preset value, outputting prompt information, wherein the prompt information is used for prompting a user that the power consumption of the Wi-Fi is abnormal;
and/or the presence of a gas in the gas,
executing an operation of cleaning a process or an application abnormally accessing the Wi-Fi chip;
and/or the presence of a gas in the gas,
and reporting the power consumption abnormal event of the Wi-Fi to a server.
16. The electronic device of claim 14 or 15, wherein the computer instructions, when executed by the one or more processors, cause the electronic device to further perform operations comprising:
acquiring a first data volume of a data packet sent and/or received by an application through the Wi-Fi in the calculation period;
calculating a ratio of the first data volume to a total data volume, wherein the total data volume is a data volume of data packets sent and/or received by the electronic equipment through the Wi-Fi in the calculation period;
and determining the Wi-Fi power consumption of the application in the calculation period according to the ratio of the first data amount to the total data amount and the total power consumption of the Wi-Fi.
17. A computer storage medium comprising computer instructions that, when executed on an electronic device, cause the electronic device to perform the method of any of claims 1-8.
18. A computer program product, characterized in that, when run on a computer, causes the computer to perform the method according to any one of claims 1-8.
CN202011197195.5A 2020-10-30 2020-10-30 Method for calculating Wi-Fi power consumption and electronic equipment Pending CN114449622A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011197195.5A CN114449622A (en) 2020-10-30 2020-10-30 Method for calculating Wi-Fi power consumption and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011197195.5A CN114449622A (en) 2020-10-30 2020-10-30 Method for calculating Wi-Fi power consumption and electronic equipment

Publications (1)

Publication Number Publication Date
CN114449622A true CN114449622A (en) 2022-05-06

Family

ID=81357438

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011197195.5A Pending CN114449622A (en) 2020-10-30 2020-10-30 Method for calculating Wi-Fi power consumption and electronic equipment

Country Status (1)

Country Link
CN (1) CN114449622A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140364174A1 (en) * 2013-06-06 2014-12-11 Apple Inc. On-device energy estimation for portable electronic devices
WO2016082109A1 (en) * 2014-11-25 2016-06-02 华为技术有限公司 User equipment power management method and power management device
CN108886548A (en) * 2017-02-24 2018-11-23 华为技术有限公司 A kind of method, electronic equipment and the storage medium of the device power consumption of determining electronic equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140364174A1 (en) * 2013-06-06 2014-12-11 Apple Inc. On-device energy estimation for portable electronic devices
WO2016082109A1 (en) * 2014-11-25 2016-06-02 华为技术有限公司 User equipment power management method and power management device
CN108886548A (en) * 2017-02-24 2018-11-23 华为技术有限公司 A kind of method, electronic equipment and the storage medium of the device power consumption of determining electronic equipment

Similar Documents

Publication Publication Date Title
CN109766036B (en) Message processing method and electronic equipment
WO2020259452A1 (en) Full-screen display method for mobile terminal, and apparatus
CN110114747B (en) Notification processing method and electronic equipment
WO2021213164A1 (en) Application interface interaction method, electronic device, and computer readable storage medium
WO2020134869A1 (en) Electronic device operating method and electronic device
CN111543042B (en) Notification message processing method and electronic equipment
CN110401767B (en) Information processing method and apparatus
CN111416407A (en) Wireless charging method and electronic equipment
CN111602108B (en) Application icon display method and terminal
CN111913750B (en) Application program management method, device and equipment
CN113704205B (en) Log storage method, chip, electronic device and readable storage medium
WO2020056778A1 (en) Method for shielding touch event, and electronic device
CN113641271A (en) Application window management method, terminal device and computer readable storage medium
CN113688019B (en) Response time duration detection method and device
WO2020192716A1 (en) System language switching method and related apparatus
CN114528581A (en) Safety display method and electronic equipment
WO2022166435A1 (en) Picture sharing method and electronic device
CN113590346B (en) Method and electronic equipment for processing service request
CN113407300B (en) Application false killing evaluation method and related equipment
CN113918003A (en) Method and device for detecting time length of skin contacting screen and electronic equipment
CN112286596A (en) Message display method and electronic equipment
CN114449622A (en) Method for calculating Wi-Fi power consumption and electronic equipment
CN116048831B (en) Target signal processing method and electronic equipment
WO2022042774A1 (en) Profile picture display method and electronic device
CN114006976B (en) Interface display method and terminal equipment

Legal Events

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