WO2023246783A1 - Method for adjusting device power consumption and electronic device - Google Patents

Method for adjusting device power consumption and electronic device Download PDF

Info

Publication number
WO2023246783A1
WO2023246783A1 PCT/CN2023/101413 CN2023101413W WO2023246783A1 WO 2023246783 A1 WO2023246783 A1 WO 2023246783A1 CN 2023101413 W CN2023101413 W CN 2023101413W WO 2023246783 A1 WO2023246783 A1 WO 2023246783A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
electronic device
processor
memory
frequency
Prior art date
Application number
PCT/CN2023/101413
Other languages
French (fr)
Chinese (zh)
Inventor
田亦鸽
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023246783A1 publication Critical patent/WO2023246783A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/3243Power saving in microcontroller unit
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/32Handling requests for interconnection or transfer for access to input/output bus using combination of interrupt and burst mode transfer

Definitions

  • the present application relates to the field of electronic technology, and in particular to methods of adjusting device power consumption and electronic devices.
  • the battery life of the electronic device can be improved by reducing the power consumption of the electronic device.
  • One way to reduce the power consumption of electronic equipment is to determine which type of core needs to be called based on the currently running tasks, load and other parameters (such as one A77 large core, three A77 medium cores, four A55 small cores of Kirin 9000). cores), and the number of calling cores, thereby reducing the power consumption of electronic devices by reducing the power consumption of the CPU.
  • the energy consumption curves of different cores are different. For example, in low-load scenarios such as browsing news, electronic devices mainly use medium cores and small cores; in high-load scenarios such as gaming, electronic devices will use large cores, thereby reducing the power consumption of electronic devices without reducing user experience. .
  • the frequency and/or voltage of the processor is configured to be lower than the frequency and/or voltage when the processor processes data. Since the processor will not process the data until the data is copied to memory, configure the processor at a lower frequency and/or voltage than the processor to process the data after the processor receives the interrupt and before the data is copied to memory.
  • the processor works in the third mode; when the processor works in the third mode, the operating frequency of the processor is the third frequency, the operating voltage of the processor is the third voltage; the third voltage is less than or equal to the first voltage, and/or the third frequency is less than or equal to the first frequency.
  • the electronic device includes a data acquisition device and a DMA controller; after the electronic device acquires the first data, the electronic device copies the first data to the memory, Specifically including: after the electronic device obtains the first data through the data acquisition device, the electronic device receives a first interrupt sent by the data acquisition device through the processor; the first interrupt is used to instruct the processor to send the first data to the data acquisition device. A data is copied from the data acquisition device to the memory; after the processor receives the first interrupt, the electronic device instructs the DMA controller through the processor to copy the first data from the data acquisition device to the memory.
  • the data acquisition device such as a sensor or a network card can send an interrupt to the processor so that the data can be copied to the memory.
  • the processor is configured as the first mode, which can reduce the power consumption of electronic devices.
  • the electronic device can determine what mode the previous processor was in. If the processor is in the second mode, the processor is configured in the first mode; if the processor is in the third mode, and the third mode If the mode is different from the first mode, the processor is configured as the first mode; if the processor is in the third mode, and the third mode is the same as the first mode, the mode of the processor is not changed.
  • the method further includes: after receiving the first operation, the electronic device instructs the DMA controller through the processor to copy the second data in the memory to the Data acquisition device; during the process of copying the second data from the memory to the data acquisition device, the processor operates in the first mode.
  • the processor when the processor wants to write data to the network card or sensor, the processor works in the first mode while instructing the DMA controller to copy the data, which can reduce the power consumption of the processor. .
  • the processor copies the data from the network card to the memory in the first mode, and then the processor calculates the required display interface based on the data in the second mode.
  • the drawing instructions are then executed by the electronic device to generate an interface for display, which reduces the power consumption of the electronic device during the process of copying data.
  • the method further includes: after the electronic device copies the first data from the data acquisition device to the memory through the DMA controller, the electronic device passes The DMA controller sends a second interrupt to the processor; after the electronic device determines through the processor that the first data is copied to the memory based on the second interrupt, the processor is configured to work in the second mode.
  • the method it also includes: the electronic device determines a first parameter; and the electronic device determines the second voltage and/or the second frequency based on the first parameter.
  • the electronic device may adjust the operating voltage and operating frequency of the processor in the second mode.
  • the electronic device determines a first parameter, which may be the current processor load, temperature, or other number of customers related to the first data, and then determines an appropriate second voltage and/or second frequency based on the first parameter.
  • the first parameter may be a parameter directly related to the first data, which may enable the processor to operate with different computing capabilities. Efforts are made to match business or application needs to ensure user experience.
  • the second voltage and/or the second frequency are preset values.
  • the second voltage and/or the second frequency can also be preset values, which is simple to develop, has low requirements on processor capabilities, and can be adapted to more types of processors.
  • inventions of the present application provide an electronic device.
  • the electronic device includes: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program codes,
  • the computer program code includes computer instructions, and the one or more processors call the computer instructions to cause the electronic device to execute: after the electronic device obtains the first data, the electronic device copies the first data to the memory, wherein, After the electronic device obtains the first data and before the first data is copied into the memory, the processor of the electronic device operates in the first mode; after the first data is copied into the memory, the electronic device passes The processor operating in the second mode processes the first data; when the processor operates in the first mode, the operating frequency of the processor is the first frequency, and the operating voltage of the processor is the first voltage; the processor When operating in the second mode, the operating frequency of the processor is the second frequency, and the operating voltage of the processor is the second voltage; the first frequency is less than the second frequency, and/or the first voltage is less than the first voltage. Two voltages.
  • the processor works in the third mode; when the processor works in the third mode, the operating frequency of the processor is the third frequency, the operating voltage of the processor is the third voltage; the third voltage is less than or equal to the first voltage, and/or the third frequency is less than or equal to the first frequency.
  • the one or more processors are specifically configured to call the computer instructions to cause the electronic device to execute: after the electronic device obtains the first data through the data acquisition device After obtaining the data, the electronic device receives the first interrupt sent by the data acquisition device through the processor; the first interrupt is used to instruct the processor to copy the first data from the data acquisition device to the memory; the processor After receiving the first interrupt, the electronic device instructs the DMA controller through the processor to copy the first data from the data acquisition device to the memory.
  • the one or more processors are also configured to call the computer instructions to cause the electronic device to execute: after receiving the first operation, the electronic device passes the processing The processor instructs the DMA controller to copy the second data in the memory to the data acquisition device; during the process of copying the second data from the memory to the data acquisition device, the processor operates in the first mode.
  • the data acquisition device is a sensor or a network card.
  • the one or more processors are also used to call the computer instructions to cause the electronic device to execute: after the electronic device transfers the first After the data is copied from the data acquisition device to the memory, the electronic device sends a second interrupt to the processor through the DMA controller; after the electronic device determines that the first data is copied based on the second interrupt through the processor After being stored in the memory, the processor is configured to work in the second mode.
  • the one or more processors are also configured to call the computer instructions to cause the electronic device to execute: the electronic device determines the first parameter; the electronic device based on the The first parameter determines the second voltage and/or second frequency.
  • the second voltage and/or the second frequency are preset values.
  • embodiments of the present application provide a chip system, which is applied to an electronic device.
  • the chip system includes one or more processors, and the processor is used to call computer instructions to cause the electronic device to execute the first step. aspect and the method described in any possible implementation manner in the first aspect.
  • embodiments of the present application provide a computer program product containing instructions.
  • the electronic device When the computer program product is run on an electronic device, the electronic device causes the electronic device to execute the first aspect and any possible implementation of the first aspect. described method.
  • embodiments of the present application provide a computer-readable storage medium that includes instructions.
  • the electronic device When the instructions are run on an electronic device, the electronic device causes the electronic device to execute the first aspect and any possible implementation of the first aspect. described method.
  • FIG. 1 is an exemplary schematic diagram of a method for reducing power consumption of an electronic device provided by an embodiment of the present application.
  • FIG. 2 is another exemplary schematic diagram of a method for reducing power consumption of an electronic device provided by an embodiment of the present application.
  • FIG. 3B is an exemplary schematic diagram of different stages corresponding to different CPU stages in the scenario shown in FIG. 3A provided by an embodiment of the present application.
  • FIG. 4A is another exemplary schematic diagram of a scenario of a method for adjusting device power consumption provided by an embodiment of the present application.
  • FIG. 4B is an exemplary schematic diagram of different stages corresponding to different CPU stages in the scenario shown in FIG. 4A provided by an embodiment of the present application.
  • FIG. 5 is an exemplary schematic diagram of the flow of a method for adjusting device power consumption provided by an embodiment of the present application.
  • FIG. 6 is another exemplary schematic diagram of the flow of a method for adjusting device power consumption provided by an embodiment of the present application.
  • FIG. 7 is another exemplary schematic diagram of the flow of a method for adjusting device power consumption provided by an embodiment of the present application.
  • FIG. 8 is another exemplary schematic diagram of the process of a method for adjusting device power consumption provided by an embodiment of the present application.
  • FIG. 10A and FIG. 10B are an exemplary schematic diagram of the hardware architecture of an electronic device provided by an embodiment of the present application.
  • FIG. 11A and FIG. 11B are an exemplary schematic diagram of the software architecture of an electronic device provided by an embodiment of the present application.
  • first and second are used for descriptive purposes only and shall not be understood as implying or implying relative importance or implicitly specifying the quantity of indicated technical features. Therefore, the features defined as “first” and “second” may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, “plurality” The meaning is two or more.
  • a feasible method to reduce the power consumption of electronic equipment is: the operating system configures the voltage (working voltage) and/or frequency (working frequency) of the CPU according to the currently running tasks, CPU load and other parameters, as shown in Figure 1 .
  • FIG. 1 is an exemplary schematic diagram of a method for reducing power consumption of an electronic device provided by an embodiment of the present application.
  • the electronic device configures the CPU frequency to different frequencies according to the type of business currently running, thereby taking into account the performance and power consumption of the electronic device.
  • the CPU frequency when the electronic device runs the first type of business, the CPU frequency is the lowest; secondly, when the electronic device runs the second type of business, the CPU frequency is the second lowest; thirdly, when the electronic device runs the third type of business, the CPU frequency The frequency is higher; when the electronic device is running the fourth type of business, the CPU frequency is the highest.
  • the load of the first type of service is lower than the load of the second type of service
  • the load of the second type of service is lower than the load of the third type of service
  • the load of the third type of service is lower than the load of the fourth type of service.
  • FIG. 2 is another exemplary schematic diagram of a method for reducing power consumption of an electronic device provided by an embodiment of the present application.
  • the electronic device configures the CPU frequency to different frequencies according to the type of business currently running.
  • This method achieves small power consumption benefits and cannot effectively reduce power consumption.
  • the power consumption gains obtained by the method shown are still not enough to meet the needs of consumers.
  • embodiments of the present application provide methods and electronic devices for adjusting device power consumption.
  • the method for adjusting device power consumption provided by this application is based on the interrupt processing capability of the operating system.
  • the processing process of the CPU after being awakened by an interrupt is divided into at least two stages, namely the wake-up stage and the business processing stage; during the wake-up stage, the electronic device
  • the operating system configures the frequency and/or voltage of the CPU to a lower level, thereby reducing power consumption; during the business processing stage, the operating system on the electronic device can configure the frequency and/or voltage of the CPU based on the type of business, or configure The CPU frequency and/or voltage are at a higher level to ensure user experience.
  • the method for adjusting device power consumption can be applied to the CPU on the electronic device, or to other chips or processing units inside the electronic device, such as a digital signal processor (digital signal processor). , DSP), neural-network processing unit (NPU) and other chips or processing units that can receive interrupts and can be configured with different operating voltages and/or operating frequencies.
  • DSP digital signal processor
  • NPU neural-network processing unit
  • the processor may also include one or more of DSP, CPU, and NPU, that is, the processor integrates one or more of DSP, NPU, and CPU as a chip.
  • the CPU hardly works and opens clock and other capabilities to the Direct Memory Access (DMA) engine (or DMA chip, or DMA controller), so that the DMA engine can obtain data from devices (such as peripherals). , sensor, network card) (also called a data acquisition device), the data is read into the memory.
  • DMA Direct Memory Access
  • the memory may include L1 memory, L2 memory, and L3 memory integrated inside the CPU, and/or may also include memory of electronic devices.
  • the electronic device can make some pre-preparations for the business processing phase, such as initializing some internal parameters, etc., which are not limited here.
  • the CPU processes the data in the memory according to the logic of the upper-layer business and obtains the results through calculation.
  • the method of adjusting device power consumption provided by the embodiment of the present application has been found at a smaller granularity that the CPU maintains a higher frequency and/or voltage under no load. problem, thereby reducing the power consumption of electronic devices by reducing the frequency and/or voltage of the CPU under no load conditions.
  • the following first takes the electronic device as a watch and a bracelet as an example to exemplarily introduce the method for adjusting the power consumption of the device provided by the embodiment of the present application.
  • FIG. 3A is an exemplary schematic diagram of a scenario of a method for adjusting device power consumption provided by an embodiment of the present application.
  • the process of the watch receiving the first message sent by the network and displaying the message on the screen can be divided into four stages.
  • Stage 1 The screen of the watch can be in a screen-off state without displaying any content.
  • Watch 1 is connected to the Internet through near-field wireless communication technologies such as Bluetooth and WiFi, or can be connected to the Internet through cellular mobile communications, which is not limited here. Alternatively, the watch can also display some content, such as time.
  • Phase 2 The watch receives the message sent from the server in the network. Among them, the watch receives data through the network card and stores the data into the network card. Optionally, in some embodiments of the present application, the watch can receive data through a Bluetooth hardware module or a WiFi hardware module.
  • Stage 3 After the watch's network card receives the data, it sends an interrupt to the operating system and wakes up the CPU; at the same time, the DMA engine copies the data from the network card to the memory.
  • Stage 4 The CPU processes the data copied to the memory; after the CPU completes processing the data according to the logic of the upper-layer business, the electronic device lights up the screen and displays the content of the message accordingly.
  • FIG. 3B is an exemplary schematic diagram of different stages corresponding to different CPU stages in the scenario shown in FIG. 3A provided by an embodiment of the present application.
  • Phase 1 and Phase 2 may correspond to the sleep phase; Phase 3 corresponds to the wake-up phase; and Phase 4 corresponds to the service processing phase.
  • the sleep stage in the sleep stage, the CPU frequency is the lowest, A1Hz; in the wake-up stage, the CPU frequency is A2Hz; in the business processing stage, the CPU frequency is the highest, A3Hz.
  • A1 is less than or equal to A2, and A2 is less than A3.
  • the sleep stage can also be called sleep mode and sleep state. For example, some CPUs can enter the sleep stage through the WFI (wait for interrupt) instruction and the WFE (wait for event) instruction.
  • A3 may be a variable, that is, A3 may be configured with different specific values according to the type of the current service.
  • the determination method of A3 can refer to the content shown in Figure 1 and will not be described again here.
  • stage 1 and stage 2 may correspond to other CPU stages, which are not limited here.
  • phase 1 and phase 2 may correspond to different CPU phases; for another example, phase 1 and phase 2 may correspond to business processing phases, etc.
  • FIG. 4A is another exemplary schematic diagram of a scenario of a method for adjusting device power consumption provided by an embodiment of the present application.
  • the process of users using the bracelet to measure heart rate can be divided into four stages.
  • Stage 1 The screen of the bracelet does not display any content and is in a screen-off state.
  • the screen of the bracelet can also display certain content through always on display (AOD) technology.
  • AOD always on display
  • Stage 4 The CPU calculates the heart rate based on the recorded changes in light intensity or other parameters, based on photoplethysmography or other methods and algorithms, and displays the heart rate data on the display of the bracelet. As shown in Figure 4A, the electronic device displays the heart rate 90 on the display screen of the bracelet.
  • FIG. 4B is an exemplary schematic diagram of different stages corresponding to different CPU stages in the scenario shown in FIG. 4A provided by an embodiment of the present application.
  • phase 1 may correspond to the sleep phase
  • phases 2 and 3 correspond to the wake-up phase
  • phase 4 corresponds to the service processing phase.
  • stage 2 may correspond to other CPU stages, which is not limited here.
  • phase 2 may correspond to a business processing phase, etc.
  • the sleep phase may also be called the third mode.
  • the processor When the processor is in the sleep phase, the processor operates in the third mode.
  • step S501 the process of the method for adjusting device power consumption provided by the embodiment of the present application includes three steps, namely step S501, step S502, and step S503. Among them, step S503 is an optional step.
  • Step S501 After receiving the interrupt, the operating system configures the frequency of the CPU to be the first frequency and/or configures the voltage of the CPU to be the first voltage; and instructs the DMA engine to copy the data to the memory.
  • an interrupt can also be called an external interrupt or an I/O interrupt, and can be generated by a data acquisition device on an electronic device, such as a network card, keyboard, clock, sensor, etc., which is not limited here.
  • the operating system wakes up the CPU if the CPU is in the sleep stage at this time, and then provides clock and other capabilities to the DMA engine to support the normal operation of the DMA engine.
  • whether to wake up the CPU in the sleep stage depends on whether the CPU can support the normal operation of the DMA engine when it is in the sleep stage. If the CPU is in the sleep phase and can still provide clock and other capabilities to the DMA engine, the operating system will not wake up the CPU after receiving an interrupt; if the CPU is in the sleep phase and cannot provide clock and other capabilities for the DMA engine, the operating system will wake up after receiving the interrupt. CPU.
  • the second frequency and/or the second voltage may be determined according to the current load of the CPU.
  • the CPU After the data copy is completed, the CPU starts to process the data in the memory according to the business logic.
  • restoring the frequency and/or voltage of the CPU to the state before receiving the interrupt is performed by the operating system.
  • FIG. 6 is another exemplary schematic diagram of the flow of a method for adjusting device power consumption provided by an embodiment of the present application.
  • the electronic device can turn off the screen or not.
  • the CPU is in the sleep state during phases 1 and 2; in the scenario shown in Figure 4A, the CPU is in the sleep phase during phase 1.
  • the data acquisition device can send an interrupt to the NPU or DSP.
  • the CPU After receiving the interrupt, the CPU changes from the sleep stage to the wake-up stage, and configures the CPU frequency to the first frequency.
  • the CPU in the wake-up phase will provide the DMA engine with basic capabilities such as clocks so that the DMA engine can work normally.
  • S604 Send DMA request.
  • the CPU sends a DMA request to the DMA engine.
  • the DMA request may include the main memory starting address, data acquisition device address, data size, etc.
  • the main memory starting address is the destination address of the copied data; the external data address is the starting address of the copied data, and the data size is the size of the copied data.
  • the processor when the processor is an NPU or a DSP, after the CPU receives an interrupt, or after the NPU or DSP receives an interrupt, the CPU sends a DMA request to the DMA engine, or directly sends a DMA request to the DMA engine.
  • the engine sends a DMA request.
  • the DMA engine reads data into memory.
  • the DMA device will take over control of the bus and copy the data to the memory.
  • memory includes L1 memory, L2 memory, and L3 memory integrated inside the CPU, and/or may also include memory of electronic devices.
  • S606 Send an interrupt to notify the CPU that the copy of data has been completed.
  • the DMA engine sends an interrupt to notify the CPU that the copy of data has been completed.
  • steps S602 to S606 can be considered as a complete interrupt.
  • the DMA engine sends an interrupt to the NPU or DSP to notify "the DMA engine has completed copying the data", or the DMA engine sends an interrupt to the CPU to notify the NPU or DSP.
  • S607 Transition to the business processing stage, configure the CPU frequency to the second frequency, read data from the memory and process it.
  • step S502 Please refer to the text description in step S502 above, which will not be described again here.
  • the CPU Before sending a DMA request, the CPU can be in the wake-up phase, sleep phase or business processing phase.
  • S703 Write the data in the memory to the data acquisition device.
  • step S606 Reference may be made to the content of step S606 above, which will not be described again here.
  • the electronic device may be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (personal digital assistant) assistant (PDA), augmented reality (AR) devices, virtual reality (VR) devices, artificial intelligence (AI) devices, wearable devices, vehicle-mounted devices, smart home devices and/or smart devices City equipment, the embodiment of this application does not place special restrictions on the specific type of electronic equipment.
  • PDA personal digital assistant
  • AR augmented reality
  • VR virtual reality
  • AI artificial intelligence
  • wearable devices wearable devices
  • vehicle-mounted devices smart home devices and/or smart devices City equipment
  • the sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (application processor, AP), a central processing unit (central processing unit, CPU), a modem processor, a graphics processor (graphics processor).
  • processing unit GPU
  • image signal processor ISP
  • controller video codec
  • digital signal processor baseband processor
  • neural network processor etc.
  • different processing units can be independent devices or integrated in one or more processors.
  • the controller can generate operation control signals based on the instruction operation code and timing signals to complete the control of fetching and executing instructions.
  • the processor 110 may also be provided with a memory for storing instructions and data.
  • the memory in processor 110 is cache memory. This memory may hold instructions or data that have been recently used or recycled by processor 110 . If the processor 110 needs to use the instructions or data again, it can be called directly from the memory. Repeated access is avoided and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
  • processor 110 may include one or more interfaces.
  • Interfaces may include integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, pulse code modulation (pulse code modulation, PCM) interface, universal asynchronous receiver and transmitter (universal asynchronous receiver/transmitter (UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and /or universal serial bus (USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • UART universal asynchronous receiver and transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (derail clock line, SCL).
  • processor 110 may include multiple sets of I2C buses.
  • the processor 110 can separately couple the touch sensor 180K, charger, flash, camera 193, etc. through different I2C bus interfaces.
  • the processor 110 can be coupled to the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to implement the touch function of the electronic device.
  • the I2S interface can be used for audio communication.
  • processor 110 may include multiple sets of I2S buses.
  • the processor 110 can be coupled with the audio module 170 through the I2S bus to implement communication between the processor 110 and the audio module 170 .
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface to implement the function of answering calls through a Bluetooth headset.
  • the PCM interface can also be used for audio communications to sample, quantize and encode analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface to implement the function of answering calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • a UART interface is generally used to connect the processor 110 and the wireless communication module 160 .
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 .
  • MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc.
  • the processor 110 and the camera 193 communicate through a CSI interface to implement the shooting function of the electronic device.
  • the processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device.
  • the GPIO interface can be configured through software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface can be used to connect the processor 110 with the camera 193, display screen 194, wireless communication module 160, audio module 170, sensor module 180, etc.
  • the GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that complies with the USB standard specification, and may be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc.
  • the USB interface 130 can be used to connect a charger to charge the electronic device, and can also be used to transmit data between the electronic device and peripheral devices. It can also be used to connect headphones to play audio through them. This interface can also be used to connect other electronic devices, such as AR devices, etc.
  • the interface connection relationships between the modules illustrated in the embodiments of the present invention are only schematic illustrations and do not constitute structural limitations on the electronic equipment.
  • the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger can be a wireless charger or a wired charger.
  • the charging management module 140 may receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device. While the charging management module 140 charges the battery 142, it can also provide power to the electronic device through the power management module 141.
  • 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 supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, the wireless communication module 160, and the like.
  • the power management module 141 can also be used to monitor battery capacity, battery cycle times, battery health status (leakage, impedance) and other parameters.
  • the power management module 141 may also be provided in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the electronic device can be realized through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in an electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • Antenna 1 can be reused as a diversity antenna for a wireless LAN.
  • antennas may be used in conjunction with tuning switches.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied to electronic devices.
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.
  • the mobile communication module 150 can receive electromagnetic waves through the antenna 1, perform filtering, amplification and other processing on the received electromagnetic waves, and transmit them to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves through the antenna 1 for radiation.
  • at least part of the functional modules of the mobile communication module 150 may be disposed in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
  • a modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
  • the demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the application processor outputs sound signals through audio devices (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194.
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent of the processor 110 and may be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), and global navigation satellite systems for use in electronic devices. (global navigation satellite system, GNSS), frequency modulation (FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
  • the antenna 1 of the electronic device is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi) -zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the electronic device implements display functions through the GPU, display screen 194, and application processor.
  • the GPU is an image processing microprocessor and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
  • the display screen 194 is used to display images, videos, etc.
  • Display 194 includes a display panel.
  • the display panel can use a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • AMOLED organic light-emitting diode
  • FLED flexible light-emitting diode
  • Miniled MicroLed, Micro-oLed, quantum dot light emitting diode (QLED), etc.
  • the electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • the electronic device can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
  • the ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, the light is transmitted to the camera sensor through the lens, the optical signal is converted into an electrical signal, and the camera sensor passes the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise and brightness. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be provided in the camera 193.
  • Camera 193 is used to capture still images or video.
  • the object passes through the lens to produce an optical image that is projected onto the photosensitive element.
  • the photosensitive element can be a charge coupled device (CCD) or a complementary metal oxide semiconductor (CCD). metal-oxide-semiconductor, CMOS) phototransistor.
  • CCD charge coupled device
  • CCD complementary metal oxide semiconductor
  • CMOS metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to convert it into a digital image signal.
  • ISP outputs digital image signals to DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other format image signals.
  • the electronic device may include 1 or N cameras 193, where N is a positive integer greater than 1.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
  • Video codecs are used to compress or decompress digital video.
  • Electronic devices may support one or more video codecs. In this way, electronic devices can play or record videos in multiple encoding formats, such as: Moving Picture Experts Group (MPEG)1, MPEG2, MPEG3, MPEG4, etc.
  • MPEG Moving Picture Experts Group
  • MPEG2 MPEG2, MPEG3, MPEG4, etc.
  • NPU is a neural network (NN) computing processor.
  • NN neural network
  • Intelligent cognitive applications of electronic devices can be realized through NPU, such as image recognition, face recognition, speech recognition, text understanding, etc.
  • the internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).
  • RAM random access memories
  • NVM non-volatile memories
  • Random access memory can include static random-access memory (SRAM), dynamic random-access memory (DRAM), synchronous dynamic random-access memory (SDRAM), double data rate synchronous Dynamic random access memory (double data rate synchronous dynamic random access memory, DDR SDRAM, such as the fifth generation DDR SDRAM is generally called DDR5SDRAM), etc.;
  • SRAM static random-access memory
  • DRAM dynamic random-access memory
  • SDRAM synchronous dynamic random-access memory
  • DDR SDRAM double data rate synchronous Dynamic random access memory
  • DDR SDRAM double data rate synchronous dynamic random access memory
  • DDR5SDRAM double data rate synchronous dynamic random access memory
  • Non-volatile memory can include disk storage devices and flash memory.
  • Flash memory can be divided according to the operating principle to include NOR FLASH, NAND FLASH, 3D NAND FLASH, etc.
  • the storage unit potential level it can include single-level storage cells (single-level cell, SLC), multi-level storage cells (multi-level cell, MLC), third-level storage unit (triple-level cell, TLC), fourth-level storage unit (quad-level cell, QLC), etc., which can include universal flash storage (English: universal flash storage, UFS) according to storage specifications. , embedded multi media card (embedded multi media Card, eMMC), etc.
  • the random access memory can be directly read and written by the processor 110, can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data, etc.
  • the non-volatile memory can also store executable programs and user and application program data, etc., and can be loaded into the random access memory in advance for direct reading and writing by the processor 110.
  • the external memory interface 120 can be used to connect an external non-volatile memory to expand the storage capacity of the electronic device.
  • the external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement the data storage function. For example, save music, video and other files in external non-volatile memory.
  • the electronic device can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
  • Speaker 170A also called “speaker” is used to convert audio electrical signals into sound signals.
  • the electronic device can listen to music through speaker 170A, or listen to hands-free calls.
  • Receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • the electronic device answers a call or a voice message, the voice can be heard by bringing the receiver 170B close to the human ear.
  • Microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak close to the microphone 170C with the human mouth and input the sound signal to the microphone 170C.
  • the electronic device may be provided with at least one microphone 170C. In other embodiments, the electronic device may be provided with two microphones 170C, which in addition to collecting sound signals, may also implement a noise reduction function. In other embodiments, the electronic device can also be equipped with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions, etc.
  • the headphone interface 170D is used to connect wired headphones.
  • the headphone interface 170D may be a USB interface 130, or may be a 3.5mm open mobile terminal platform (OMTP) standard interface, or a Cellular Telecommunications Industry Association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA Cellular Telecommunications Industry Association of the USA
  • the pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals.
  • pressure sensor 180A may be disposed on display screen 194 .
  • pressure sensors 180A such as resistive pressure sensors, inductive pressure sensors, Capacitive pressure sensor, etc.
  • a capacitive pressure sensor may include at least two parallel plates of conductive material. When a force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Electronics determine the intensity of the pressure based on changes in capacitance.
  • the electronic device detects the strength of the touch operation according to the pressure sensor 180A. The electronic device may also calculate the touched position based on the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch location but with different touch operation intensities may correspond to different operation instructions. For example: when a touch operation with a touch operation intensity smaller than the first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold is applied to the short message application icon, an instruction to create a new short message is executed.
  • the gyro sensor 180B can be used to determine the motion posture of the electronic device. In some embodiments, the angular velocity of the electronic device about three axes (ie, x, y, and z axes) may be determined by gyro sensor 180B.
  • the gyro sensor 180B can be used for image stabilization. For example, when the shutter is pressed, the gyro sensor 180B detects the angle at which the electronic device shakes, and calculates the distance that the lens module needs to compensate based on the angle, so that the lens can offset the shake of the electronic device through reverse movement to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • Air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
  • Magnetic sensor 180D includes a Hall sensor.
  • the electronic device can use the magnetic sensor 180D to detect the opening and closing of the flip holster.
  • the electronic device may detect opening and closing of the flip according to the magnetic sensor 180D. Then, based on the detected opening and closing status of the leather case or the opening and closing status of the flip cover, features such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the acceleration of the electronic device in various directions (generally three axes). When the electronic device is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices and be used in horizontal and vertical screen switching, pedometer and other applications.
  • Distance sensor 180F for measuring distance.
  • Electronic devices can measure distance via infrared or laser. In some embodiments, when shooting a scene, the electronic device can utilize the distance sensor 180F to measure distance to achieve fast focusing.
  • 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.
  • Electronic devices emit infrared light through light-emitting diodes.
  • Electronic devices use photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device. When insufficient reflected light is detected, the electronic device can determine that there is no object near the electronic device.
  • Electronic devices can use the proximity light sensor 180G to detect when the user holds the electronic device close to the ear and talk, so that the screen can be automatically turned off to save power.
  • the proximity light sensor 180G can also be used in holster mode, and pocket mode automatically unlocks and locks the screen.
  • the ambient light sensor 180L is used to sense ambient light brightness.
  • the electronic device can adaptively adjust the brightness of the display screen 194 based on perceived ambient light brightness.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device is in the pocket to prevent accidental touching.
  • Fingerprint sensor 180H is used to collect fingerprints. Electronic devices can use the collected fingerprint characteristics to unlock fingerprints, access application locks, take photos with fingerprints, answer incoming calls with fingerprints, etc.
  • Temperature sensor 180J is used to detect temperature.
  • the electronic device uses the temperature detected by the temperature sensor 180J to execute the temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device reduces the performance of a processor located near the temperature sensor 180J in order to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device heats the battery 142 to prevent the low temperature from causing abnormal shutdown of the electronic device. In some other embodiments, when the temperature is lower than another threshold, the electronic device performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 180K also known as "touch device”.
  • the touch sensor 180K can be disposed on the display screen 194.
  • 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 on or near the touch sensor 180K.
  • the touch sensor can pass the detected touch operation to the application processor to determine the touch event type.
  • Visual output related to the touch operation may be provided through display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device at a location different from that of the display screen 194 .
  • Bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human body's vocal part.
  • the bone conduction sensor 180M can also contact the human body's pulse and receive blood pressure beating signals.
  • the bone conduction sensor 180M can also be provided in an earphone and combined into a bone conduction earphone.
  • the audio module 170 can analyze the voice signal based on the vibration signal of the vocal vibrating bone obtained by the bone conduction sensor 180M to implement the voice function.
  • the application processor can analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M to implement the heart rate detection function.
  • Photoelectric sensors also known as optical heart rate sensors, can convert light signals into electrical signals.
  • the electronic device when the electronic device is a wearable device such as a watch, the light source on the electronic device illuminates the wrist, and the photoelectric sensor records the intensity of the reflected light or Other parameters.
  • the electronic device calculates the user's heart rate based on photoplethysmography (Photo Plethysmo Graphy, PPG) or other algorithms based on changes in the intensity of reflected light or other parameters.
  • photoplethysmography Photo Plethysmo Graphy, PPG
  • the buttons 190 include a power button, a volume button, etc.
  • Key 190 may be a mechanical key. It can also be a touch button.
  • the electronic device can receive key input and generate key signal input related to user settings and function control of the electronic device.
  • the indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, or may be used to indicate messages, missed calls, notifications, etc.
  • the SIM card interface 195 is used to connect a SIM card.
  • the SIM card can be inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to realize contact and separation from the electronic device.
  • the electronic device can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card, etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the plurality of cards may be the same or different.
  • the SIM card interface 195 is also compatible with different types of SIM cards.
  • the SIM card interface 195 is also compatible with external memory cards.
  • Electronic devices interact with the network through SIM cards to implement functions such as calls and data communications.
  • the electronic device uses an eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the electronic device and cannot be separated from the electronic device.
  • the processor 110 may also include a DMA controller 110A.
  • the DMA controller 110A can be used to receive a DMA request sent by the processor, and send an interrupt to the processor after the data copy is completed.
  • the DMA controller is used to control the bus to copy data from the data acquisition module to the memory, or copy data from the memory to the data acquisition module.
  • the memory may be the internal memory 121 , or may be a random access memory of the internal memory 121 .
  • the DMA controller 110A may be located in the south bridge of the electronic device, or in other locations, rather than inside the processor.
  • the mobile communication module 150 , the wireless communication module 160 and/or the sensor module 180 can all be data acquisition devices.
  • the data acquisition device may be a separate chip or hardware module.
  • FIG. 11A and FIG. 11B are an exemplary schematic diagram of the software architecture of an electronic device provided by an embodiment of the present application.
  • Software systems of electronic devices can adopt layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture.
  • the embodiment of the present invention takes the Android system with a layered architecture as an example to illustrate the software structure of the electronic device.
  • the layered architecture divides the software into several layers, and each layer has clear roles and division of labor.
  • the layers communicate through software interfaces.
  • the Android system is divided into four layers, from top to bottom: application layer, application framework layer, Android runtime and system libraries, and kernel layer.
  • the application layer can include a series of application packages.
  • the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
  • the application framework layer provides an application programming interface (API) and programming framework for applications in the application layer.
  • API application programming interface
  • the application framework layer includes some predefined functions.
  • the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
  • a window manager is used to manage window programs.
  • the window manager can obtain the display size, determine whether there is a status bar, lock the screen, capture the screen, etc.
  • Content providers are used to store and retrieve data and make this data accessible to applications.
  • Said data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
  • the view system includes visual controls, such as controls that display text, controls that display pictures, etc.
  • a view system can be used to build applications.
  • the display interface can be composed of one or more views.
  • a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
  • Telephone managers are used to provide communication functions of electronic devices. For example, call status management (including connected, hung up, etc.).
  • the resource manager provides various resources to applications, such as localized strings, icons, pictures, layout files, video files, etc.
  • the notification manager allows applications to display notification information in the status bar, which can be used to convey notification-type messages and can automatically disappear after a short stay without user interaction.
  • the notification manager is used to notify download completion, message reminders, etc.
  • the notification manager can also be notifications that appear in the status bar at the top of the system in the form of charts or scroll bar text, such as notifications for applications running in the background, or notifications that appear on the screen in the form of conversation windows. For example, text information is prompted in the status bar, a beep sounds, the electronic device vibrates, the indicator light flashes, etc.
  • Android Runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
  • the core library contains two parts: one is the functional functions that need to be called by the Java language, and the other is the core library of Android.
  • the application layer and application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application layer and application framework layer into binary files.
  • the virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection and other functions.
  • System libraries can include multiple functional modules. For example: surface manager (surface manager), media libraries (Media Libraries), 3D graphics processing libraries (for example: OpenGL ES), 2D graphics engines (for example: SGL), etc.
  • the surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, composition, and layer processing.
  • 2D Graphics Engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
  • the operating system in the kernel layer is used to configure the processor into different modes, that is, configuring different frequencies and/or voltages.
  • the operating system in the kernel layer can determine which program in the application layer the data belongs to, and then determine the frequency and/or voltage of the processor in the business processing stage.
  • the operation or operating system kernel running on the electronic device may include four software modules, namely a business processing module, an interrupt processing module, a DMA engine, and a CPU frequency and voltage adjustment module.
  • the interrupt processing module is used to receive interrupts and send DMA requests to the DMA control chip.
  • the business processing module is used to instruct the processor to perform calculations according to the logic of the upper-layer business.
  • the DMA engine is used to copy data between the memory and the data acquisition device.
  • the processor frequency and/or voltage adjustment module is used to configure the mode of the processor, that is, configure the voltage and/or frequency of the processor.
  • the term “when” may be interpreted to mean “if" or “after” or “in response to determining" or “in response to detecting" depending on the context.
  • the phrase “when determining" or “if (stated condition or event) is detected” may be interpreted to mean “if it is determined" or “in response to determining" or “on detecting (stated condition or event)” or “in response to detecting (stated condition or event)”.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted over a wired connection from a website, computer, server, or data center (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) means to transmit to another website, computer, server or data center.
  • the computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center integrated with one or more available media.
  • the available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, solid state drive), etc.
  • the program can be stored in a computer-readable storage medium.
  • the aforementioned storage media include: ROM, random access memory (RAM), magnetic disks, optical disks and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)

Abstract

Embodiments of the present application relate to the technical field of electronics, and provide a method for adjusting device power consumption and an electronic device. According to the method for adjusting device power consumption provided by the embodiments of the present application, the power consumption of an electronic device can be reduced by reducing a voltage and/or a frequency of a processor. The method for adjusting device power consumption provided by the embodiments of the present application comprises: first, after a processor receives an interrupt initiated by a network card or a sensor, the processor is not directly configured with a relatively high voltage and/or frequency, but provided with a relatively low voltage and/or frequency, and a DMA controller copies data into a memory, so that operation capability waste of the processor is reduced, and the power consumption of the processor is reduced; and then the processor is configured with a relatively high voltage and/or frequency only after the data is copied to the memory, so that the processor can quickly perform processing, and normal experience of a user is not affected.

Description

调整设备功耗的方法及电子设备Methods and electronic equipment for adjusting power consumption of equipment
本申请要求于2022年06月24日提交中国专利局、申请号为202210726906.6、申请名称为“调整设备功耗的方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application submitted to the China Patent Office on June 24, 2022, with the application number 202210726906.6 and the application name "Method and Electronic Device for Adjusting Equipment Power Consumption", the entire content of which is incorporated herein by reference. Applying.
技术领域Technical field
本申请涉及电子技术领域,尤其涉及调整设备功耗的方法及电子设备。The present application relates to the field of electronic technology, and in particular to methods of adjusting device power consumption and electronic devices.
背景技术Background technique
随着电子技术的发展,电子设备的功能不断增强,电子设备越来越频繁的参与到消费者的日常生活中来。其中,以可穿戴电子设备为代表的电子设备,由于消费者的使用***板等电子设备不同,需要可穿戴电子设备具有更强的续航能力。With the development of electronic technology, the functions of electronic devices continue to increase, and electronic devices are increasingly involved in consumers' daily lives. Among them, electronic devices represented by wearable electronic devices need to have stronger battery life because consumers' usage habits, product forms and product uses are different from electronic devices such as mobile phones and tablets.
在电子设备上的电池容量不变的情况下,可以通过降低电子设备的功耗可以提升电子设备的续航能力。一种降低电子设备的功耗的方法为,根据当前运行的任务、负载等多种参数确定需要调用哪种类型的核心(如麒麟9000的一个A77大核、三个A77中核、四个A55小核),以及调用核心的数量,进而通过降低CPU的功耗以降低电子设备的功耗。其中,不同核心的能耗曲线不同。例如,在浏览新闻等低负载场景中,电子设备主要调用中核和小核;在游戏等高负载场景中,电子设备会调用大核,进而在不降低用户体验的情况下降低电子设备的功耗。When the battery capacity of the electronic device remains unchanged, the battery life of the electronic device can be improved by reducing the power consumption of the electronic device. One way to reduce the power consumption of electronic equipment is to determine which type of core needs to be called based on the currently running tasks, load and other parameters (such as one A77 large core, three A77 medium cores, four A55 small cores of Kirin 9000). cores), and the number of calling cores, thereby reducing the power consumption of electronic devices by reducing the power consumption of the CPU. Among them, the energy consumption curves of different cores are different. For example, in low-load scenarios such as browsing news, electronic devices mainly use medium cores and small cores; in high-load scenarios such as gaming, electronic devices will use large cores, thereby reducing the power consumption of electronic devices without reducing user experience. .
但是,该方法主要依赖于CPU的架构,在许多电子设备上并不能取得比较好的效果。例如,在电子设备为搭载多个能效相同或相近核心的CPU的电子设备,或者,电子设备为嵌入式类型的电子设备的情况下,该方法的收益较小。However, this method mainly relies on the architecture of the CPU and cannot achieve better results on many electronic devices. For example, when the electronic device is an electronic device equipped with multiple CPUs with the same or similar energy efficiency cores, or the electronic device is an embedded type electronic device, the benefits of this method are smaller.
发明内容Contents of the invention
本申请实施例提供了调整设备功耗的方法及电子设备。本申请实施例提供的调整设备功耗的方法可以通过降低处理器的电压和/或频率,进而降低电子设备的功耗。本申请实施例提供的调整设备功耗的方法包括:首先,在处理器接收到由数据获取装置发起的中断后,并不直接配置处理器为较高的电压和/或频率,而是配置较低的电压和/或频率并由DMA控制器将数据拷贝到内存中,减少了处理器的运算能力浪费还降低了处理器的功耗;其次,在数据被拷贝到内存后才配置处理器为较高的电压和/或频率,使得处理器可以快速处理,不影响用户的正常体验。Embodiments of the present application provide methods and electronic devices for adjusting device power consumption. The method for adjusting device power consumption provided by embodiments of the present application can reduce the power consumption of electronic devices by reducing the voltage and/or frequency of the processor. The method for adjusting device power consumption provided by embodiments of the present application includes: first, after the processor receives an interrupt initiated by the data acquisition device, the processor is not directly configured to a higher voltage and/or frequency, but a higher voltage and/or frequency is configured. Low voltage and/or frequency and the DMA controller copies the data to the memory, which reduces the waste of computing power of the processor and reduces the power consumption of the processor; secondly, the processor is configured after the data is copied to the memory. Higher voltage and/or frequency allows the processor to process quickly without affecting the user's normal experience.
第一方面,本申请提供了一种调整设备功耗的方法,其特征在于,该方法包括:在电子设备获取第一数据后,该电子设备将该第一数据拷贝至内存中,其中,在该电子设备获取该第一数据后至该第一数据被拷贝到内存中前,该电子设备的处理器以第一模式工作;在该第一数据被拷贝到内存中后,该电子设备通过以第二模式工作的该处理器处理该第一数据;该处理器以第一模式工作时,该处理器的工作频率为第一频率,该处理器的工作电压为第一电压;该处理器以第二模式工作时,该处理器的工作频率为第二频率,该处理器的工作电压为第二电压;该第一频率小于该第二频率,和/或,该第一电压小于该第二电压。In a first aspect, the present application provides a method for adjusting the power consumption of a device, characterized in that the method includes: after the electronic device obtains the first data, the electronic device copies the first data to a memory, wherein, in After the electronic device obtains the first data and before the first data is copied into the memory, the processor of the electronic device operates in the first mode; after the first data is copied into the memory, the electronic device uses The processor operating in the second mode processes the first data; when the processor operates in the first mode, the operating frequency of the processor is the first frequency, and the operating voltage of the processor is the first voltage; When working in the second mode, the operating frequency of the processor is the second frequency, and the operating voltage of the processor is the second voltage; the first frequency is less than the second frequency, and/or the first voltage is less than the second Voltage.
在上述实施例中,在处理器接收到中断后至数据被拷贝到内存中前,配置处理器的频率和/或电压低于处理器处理数据时的频率和/或电压。由于在数据被拷贝到内存中前,处理器不会处理该数据,所以在处理器接收到中断后至数据被拷贝到内存中前,配置处理器的频率和/或电压低于处理器处理数据时的频率和/或电压,通过减少处理器的运算能力的浪费,进而降低处理器的功耗,提升电子设备的续航。In the above embodiment, after the processor receives the interrupt and before the data is copied into the memory, the frequency and/or voltage of the processor is configured to be lower than the frequency and/or voltage when the processor processes data. Since the processor will not process the data until the data is copied to memory, configure the processor at a lower frequency and/or voltage than the processor to process the data after the processor receives the interrupt and before the data is copied to memory. By reducing the waste of computing power of the processor, the power consumption of the processor is reduced and the battery life of the electronic device is improved.
结合第一方面的一些实施例,在一些实施例中,在该电子设备获取第一数据前,该处理器以第三模式工作;该处理器以第三模式工作时,该处理器的工作频率为第三频率,该处理器的工作电压为第三电压;该第三电压小于等于该第一电压,和/或,该第三频率小于等于该第一频率。With reference to some embodiments of the first aspect, in some embodiments, before the electronic device obtains the first data, the processor works in the third mode; when the processor works in the third mode, the operating frequency of the processor is the third frequency, the operating voltage of the processor is the third voltage; the third voltage is less than or equal to the first voltage, and/or the third frequency is less than or equal to the first frequency.
在上述实施例中,在电子设备获取数据前,处理器可以处于休眠模式,那么在处理器接收到中断后至数据被拷贝到内存中前,处理器的电压和/或频率与休眠模式可以相同。或者,在电子设备获取数据前,处理器可以处于休眠模式,那么在处理器接收到中断后至数据被拷贝到内存中前,处理器模式与休眠模式可以相同,即第一模式和第三模式相同。In the above embodiments, before the electronic device obtains data, the processor may be in sleep mode. Then, after the processor receives the interrupt and before the data is copied to the memory, the voltage and/or frequency of the processor may be the same as the sleep mode. . Alternatively, before the electronic device obtains data, the processor may be in sleep mode. Then, after the processor receives the interrupt and before the data is copied to the memory, the processor mode and the sleep mode may be the same, that is, the first mode and the third mode. same.
结合第一方面的一些实施例,在一些实施例中,在该电子设备获取第一数据前,该处理器以该第二模 式工作。In conjunction with some embodiments of the first aspect, in some embodiments, before the electronic device acquires the first data, the processor uses the second mode style work.
在上述实施例中,在电子设备获取数据前,处理器可以处于工作模式,并不一定局限于休眠模式。In the above embodiments, before the electronic device obtains data, the processor may be in the working mode and is not necessarily limited to the sleep mode.
结合第一方面的一些实施例,在一些实施例中,该电子设备包括数据获取装置和DMA控制器;该在电子设备获取第一数据后,该电子设备将该第一数据拷贝至内存中,具体包括:在该电子设备通过该数据获取装置获取该第一数据后,该电子设备通过该处理器接收该数据获取装置发送的第一中断;该第一中断用于指示该处理器将该第一数据从该数据获取装置拷贝到该内存中;该处理器接收到该第一中断后,该电子设备通过该处理器指示该DMA控制器将该第一数据从该数据获取装置拷贝到内存中。With reference to some embodiments of the first aspect, in some embodiments, the electronic device includes a data acquisition device and a DMA controller; after the electronic device acquires the first data, the electronic device copies the first data to the memory, Specifically including: after the electronic device obtains the first data through the data acquisition device, the electronic device receives a first interrupt sent by the data acquisition device through the processor; the first interrupt is used to instruct the processor to send the first data to the data acquisition device. A data is copied from the data acquisition device to the memory; after the processor receives the first interrupt, the electronic device instructs the DMA controller through the processor to copy the first data from the data acquisition device to the memory. .
在上述实施例中,数据获取装置如传感器或网卡在接收到数据后,可以向处理器发送中断,进而才能将数据拷贝至内存中,在拷贝至内存的过程中,处理器被配置为第一模式,可以降低电子设备的功耗。其中,电子设备在配置处理器第一模式前,可以判断之前处理器处于什么模式,若是处理器处于第二模式,则配置处理器为第一模式;若是处理器为第三模式,且第三模式与第一模式不同,则配置处理器为第一模式;若是处理器为第三模式,且第三模式与第一模式相同,则不更改处理器的模式。In the above embodiment, after receiving the data, the data acquisition device such as a sensor or a network card can send an interrupt to the processor so that the data can be copied to the memory. During the process of copying to the memory, the processor is configured as the first mode, which can reduce the power consumption of electronic devices. Before configuring the first mode of the processor, the electronic device can determine what mode the previous processor was in. If the processor is in the second mode, the processor is configured in the first mode; if the processor is in the third mode, and the third mode If the mode is different from the first mode, the processor is configured as the first mode; if the processor is in the third mode, and the third mode is the same as the first mode, the mode of the processor is not changed.
结合第一方面的一些实施例,在一些实施例中,该方法还包括:接收到第一操作后,该电子设备通过该处理器指示该DMA控制器将该内存中的第二数据拷贝到该数据获取装置;在该第二数据从该内存拷贝到该数据获取装置的过程中,该处理器以该第一模式工作。In conjunction with some embodiments of the first aspect, in some embodiments, the method further includes: after receiving the first operation, the electronic device instructs the DMA controller through the processor to copy the second data in the memory to the Data acquisition device; during the process of copying the second data from the memory to the data acquisition device, the processor operates in the first mode.
在上述实施例中,当处理器要将数据写入到网卡或传感器的情况下,处理器在指示DMA控制器拷贝数据的过程中,处理器以第一模式工作,可以降低处理器的功耗。In the above embodiment, when the processor wants to write data to the network card or sensor, the processor works in the first mode while instructing the DMA controller to copy the data, which can reduce the power consumption of the processor. .
结合第一方面的一些实施例,在一些实施例中,该数据获取装置为传感器或网卡。With reference to some embodiments of the first aspect, in some embodiments, the data acquisition device is a sensor or a network card.
在上述实施例中,数据获取装置为传感器或网卡,也可以是其他位于处理器外的其他芯片,在此不做限定。In the above embodiment, the data acquisition device is a sensor or a network card. It may also be other chips located outside the processor, which is not limited here.
结合第一方面的一些实施例,在一些实施例中,该数据获取装置为光电传感器,该第一数据为用于确定心率的数据;在该第一数据被拷贝到内存中后,该电子设备通过以第二模式工作的该处理器处理该第一数据,具体包括:在该第一数据被拷贝到内存后,该电子设备的处理器基于该第一数据确定心率。With reference to some embodiments of the first aspect, in some embodiments, the data acquisition device is a photoelectric sensor, and the first data is data used to determine heart rate; after the first data is copied to the memory, the electronic device Processing the first data by the processor operating in the second mode specifically includes: after the first data is copied to the memory, the processor of the electronic device determines the heart rate based on the first data.
在上述实施例中,在用户使用手表测量心率的场景中,处理器以第一模式将数据从光电传感器拷贝到内存中,进而处理器以第二模式基于该数据计算得到用户的心率,降低了电子设备在拷贝数据的过程中电子设备的功耗。In the above embodiment, in the scenario where the user uses the watch to measure the heart rate, the processor copies the data from the photoelectric sensor to the memory in the first mode, and then the processor calculates the user's heart rate based on the data in the second mode, reducing the The power consumption of electronic equipment during the process of copying data.
结合第一方面的一些实施例,在一些实施例中,该数据获取装置为网卡;在该第一数据被拷贝到内存中后,该电子设备通过以第二模式工作的该处理器处理该第一数据,具体包括:在该第一数据被拷贝到内存中后,该电子设备通过以第二模式工作的该处理器基于该第一数据确定第一内容;该方法还包括:该电子设备显示该第一内容,该第一内容与该第一数据对应。With reference to some embodiments of the first aspect, in some embodiments, the data acquisition device is a network card; after the first data is copied into the memory, the electronic device processes the third data through the processor working in the second mode. A data, specifically including: after the first data is copied into the memory, the electronic device determines the first content based on the first data through the processor working in the second mode; the method also includes: the electronic device displays The first content corresponds to the first data.
在上述实施例中,在电子设备接收到消息并显示在屏幕上的场景中,处理器以第一模式将数据从网卡拷贝到内存中,进而处理器以第二模式基于该数据计算需要显示界面的绘制指令,再进而由电子设备执行绘制生成用于送显的界面,降低了电子设备在拷贝数据的过程中电子设备的功耗。In the above embodiment, in the scenario where the electronic device receives the message and displays it on the screen, the processor copies the data from the network card to the memory in the first mode, and then the processor calculates the required display interface based on the data in the second mode. The drawing instructions are then executed by the electronic device to generate an interface for display, which reduces the power consumption of the electronic device during the process of copying data.
结合第一方面的一些实施例,在一些实施例中,该方法还包括:在该电子设备通过该DMA控制器将该第一数据从该数据获取装置拷贝至该内存中后,该电子设备通过该DMA控制器向该处理器发送第二中断;在该电子设备通过该处理器基于该第二中断确定该第一数据被拷贝至该内存中后,配置该处理器工作在该第二模式。In conjunction with some embodiments of the first aspect, in some embodiments, the method further includes: after the electronic device copies the first data from the data acquisition device to the memory through the DMA controller, the electronic device passes The DMA controller sends a second interrupt to the processor; after the electronic device determines through the processor that the first data is copied to the memory based on the second interrupt, the processor is configured to work in the second mode.
在上述实施例中,在数据拷贝完成后,需要DMA控制器向处理器发送中断以通知处理器完成了数据拷贝,进而配置处理器以第二模式工作,不会减慢电子设备处理数据的速率,不会降低用户的体验。In the above embodiment, after the data copy is completed, the DMA controller needs to send an interrupt to the processor to notify the processor that the data copy is completed, and then configure the processor to work in the second mode, which will not slow down the data processing rate of the electronic device. , will not reduce the user experience.
结合第一方面的一些实施例,在一些实施例中,在该第一数据被拷贝到内存中后,在该电子设备通过以第二模式工作的该处理器处理该第一数据前,该方法还包括:该电子设备确定第一参数;该电子设备基于该第一参数确定该第二电压和/或第二频率。In conjunction with some embodiments of the first aspect, in some embodiments, after the first data is copied into the memory and before the electronic device processes the first data through the processor operating in the second mode, the method It also includes: the electronic device determines a first parameter; and the electronic device determines the second voltage and/or the second frequency based on the first parameter.
在上述实施例中,电子设备在配置处理器以第二模式工作前,可以调整处理器的第二模式的工作电压和工作频率。电子设备会确定第一参数,第一参数可以是当前处理器的负载、温度或者其他和第一数据有关的餐户数,进而基于第一参数确定合适的第二电压和/或第二频率。In the above embodiment, before configuring the processor to operate in the second mode, the electronic device may adjust the operating voltage and operating frequency of the processor in the second mode. The electronic device determines a first parameter, which may be the current processor load, temperature, or other number of customers related to the first data, and then determines an appropriate second voltage and/or second frequency based on the first parameter.
结合第一方面的一些实施例,在一些实施例中,该第一参数用于指示该第一数据对应的应用程序;或者,该第一参数用于指示该第一数据对应的业务;或者,该第一参数用于指示该第一数据对应的业务的类型。With reference to some embodiments of the first aspect, in some embodiments, the first parameter is used to indicate the application program corresponding to the first data; or, the first parameter is used to indicate the service corresponding to the first data; or, The first parameter is used to indicate the type of service corresponding to the first data.
在上述实施例中,第一参数可以是和第一数据直接相关的参数,进而可以使得处理器以不同的运算能 力去匹配业务或应用程序的需求,进而保障用户的体验。In the above embodiments, the first parameter may be a parameter directly related to the first data, which may enable the processor to operate with different computing capabilities. Efforts are made to match business or application needs to ensure user experience.
结合第一方面的一些实施例,在一些实施例中,其特征在于,该第二电压和/或第二频率为预设值。In conjunction with some embodiments of the first aspect, in some embodiments, it is characterized in that the second voltage and/or the second frequency are preset values.
在上述实施例中,第二电压和/或第二频率也可以是预设值,开发简单,对处理器的能力要求低,可以适配更多类型的处理器。In the above embodiments, the second voltage and/or the second frequency can also be preset values, which is simple to develop, has low requirements on processor capabilities, and can be adapted to more types of processors.
第二方面,本申请实施例提供了一种电子设备,该电子设备包括:一个或多个处理器和存储器;该存储器与该一个或多个处理器耦合,该存储器用于存储计算机程序代码,该计算机程序代码包括计算机指令,该一个或多个处理器调用该计算机指令以使得该电子设备执行:在电子设备获取第一数据后,该电子设备将该第一数据拷贝至内存中,其中,在该电子设备获取该第一数据后至该第一数据被拷贝到内存中前,该电子设备的处理器以第一模式工作;在该第一数据被拷贝到内存中后,该电子设备通过以第二模式工作的该处理器处理该第一数据;该处理器以第一模式工作时,该处理器的工作频率为第一频率,该处理器的工作电压为第一电压;该处理器以第二模式工作时,该处理器的工作频率为第二频率,该处理器的工作电压为第二电压;该第一频率小于该第二频率,和/或,该第一电压小于该第二电压。In a second aspect, embodiments of the present application provide an electronic device. The electronic device includes: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program codes, The computer program code includes computer instructions, and the one or more processors call the computer instructions to cause the electronic device to execute: after the electronic device obtains the first data, the electronic device copies the first data to the memory, wherein, After the electronic device obtains the first data and before the first data is copied into the memory, the processor of the electronic device operates in the first mode; after the first data is copied into the memory, the electronic device passes The processor operating in the second mode processes the first data; when the processor operates in the first mode, the operating frequency of the processor is the first frequency, and the operating voltage of the processor is the first voltage; the processor When operating in the second mode, the operating frequency of the processor is the second frequency, and the operating voltage of the processor is the second voltage; the first frequency is less than the second frequency, and/or the first voltage is less than the first voltage. Two voltages.
结合第二方面的一些实施例,在一些实施例中,在该电子设备获取第一数据前,该处理器以第三模式工作;该处理器以第三模式工作时,该处理器的工作频率为第三频率,该处理器的工作电压为第三电压;该第三电压小于等于该第一电压,和/或,该第三频率小于等于该第一频率。Combined with some embodiments of the second aspect, in some embodiments, before the electronic device obtains the first data, the processor works in the third mode; when the processor works in the third mode, the operating frequency of the processor is the third frequency, the operating voltage of the processor is the third voltage; the third voltage is less than or equal to the first voltage, and/or the third frequency is less than or equal to the first frequency.
结合第二方面的一些实施例,在一些实施例中,在该电子设备获取第一数据前,该处理器以该第二模式工作。In conjunction with some embodiments of the second aspect, in some embodiments, before the electronic device acquires the first data, the processor works in the second mode.
结合第二方面的一些实施例,在一些实施例中,该一个或多个处理器,具体用于调用该计算机指令以使得该电子设备执行:在该电子设备通过该数据获取装置获取该第一数据后,该电子设备通过该处理器接收该数据获取装置发送的第一中断;该第一中断用于指示该处理器将该第一数据从该数据获取装置拷贝到该内存中;该处理器接收到该第一中断后,该电子设备通过该处理器指示该DMA控制器将该第一数据从该数据获取装置拷贝到内存中。With reference to some embodiments of the second aspect, in some embodiments, the one or more processors are specifically configured to call the computer instructions to cause the electronic device to execute: after the electronic device obtains the first data through the data acquisition device After obtaining the data, the electronic device receives the first interrupt sent by the data acquisition device through the processor; the first interrupt is used to instruct the processor to copy the first data from the data acquisition device to the memory; the processor After receiving the first interrupt, the electronic device instructs the DMA controller through the processor to copy the first data from the data acquisition device to the memory.
结合第二方面的一些实施例,在一些实施例中,该一个或多个处理器,还用于调用该计算机指令以使得该电子设备执行:接收到第一操作后,该电子设备通过该处理器指示该DMA控制器将该内存中的第二数据拷贝到该数据获取装置;在该第二数据从该内存拷贝到该数据获取装置的过程中,该处理器以该第一模式工作。In conjunction with some embodiments of the second aspect, in some embodiments, the one or more processors are also configured to call the computer instructions to cause the electronic device to execute: after receiving the first operation, the electronic device passes the processing The processor instructs the DMA controller to copy the second data in the memory to the data acquisition device; during the process of copying the second data from the memory to the data acquisition device, the processor operates in the first mode.
结合第二方面的一些实施例,在一些实施例中,该数据获取装置为传感器或网卡。With reference to some embodiments of the second aspect, in some embodiments, the data acquisition device is a sensor or a network card.
结合第二方面的一些实施例,在一些实施例中,该一个或多个处理器,具体用于调用该计算机指令以使得该电子设备执行:在该第一数据被拷贝到内存中后,该电子设备通过以第二模式工作的该处理器处理该第一数据,具体包括:在该第一数据被拷贝到内存后,该电子设备的处理器基于该第一数据确定心率。In conjunction with some embodiments of the second aspect, in some embodiments, the one or more processors are specifically configured to call the computer instructions to cause the electronic device to execute: after the first data is copied into the memory, the The electronic device processes the first data through the processor operating in the second mode, which specifically includes: after the first data is copied to the memory, the processor of the electronic device determines the heart rate based on the first data.
结合第二方面的一些实施例,在一些实施例中,该一个或多个处理器,具体用于调用该计算机指令以使得该电子设备执行:在该第一数据被拷贝到内存中后,该电子设备通过以第二模式工作的该处理器基于该第一数据确定第一内容;该电子设备还用于显示该第一内容,该第一内容与该第一数据对应。In conjunction with some embodiments of the second aspect, in some embodiments, the one or more processors are specifically configured to call the computer instructions to cause the electronic device to execute: after the first data is copied into the memory, the The electronic device determines the first content based on the first data through the processor operating in the second mode; the electronic device is also used to display the first content, and the first content corresponds to the first data.
结合第二方面的一些实施例,在一些实施例中,该一个或多个处理器,还用于调用该计算机指令以使得该电子设备执行:在该电子设备通过该DMA控制器将该第一数据从该数据获取装置拷贝至该内存中后,该电子设备通过该DMA控制器向该处理器发送第二中断;在该电子设备通过该处理器基于该第二中断确定该第一数据被拷贝至该内存中后,配置该处理器工作在该第二模式。In conjunction with some embodiments of the second aspect, in some embodiments, the one or more processors are also used to call the computer instructions to cause the electronic device to execute: after the electronic device transfers the first After the data is copied from the data acquisition device to the memory, the electronic device sends a second interrupt to the processor through the DMA controller; after the electronic device determines that the first data is copied based on the second interrupt through the processor After being stored in the memory, the processor is configured to work in the second mode.
结合第二方面的一些实施例,在一些实施例中,该一个或多个处理器,还用于调用该计算机指令以使得该电子设备执行:该电子设备确定第一参数;该电子设备基于该第一参数确定该第二电压和/或第二频率。With reference to some embodiments of the second aspect, in some embodiments, the one or more processors are also configured to call the computer instructions to cause the electronic device to execute: the electronic device determines the first parameter; the electronic device based on the The first parameter determines the second voltage and/or second frequency.
结合第二方面的一些实施例,在一些实施例中,该第一参数用于指示该第一数据对应的应用程序;或者,该第一参数用于指示该第一数据对应的业务;或者,该第一参数用于指示该第一数据对应的业务的类型。With reference to some embodiments of the second aspect, in some embodiments, the first parameter is used to indicate the application program corresponding to the first data; or, the first parameter is used to indicate the service corresponding to the first data; or, The first parameter is used to indicate the type of service corresponding to the first data.
结合第二方面的一些实施例,在一些实施例中,该第二电压和/或第二频率为预设值。In conjunction with some embodiments of the second aspect, in some embodiments, the second voltage and/or the second frequency are preset values.
第三方面,本申请实施例提供了一种芯片***,该芯片***应用于电子设备,该芯片***包括一个或多个处理器,该处理器用于调用计算机指令以使得该电子设备执行如第一方面以及第一方面中任一可能的实现方式描述的方法。 In a third aspect, embodiments of the present application provide a chip system, which is applied to an electronic device. The chip system includes one or more processors, and the processor is used to call computer instructions to cause the electronic device to execute the first step. aspect and the method described in any possible implementation manner in the first aspect.
第四方面,本申请实施例提供一种包含指令的计算机程序产品,当上述计算机程序产品在电子设备上运行时,使得上述电子设备执行如第一方面以及第一方面中任一可能的实现方式描述的方法。In a fourth aspect, embodiments of the present application provide a computer program product containing instructions. When the computer program product is run on an electronic device, the electronic device causes the electronic device to execute the first aspect and any possible implementation of the first aspect. described method.
第五方面,本申请实施例提供一种计算机可读存储介质,包括指令,当上述指令在电子设备上运行时,使得上述电子设备执行如第一方面以及第一方面中任一可能的实现方式描述的方法。In a fifth aspect, embodiments of the present application provide a computer-readable storage medium that includes instructions. When the instructions are run on an electronic device, the electronic device causes the electronic device to execute the first aspect and any possible implementation of the first aspect. described method.
可以理解地,上述第二方面提供的电子设备、第三方面提供的芯片***、第四方面提供的计算机程序产品和第五方面提供的计算机存储介质均用于执行本申请实施例所提供的方法。因此,其所能达到的有益效果可参考对应方法中的有益效果,此处不再赘述。It can be understood that the electronic device provided by the second aspect, the chip system provided by the third aspect, the computer program product provided by the fourth aspect, and the computer storage medium provided by the fifth aspect are all used to execute the method provided by the embodiments of the present application. . Therefore, the beneficial effects it can achieve can be referred to the beneficial effects in the corresponding methods, and will not be described again here.
附图说明Description of the drawings
图1为本申请实施例提供的降低电子设备的功耗的方法的一个示例性示意图。FIG. 1 is an exemplary schematic diagram of a method for reducing power consumption of an electronic device provided by an embodiment of the present application.
图2为本申请实施例提供的降低电子设备的功耗的方法的另一个示例性示意图。FIG. 2 is another exemplary schematic diagram of a method for reducing power consumption of an electronic device provided by an embodiment of the present application.
图3A为本申请实施例提供的调整设备功耗方法的场景的一个示例性示意图。FIG. 3A is an exemplary schematic diagram of a scenario of a method for adjusting device power consumption provided by an embodiment of the present application.
图3B为本申请实施例提供的图3A所示场景中不同阶段对应不同CPU阶段的一个示例性示意图。FIG. 3B is an exemplary schematic diagram of different stages corresponding to different CPU stages in the scenario shown in FIG. 3A provided by an embodiment of the present application.
图4A为本申请实施例提供的调整设备功耗方法的场景的另一个示例性示意图。FIG. 4A is another exemplary schematic diagram of a scenario of a method for adjusting device power consumption provided by an embodiment of the present application.
图4B为本申请实施例提供的图4A所示场景中不同阶段对应不同CPU阶段的一个示例性示意图。FIG. 4B is an exemplary schematic diagram of different stages corresponding to different CPU stages in the scenario shown in FIG. 4A provided by an embodiment of the present application.
图5为本申请实施例提供的调整设备功耗的方法的流程的一个示例性示意图。FIG. 5 is an exemplary schematic diagram of the flow of a method for adjusting device power consumption provided by an embodiment of the present application.
图6为本申请实施例提供的调整设备功耗的方法的流程的另一个示例性示意图。FIG. 6 is another exemplary schematic diagram of the flow of a method for adjusting device power consumption provided by an embodiment of the present application.
图7为本申请实施例提供的调整设备功耗的方法的流程的另一个示例性示意图。FIG. 7 is another exemplary schematic diagram of the flow of a method for adjusting device power consumption provided by an embodiment of the present application.
图8为本申请实施例提供的调整设备功耗的方法的流程的另一个示例性示意图。FIG. 8 is another exemplary schematic diagram of the process of a method for adjusting device power consumption provided by an embodiment of the present application.
图9A、图9B和图9C为本申请实施例提供的CPU频率和电压变化的一个示例性示意图。FIG. 9A, FIG. 9B, and FIG. 9C are exemplary schematic diagrams of changes in CPU frequency and voltage provided by embodiments of the present application.
图10A和图10B为本申请实施例提供的电子设备的硬件架构的一个示例性示意图。FIG. 10A and FIG. 10B are an exemplary schematic diagram of the hardware architecture of an electronic device provided by an embodiment of the present application.
图11A和图11B为本申请实施例提供的电子设备软件架构的一个示例性示意图。FIG. 11A and FIG. 11B are an exemplary schematic diagram of the software architecture of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
本申请以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“该”、“上述”、“该”和“这一”旨在也包括复数表达形式,除非其上下文中明确地有相反指示。还应当理解,本申请中使用的术语“和/或”是指并包含一个或多个所列出项目的任何或所有可能组合。The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the specification and appended claims of this application, the singular expressions "a", "an", "the", "above", "the" and "the" are intended to also include Plural expressions unless the context clearly indicates otherwise. It will also be understood that the term "and/or" as used in this application refers to and includes any and all possible combinations of one or more of the listed items.
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为暗示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征,在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。Hereinafter, the terms “first” and “second” are used for descriptive purposes only and shall not be understood as implying or implying relative importance or implicitly specifying the quantity of indicated technical features. Therefore, the features defined as “first” and “second” may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, “plurality” The meaning is two or more.
本申请以下实施例中的术语“用户界面(user interface,UI)”,是应用程序或操作***与用户之间进行交互和信息交换的介质接口,它实现信息的内部形式与用户可以接受形式之间的转换。用户界面是通过java、可扩展标记语言(extensible markup language,XML)等特定计算机语言编写的源代码,界面源代码在电子设备上经过解析,渲染,最终呈现为用户可以识别的内容。用户界面常用的表现形式是图形用户界面(graphic user interface,GUI),是指采用图形方式显示的与计算机操作相关的用户界面。它可以是在电子设备的显示屏中显示的文本、图标、按钮、菜单、选项卡、文本框、对话框、状态栏、导航栏、Widget等可视的界面元素。The term "user interface (UI)" in the following embodiments of this application is a media interface for interaction and information exchange between an application or operating system and a user. It realizes the difference between the internal form of information and the form acceptable to the user. conversion between. The user interface is source code written in specific computer languages such as Java and extensible markup language (XML). The interface source code is parsed and rendered on the electronic device, and finally presented as content that can be recognized by the user. The commonly used form of user interface is graphical user interface (GUI), which refers to a user interface related to computer operations that is displayed graphically. It can be text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets and other visual interface elements displayed on the display screen of an electronic device.
首先,由于消费者对如手表、手环等可穿戴电子设备的使用***板等电子设备一样,总是每天对电子设备充电;其次,相比于手机、平板等电子设备,可穿戴电子设备的电池容量一般较小。为了尽可能的提升用户的体验,应该在不影响用户的体验和可穿戴电子设备的功能正常运行的情况下,尽可能的降低可穿戴电子设备的功耗。First of all, because consumers’ usage habits of wearable electronic devices such as watches and bracelets are not the same as those of electronic devices such as mobile phones and tablets, they always charge electronic devices every day; secondly, compared with electronic devices such as mobile phones and tablets, Wearable electronic devices generally have smaller battery capacities. In order to improve the user experience as much as possible, the power consumption of wearable electronic devices should be reduced as much as possible without affecting the user experience and the normal operation of the wearable electronic devices.
一种可行的降低电子设备的功耗的方法为:操作***根据当前运行的任务、CPU负载等多种参数配置CPU的电压(工作电压)和/或频率(工作频率),如图1所示。A feasible method to reduce the power consumption of electronic equipment is: the operating system configures the voltage (working voltage) and/or frequency (working frequency) of the CPU according to the currently running tasks, CPU load and other parameters, as shown in Figure 1 .
图1为本申请实施例提供的降低电子设备的功耗的方法的一个示例性示意图。 FIG. 1 is an exemplary schematic diagram of a method for reducing power consumption of an electronic device provided by an embodiment of the present application.
电子设备根据当前运行的业务的类型,配置CPU频率为不同的频率,进而兼顾电子设备的性能和功耗。如图1所示,当电子设备运行第一类型业务时,CPU频率最低;其次,当电子设备运行第二类型业务时,CPU频率次低;再次,当电子设备运行第三类型业务时,CPU频率较高;当电子设备运行第四类型业务时,CPU频率最高。其中,第一类型业务的负载低于第二类型业务的负载,第二类型业务的负载低于第三类型业务的负载;第三类型业务的负载低于第四类型业务的负载。The electronic device configures the CPU frequency to different frequencies according to the type of business currently running, thereby taking into account the performance and power consumption of the electronic device. As shown in Figure 1, when the electronic device runs the first type of business, the CPU frequency is the lowest; secondly, when the electronic device runs the second type of business, the CPU frequency is the second lowest; thirdly, when the electronic device runs the third type of business, the CPU frequency The frequency is higher; when the electronic device is running the fourth type of business, the CPU frequency is the highest. Among them, the load of the first type of service is lower than the load of the second type of service, the load of the second type of service is lower than the load of the third type of service, and the load of the third type of service is lower than the load of the fourth type of service.
其中,对于基于Linux内核的操作***来讲,可以基于Linux内核中的CPUfreq模块调整CPU的电压和频率。其中,CPUfreq模块提供许多种调度策略,例如Performance策略、Powersave策略、Userspace策略、Ondemand策略等。其中,Userspace策略允许操作***自己调整CPU的电压和频率,进而实现如图1所示的方法。Among them, for operating systems based on the Linux kernel, the voltage and frequency of the CPU can be adjusted based on the CPUfreq module in the Linux kernel. Among them, the CPUfreq module provides many scheduling strategies, such as Performance strategy, Powersave strategy, Userspace strategy, Ondemand strategy, etc. Among them, the Userspace policy allows the operating system to adjust the voltage and frequency of the CPU by itself, thereby implementing the method shown in Figure 1.
但是,对于以可穿戴电子设备为代表的电子设备来说,电子设备上可以运行的高负载的业务较少,电子设备运行该高负载的业务的时间也较少,大部分业务的负载差距不大,如图2所示。However, for electronic devices represented by wearable electronic devices, there are fewer high-load services that can be run on the electronic devices, and the electronic devices have less time to run the high-load services. The load gap of most services is not large. Large, as shown in Figure 2.
图2为本申请实施例提供的降低电子设备的功耗的方法的另一个示例性示意图。FIG. 2 is another exemplary schematic diagram of a method for reducing power consumption of an electronic device provided by an embodiment of the present application.
如图2所示,当电子设备上不同类型业务的负载差距不大的情况下,不同类型业务对应的CPU频率差距不大。其次,在消费者日常生活中,电子设备更多处于低负载状态,即电子设备高负载业务的运行时间较短。As shown in Figure 2, when the load difference between different types of services on the electronic device is not large, the difference in CPU frequencies corresponding to different types of services is not large. Secondly, in consumers' daily lives, electronic equipment is more likely to be in a low-load state, that is, the operation time of high-load services of electronic equipment is shorter.
在图2所示的情况下,电子设备根据当前运行的业务的类型,配置CPU频率为不同的频率的这种方法取得的功耗收益较小,不能有效的降低功耗,或者说图1所示的方法取得的功耗收益仍然不足以满足消费者的需求。In the situation shown in Figure 2, the electronic device configures the CPU frequency to different frequencies according to the type of business currently running. This method achieves small power consumption benefits and cannot effectively reduce power consumption. In other words, as shown in Figure 1 The power consumption gains obtained by the method shown are still not enough to meet the needs of consumers.
基于此,本申请实施例提供了调整设备功耗的方法及电子设备。本申请提供的调整设备功耗的方法基于操作***的中断处理能力,将被中断唤醒后的CPU的处理过程分为至少两个阶段,分别为唤醒阶段和业务处理阶段;在唤醒阶段,电子设备的操作***配置CPU的频率和/或电压为较低的水平,进而降低功耗;在业务处理阶段,电子设备上的操作***可以基于业务的类型配置CPU的频率和/或电压,或者,配置CPU的频率和/或电压为较高的水平,进而保障用户的体验。Based on this, embodiments of the present application provide methods and electronic devices for adjusting device power consumption. The method for adjusting device power consumption provided by this application is based on the interrupt processing capability of the operating system. The processing process of the CPU after being awakened by an interrupt is divided into at least two stages, namely the wake-up stage and the business processing stage; during the wake-up stage, the electronic device The operating system configures the frequency and/or voltage of the CPU to a lower level, thereby reducing power consumption; during the business processing stage, the operating system on the electronic device can configure the frequency and/or voltage of the CPU based on the type of business, or configure The CPU frequency and/or voltage are at a higher level to ensure user experience.
值得说明的是,本申请实施例提供的调整设备功耗的方法可以作用于电子设备上的CPU,也可以作用于电子设备内部的其他芯片或处理单元,例如,数字信号处理器(digital signal processor,DSP)、神经网络处理器(neural-network processing unit,NPU)等可以接收中断并且可以被配置不同的工作电压和/或工作频率的芯片或处理单元。其中,处理器也可以包括DSP、CPU、NPU中的一种或多种,即处理器作为一个芯片集成了DSP、NPU、CPU中的一种或多种。It is worth noting that the method for adjusting device power consumption provided by the embodiments of the present application can be applied to the CPU on the electronic device, or to other chips or processing units inside the electronic device, such as a digital signal processor (digital signal processor). , DSP), neural-network processing unit (NPU) and other chips or processing units that can receive interrupts and can be configured with different operating voltages and/or operating frequencies. The processor may also include one or more of DSP, CPU, and NPU, that is, the processor integrates one or more of DSP, NPU, and CPU as a chip.
在后文中,主要以CPU为例介绍本申请实施例提供的调整设备功耗的方法。In the following, the method of adjusting device power consumption provided by the embodiments of the present application will be mainly introduced using the CPU as an example.
其中,在唤醒阶段,CPU几乎不工作,开放时钟等能力给直接内存访问(Direct Memorty Access,DMA)引擎(或DMA芯片、或DMA控制器),使得DMA引擎可以将数据获取装置(如外设、传感器、网卡)(也可以称为数据获取装置)的数据读入到内存中。其中,内存可以包括集成在CPU内部的L1内存、L2内存、L3内存,和/或也可以包括电子设备的内存。Among them, during the wake-up phase, the CPU hardly works and opens clock and other capabilities to the Direct Memory Access (DMA) engine (or DMA chip, or DMA controller), so that the DMA engine can obtain data from devices (such as peripherals). , sensor, network card) (also called a data acquisition device), the data is read into the memory. Among them, the memory may include L1 memory, L2 memory, and L3 memory integrated inside the CPU, and/or may also include memory of electronic devices.
可选地,在本申请一些实施例中,在唤醒阶段,电子设备可以为业务处理阶段做一些预先准备,例如,初始化一些内部参数等,在此不做限定。Optionally, in some embodiments of the present application, during the wake-up phase, the electronic device can make some pre-preparations for the business processing phase, such as initializing some internal parameters, etc., which are not limited here.
其中,在业务处理阶段,CPU按照上层业务的逻辑处理内存中的数据,通过计算得到结果。Among them, in the business processing stage, the CPU processes the data in the memory according to the logic of the upper-layer business and obtains the results through calculation.
值得说明的是,在唤醒阶段,由于DMA引擎还没有将全部的数据读入到内存中,CPU此时可以不处理数据。It is worth mentioning that during the wake-up phase, since the DMA engine has not read all the data into the memory, the CPU does not need to process the data at this time.
可以理解的是,相比于图1所示的方法,本申请实施例提供的调整设备功耗的方法,由于在更小的粒度上发现了CPU在空负载维持较高频率和/或电压的问题,进而通过降低CPU空负载情况下的频率和/或电压,降低电子设备的功耗。It can be understood that, compared with the method shown in Figure 1, the method of adjusting device power consumption provided by the embodiment of the present application has been found at a smaller granularity that the CPU maintains a higher frequency and/or voltage under no load. problem, thereby reducing the power consumption of electronic devices by reducing the frequency and/or voltage of the CPU under no load conditions.
下面首先以电子设备为手表和手环为例,示例性的介绍本申请实施例提供的调整设备功耗的方法。The following first takes the electronic device as a watch and a bracelet as an example to exemplarily introduce the method for adjusting the power consumption of the device provided by the embodiment of the present application.
图3A为本申请实施例提供的调整设备功耗方法的场景的一个示例性示意图。FIG. 3A is an exemplary schematic diagram of a scenario of a method for adjusting device power consumption provided by an embodiment of the present application.
如图3A所示,手表收到网络发送的第一消息,并将消息在屏幕上显示出来的过程可以分为四个阶段。As shown in Figure 3A, the process of the watch receiving the first message sent by the network and displaying the message on the screen can be divided into four stages.
阶段1:手表的屏幕可以不显示任何内容,处于息屏状态。手表1通过蓝牙、WiFi等近场无线通信技术与互联网连接,或者可以通过蜂窝移动通信与互联网连接,在此不做限定。或者,手表也可以显示一些内容,如时间等。Stage 1: The screen of the watch can be in a screen-off state without displaying any content. Watch 1 is connected to the Internet through near-field wireless communication technologies such as Bluetooth and WiFi, or can be connected to the Internet through cellular mobile communications, which is not limited here. Alternatively, the watch can also display some content, such as time.
阶段2:手表接收到来自网络中的服务器发送的消息。其中,手表通过网卡接收数据,并将数据存储到网卡中。可选地,在本申请一些实施例中,手表可以通过蓝牙硬件模块或WiFi硬件模块接收数据。 Phase 2: The watch receives the message sent from the server in the network. Among them, the watch receives data through the network card and stores the data into the network card. Optionally, in some embodiments of the present application, the watch can receive data through a Bluetooth hardware module or a WiFi hardware module.
阶段3:手表的网卡接收到数据后,向操作***发送中断,唤醒CPU;同时,DMA引擎将数据从网卡拷贝到内存中。Stage 3: After the watch's network card receives the data, it sends an interrupt to the operating system and wakes up the CPU; at the same time, the DMA engine copies the data from the network card to the memory.
阶段4:CPU处理该拷贝到内存中的数据;在CPU按照上层业务的逻辑处理数据完成后,电子设备点亮屏幕,并对应的显示消息的内容。Stage 4: The CPU processes the data copied to the memory; after the CPU completes processing the data according to the logic of the upper-layer business, the electronic device lights up the screen and displays the content of the message accordingly.
图3B为本申请实施例提供的图3A所示场景中不同阶段对应不同CPU阶段的一个示例性示意图。FIG. 3B is an exemplary schematic diagram of different stages corresponding to different CPU stages in the scenario shown in FIG. 3A provided by an embodiment of the present application.
如图3B所示,阶段1和阶段2可以对应于休眠阶段;阶段3对应于唤醒阶段;阶段4对应于业务处理阶段。As shown in Figure 3B, Phase 1 and Phase 2 may correspond to the sleep phase; Phase 3 corresponds to the wake-up phase; and Phase 4 corresponds to the service processing phase.
其中,在休眠阶段,CPU的频率最低,为A1Hz;在唤醒阶段,CPU频率为A2Hz;在业务处理阶段,CPU的频率最高,频率为A3Hz。其中,A1小于等于A2,A2小于A3。其中,休眠阶段也可以称为休眠模式、休眠状态,例如部分CPU可以通过WFI(wait for interrupt)指令和WFE(wait for event)指令进入休眠阶段。Among them, in the sleep stage, the CPU frequency is the lowest, A1Hz; in the wake-up stage, the CPU frequency is A2Hz; in the business processing stage, the CPU frequency is the highest, A3Hz. Among them, A1 is less than or equal to A2, and A2 is less than A3. Among them, the sleep stage can also be called sleep mode and sleep state. For example, some CPUs can enter the sleep stage through the WFI (wait for interrupt) instruction and the WFE (wait for event) instruction.
值得说明的是,A2等于A1的情况下,唤醒阶段可以认为与休眠阶段相同,即在CPU处于休眠阶段的情况下,电子设备上的DMA引擎仍然可以正常工作;在该情况下,可以认为本申请调整设备功耗的方法实质上是延长了CPU的休眠阶段的时间,处于休眠阶段的CPU不会被数据获取装置发送的中断唤醒,而是被DMA引擎的中断唤醒,其中DMA引擎的中断用于通知CPU数据已经拷贝完成。It is worth noting that when A2 is equal to A1, the wake-up phase can be considered the same as the sleep phase, that is, when the CPU is in the sleep phase, the DMA engine on the electronic device can still work normally; in this case, the wake-up phase can be considered to be the same as the sleep phase. The method of applying to adjust device power consumption essentially prolongs the sleep phase of the CPU. The CPU in the sleep phase will not be awakened by the interrupt sent by the data acquisition device, but by the interrupt of the DMA engine. The interrupt of the DMA engine is used. Notifies the CPU that the data has been copied.
可选地,在本申请一些实施例中,A3可以是变量,即A3可以根据当前业务的类型配置为具体的不同数值。A3的确定方法可以参考图1所示的内容,此处不再赘述。Optionally, in some embodiments of the present application, A3 may be a variable, that is, A3 may be configured with different specific values according to the type of the current service. The determination method of A3 can refer to the content shown in Figure 1 and will not be described again here.
值得说明的是,CPU的电压在不同CPU阶段的电压变化趋势可以与图3B所示的内容类似。It is worth noting that the voltage change trend of the CPU voltage in different CPU stages can be similar to what is shown in Figure 3B.
可选地,在本申请一些实施例中,阶段1和阶段2可以对应于其他CPU阶段,在此不做限定。例如,阶段1和阶段2可以对应于不同的CPU阶段;又例如,阶段1和阶段2可以对应于业务处理阶段等。Optionally, in some embodiments of the present application, stage 1 and stage 2 may correspond to other CPU stages, which are not limited here. For example, phase 1 and phase 2 may correspond to different CPU phases; for another example, phase 1 and phase 2 may correspond to business processing phases, etc.
图4A为本申请实施例提供的调整设备功耗方法的场景的另一个示例性示意图。FIG. 4A is another exemplary schematic diagram of a scenario of a method for adjusting device power consumption provided by an embodiment of the present application.
如图4A所示,用户使用手环测量心率的过程可以分为四个阶段。As shown in Figure 4A, the process of users using the bracelet to measure heart rate can be divided into four stages.
阶段1:手环的屏幕可以不显示任何内容,处于息屏状态。或者,手环的屏幕也可以通过息屏显示(always on display,AOD)技术显示某些内容。Stage 1: The screen of the bracelet does not display any content and is in a screen-off state. Alternatively, the screen of the bracelet can also display certain content through always on display (AOD) technology.
阶段2:响应于接收到用户的操作后,电子设备开始执行心率检测;或者,周期性的,电子设备执行心率检测。电子设备在执行心率检测的过程中,通过光电传感器记录手腕反射的光的强度变化。Phase 2: In response to receiving the user's operation, the electronic device begins to perform heart rate detection; or, periodically, the electronic device performs heart rate detection. During the process of performing heart rate detection, the electronic device records the intensity changes of the light reflected by the wrist through the photoelectric sensor.
可选地,在本申请一些实施例中,电子设备也可以通过其他硬件模块以其他方式执行心率检测。Optionally, in some embodiments of the present application, the electronic device can also perform heart rate detection in other ways through other hardware modules.
阶段3:在心率检测完成后,或者,在心率检测的过程中手环通过DMA引擎将数据从光电传感器拷贝到内存中。Stage 3: After the heart rate detection is completed, or during the heart rate detection process, the bracelet copies the data from the photoelectric sensor to the memory through the DMA engine.
阶段4:CPU基于记录的光的强度或其他参数的变化,基于光体积变化描记法或者其他方法、算法,计算得到心率,并将心率的数据显示在手环的显示屏上。如图4A所示,电子设备将心率90显示在手环的显示屏上。Stage 4: The CPU calculates the heart rate based on the recorded changes in light intensity or other parameters, based on photoplethysmography or other methods and algorithms, and displays the heart rate data on the display of the bracelet. As shown in Figure 4A, the electronic device displays the heart rate 90 on the display screen of the bracelet.
图4B为本申请实施例提供的图4A所示场景中不同阶段对应不同CPU阶段的一个示例性示意图。FIG. 4B is an exemplary schematic diagram of different stages corresponding to different CPU stages in the scenario shown in FIG. 4A provided by an embodiment of the present application.
如图4B所示,阶段1可以对应于休眠阶段;阶段2和阶段3对应于唤醒阶段;阶段4对应于业务处理阶段。As shown in Figure 4B, phase 1 may correspond to the sleep phase; phases 2 and 3 correspond to the wake-up phase; and phase 4 corresponds to the service processing phase.
其中,在休眠阶段,CPU的频率最低,为B1Hz;在唤醒阶段,CPU频率为B2Hz;在业务处理阶段,CPU的频率最高,频率为A3Hz。其中,B1小于等于B2,B2小于B3。Among them, during the sleep phase, the CPU frequency is the lowest, which is B1Hz; during the wake-up phase, the CPU frequency is B2Hz; during the business processing phase, the CPU frequency is the highest, which is A3Hz. Among them, B1 is less than or equal to B2, and B2 is less than B3.
值得说明的是,CPU的电压在不同CPU阶段的电压变化趋势可以与图3B所示的内容类似。It is worth noting that the voltage change trend of the CPU voltage in different CPU stages can be similar to what is shown in Figure 3B.
可选地,在本申请一些实施例中,阶段2可以对应于其他CPU阶段,在此不做限定。例如,阶段2可以对应于业务处理阶段等。Optionally, in some embodiments of the present application, stage 2 may correspond to other CPU stages, which is not limited here. For example, phase 2 may correspond to a business processing phase, etc.
结合图3A、图3B、图4A和图4B所示的内容,可以得出,首先,本申请实施例提供的调整设备功耗的方法,将CPU阶段划分为至少两个阶段,其中至少两个阶段包括唤醒阶段;其次,本申请实施例提供的调整设备功耗的方法,通过降低唤醒阶段的CPU的频率或电压,进而降低电子设备的功耗。Combining the contents shown in Figure 3A, Figure 3B, Figure 4A and Figure 4B, it can be concluded that first, the method for adjusting device power consumption provided by the embodiment of the present application divides the CPU stage into at least two stages, of which at least two The stages include a wake-up stage; secondly, the method for adjusting the power consumption of a device provided by embodiments of the present application reduces the power consumption of the electronic device by reducing the frequency or voltage of the CPU in the wake-up stage.
值得说明的是,图1和图2所示的方法,同样可以应用在图3A、图3B、图4A和图4B中阶段4时CPU的频率调整。即,本申请实施例提供的降低电子设备功耗的方法在图1和图2所示的方法的基础上,进一步降低电子设备的功耗,延长电子设备的续航时间,进而提升用户的体验。It is worth noting that the methods shown in Figures 1 and 2 can also be applied to the frequency adjustment of the CPU in stage 4 in Figures 3A, 3B, 4A and 4B. That is, the method for reducing the power consumption of electronic equipment provided by the embodiments of the present application is based on the methods shown in Figures 1 and 2, further reducing the power consumption of the electronic equipment, extending the battery life of the electronic equipment, and thereby improving the user experience.
其中,在本申请实施例中,唤醒阶段也可以称为第一模式,即处理器处于唤醒阶段时,处理器以第一模式工作。In this embodiment of the present application, the wake-up phase may also be called the first mode, that is, when the processor is in the wake-up phase, the processor operates in the first mode.
其中,在本申请实施例中,业务处理阶段也可以称为第二模式,即处理器处于业务处理阶段时,处理 器以第二模式工作。Among them, in the embodiment of the present application, the business processing stage may also be called the second mode, that is, when the processor is in the business processing stage, the processing The device operates in the second mode.
其中,在本申请实施例中,休眠阶段也可以称为第三模式,处理器处于休眠阶段时,处理器以第三模式工作。In this embodiment of the present application, the sleep phase may also be called the third mode. When the processor is in the sleep phase, the processor operates in the third mode.
下面结合图5、图6、图7、图8所示的内容示例性的介绍本申请实施例提供的调整设备功耗的方法的流程。The following exemplarily introduces the process of the method for adjusting device power consumption provided by the embodiment of the present application in conjunction with the content shown in Figures 5, 6, 7, and 8.
下面主要以处理器为CPU为例,示例性的介绍本申请实施例提供的调整设备功耗的方法的流程。处理器也可以是NPU、DSP等。图5为本申请实施例提供的调整设备功耗的方法的流程的一个示例性示意图。The following mainly takes the processor as a CPU as an example to exemplarily introduce the process of the method for adjusting device power consumption provided by the embodiments of the present application. The processor can also be NPU, DSP, etc. FIG. 5 is an exemplary schematic diagram of the flow of a method for adjusting device power consumption provided by an embodiment of the present application.
如图5所示,本申请实施例提供的调整设备功耗的方法的流程包括三个步骤,分别为步骤S501、步骤S502、步骤S503。其中,步骤S503为可选的步骤。As shown in Figure 5, the process of the method for adjusting device power consumption provided by the embodiment of the present application includes three steps, namely step S501, step S502, and step S503. Among them, step S503 is an optional step.
步骤S501:操作***在接收到中断后,配置CPU的频率为第一频率和/或配置CPU的电压为第一电压;并且,指示DMA引擎将数据拷贝到内存中。Step S501: After receiving the interrupt, the operating system configures the frequency of the CPU to be the first frequency and/or configures the voltage of the CPU to be the first voltage; and instructs the DMA engine to copy the data to the memory.
其中,中断(interrupt)也可以称为外部中断或者I/O中断,可以由电子设备上的数据获取装置产生,例如,网卡、键盘、时钟、传感器等,在此不做限定。Among them, an interrupt can also be called an external interrupt or an I/O interrupt, and can be generated by a data acquisition device on an electronic device, such as a network card, keyboard, clock, sensor, etc., which is not limited here.
可选地,在本申请一些实施例中,操作***在接收到中断后,若CPU此时处于休眠阶段则唤醒CPU,进而为DMA引擎提供时钟等能力以支持DMA引擎的正常工作。Optionally, in some embodiments of the present application, after receiving an interrupt, the operating system wakes up the CPU if the CPU is in the sleep stage at this time, and then provides clock and other capabilities to the DMA engine to support the normal operation of the DMA engine.
可选地,在本申请一些实施例中,操作***在接收到中断后,若CPU此时处于休眠阶段,可以不唤醒CPU。Optionally, in some embodiments of the present application, after receiving an interrupt, the operating system may not wake up the CPU if the CPU is in the sleep stage at this time.
值得说明的是,在操作***接收到中断后,是否唤醒休眠阶段的CPU取决于CPU处于休眠阶段时能否支持DMA引擎的正常工作。若CPU处于休眠阶段仍然可以为DMA引擎提供时钟等能力,操作***在接收到中断后不会唤醒CPU;若CPU处于休眠阶段不可以为DMA引擎提供时钟等能力,则操作***在接收到中断后唤醒CPU。It is worth noting that after the operating system receives an interrupt, whether to wake up the CPU in the sleep stage depends on whether the CPU can support the normal operation of the DMA engine when it is in the sleep stage. If the CPU is in the sleep phase and can still provide clock and other capabilities to the DMA engine, the operating system will not wake up the CPU after receiving an interrupt; if the CPU is in the sleep phase and cannot provide clock and other capabilities for the DMA engine, the operating system will wake up after receiving the interrupt. CPU.
操作***在接收到中断后,指示DMA引擎将中断源的数据拷贝到内存中。After receiving the interrupt, the operating system instructs the DMA engine to copy the data from the interrupt source to the memory.
可选地,在本申请一些实施例中,电子设备在执行步骤S501前,即CPU处于休眠阶段时,CPU被配置为第一模式。Optionally, in some embodiments of the present application, before the electronic device performs step S501, that is, when the CPU is in the sleep stage, the CPU is configured in the first mode.
可选地,在本申请一些实施例中,电子设备在执行步骤S501的过程中,CPU被配置第二模式。其中,第一模式和第二模式电子设备上CPU的电压和频率可以不同。Optionally, in some embodiments of the present application, when the electronic device performs step S501, the CPU is configured in the second mode. The voltage and frequency of the CPU on the electronic device in the first mode and the second mode may be different.
S502:在数据拷贝完成后,配置CPU的频率为第二频率和/或配置CPU的电压为第二电压;并且,指示CPU对内存中的数据执行处理。S502: After the data copy is completed, configure the frequency of the CPU to the second frequency and/or configure the voltage of the CPU to the second voltage; and instruct the CPU to perform processing on the data in the memory.
其中,配置是由操作***完成的。Among them, the configuration is completed by the operating system.
其中,第二频率高于第一频率,和/或,第二电压高于第一电压。其中,第二频率和/或第二电压可以根据当前运行的业务、业务的类型和/或应用程序确定,也可以配置为固定值。Wherein, the second frequency is higher than the first frequency, and/or the second voltage is higher than the first voltage. The second frequency and/or the second voltage may be determined according to the currently running service, service type and/or application, or may be configured as a fixed value.
可选地,第二频率和/或第二电压可以根据当前CPU的负载确定。Optionally, the second frequency and/or the second voltage may be determined according to the current load of the CPU.
在数据拷贝完成后,CPU开始对内存中的数据按照业务的逻辑执行处理。After the data copy is completed, the CPU starts to process the data in the memory according to the business logic.
其中,在上文中的图3A和图3B所示的场景中,该数据为从网卡中拷贝到内存中的消息,CPU执行的处理为在屏幕上显示该消息;在上文中的图4A和图4B所示的场景中,该数据为从光电传感器拷贝到内存中的光强度数值,CPU执行的处理为根据光强度数值计算心率,并将计算出的心率显示在屏幕上。Among them, in the scenarios shown in Figure 3A and Figure 3B above, the data is a message copied from the network card to the memory, and the processing performed by the CPU is to display the message on the screen; in the above Figure 4A and Figure In the scene shown in 4B, the data is the light intensity value copied from the photoelectric sensor to the memory. The processing performed by the CPU is to calculate the heart rate based on the light intensity value and display the calculated heart rate on the screen.
可选地,在本申请一些实施例中,电子设备在执行步骤S502的过程中,CPU被配置第三模式。Optionally, in some embodiments of the present application, when the electronic device performs step S502, the CPU is configured in the third mode.
S503:可选地,恢复CPU的频率和/或电压至接收到中断前的状态。S503: Optionally, restore the frequency and/or voltage of the CPU to the state before receiving the interrupt.
其中,恢复CPU的频率和/或电压至接收到中断前的状态是由操作***执行的。Among them, restoring the frequency and/or voltage of the CPU to the state before receiving the interrupt is performed by the operating system.
可选地,在本申请一些实施例中,操作***接收到中断后,在配置CPU的频率为第一频率和/或配置CPU的电压为第一电压前,操作***记录当前CPU的频率和/或电压。Optionally, in some embodiments of the present application, after the operating system receives the interrupt and before configuring the frequency of the CPU to the first frequency and/or configuring the voltage of the CPU to the first voltage, the operating system records the current frequency of the CPU and/or or voltage.
可选地,在本申请一些实施例中,CPU处理完由中断引发的业务后,即处理完内存的数据后,可以转变为休眠阶段。Optionally, in some embodiments of the present application, after the CPU has processed the services caused by the interrupt, that is, after processing the data in the memory, it can transition to the sleep stage.
可选地,在本申请一些实施例中,当操作***指示CPU进入休眠阶段前,记录CPU的频率和/或电压,并在执行步骤S502后,恢复CPU的频率和/或电压至记录的数值。Optionally, in some embodiments of the present application, when the operating system instructs the CPU to enter the sleep stage, the frequency and/or voltage of the CPU are recorded, and after step S502 is performed, the frequency and/or voltage of the CPU are restored to the recorded values. .
可以理解的是,结合图5所示的内容,在DMA引擎从数据获取装置读取数据的阶段,配置CPU的频 率和/或电压为较低的值,进而降低了电子设备的功耗。It can be understood that, combined with the content shown in Figure 5, during the stage when the DMA engine reads data from the data acquisition device, the frequency of the CPU is configured. The rate and/or voltage are lower values, thereby reducing the power consumption of the electronic device.
图6为本申请实施例提供的调整设备功耗的方法的流程的另一个示例性示意图。FIG. 6 is another exemplary schematic diagram of the flow of a method for adjusting device power consumption provided by an embodiment of the present application.
S601:处于休眠阶段。S601: In dormant stage.
CPU处于休眠阶段时,电子设备可以息屏或者也可以不息屏。在图3A所示的场景中,阶段1和阶段2时CPU处于休眠状态;在图4A所示的场景中,在阶段1时CPU处于休眠阶段。When the CPU is in the sleep stage, the electronic device can turn off the screen or not. In the scenario shown in Figure 3A, the CPU is in the sleep state during phases 1 and 2; in the scenario shown in Figure 4A, the CPU is in the sleep phase during phase 1.
S602:发送中断。S602: Transmission interruption.
数据获取装置向CPU发送中断。The data acquisition device sends an interrupt to the CPU.
其中,数据获取装置可以周期性的向CPU发送中断。例如在图4A所示的场景中,电子设备可以周期性的测量用户的心率,则光电传感器在周期性的记录光强度的过程中,会周期性的向CPU发送中断。Wherein, the data acquisition device can periodically send interrupts to the CPU. For example, in the scenario shown in Figure 4A, the electronic device can periodically measure the user's heart rate, and the photoelectric sensor will periodically send interrupts to the CPU during the process of periodically recording the light intensity.
或者,数据获取装置也可以在接收到用户的操作、网络的消息等后,向CPU发送中断。例如,图4A所示的场景中,在网卡接收到来自网络的消息后,向CPU发送中断。Alternatively, the data acquisition device may also send an interrupt to the CPU after receiving user operations, network messages, etc. For example, in the scenario shown in Figure 4A, after the network card receives a message from the network, it sends an interrupt to the CPU.
可选地,在本申请一些实施例中,当处理器为NPU或DSP的情况下,数据获取装置可以向NPU、DSP发送中断。Optionally, in some embodiments of the present application, when the processor is an NPU or DSP, the data acquisition device can send an interrupt to the NPU or DSP.
S603:转变为唤醒阶段,配置CPU频率至第一频率。S603: Transition to the wake-up stage, configure the CPU frequency to the first frequency.
在接收到中断后,CPU从休眠阶段变为唤醒阶段,配置CPU频率为第一频率。After receiving the interrupt, the CPU changes from the sleep stage to the wake-up stage, and configures the CPU frequency to the first frequency.
在唤醒阶段的CPU会为DMA引擎提供时钟等基础能力,使得DMA引擎可以正常工作。The CPU in the wake-up phase will provide the DMA engine with basic capabilities such as clocks so that the DMA engine can work normally.
S604:发送DMA请求。S604: Send DMA request.
CPU向DMA引擎发送DMA请求。其中DMA请求中可以包括主存起始地址、数据获取装置地址、数据大小等。主存起始地址为拷贝数据的目的地址;外部数据地址为拷贝数据的起始地址,数据大小为被拷贝的数据的大小。The CPU sends a DMA request to the DMA engine. The DMA request may include the main memory starting address, data acquisition device address, data size, etc. The main memory starting address is the destination address of the copied data; the external data address is the starting address of the copied data, and the data size is the size of the copied data.
可选地,在本申请一些实施例中,当处理器为NPU或DSP的情况下,CPU接收中断后,或者NPU或DSP接收到中断后,通过CPU向DMA引擎发送DMA请求,或者直接向DMA引擎发送DMA请求。Optionally, in some embodiments of the present application, when the processor is an NPU or a DSP, after the CPU receives an interrupt, or after the NPU or DSP receives an interrupt, the CPU sends a DMA request to the DMA engine, or directly sends a DMA request to the DMA engine. The engine sends a DMA request.
S605:拷贝数据至内存中。S605: Copy data to memory.
DMA引擎读取数据至内存中。其中,DMA设备会接管总线的控制权,进而将数据拷贝到内存中。其中,内存包括集成在CPU内部的L1内存、L2内存、L3内存,和/或也可以包括电子设备的内存。The DMA engine reads data into memory. Among them, the DMA device will take over control of the bus and copy the data to the memory. Among them, memory includes L1 memory, L2 memory, and L3 memory integrated inside the CPU, and/or may also include memory of electronic devices.
S606:发送中断以通知CPU已经完成数据的拷贝。S606: Send an interrupt to notify the CPU that the copy of data has been completed.
DMA引擎发送中断以通知CPU已经完成数据的拷贝。The DMA engine sends an interrupt to notify the CPU that the copy of data has been completed.
值得说明的是,步骤S602至步骤S606可以认为是一个完整的中断。It is worth noting that steps S602 to S606 can be considered as a complete interrupt.
对应的,可选地,在本申请一些实施例中,DMA引擎向NPU或DSP等发送中断以通知“DMA引擎已经完成数据的拷贝”,或者通过DMA引擎向CPU发送中断以通知NPU或DSP。Correspondingly, optionally, in some embodiments of the present application, the DMA engine sends an interrupt to the NPU or DSP to notify "the DMA engine has completed copying the data", or the DMA engine sends an interrupt to the CPU to notify the NPU or DSP.
S607:转变为业务处理阶段,配置CPU频率至第二频率,从内存中读取数据并处理。S607: Transition to the business processing stage, configure the CPU frequency to the second frequency, read data from the memory and process it.
可以参见上文中步骤S502中的文字描述,此处不再赘述。Please refer to the text description in step S502 above, which will not be described again here.
图7为本申请实施例提供的调整设备功耗的方法的流程的另一个示例性示意图。FIG. 7 is another exemplary schematic diagram of the flow of a method for adjusting device power consumption provided by an embodiment of the present application.
与图6所示内容不同的是,图7所示的内容为DMA引擎将数据拷贝到数据获取装置上。What is different from the content shown in Figure 6 is that the content shown in Figure 7 is that the DMA engine copies data to the data acquisition device.
S701:发送DMA请求。S701: Send DMA request.
在发送DMA请求前,CPU可以处于唤醒阶段、休眠阶段或业务处理阶段。Before sending a DMA request, the CPU can be in the wake-up phase, sleep phase or business processing phase.
DAM请求的内容可以参考上文中步骤S604中的内容,此处不再赘述。For the content of the DAM request, please refer to the content in step S604 above, which will not be described again here.
S702:变为唤醒阶段,配置CPU的频率为第一频率。S702: It changes to the wake-up stage, and the frequency of the CPU is configured as the first frequency.
可以参考上文中步骤S603中的内容,此处不再赘述。Reference may be made to the content in step S603 above, which will not be described again here.
S703:将内存中的数据写入数据获取装置。S703: Write the data in the memory to the data acquisition device.
与步骤S605不同的是,DMA引擎将内存中的数据写入数据获取装置。Different from step S605, the DMA engine writes the data in the memory into the data acquisition device.
S704:发送中断以通知CPU已经完成数据拷贝。S704: Send an interrupt to notify the CPU that the data copy has been completed.
可以参考上文中步骤S606的内容,此处不再赘述。Reference may be made to the content of step S606 above, which will not be described again here.
在步骤S704后,CPU可以转变为休眠阶段。After step S704, the CPU may transition to the sleep stage.
值得说明的是,在上文中图6和图7所示的方法中,CPU转变为唤醒阶段后,可以同时调整CPU的频率和/或电压。It is worth noting that in the methods shown in Figures 6 and 7 above, after the CPU transitions to the wake-up stage, the frequency and/or voltage of the CPU can be adjusted at the same time.
图8为本申请实施例提供的调整设备功耗的方法的流程的另一个示例性示意图。FIG. 8 is another exemplary schematic diagram of the process of a method for adjusting device power consumption provided by an embodiment of the present application.
S801:可选地,CPU进入休眠阶段前,记录CPU的频率和电压。 S801: Optionally, before the CPU enters the sleep stage, record the frequency and voltage of the CPU.
可选地,在CPU进入休眠阶段前,可以记录CPU的频率和电压。Optionally, the frequency and voltage of the CPU can be recorded before the CPU enters the sleep phase.
S802:判断是否有数据获取装置发起的中断。S802: Determine whether there is an interrupt initiated by the data acquisition device.
判断是否有由数据获取装置发起的中断,其中数据获取装置的定义可以参考上文的描述,此处不再赘述。若有由数据获取装置发起的中断,则执行步骤S803,若没有由数据获取装置发起的中断,则执行步骤S802。Determine whether there is an interrupt initiated by the data acquisition device. For the definition of the data acquisition device, please refer to the above description and will not be repeated here. If there is an interruption initiated by the data acquisition device, step S803 is executed. If there is no interruption initiated by the data acquisition device, step S802 is executed.
S803:配置CPU的频率为第一频率和/或配置CPU的电压为第一电压。S803: Configure the frequency of the CPU to be the first frequency and/or configure the voltage of the CPU to be the first voltage.
从休眠阶段唤醒CPU后,CPU位于唤醒阶段,开发时钟等能力给DMA引擎。并且,配置CPU的频率为第一频率和/或配置CPU的电压为第一电压。After waking up the CPU from the sleep phase, the CPU is in the wake-up phase and develops clock and other capabilities to the DMA engine. Furthermore, the frequency of the CPU is configured to be the first frequency and/or the voltage of the CPU is configured to be the first voltage.
S804:中断处理,由DMA引擎完成数据拷贝。S804: Interrupt processing, the DMA engine completes the data copy.
处理由中断源通过中断发送的消息,由DMA引擎将数据从中断源拷贝到电子设备的内存中,进而方便CPU读取数据并处理数据。The message sent by the interrupt source through the interrupt is processed, and the DMA engine copies the data from the interrupt source to the memory of the electronic device, thereby facilitating the CPU to read the data and process the data.
S805:配置CPU的频率为第二频率和/或配置CPU的电压为第二电压,CPU开始处理数据。S805: Configure the frequency of the CPU to the second frequency and/or configure the voltage of the CPU to the second voltage, and the CPU starts processing data.
其中,第二频率和第二电压可以与休眠阶段前的CPU的频率和电压相同,或者与当前的业务相关。The second frequency and the second voltage may be the same as the frequency and voltage of the CPU before the sleep stage, or may be related to the current service.
结合上文中图5、图6、图7和图8所示的内容,本申请实施例提供的调整设备功耗的方法可以降低DMA引擎在拷贝数据过程中的CPU的功耗,进而降低电子设备的功耗。Combined with the contents shown in Figure 5, Figure 6, Figure 7 and Figure 8 above, the method for adjusting device power consumption provided by the embodiment of the present application can reduce the power consumption of the CPU of the DMA engine during the process of copying data, thereby reducing the cost of electronic equipment. of power consumption.
例如,在传感器周期性上报数据的场景下,CPU的频率或电压的变化过程如图9A和图9B所示。For example, in a scenario where a sensor periodically reports data, the changing process of the CPU frequency or voltage is as shown in Figure 9A and Figure 9B.
图9A、图9B和图9C为本申请实施例提供的CPU频率和电压变化的一个示例性示意图。FIG. 9A, FIG. 9B, and FIG. 9C are exemplary schematic diagrams of changes in CPU frequency and voltage provided by embodiments of the present application.
如图9A所示,当CPU位于休眠阶段时,CPU频率为C1;接收到传感器上报的数据后,CPU阶段变为唤醒阶段,在唤醒阶段CPU频率为C2;在一段时间后,CPU阶段变为业务处理阶段,CPU频率为C3。其中,C1小于等于C2,C2小于C3。As shown in Figure 9A, when the CPU is in the sleep stage, the CPU frequency is C1; after receiving the data reported by the sensor, the CPU stage changes to the wake-up stage, and in the wake-up stage the CPU frequency is C2; after a period of time, the CPU stage becomes In the business processing stage, the CPU frequency is C3. Among them, C1 is less than or equal to C2, and C2 is less than C3.
如图9B所示,当CPU位于休眠阶段时,CPU电压为D1;接收到传感器上报的数据后,CPU阶段变为唤醒阶段,在唤醒阶段CPU电压为D2;在一段时间后,CPU阶段变为业务处理阶段,CPU电压为D3。其中,C1小于等于C2,C2小于C3。As shown in Figure 9B, when the CPU is in the sleep stage, the CPU voltage is D1; after receiving the data reported by the sensor, the CPU stage changes to the wake-up stage. In the wake-up stage, the CPU voltage is D2; after a period of time, the CPU stage becomes In the business processing stage, the CPU voltage is D3. Among them, C1 is less than or equal to C2, and C2 is less than C3.
如图9C所示,CPU阶段为唤醒阶段时,唤醒阶段的时长由DMA引擎拷贝数据的耗时决定,而与CPU的运算能力无关,因此,降低CPU的功耗可以降低电子设备的功耗。As shown in Figure 9C, when the CPU stage is the wake-up stage, the duration of the wake-up stage is determined by the time it takes for the DMA engine to copy data, and has nothing to do with the computing power of the CPU. Therefore, reducing the power consumption of the CPU can reduce the power consumption of electronic devices.
最后,介绍本申请实施例提供的电子设备的硬件架构和软件结构。Finally, the hardware architecture and software structure of the electronic device provided by the embodiments of the present application are introduced.
图10A和图10B为本申请实施例提供的电子设备的硬件架构的一个示例性示意图。FIG. 10A and FIG. 10B are an exemplary schematic diagram of the hardware architecture of an electronic device provided by an embodiment of the present application.
电子设备可以是手机、平板电脑、桌面型计算机、膝上型计算机、手持计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本,以及蜂窝电话、个人数字助理(personal digital assistant,PDA)、增强现实(augmented reality,AR)设备、虚拟现实(virtual reality,VR)设备、人工智能(artificial intelligence,AI)设备、可穿戴式设备、车载设备、智能家居设备和/或智慧城市设备,本申请实施例对该电子设备的具体类型不作特殊限制。The electronic device may be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (personal digital assistant) assistant (PDA), augmented reality (AR) devices, virtual reality (VR) devices, artificial intelligence (AI) devices, wearable devices, vehicle-mounted devices, smart home devices and/or smart devices City equipment, the embodiment of this application does not place special restrictions on the specific type of electronic equipment.
电子设备可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M,光电传感器(未在图10A中示出)等。The electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, Mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone interface 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and user Identification module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, photoelectric sensor (not shown in Figure 10A), etc.
可以理解的是,本发明实施例示意的结构并不构成对电子设备的具体限定。在本申请另一些实施例中,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structures illustrated in the embodiments of the present invention do not constitute specific limitations on the electronic equipment. In other embodiments of the present application, the electronic device may include more or less components than shown in the figures, or some components may be combined, some components may be separated, or some components may be arranged differently. The components illustrated may be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),中央处理器(central processing unit,CPU)调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器,基带处理器,和/或神经网络处理器等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。 The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (application processor, AP), a central processing unit (central processing unit, CPU), a modem processor, a graphics processor (graphics processor). processing unit (GPU), image signal processor (ISP), controller, video codec, digital signal processor, baseband processor, and/or neural network processor, etc. Among them, different processing units can be independent devices or integrated in one or more processors.
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate operation control signals based on the instruction operation code and timing signals to complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了***的效率。The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in processor 110 is cache memory. This memory may hold instructions or data that have been recently used or recycled by processor 110 . If the processor 110 needs to use the instructions or data again, it can be called directly from the memory. Repeated access is avoided and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, processor 110 may include one or more interfaces. Interfaces may include integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, pulse code modulation (pulse code modulation, PCM) interface, universal asynchronous receiver and transmitter (universal asynchronous receiver/transmitter (UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and /or universal serial bus (USB) interface, etc.
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备的触摸功能。The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (derail clock line, SCL). In some embodiments, processor 110 may include multiple sets of I2C buses. The processor 110 can separately couple the touch sensor 180K, charger, flash, camera 193, etc. through different I2C bus interfaces. For example, the processor 110 can be coupled to the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to implement the touch function of the electronic device.
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 can be coupled with the audio module 170 through the I2S bus to implement communication between the processor 110 and the audio module 170 . In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface to implement the function of answering calls through a Bluetooth headset.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communications to sample, quantize and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface to implement the function of answering calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus can 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 and the wireless communication module 160 . For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等***器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备的显示功能。The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 . MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate through a CSI interface to implement the shooting function of the electronic device. The processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device.
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured through software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, display screen 194, wireless communication module 160, audio module 170, sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备充电,也可以用于电子设备与***设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface that complies with the USB standard specification, and may be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device, and can also be used to transmit data between the electronic device and peripheral devices. It can also be used to connect headphones to play audio through them. This interface can also be used to connect other electronic devices, such as AR devices, etc.
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备的结构限定。在本申请另一些实施例中,电子设备也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are only schematic illustrations and do not constitute structural limitations on the electronic equipment. In other embodiments of the present application, the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is used to receive charging input from the charger. Among them, the charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from the wired charger through the USB interface 130 . In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device. While the charging management module 140 charges the battery 142, it can also provide power to the electronic device through the power management module 141.
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。 The power management module 141 is used 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 supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 can also be used to monitor battery capacity, battery cycle times, battery health status (leakage, impedance) and other parameters. In some other embodiments, the power management module 141 may also be provided in the processor 110 . In other embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.
电子设备的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device can be realized through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
天线1和天线2用于发射和接收电磁波信号。电子设备中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in an electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example: Antenna 1 can be reused as a diversity antenna for a wireless LAN. In other embodiments, antennas may be used in conjunction with tuning switches.
移动通信模块150可以提供应用在电子设备上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied to electronic devices. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves through the antenna 1, perform filtering, amplification and other processing on the received electromagnetic waves, and transmit them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves through the antenna 1 for radiation. In some embodiments, at least part of the functional modules of the mobile communication module 150 may be disposed in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。A modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs sound signals through audio devices (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be independent of the processor 110 and may be provided in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在电子设备上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星***(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), and global navigation satellite systems for use in electronic devices. (global navigation satellite system, GNSS), frequency modulation (FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
在一些实施例中,电子设备的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯***(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位***(global positioning system,GPS),全球导航卫星***(global navigation satellite system,GLONASS),北斗卫星导航***(beidou navigation satellite system,BDS),准天顶卫星***(quasi-zenith satellite system,QZSS)和/或星基增强***(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc. The GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi) -zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
电子设备通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device implements display functions through the GPU, display screen 194, and application processor. The GPU is an image processing microprocessor and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos, etc. Display 194 includes a display panel. The display panel can use a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode). emitting diode (AMOLED), flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diode (QLED), etc. In some embodiments, the electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1.
电子设备可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, the light is transmitted to the camera sensor through the lens, the optical signal is converted into an electrical signal, and the camera sensor passes the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise and brightness. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be provided in the camera 193.
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary  metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备可以包括1个或N个摄像头193,N为大于1的正整数。Camera 193 is used to capture still images or video. The object passes through the lens to produce an optical image that is projected onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal oxide semiconductor (CCD). metal-oxide-semiconductor, CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to convert it into a digital image signal. ISP outputs digital image signals to DSP for processing. DSP converts digital image signals into standard RGB, YUV and other format image signals. In some embodiments, the electronic device may include 1 or N cameras 193, where N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
视频编解码器用于对数字视频压缩或解压缩。电子设备可以支持一种或多种视频编解码器。这样,电子设备可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. Electronic devices may support one or more video codecs. In this way, electronic devices can play or record videos in multiple encoding formats, such as: Moving Picture Experts Group (MPEG)1, MPEG2, MPEG3, MPEG4, etc.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can continuously learn by itself. Intelligent cognitive applications of electronic devices can be realized through NPU, such as image recognition, face recognition, speech recognition, text understanding, etc.
内部存储器121可以包括一个或多个随机存取存储器(random access memory,RAM)和一个或多个非易失性存储器(non-volatile memory,NVM)。The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).
随机存取存储器可以包括静态随机存储器(static random-access memory,SRAM)、动态随机存储器(dynamic random access memory,DRAM)、同步动态随机存储器(synchronous dynamic random access memory,SDRAM)、双倍资料率同步动态随机存取存储器(double data rate synchronous dynamic random access memory,DDR SDRAM,例如第五代DDR SDRAM一般称为DDR5SDRAM)等;Random access memory can include static random-access memory (SRAM), dynamic random-access memory (DRAM), synchronous dynamic random-access memory (SDRAM), double data rate synchronous Dynamic random access memory (double data rate synchronous dynamic random access memory, DDR SDRAM, such as the fifth generation DDR SDRAM is generally called DDR5SDRAM), etc.;
非易失性存储器可以包括磁盘存储器件、快闪存储器(flash memory)。Non-volatile memory can include disk storage devices and flash memory.
快闪存储器按照运作原理划分可以包括NOR FLASH、NAND FLASH、3D NAND FLASH等,按照存储单元电位阶数划分可以包括单阶存储单元(single-level cell,SLC)、多阶存储单元(multi-level cell,MLC)、三阶储存单元(triple-level cell,TLC)、四阶储存单元(quad-level cell,QLC)等,按照存储规范划分可以包括通用闪存存储(英文:universal flash storage,UFS)、嵌入式多媒体存储卡(embedded multi media Card,eMMC)等。Flash memory can be divided according to the operating principle to include NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. According to the storage unit potential level, it can include single-level storage cells (single-level cell, SLC), multi-level storage cells (multi-level cell, MLC), third-level storage unit (triple-level cell, TLC), fourth-level storage unit (quad-level cell, QLC), etc., which can include universal flash storage (English: universal flash storage, UFS) according to storage specifications. , embedded multi media card (embedded multi media Card, eMMC), etc.
随机存取存储器可以由处理器110直接进行读写,可以用于存储操作***或其他正在运行中的程序的可执行程序(例如机器指令),还可以用于存储用户及应用程序的数据等。The random access memory can be directly read and written by the processor 110, can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data, etc.
非易失性存储器也可以存储可执行程序和存储用户及应用程序的数据等,可以提前加载到随机存取存储器中,用于处理器110直接进行读写。The non-volatile memory can also store executable programs and user and application program data, etc., and can be loaded into the random access memory in advance for direct reading and writing by the processor 110.
外部存储器接口120可以用于连接外部的非易失性存储器,实现扩展电子设备的存储能力。外部的非易失性存储器通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部的非易失性存储器中。电子设备可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The external memory interface 120 can be used to connect an external non-volatile memory to expand the storage capacity of the electronic device. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement the data storage function. For example, save music, video and other files in external non-volatile memory. The electronic device can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备可以通过扬声器170A收听音乐,或收听免提通话。Speaker 170A, also called "speaker", is used to convert audio electrical signals into sound signals. The electronic device can listen to music through speaker 170A, or listen to hands-free calls.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。Receiver 170B, also called "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device answers a call or a voice message, the voice can be heard by bringing the receiver 170B close to the human ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备可以设置至少一个麦克风170C。在另一些实施例中,电子设备可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak close to the microphone 170C with the human mouth and input the sound signal to the microphone 170C. The electronic device may be provided with at least one microphone 170C. In other embodiments, the electronic device may be provided with two microphones 170C, which in addition to collecting sound signals, may also implement a noise reduction function. In other embodiments, the electronic device can also be equipped with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions, etc.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The headphone interface 170D is used to connect wired headphones. The headphone interface 170D may be a USB interface 130, or may be a 3.5mm open mobile terminal platform (OMTP) standard interface, or a Cellular Telecommunications Industry Association of the USA (CTIA) standard interface.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器, 电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备根据压力传感器180A检测所述触摸操作强度。电子设备也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, pressure sensor 180A may be disposed on display screen 194 . There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, Capacitive pressure sensor, etc. A capacitive pressure sensor may include at least two parallel plates of conductive material. When a force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Electronics determine the intensity of the pressure based on changes in capacitance. When a touch operation is performed on the display screen 194, the electronic device detects the strength of the touch operation according to the pressure sensor 180A. The electronic device may also calculate the touched position based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch location but with different touch operation intensities may correspond to different operation instructions. For example: when a touch operation with a touch operation intensity smaller than the first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold is applied to the short message application icon, an instruction to create a new short message is executed.
陀螺仪传感器180B可以用于确定电子设备的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyro sensor 180B can be used to determine the motion posture of the electronic device. In some embodiments, the angular velocity of the electronic device about three axes (ie, x, y, and z axes) may be determined by gyro sensor 180B. The gyro sensor 180B can be used for image stabilization. For example, when the shutter is pressed, the gyro sensor 180B detects the angle at which the electronic device shakes, and calculates the distance that the lens module needs to compensate based on the angle, so that the lens can offset the shake of the electronic device through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.
气压传感器180C用于测量气压。在一些实施例中,电子设备通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。Air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
磁传感器180D包括霍尔传感器。电子设备可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备是翻盖机时,电子设备可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。Magnetic sensor 180D includes a Hall sensor. The electronic device can use the magnetic sensor 180D to detect the opening and closing of the flip holster. In some embodiments, when the electronic device is a flip machine, the electronic device may detect opening and closing of the flip according to the magnetic sensor 180D. Then, based on the detected opening and closing status of the leather case or the opening and closing status of the flip cover, features such as automatic unlocking of the flip cover are set.
加速度传感器180E可检测电子设备在各个方向上(一般为三轴)加速度的大小。当电子设备静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the acceleration of the electronic device in various directions (generally three axes). When the electronic device is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices and be used in horizontal and vertical screen switching, pedometer and other applications.
距离传感器180F,用于测量距离。电子设备可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备可以利用距离传感器180F测距以实现快速对焦。Distance sensor 180F for measuring distance. Electronic devices can measure distance via infrared or laser. In some embodiments, when shooting a scene, the electronic device can utilize the distance sensor 180F to measure distance to achieve fast focusing.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备通过发光二极管向外发射红外光。电子设备使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备附近有物体。当检测到不充分的反射光时,电子设备可以确定电子设备附近没有物体。电子设备可以利用接近光传感器180G检测用户手持电子设备贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。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. Electronic devices emit infrared light through light-emitting diodes. Electronic devices use photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device. When insufficient reflected light is detected, the electronic device can determine that there is no object near the electronic device. Electronic devices can use the proximity light sensor 180G to detect when the user holds the electronic device close to the ear and talk, so that the screen can be automatically turned off to save power. The proximity light sensor 180G can also be used in holster mode, and pocket mode automatically unlocks and locks the screen.
环境光传感器180L用于感知环境光亮度。电子设备可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备是否在口袋里,以防误触。The ambient light sensor 180L is used to sense ambient light brightness. The electronic device can adaptively adjust the brightness of the display screen 194 based on perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device is in the pocket to prevent accidental touching.
指纹传感器180H用于采集指纹。电子设备可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。Fingerprint sensor 180H is used to collect fingerprints. Electronic devices can use the collected fingerprint characteristics to unlock fingerprints, access application locks, take photos with fingerprints, answer incoming calls with fingerprints, etc.
温度传感器180J用于检测温度。在一些实施例中,电子设备利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备对电池142加热,以避免低温导致电子设备异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备对电池142的输出电压执行升压,以避免低温导致的异常关机。Temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device uses the temperature detected by the temperature sensor 180J to execute the temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device reduces the performance of a processor located near the temperature sensor 180J in order to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device heats the battery 142 to prevent the low temperature from causing abnormal shutdown of the electronic device. In some other embodiments, when the temperature is lower than another threshold, the electronic device performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备的表面,与显示屏194所处的位置不同。Touch sensor 180K, also known as "touch device". The touch sensor 180K can be disposed on the display screen 194. 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 on or near the touch sensor 180K. The touch sensor can pass the detected touch operation to the application processor to determine the touch event type. Visual output related to the touch operation may be provided through display screen 194 . In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device at a location different from that of the display screen 194 .
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。Bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human body's vocal part. The bone conduction sensor 180M can also contact the human body's pulse and receive blood pressure beating signals. In some embodiments, the bone conduction sensor 180M can also be provided in an earphone and combined into a bone conduction earphone. The audio module 170 can analyze the voice signal based on the vibration signal of the vocal vibrating bone obtained by the bone conduction sensor 180M to implement the voice function. The application processor can analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M to implement the heart rate detection function.
光电传感器也可以称为光学心率传感器,可以将光信号转换为电信号。在本申请一些实施例中,当电子设备为手表等可穿戴设备的情况下,电子设备上的发光源照射手腕,光电传感器记录反射的光的强度或 其他参数。进而,电子设备根据反射的光的强度或其他参数的变化,基于光电容积脉搏波描记法(Photo Plethysmo Graphy,PPG)或者其他算法计算出用户的心率。Photoelectric sensors, also known as optical heart rate sensors, can convert light signals into electrical signals. In some embodiments of the present application, when the electronic device is a wearable device such as a watch, the light source on the electronic device illuminates the wrist, and the photoelectric sensor records the intensity of the reflected light or Other parameters. Furthermore, the electronic device calculates the user's heart rate based on photoplethysmography (Photo Plethysmo Graphy, PPG) or other algorithms based on changes in the intensity of reflected light or other parameters.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备可以接收按键输入,产生与电子设备的用户设置以及功能控制有关的键信号输入。The buttons 190 include a power button, a volume button, etc. Key 190 may be a mechanical key. It can also be a touch button. The electronic device can receive key input and generate key signal input related to user settings and function control of the electronic device.
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。The motor 191 can generate vibration prompts. The motor 191 can be used for vibration prompts for incoming calls and can also be used for touch vibration feedback. For example, touch operations for different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. The motor 191 can also respond to different vibration feedback effects for touch operations in different areas of the display screen 194 . Different application scenarios (such as time reminders, receiving information, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customized.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, or may be used to indicate messages, missed calls, notifications, etc.
SIM卡接口195用于连接SIM卡。SIM卡可以通过***SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备的接触和分离。电子设备可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时***多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备中,不能和电子设备分离。The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to realize contact and separation from the electronic device. The electronic device can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card, etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. Electronic devices interact with the network through SIM cards to implement functions such as calls and data communications. In some embodiments, the electronic device uses an eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the electronic device and cannot be separated from the electronic device.
在本申请实施例中,处理器110还可以包括DMA控制器110A。In this embodiment of the present application, the processor 110 may also include a DMA controller 110A.
其中,DMA控制器110A可以用于接收处理器发送的DMA请求,并在数据拷贝完成后向处理器发送中断。DMA控制器用于控制总线从数据获取模块中拷贝数据至内存中,或者从内存中拷贝数据至数据获取模块。Among them, the DMA controller 110A can be used to receive a DMA request sent by the processor, and send an interrupt to the processor after the data copy is completed. The DMA controller is used to control the bus to copy data from the data acquisition module to the memory, or copy data from the memory to the data acquisition module.
其中,内存可以为内部存储器121,或者可以为内部存储器121的随机存取存储器。The memory may be the internal memory 121 , or may be a random access memory of the internal memory 121 .
可选地,在本申请一些实施例中,DMA控制器110A可以位于电子设备的南桥中,或者其他位置上,而不在处理器内部。Alternatively, in some embodiments of the present application, the DMA controller 110A may be located in the south bridge of the electronic device, or in other locations, rather than inside the processor.
如图10B所示,在本申请实施例中,移动通信模块150、无线通信模块160和/或传感器模块180均可以为数据获取装置。As shown in FIG. 10B , in this embodiment of the present application, the mobile communication module 150 , the wireless communication module 160 and/or the sensor module 180 can all be data acquisition devices.
其中,数据获取装置可以是一个单独的芯片或硬件模组。The data acquisition device may be a separate chip or hardware module.
图11A和图11B为本申请实施例提供的电子设备软件架构的一个示例性示意图。FIG. 11A and FIG. 11B are an exemplary schematic diagram of the software architecture of an electronic device provided by an embodiment of the present application.
电子设备的软件***可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android***为例,示例性说明电子设备的软件结构。Software systems of electronic devices can adopt layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. The embodiment of the present invention takes the Android system with a layered architecture as an example to illustrate the software structure of the electronic device.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android***分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和***库,以及内核层。The layered architecture divides the software into several layers, and each layer has clear roles and division of labor. The layers communicate through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: application layer, application framework layer, Android runtime and system libraries, and kernel layer.
应用程序层可以包括一系列应用程序包。The application layer can include a series of application packages.
如图11A所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。As shown in Figure 11A, the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.
如图11A所示,应用程序框架层可以包括窗口管理器,内容提供器,视图***,电话管理器,资源管理器,通知管理器等。As shown in Figure 11A, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。A window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, capture the screen, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make this data accessible to applications. Said data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
视图***包括可视控件,例如显示文字的控件,显示图片的控件等。视图***可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls that display text, controls that display pictures, etc. A view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
电话管理器用于提供电子设备的通信功能。例如通话状态的管理(包括接通,挂断等)。Telephone managers are used to provide communication functions of electronic devices. For example, call status management (including connected, hung up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。 The resource manager provides various resources to applications, such as localized strings, icons, pictures, layout files, video files, etc.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在***顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager allows applications to display notification information in the status bar, which can be used to convey notification-type messages and can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be notifications that appear in the status bar at the top of the system in the form of charts or scroll bar text, such as notifications for applications running in the background, or notifications that appear on the screen in the form of conversation windows. For example, text information is prompted in the status bar, a beep sounds, the electronic device vibrates, the indicator light flashes, etc.
Android Runtime包括核心库和虚拟机。Android runtime负责安卓***的调度和管理。Android Runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library contains two parts: one is the functional functions that need to be called by the Java language, and the other is the core library of Android.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and application framework layer run in virtual machines. The virtual machine executes the java files of the application layer and application framework layer into binary files. The virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection and other functions.
***库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。System libraries can include multiple functional modules. For example: surface manager (surface manager), media libraries (Media Libraries), 3D graphics processing libraries (for example: OpenGL ES), 2D graphics engines (for example: SGL), etc.
表面管理器用于对显示子***进行管理,并且为多个应用程序提供了2D和3D图层的融合。The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, composition, and layer processing.
2D图形引擎是2D绘图的绘图引擎。2D Graphics Engine is a drawing engine for 2D drawing.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
可选地,在本申请一些实施例中,内核层中得操作***用于配置处理器的为不同的模式,即配置不同的频率和/或电压。可选地,内核层中的操作***可以确定数据属于应用程序层中的哪个程序,进而确定业务处理阶段中的处理器的频率和/或电压。Optionally, in some embodiments of the present application, the operating system in the kernel layer is used to configure the processor into different modes, that is, configuring different frequencies and/or voltages. Optionally, the operating system in the kernel layer can determine which program in the application layer the data belongs to, and then determine the frequency and/or voltage of the processor in the business processing stage.
如图11B所示,电子设备上运行的操作或操作***内核可以包括四个软件模块,分别为业务处理模块,中断处理模块、DMA引擎、CPU频率和电压调整模块。As shown in Figure 11B, the operation or operating system kernel running on the electronic device may include four software modules, namely a business processing module, an interrupt processing module, a DMA engine, and a CPU frequency and voltage adjustment module.
其中,中断处理模块用于接收中断,并向DMA控制芯片发送DMA请求。Among them, the interrupt processing module is used to receive interrupts and send DMA requests to the DMA control chip.
其中,业务处理模块用于按照上层业务的逻辑指示处理器执行计算。Among them, the business processing module is used to instruct the processor to perform calculations according to the logic of the upper-layer business.
其中,DMA引擎用于实现数据的在内存和数据获取装置之间的拷贝。Among them, the DMA engine is used to copy data between the memory and the data acquisition device.
其中,处理器频率和/或电压调整模块用于配置处理器的模式,即配置处理器的电压和/或频率。The processor frequency and/or voltage adjustment module is used to configure the mode of the processor, that is, configure the voltage and/or frequency of the processor.
上述实施例中所用,根据上下文,术语“当…时”可以被解释为意思是“如果…”或“在…后”或“响应于确定…”或“响应于检测到…”。类似地,根据上下文,短语“在确定…时”或“如果检测到(所陈述的条件或事件)”可以被解释为意思是“如果确定…”或“响应于确定…”或“在检测到(所陈述的条件或事件)时”或“响应于检测到(所陈述的条件或事件)”。As used in the above embodiments, the term "when" may be interpreted to mean "if..." or "after" or "in response to determining..." or "in response to detecting..." depending on the context. Similarly, depending on the context, the phrase "when determining..." or "if (stated condition or event) is detected" may be interpreted to mean "if it is determined..." or "in response to determining..." or "on detecting (stated condition or event)” or “in response to detecting (stated condition or event)”.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行该计算机程序指令时,全部或部分地产生按照本申请实施例该的流程或功能。该计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。该计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,该计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。该计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如DVD)、或者半导体介质(例如固态硬盘)等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application are generated in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted over a wired connection from a website, computer, server, or data center (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) means to transmit to another website, computer, server or data center. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center integrated with one or more available media. The available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, solid state drive), etc.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。 Those of ordinary skill in the art can understand that all or part of the process of implementing the method of the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, , may include the processes of the above method embodiments. The aforementioned storage media include: ROM, random access memory (RAM), magnetic disks, optical disks and other media that can store program codes.

Claims (18)

  1. 一种调整设备功耗的方法,其特征在于,所述方法包括:A method for adjusting device power consumption, characterized in that the method includes:
    在电子设备获取第一数据后,所述电子设备将所述第一数据拷贝至内存中,其中,在所述电子设备获取所述第一数据后至所述第一数据被拷贝到内存中前,所述电子设备的处理器以第一模式工作;After the electronic device obtains the first data, the electronic device copies the first data into the memory, wherein, after the electronic device obtains the first data and before the first data is copied into the memory, , the processor of the electronic device operates in the first mode;
    在所述第一数据被拷贝到内存中后,所述电子设备通过以第二模式工作的所述处理器处理所述第一数据;After the first data is copied into the memory, the electronic device processes the first data through the processor operating in a second mode;
    所述处理器以第一模式工作时,所述处理器的工作频率为第一频率,所述处理器的工作电压为第一电压;所述处理器以第二模式工作时,所述处理器的工作频率为第二频率,所述处理器的工作电压为第二电压;When the processor operates in the first mode, the operating frequency of the processor is the first frequency, and the operating voltage of the processor is the first voltage; when the processor operates in the second mode, the processor The operating frequency is the second frequency, and the operating voltage of the processor is the second voltage;
    所述第一频率小于所述第二频率,和/或,所述第一电压小于所述第二电压。The first frequency is less than the second frequency, and/or the first voltage is less than the second voltage.
  2. 根据权利要求1所述的方法,其特征在于,The method according to claim 1, characterized in that:
    在所述电子设备获取第一数据前,所述处理器以第三模式工作;Before the electronic device obtains the first data, the processor operates in a third mode;
    所述处理器以所述第三模式工作时,所述处理器的工作频率为第三频率,所述处理器的工作电压为第三电压;When the processor operates in the third mode, the operating frequency of the processor is the third frequency, and the operating voltage of the processor is the third voltage;
    所述第三电压小于等于所述第一电压,和/或,所述第三频率小于等于所述第一频率。The third voltage is less than or equal to the first voltage, and/or the third frequency is less than or equal to the first frequency.
  3. 根据权利要求1所述的方法,其特征在于,The method according to claim 1, characterized in that:
    在所述电子设备获取第一数据前,所述处理器以所述第二模式工作。Before the electronic device obtains the first data, the processor operates in the second mode.
  4. 根据权利要求1-3中任一项所述的方法,其特征在于,所述电子设备包括数据获取装置和DMA控制器;所述在电子设备获取第一数据后,所述电子设备将所述第一数据拷贝至内存中,具体包括:The method according to any one of claims 1 to 3, characterized in that the electronic device includes a data acquisition device and a DMA controller; after the electronic device acquires the first data, the electronic device The first data is copied to the memory, specifically including:
    在所述电子设备通过所述数据获取装置获取所述第一数据后,所述电子设备通过所述处理器接收所述数据获取装置发送的第一中断;所述第一中断用于指示所述处理器将所述第一数据从所述数据获取装置拷贝到所述内存中;After the electronic device acquires the first data through the data acquisition device, the electronic device receives a first interrupt sent by the data acquisition device through the processor; the first interrupt is used to indicate that the The processor copies the first data from the data acquisition device to the memory;
    所述电子设备通过所述处理器接收到所述第一中断后,所述电子设备通过所述处理器指示所述DMA控制器将所述第一数据从所述数据获取装置拷贝到所述内存中。After the electronic device receives the first interrupt through the processor, the electronic device instructs the DMA controller through the processor to copy the first data from the data acquisition device to the memory. middle.
  5. 根据权利要求4所述的方法,其特征在于,所述方法还包括:The method of claim 4, further comprising:
    接收到第一操作后,所述电子设备通过所述处理器指示所述DMA控制器将所述内存中的第二数据拷贝到所述数据获取装置;After receiving the first operation, the electronic device instructs the DMA controller through the processor to copy the second data in the memory to the data acquisition device;
    在所述第二数据从所述内存拷贝到所述数据获取装置的过程中,所述处理器以所述第一模式工作。During the process of copying the second data from the memory to the data acquisition device, the processor operates in the first mode.
  6. 根据权利要求4或5所述的方法,其特征在于,所述数据获取装置为传感器或网卡。The method according to claim 4 or 5, characterized in that the data acquisition device is a sensor or a network card.
  7. 根据权利要求6所述的方法,其特征在于,所述数据获取装置为光电传感器,所述第一数据为用于确定心率的数据;The method according to claim 6, characterized in that the data acquisition device is a photoelectric sensor, and the first data is data used to determine heart rate;
    在所述第一数据被拷贝到内存中后,所述电子设备通过以第二模式工作的所述处理器处理所述第一数据,具体包括:在所述第一数据被拷贝到所述内存后,所述电子设备通过所述处理器基于所述第一数据确定心率。After the first data is copied to the memory, the electronic device processes the first data through the processor working in the second mode, specifically including: after the first data is copied to the memory Finally, the electronic device determines the heart rate based on the first data through the processor.
  8. 根据权利要求6所述的方法,其特征在于,所述数据获取装置为网卡;The method according to claim 6, characterized in that the data acquisition device is a network card;
    在所述第一数据被拷贝到内存中后,所述电子设备通过以第二模式工作的所述处理器处理所述第一数据,具体包括:After the first data is copied into the memory, the electronic device processes the first data through the processor working in the second mode, specifically including:
    在所述第一数据被拷贝到所述内存中后,所述电子设备通过以所述第二模式工作的所述处理器基于所述第一数据确定第一内容;After the first data is copied into the memory, the electronic device determines first content based on the first data through the processor operating in the second mode;
    所述方法还包括:所述电子设备显示所述第一内容,所述第一内容与所述第一数据对应。The method further includes: the electronic device displays the first content, and the first content corresponds to the first data.
  9. 根据权利要求4-8中任一项所述的方法,其特征在于,所述方法还包括: The method according to any one of claims 4-8, characterized in that the method further includes:
    在所述电子设备通过所述DMA控制器将所述第一数据从所述数据获取装置拷贝至所述内存中后,所述电子设备通过所述DMA控制器向所述处理器发送第二中断;After the electronic device copies the first data from the data acquisition device to the memory through the DMA controller, the electronic device sends a second interrupt to the processor through the DMA controller. ;
    在所述电子设备通过所述处理器基于所述第二中断确定所述第一数据被拷贝至所述内存中后,配置所述处理器工作在所述第二模式。After the electronic device determines through the processor that the first data is copied to the memory based on the second interrupt, the processor is configured to work in the second mode.
  10. 根据权利要求1-9中任一项所述的方法,其特征在于,在所述第一数据被拷贝到内存中后,在所述电子设备通过以第二模式工作的所述处理器处理所述第一数据前,所述方法还包括:The method according to any one of claims 1 to 9, characterized in that after the first data is copied into the memory, the electronic device processes the data by the processor operating in the second mode. Before describing the first data, the method further includes:
    所述电子设备确定第一参数;The electronic device determines a first parameter;
    所述电子设备基于所述第一参数确定所述第二电压和/或第二频率。The electronic device determines the second voltage and/or second frequency based on the first parameter.
  11. 根据权利要求10所述的方法,其特征在于,所述第一参数用于指示所述第一数据对应的应用程序;或者,所述第一参数用于指示所述第一数据对应的业务;或者,所述第一参数用于指示所述第一数据对应的业务的类型。The method according to claim 10, wherein the first parameter is used to indicate an application program corresponding to the first data; or, the first parameter is used to indicate a service corresponding to the first data; Alternatively, the first parameter is used to indicate the type of service corresponding to the first data.
  12. 根据权利要求1-9中任一项所述的方法,其特征在于,所述第二电压和/或所述第二频率为预设值。The method according to any one of claims 1 to 9, characterized in that the second voltage and/or the second frequency are preset values.
  13. 根据权利要求1-12中任一项所述的方法,其特征在于,所述处理器包括中央处理器CPU、数字信号处理器DSP和神经网络处理器NPU中的一种或多种。The method according to any one of claims 1-12, wherein the processor includes one or more of a central processing unit (CPU), a digital signal processor (DSP), and a neural network processor (NPU).
  14. 一种电子设备,其特征在于,所述电子设备包括:一个或多个处理器和存储器;An electronic device, characterized in that the electronic device includes: one or more processors and memories;
    所述存储器与所述一个或多个处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,所述一个或多个处理器调用所述计算机指令以使得所述电子设备执行如权利要求1-13中任一项所述的方法。The memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors invoke the computer instructions to cause the The electronic device performs the method according to any one of claims 1-13.
  15. 根据权利要求14所述的方法,其特征在于,所述电子设备为可穿戴电子设备。The method of claim 14, wherein the electronic device is a wearable electronic device.
  16. 一种芯片***,其特征在于,所示所述芯片***应用于电子设备,所述芯片***包括一个或多个处理器,所述处理器用于调用计算机指令以使得所述电子设备执行如权利要求1-13中任一项所述的方法。A chip system, characterized in that the chip system shown is applied to electronic equipment, and the chip system includes one or more processors, and the processor is used to call computer instructions to cause the electronic equipment to execute the claims. The method described in any one of 1-13.
  17. 一种计算机可读存储介质,包括指令,其特征在于,当所述指令在电子设备上运行时,使得所述电子设备执行如权利要求1-13中任一项所述的方法。A computer-readable storage medium includes instructions, characterized in that when the instructions are run on an electronic device, the electronic device is caused to perform the method according to any one of claims 1-13.
  18. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在电子设备上运行时,使得所述电子设备执行如权利要求1-13中任一项所述的方法。 A computer program product containing instructions, characterized in that, when the computer program product is run on an electronic device, it causes the electronic device to execute the method according to any one of claims 1-13.
PCT/CN2023/101413 2022-06-24 2023-06-20 Method for adjusting device power consumption and electronic device WO2023246783A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210726906.6 2022-06-24
CN202210726906.6A CN117311484A (en) 2022-06-24 2022-06-24 Method for adjusting power consumption of equipment and electronic equipment

Publications (1)

Publication Number Publication Date
WO2023246783A1 true WO2023246783A1 (en) 2023-12-28

Family

ID=89260944

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/101413 WO2023246783A1 (en) 2022-06-24 2023-06-20 Method for adjusting device power consumption and electronic device

Country Status (2)

Country Link
CN (1) CN117311484A (en)
WO (1) WO2023246783A1 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106556424A (en) * 2016-10-18 2017-04-05 上海斐讯数据通信技术有限公司 A kind of intelligent wearable device and its energy-saving operating method
CN107909686A (en) * 2017-11-02 2018-04-13 广东欧珀移动通信有限公司 Method, apparatus, computer-readable recording medium and the electronic equipment of face unlock
CN108540664A (en) * 2018-03-30 2018-09-14 联想(北京)有限公司 A kind of starting-up method and electronic equipment
US20190171277A1 (en) * 2017-12-05 2019-06-06 Fujitsu Limited Power control system and power control program
CN112147944A (en) * 2020-08-17 2020-12-29 来邦养老科技有限公司 Low-power-consumption monitoring method and monitoring system for old people
CN113260949A (en) * 2019-01-31 2021-08-13 华为技术有限公司 Method for reducing power consumption and electronic equipment
CN113325941A (en) * 2020-02-29 2021-08-31 荣耀终端有限公司 Method for displaying finger print under screen and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106556424A (en) * 2016-10-18 2017-04-05 上海斐讯数据通信技术有限公司 A kind of intelligent wearable device and its energy-saving operating method
CN107909686A (en) * 2017-11-02 2018-04-13 广东欧珀移动通信有限公司 Method, apparatus, computer-readable recording medium and the electronic equipment of face unlock
US20190171277A1 (en) * 2017-12-05 2019-06-06 Fujitsu Limited Power control system and power control program
CN108540664A (en) * 2018-03-30 2018-09-14 联想(北京)有限公司 A kind of starting-up method and electronic equipment
CN113260949A (en) * 2019-01-31 2021-08-13 华为技术有限公司 Method for reducing power consumption and electronic equipment
CN113325941A (en) * 2020-02-29 2021-08-31 荣耀终端有限公司 Method for displaying finger print under screen and electronic equipment
CN112147944A (en) * 2020-08-17 2020-12-29 来邦养老科技有限公司 Low-power-consumption monitoring method and monitoring system for old people

Also Published As

Publication number Publication date
CN117311484A (en) 2023-12-29

Similar Documents

Publication Publication Date Title
KR102470275B1 (en) Voice control method and electronic device
WO2021052263A1 (en) Voice assistant display method and device
WO2021169337A1 (en) In-screen fingerprint display method and electronic device
US20210263564A1 (en) Display Method for Flexible Display, and Terminal
WO2021017901A1 (en) Screen display method and electronic device
CN114443277A (en) Memory management method and device, electronic equipment and computer readable storage medium
WO2020093988A1 (en) Image processing method and electronic device
US11995317B2 (en) Method and apparatus for adjusting memory configuration parameter
CN113553130A (en) Method for executing drawing operation by application and electronic equipment
CN111522425A (en) Power consumption control method of electronic equipment and electronic equipment
US20230343318A1 (en) Noise reduction method and noise reduction apparatus
WO2021238387A1 (en) Application execution method and apparatus
CN112437341B (en) Video stream processing method and electronic equipment
WO2023179123A1 (en) Bluetooth audio playback method, electronic device, and storage medium
WO2022033355A1 (en) Mail processing method and electronic device
WO2023246783A1 (en) Method for adjusting device power consumption and electronic device
CN114398108A (en) Electronic device, drive loading method thereof, and medium
WO2024045841A1 (en) Storage method and apparatus, and electronic device
CN117013660B (en) Charging icon display method and electronic equipment
US20240069845A1 (en) Focus synchronization method and electronic device
CN115529379B (en) Method for preventing Bluetooth audio Track jitter, electronic equipment and storage medium
WO2022262291A1 (en) Image data calling method and system for application, and electronic device and storage medium
WO2023169542A1 (en) Display method and electronic device
WO2024109573A1 (en) Method for floating window display and electronic device
WO2022166550A1 (en) Data transmission method and electronic device

Legal Events

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

Ref document number: 23826430

Country of ref document: EP

Kind code of ref document: A1