CN112639675A - Method for dynamically modulating frequency of internal memory and electronic equipment - Google Patents

Method for dynamically modulating frequency of internal memory and electronic equipment Download PDF

Info

Publication number
CN112639675A
CN112639675A CN201880097064.4A CN201880097064A CN112639675A CN 112639675 A CN112639675 A CN 112639675A CN 201880097064 A CN201880097064 A CN 201880097064A CN 112639675 A CN112639675 A CN 112639675A
Authority
CN
China
Prior art keywords
electronic device
load
internal memory
threshold
frequency
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201880097064.4A
Other languages
Chinese (zh)
Other versions
CN112639675B (en
Inventor
史公正
乔苇岩
王高扬
李达
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN112639675A publication Critical patent/CN112639675A/en
Application granted granted Critical
Publication of CN112639675B publication Critical patent/CN112639675B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

A method for dynamically tuning an internal memory and an electronic device (100) relate to the technical field of terminals and are applied to the electronic device (100), wherein the electronic device (100) comprises the internal memory (122), and the method comprises the following steps: the electronic equipment (100) obtains a first load (501), the electronic equipment (100) compares the magnitude relation (502) between the first load and a load threshold, then the electronic equipment (100) determines the frequency corresponding to the magnitude relation between the first load and the load threshold as a target frequency (503) from the corresponding relation between the magnitude relation and the frequency between the preset load and the load threshold according to the magnitude relation, and finally the electronic equipment (100) adjusts the working frequency of the internal memory (122) according to the target frequency (504). Wherein the first load is a number of commands for accessing the internal memory (122); the load threshold is determined by the electronic device (100) based on at least two second loads, the at least two second loads being the number of commands to access the internal memory (122) periodically obtained by the electronic device (100) during the first time period. Therefore, the method is beneficial to improving the smoothness of the operation of the electronic device (100) and reducing the power consumption of the electronic device (100).

Description

Method for dynamically modulating frequency of internal memory and electronic equipment Technical Field
The present disclosure relates to the field of terminal technologies, and in particular, to a method for dynamically modulating frequency of an internal memory and an electronic device.
Background
With the increasing functions of electronic devices (such as mobile phones and tablet computers), the requirements for reading and writing data of internal memories in the electronic devices are also higher and higher, so as to meet the smoothness of the operation of the electronic devices in different application scenes.
The higher the working frequency of the internal memory is, the higher the data reading and writing speed is, and the smoother the electronic equipment runs. However, the operating frequency of the internal memory is positively correlated with the power consumption of the electronic device. The higher the operating frequency of the internal memory is, the higher the power consumption of the electronic device is, and the lower the operating frequency of the internal memory is, the lower the power consumption of the electronic device is. However, when the operating frequency of the internal memory is low, the smoothness of the operation of the electronic device may be affected. Therefore, the research on the method for adjusting the operating frequency of the internal memory in the electronic device has important practical significance.
Disclosure of Invention
The application provides a method for dynamically modulating frequency of an internal memory and an electronic device, which are beneficial to improving the smoothness of the operation of the electronic device and reducing the power consumption of the electronic device.
In a first aspect, a method for dynamically tuning an internal memory according to an embodiment of the present application is applied to an electronic device, where the electronic device includes the internal memory, and the method includes:
the electronic equipment obtains a first load, compares the magnitude relation between the first load and a load threshold, determines a frequency corresponding to the magnitude relation between the first load and the load threshold from the corresponding relation between the magnitude relation between the preset load and the load threshold and the frequency as a target frequency, and finally adjusts the working frequency of the internal memory according to the target frequency. Wherein the first load is the number of commands for accessing the internal memory; the load threshold is determined by the electronic device according to at least two second loads, wherein the at least two second loads are the number of commands periodically acquired by the electronic device during the first time period and used for accessing the internal memory.
In the embodiment of the application, the load threshold can be dynamically adjusted based on the at least two second loads, so that the electronic device can dynamically adjust the working frequency of the internal memory, and the load threshold is determined according to the load condition of the internal memory, so that the adjustment of the working frequency of the internal memory can better meet the performance requirement of the electronic device, and the improvement of the smooth operation of the electronic device and the reduction of the power consumption of the electronic device are facilitated.
In one possible design, the electronic device determines a first characteristic value according to at least two second loads, wherein the first characteristic value is used for indicating the current operation scene or performance requirement of the electronic device; and determining a threshold corresponding to the first characteristic value in the preset corresponding relation between the characteristic value and the threshold as a load threshold. Through the technical scheme, the implementation mode of determining the load threshold is facilitated to be simplified.
In one possible design, the electronic device determines the first characteristic value to be a minimum value or a maximum value of the at least two loads; alternatively, the electronic device determines the first characteristic value as an average of the at least two loads. Through the technical scheme, the implementation mode of determining the first characteristic value is facilitated to be simplified.
In one possible design, when the electronic device detects that the load threshold does not meet the performance requirement, the load threshold is adjusted according to a preset first policy. It is helpful to enable the load threshold determined by the electronic device to meet the performance requirements of the electronic device.
In one possible design, the loading threshold includes an upper frequency modulation threshold and a lower frequency modulation threshold. Helping to reduce the possibility of the occurrence of ping-pong effect.
In one possible design, the duration of the period in which the electronic device acquires the second load is determined by the electronic device according to at least two second loads. The sampling of the electronic equipment is more consistent with the performance requirement or the operation scene.
In one possible design, the electronic device periodically acquires the first load. Thereby contributing to a simplified implementation.
In one possible design, the duration of the period in which the electronic device acquires the first load is the same as the duration of the period in which the electronic device acquires the second load. It is helpful to reduce the power consumption of the electronic device.
In a second aspect, an embodiment of the present application provides an electronic device, including: one or more processors, memory, and one or more computer programs; wherein one or more computer programs are stored in a memory, the memory including an internal memory, which when executed by an electronic device, implement the method of the first aspect of the embodiments of the present application and any of the possible designs provided by the first aspect.
In a third aspect, a chip provided in this embodiment of the present application is coupled to a memory in an electronic device, so that the chip invokes a computer program stored in the memory when running, so as to implement the method provided in the first aspect of this embodiment and any possible design provided in the first aspect of this embodiment.
In a fourth aspect, an internal memory according to an embodiment of the present application stores a computer program, which, when executed on an electronic device, causes the electronic device to perform the method according to the first aspect and any one of the possible designs of the first aspect.
In a fifth aspect, a computer program product according to an embodiment of the present application, when running on an electronic device, causes the electronic device to perform the first aspect and any one of the possible design methods of the first aspect.
In addition, the technical effects brought by any one of the possible design manners in the second aspect to the fifth aspect can be referred to the technical effects brought by the different design manners in the first aspect, and are not described herein again.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application;
FIG. 2 is a schematic structural diagram of a memory module according to an embodiment of the present application;
FIG. 3 is a schematic diagram of another exemplary memory module according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of another structure of a memory module according to an embodiment of the present application;
FIG. 5 is a schematic diagram illustrating a flow chart of a method for dynamically tuning an internal memory according to an embodiment of the present application;
FIG. 6 is a schematic view of a first interval in an embodiment of the present application;
FIG. 7 is a sample diagram of command numbers according to an embodiment of the present application;
FIG. 8 is a diagram illustrating the variation of the load and operating frequency of the internal memory with time according to an embodiment of the present application;
FIG. 9 is a diagram illustrating the operation frequency and power consumption of an internal memory according to an embodiment of the present application over time;
fig. 10 is a schematic structural diagram of another electronic device according to an embodiment of the present application.
Detailed Description
It should be understood that "at least one" in the embodiments of the present application means one or more, "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that three relationships may exist. For example, a and/or B, may represent the following three relationships: a exists alone, A and B exist simultaneously, and B exists alone. A, B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, a and b, a and c, b and c, or a, b and c, wherein a, b and c can be single or multiple.
It should be understood that the embodiment of the application can be applied to electronic equipment. For example, the electronic device may be a portable electronic device, such as a cell phone, a tablet computer, a wearable device with wireless communication functionality (e.g., a smart watch), an in-vehicle device, and so on. Exemplary embodiments of the portable electronic device include, but are not limited to, a mount
Figure PCTCN2018110302-APPB-000001
Or other operating system. The portable electronic device may also be a device such as a Laptop computer (Laptop) with a touch sensitive surface (e.g., a touch panel), etc. It should also be understood that in some other embodiments of the present application, electronic device 100 may also be a desktop computer with a touch-sensitive surface (e.g., a touch panel).
For example, fig. 1 shows a hardware structure diagram of an electronic device to which an embodiment of the present application is applicable. As shown in fig. 1, the electronic device 100 includes a processor 110, a storage module 120, an antenna 1, a mobile communication module 131, an antenna 2, a wireless communication module 132, an audio module 140, a speaker 140A, a receiver 140B, a microphone 140C, an earphone interface 140D, a display screen 151, a Subscriber Identity Module (SIM) card interface 152, a camera 153, a key 154, a sensor module 160, a Universal Serial Bus (USB) interface 170, a charging management module 180, a power management module 181, and a battery 182. In other embodiments, the electronic device 100 may also include motors, indicators, and the like.
Processor 110 may include one or more processing units, among others. For example: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
In some embodiments, a memory may also be provided in processor 110 for storing instructions and data. By way of example, the memory in the processor 110 may be a cache memory. The memory may be used to hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Thereby helping to avoid repeated accesses and reducing the latency of the processor 110, thereby increasing the efficiency of the system.
The memory module 120 may include a memory controller 121, an internal memory 122, and an external memory interface 123 as shown in fig. 2, and the memory module 120 may further include an internal memory 122 and an external memory interface 123 as shown in fig. 3, wherein the processor 110 includes the memory controller 121. It should be understood that the memory controller 121 is used to process all access instructions to the internal memory 122 and the external memory connected to the external memory interface 123. In some embodiments, memory controller 121 includes a first memory controller for all access instructions to internal memory 122 and a second memory controller for all access instructions to external memory connected to external memory interface 123.
The internal memory 122 may be used to store computer executable program code. The executable program code includes instructions. The electronic apparatus 100 executes various functional applications and data processing of the electronic apparatus 100 by executing instructions stored in the internal memory 122. The internal memory 122 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The storage data area can store data (such as audio data, phone book and the like) created in the using process of the electronic device. In addition, the internal memory 122 may include a high speed random access memory, and may further include a nonvolatile memory, such as at least one disk memory device, a flash memory device, a universal flash memory (UFS), a double data rate synchronous dynamic random access memory (DDR SDRAM), a low power double data rate DDR SDRAM (LPDDR SDRAM), an X3D (3D Xpoint), and the like, wherein DDR SDRAM may be abbreviated as DDR, LPDDR SDRAM may be abbreviated as LPDDR.
The external memory interface 123 may be used to connect an external memory card (e.g., a Micro SD card) to extend the memory capability of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 123 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 131 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device 100. The mobile communication module 131 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 131 can receive the electromagnetic wave signal from the antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic wave signal, and transmit the electromagnetic wave signal to the modem processor for demodulation. The mobile communication module 131 can also amplify the signal modulated by the modem processor, and convert the signal into an electromagnetic wave signal through the antenna 1 to radiate the electromagnetic wave signal. In some embodiments, at least part of the functional modules of the mobile communication module 131 may be provided in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 131 may be disposed in the same device as at least some of the modules of the processor 110. For example, the mobile communication module 131 may transmit and receive voice to and from other electronic devices.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 140A, the receiver 140B, etc.) or displays an image or video through the display screen 151. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 131 or other functional modules, independent of the processor 110.
The wireless communication module 132 may provide a solution for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs), such as Wi-Fi networks, Bluetooth (BT), Global Navigation Satellite Systems (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like. The wireless communication module 132 may be one or more devices integrating at least one communication processing module. The wireless communication module 132 receives the electromagnetic wave signal via the antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signal, and transmits the processed signal to the processor 110. The wireless communication module 132 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into an electromagnetic wave signal through the antenna 2 to radiate the signal.
In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 131 and antenna 2 is coupled to wireless communication module 132 so that electronic device 100 can communicate with networks and other devices through wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (TD-SCDMA), Long Term Evolution (LTE), LTE, BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The electronic device 100 may implement audio functions through the audio module 140, the speaker 140A, the receiver 140B, the microphone 140C, the earphone interface 140D, and the application processor. Such as music playing, recording, etc.
The audio module 140 may be used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 140 may also be used to encode and decode audio signals. In some embodiments, the audio module 140 may be disposed in the processor 110, or some functional modules of the audio module 140 may be disposed in the processor 110.
The speaker 140A, also called a "horn", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or a hands-free call through the speaker 140A.
The receiver 140B, also called "earpiece", is used to convert the electrical audio signal into an acoustic signal. When the electronic apparatus 100 receives a call or voice information, it can receive voice by placing the receiver 140B close to the ear of the person.
The microphone 140C, also known as a "microphone," is used to convert sound signals into electrical signals. When making a call or sending voice information, the user may speak via the mouth of the user near the microphone 140C, which may be used to capture the user's voice and then convert the user's voice into an electrical signal. The electronic device 100 may be provided with at least one microphone 140C. In other embodiments, the electronic device 100 may be provided with two microphones 140C to achieve a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further include three, four, or more microphones 140C to collect and reduce sound signals, identify sound sources, and perform directional recording.
The headphone interface 140D is used to connect wired headphones. The headset interface 140D may be the USB interface 130, or may be a 3.5mm open mobile electronic device platform (OMTP) standard interface, a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface, or the like.
The electronic device 100 may implement a display function through the GPU, the display screen 151, and the application processor, etc. The GPU is a microprocessor for image processing, and is connected to the display screen 151 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 151 may be used to display images, videos, and the like. The display screen 151 may include a display panel. The display panel may be a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), or the like. In some embodiments, the electronic device may include 1 or N display screens 151, N being a positive integer greater than 1.
The electronic apparatus 100 may implement a photographing function through the ISP, the camera 153, the video codec, the GPU, the display screen 151, and the application processor, etc.
The ISP may be used to process data fed back by the camera 153. For example, when taking a picture, the shutter is opened, the optical signal is collected by the camera 153, and then the camera 153 converts the collected optical signal into an electrical signal and transmits the electrical signal to the ISP for processing and converting into an image visible to the naked eye. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 153 may be used to capture still images or video. Typically, the camera 153 includes a lens and an image sensor. Wherein, the object generates an optical image through the lens and projects the optical image to the image sensor. The image sensor may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The image sensor converts the optical signal into an electrical signal and then transmits the electrical signal to the ISP to be converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device may include 1 or N cameras 153, N being a positive integer greater than 1.
The keys 154 may include a power-on key, a volume key, and the like. The keys 154 may be mechanical keys. Or may be touch keys. The electronic device may receive key inputs, generate key signal inputs related to user settings and function control of the electronic device 100.
The sensor module 160 may include one or more sensors. For example, the touch sensor 160A, the fingerprint sensor 160B, the gyro sensor 160C, the pressure sensor 160D, the acceleration sensor 160E, and the like. In some embodiments, the sensor module 160 may also include environmental sensors, distance sensors, proximity light sensors, bone conduction sensors, and the like.
The touch sensor 160A may also be referred to as a "touch panel". The touch sensor 160A may be disposed on the display screen 151, and the touch sensor 160A and the display screen 151 form a touch screen, which is also called a "touch screen". The touch sensor 160A is used to detect a touch operation applied thereto or therearound. Touch sensor 160A may pass the detected touch operation to an application processor to determine the touch event type. Visual output related to the touch operation may be provided through the display screen 151. In other embodiments, the touch sensor 160A may be disposed on a surface of the electronic device 100, different from the position of the display screen 151.
The fingerprint sensor 160 may be used to capture a fingerprint. The electronic device 100 may utilize the collected fingerprint characteristics to implement fingerprint unlocking, access to an application lock, fingerprint photographing, fingerprint answering, and the like.
The gyro sensor 160C may be used to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., x, y, and z axes) may be determined by gyroscope sensor 160C. The gyro sensor 160C may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 160C detects a shake angle of the electronic device 100, calculates a distance to be compensated for by the lens module according to the shake angle, and allows the lens to counteract the shake of the electronic device 100 through a reverse movement, thereby achieving anti-shake. The gyro sensor 160C may also be used for navigation, body sensing game scenes.
The pressure sensor 160D is used for sensing a pressure signal, and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 160D may be disposed on the display screen 151. The pressure sensor 160D may be of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic apparatus 100 may also calculate the touched position from the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but different touch operation intensities may correspond to different operation instructions. For example: and when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for viewing the short message. And when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.
The acceleration sensor 160E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. The method can also be used for identifying the posture of the electronic equipment 100 and applied to horizontal and vertical screen switching, pedometers and other applications.
In other embodiments, processor 110 may also include one or more interfaces. For example, the interface may be a SIM card interface 152. Also for example, the interface may be a USB interface 170. For example, the interface may also be an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, or the like. It is understood that the processor 110 may interface with different modules of the electronic device 100 according to the embodiment of the present application, so that the electronic device 100 can implement different functions. Such as taking a picture, processing, etc. In the embodiment of the present application, the connection method of the interface in the electronic device 100 is not limited.
The SIM card interface 152 may be used to connect a SIM card, among other things. The SIM card can be brought into and out of contact with the electronic device 100 by being inserted into the SIM card interface 152 or being pulled out of the SIM card interface 152. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 152 may support a Nano SIM card, a Micro SIM card, a SIM card, or the like. Multiple cards can be inserted into the same SIM card interface 152 at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 152 may also be compatible with different types of SIM cards. The SIM card interface 152 may also be compatible with an external memory card. The electronic device 100 interacts with the network through the SIM card to implement functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
The USB interface 170 is an interface conforming to the USB standard specification. For example, the USB interface 170 may include a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 170 may be used to connect a charger to charge the electronic device 100, and may also be used to transmit data between the electronic device 100 and a peripheral device. And the earphone can also be used for connecting an earphone and playing audio through the earphone. The USB interface 170 may also be used to connect other electronic devices, such as Augmented Reality (AR) devices, and the like.
The charge management module 180 is configured to receive a charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 180 may receive charging input from a wired charger via the USB interface 170. In some wireless charging embodiments, the charging management module 180 may receive a wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device through the power management module 181 while charging the battery 182.
The power management module 181 is used to connect the battery 182, the charging management module 180 and the processor 110. The power management module 181 receives an input of the battery 182 and/or the charging management module 180, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 151, the camera 153, the mobile communication module 131, the wireless communication module 132, and the like. The power management module 181 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), and the like. In some other embodiments, the power management module 181 may also be disposed in the processor 110. In other embodiments, the power management module 181 and the charging management module 180 may be disposed in the same device.
It should be understood that the hardware configuration shown in fig. 1 is only one example. The electronic device 100 of embodiments of the application may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
The following describes embodiments of the present application in detail by taking the electronic device 100 as an example.
The embodiment of the application provides a method for dynamically modulating the frequency of an internal memory, which can realize the adjustment of the working frequency of the internal memory based on the number of commands for accessing the internal memory. In some embodiments, the electronic device 100 may set a buffer space large enough in advance on the processor 110, the camera 153, the audio module 140, and other modules for accessing the internal memory to implement corresponding functions, so as to reduce the number of times that these modules are used to access the internal memory, thereby helping to shorten an adjustment interval of the operating frequency of the internal memory in the electronic device 100, even within 5ms, to implement fast adjustment of the operating frequency of the internal memory in a case that the electronic device 100 is operating normally, and further helping to achieve a purpose of saving power consumption.
It should be noted that, in the embodiment of the present application, the operating frequency of the internal memory refers to a frequency used when the internal memory operates. It should be understood that the internal memory in the embodiment of the present application may support at least two frequencies, and the operating frequency of the internal memory is usually one of the frequencies supported by the internal memory. Take the example where the internal memory is LPDDR 4X. The highest frequency supported by LPDDR is 2133MHz, the lowest frequency is 415MHz, and in addition, a frequency of 830MHz is supported. Thus, the operating frequency of LPDDR4X may typically be one of 2133MHz, 415MHz, or 830 MHz.
In some embodiments, the present application may implement fast adjustment of the operating frequency of the internal memory by adding a smart fm module to the electronic device 100. For example, as shown in fig. 4, the smart fm module 400 includes a statistics module 401, a feature value extraction module 402, and an analysis module 403. Smart fm module 400 may also include performance detection module 404 in some embodiments. In the embodiment of the present application, the smart fm module 400 may be an independent module, or may be integrated on the memory controller 121. The method for tuning frequency according to the embodiment of the present application is described in detail below with reference to the schematic structural diagram of the smart frequency tuning module 400 shown in fig. 4.
For example, as shown in fig. 5, a flowchart of a method for dynamically tuning an internal memory according to an embodiment of the present application is shown. Comprises the following steps.
In step 501, the electronic device 100 obtains a first load. Wherein the first payload is a number of commands for accessing the internal memory. In particular implementations, the memory controller 121 in the electronic device 100 obtains the first load.
It should be noted that the electronic device 100 may periodically acquire the first load. In this embodiment of the present application, a duration of a cycle of acquiring a first load is a first interval. For example, the obtained first load may be a total number of commands for accessing the internal memory in the first interval, may also be a number of commands for accessing the internal memory at a certain time in the first interval, may also be an average value of the commands for accessing the internal memory in the first interval, and the like, which is not limited herein. Taking fig. 6 as an example, the electronic device 100 acquires the first load at time t1, and acquires the first load at time t 2. Wherein the interval between time t1 and time t2 is the first interval. Take time t2 as an example. The number of commands for accessing the internal memory acquired at time t2 may be the number of commands for accessing the internal memory by electronic device 100 at time t2, or the total number of commands for accessing the internal memory by electronic device 100 in the first interval. Wherein the first interval refers to starting from time t1 and ending at time t 2.
In some embodiments, the first interval may be preset in the electronic device 100, for example, 5ms, less than 5ms, for example, 3ms, 1ms, and more than 5ms, for example, 10 ms.
In other embodiments, the electronic device 100 presets different time intervals, so that the electronic device 100 can select one time interval from the preset different time intervals as the first interval according to different application scenarios or performance requirements. Illustratively, when the remaining power of the electronic device 100 is less than the first threshold, the first interval is determined to be the maximum value of the preset at least one time interval. For example, the first threshold may be 20%, 10%, or the like. As another example, when the remaining power is greater than or equal to the second threshold, the electronic device 100 may determine that the first interval is a minimum value of the preset at least one time interval. For example, the second threshold value may be 50%, 80%, or the like, and the second threshold value may be the same as or different from the first threshold value. For example, the preset time intervals are 1ms, 5ms, 10ms, 16ms and 20ms, and taking the first threshold and the second threshold as 10% as an example, when the remaining power of the electronic device 100 is less than 10%, the first time interval is determined to be 20ms from 1ms, 5ms, 10ms, 16ms and 20ms, and when the remaining power of the electronic device 100 is greater than or equal to 10%, the first time interval is determined to be 1ms from 1ms, 5ms, 10ms, 16ms and 20 ms.
In other embodiments, the electronic device 100 may further obtain the first load in response to a triggering event, such as a performance requirement or some specific operation scenario of the electronic device 100. The embodiment of the present application does not limit the manner of acquiring the first load.
In step 502, the electronic device 100 compares the magnitude relationship between the first load and the load threshold. In a specific implementation, the memory controller 121 in the electronic device 100 compares the magnitude relationship between the first load and the load threshold.
It should be noted that, if the electronic device 100 periodically acquires the first load in step 501, the electronic device 100 may compare the size relationship between the number of commands for accessing the internal memory and the load threshold after acquiring the number of commands for accessing the internal memory each time.
In the embodiment of the present application, the load threshold may be a value, or may be set as a value of the number of commands for accessing the internal memory in a unit time length (for example, 1 s). Illustratively, when the unit duration is ms, the first interval may be also used. For example, the loading threshold may be 32000/ms. In this case, if the first interval is 1ms, if the number of commands for accessing the internal memory within 1ms acquired is 30000, the first load is 30000, the magnitude relationship between the first load and the load threshold is compared, and if the first interval is 2ms, if the number of commands for accessing the internal memory within 2ms acquired is 40000, the first load is 20000/ms, the first load (20000/ms) and the load threshold (32000/ms) are compared.
For example, the load threshold may be preset in the electronic device 100. For example, the loading threshold may be 32000/s when the first loading is an accumulated value of the number of commands for accessing the internal memory in the acquired first interval, and may be a value, for example 30000, when the first loading is the number of commands for accessing the internal memory at a certain time in the acquired first interval. As another example, in the embodiment of the present application, different load thresholds may also be set for different operation scenarios or performance requirements of the electronic device 100. For example, for a game scene with a high frame rate and a high change speed, the performance requirement is high, and the preset load threshold is small; for an application scenario with low frame rate and change requirements, the performance requirement is low, and a high load threshold can be preset. Thus, in some embodiments, the electronic device 100 may determine the current performance requirements and then determine a load threshold corresponding to the current performance requirements. For example, the electronic device 100 may determine the current performance requirement according to the currently running application, or may determine the current performance requirement based on other ways, which is not limited thereto.
In some embodiments, the electronic device 100 may also determine the load threshold by periodically obtaining a second load, which is the number of commands for accessing the internal memory. For example, the obtained second load may be the total number of commands for accessing the internal memory in the second interval, or may be the number of commands for accessing the internal memory at a certain time in the second interval. The relevant description may refer to the relevant description of the first load. In particular implementations, in some embodiments, the statistics module 401 of the electronic device 100 periodically obtains the second load.
And acquiring the duration of the period of the second load as a second interval. The second interval may be different from or the same as the first interval. In the embodiment of the present application, the second interval may be 1ms, 3ms, 5ms, 10ms, 16ms, 20ms, or the like. It should be noted that, when the second interval is the same as the first interval, the first load and the second load may be the number of commands for accessing the internal memory in the same interval acquired by the electronic device 100, or the number of commands for accessing the internal memory at the same time in the same interval; but may be a different number of commands for accessing the internal memory. Thus, the electronic device 100 may determine the load threshold based on the first load (which may be the second load) acquired at every first interval (or the second interval), and may determine the target frequency based on the first load (which may be the second load) acquired at every first interval (or the second interval), thereby helping to reduce the number of sampling times of the electronic device, and further helping to reduce the power consumption of the electronic device. Illustratively, the second interval is preset in the electronic device 100, for example, 1ms, 5ms, 3ms, 10ms, and so on. As another example, the electronic device 100 presets different time intervals, so that the electronic device 100 may select one time interval from the preset different time intervals as the second interval according to different application scenarios or performance requirements. For example, for a scene where the high frame rate changes at a high speed (e.g., a scene where the electronic device 100 runs a game), the second interval may be set to a smaller duration of 1ms, 2ms, or the like. For scenarios where the read/write requirements of the internal memory are low (e.g. scenarios where the electronic device 100 runs a clock, a calendar, a telephone), the second interval may be set to a longer time interval of 10ms or the like. For example, the electronic device 100 may determine the second interval according to the running application. Thereby helping electronic device 100 to conserve power consumption while meeting performance requirements.
In still other embodiments, electronic device 100 may also determine the second interval based on the second load. The electronic device 100 may start acquiring the second load, and may adopt the default second interval because the number of acquired second loads is small and the performance requirement of the electronic device 100 cannot be identified. For example, the default second interval may be determined by referring to the related description of presetting the second interval. After the electronic device 100 acquires a sufficient number of second loads, the electronic device 100 may determine the second interval according to the acquired second loads. In some embodiments, the electronic device 100 determines the load threshold according to a plurality of second loads obtained within the first time period. The first time period may be preset or determined based on a preset policy. For example, the electronic device 100 may determine the second interval according to a plurality of second loads acquired in the first duration every first duration. As another example, the electronic device 100 may further determine the second interval according to a plurality of second loads acquired within the first duration in response to a triggering event (e.g., a performance requirement, etc.). For example, the first time period may be 10min, 20min, etc. The first duration may be variable or fixed. For example, as shown in fig. 7, the electronic device 100 acquires the second loads at every second interval 1 within the first duration 1, and if the second interval determined by the electronic device 100 based on the 5 second loads acquired within the first duration 1 is the second interval 2, the electronic device 100 acquires the second loads at every second interval 2 from the time t 4. When the electronic apparatus 100 determines the second interval every first duration, as shown in fig. 7, the electronic apparatus 100 determines the second interval according to the acquired 4 second loads within the first duration 2. If the electronic device 100 determines that the second interval is the second interval 3 according to the 4 second loads acquired within the first duration 2, when the second interval 3 is equal to the second interval 2, the electronic device 100 continues to acquire the second load using the second interval 2 from the time t8, and when the second interval 3 is not equal to the second interval 2, the electronic device 100 continues to acquire the second load using the second interval 3 from the time t 8. For another example, when the electronic device 100 responds to the trigger event and determines the second interval according to the plurality of second loads acquired within the first duration, as shown in fig. 7, if the electronic device 100 responds to the trigger event at time T, the second interval is determined to be the second interval 2 according to the 4 second loads acquired within the first duration 2.
For example, the electronic device 100 may determine the second interval according to the plurality of second loads acquired in the first duration as follows:
the electronic device 100 extracts a first feature value according to the plurality of second loads acquired within the first duration. And then determining the interval corresponding to the first characteristic value as a second interval from the preset corresponding relation between the characteristic value and the interval. The first characteristic value may be used to indicate a performance requirement or an operational scenario of the electronic device 100. In some embodiments, the electronic device 100 may further determine, according to the extracted first feature value, a threshold value corresponding to the first feature value as the load threshold from a preset correspondence between the feature value and the threshold. It should be noted that, according to the second characteristic value, the electronic device 100 may further determine the load threshold from a preset corresponding relationship between the characteristic value and the threshold. And the load threshold is a threshold corresponding to the second characteristic value. The second characteristic value may be extracted from at least two third loads. The third load is the number of commands for accessing the internal memory. The third load may be acquired periodically by the electronic device 100, or acquired by event triggering of the electronic device 100, which is not limited in this respect. When the third load is periodically acquired by the electronic device 100, the duration of the period in which the electronic device 100 acquires the third load may be different from the first interval and the second interval, and a manner of determining the duration of the period of the third load may refer to a manner of determining the second interval. The explanation of the third load can be referred to the explanation of the first load. For example, the electronic device 100 determines the load threshold according to the extracted first feature value, and the manner in which the electronic device 100 determines the load threshold according to the second feature value may refer to the manner in which the load threshold is determined according to the first feature value.
In some embodiments, after the electronic device 100 determines the second interval, it is determined whether the determined second interval and/or the load threshold meet the performance requirement of the current operating scenario of the electronic device 100. For example, the performance requirement may be frame rate, latency, etc. If not, the electronic device 100 adjusts the second interval according to a preset first policy, and/or adjusts the load threshold according to a second policy. For example, the first strategy may be to shorten the second interval. For example, the electronic device 100 may decrease the second interval by a preset first ratio (e.g., 5%, 10%, or a fixed value), and the second policy may be to decrease the load threshold. For example, the electronic device 100 may decrease the load threshold by a preset second ratio. And then, whether the reduced second interval and/or the load threshold meet the performance requirement of the current operation scene of the electronic device 100 is continuously judged. Until the performance requirements are met. It should be noted that when the second interval and/or the load threshold is adjusted to the limit value and cannot be adjusted, the electronic device 100 may select the second interval and/or the load threshold with the optimal performance and power consumption from the adjustment process. Such that the electronic device 100 may update the setting of the second interval based on the newly determined second interval and/or update the setting of the load threshold according to the newly determined load threshold.
In particular implementations, in some embodiments, the statistics module 401 of the electronic device 100 sends the obtained second load to the feature extraction module 402. The feature extraction module 402 extracts a first feature value according to the plurality of second loads acquired within the first duration, and sends the first feature value to the analysis module 403. The analysis module 403 determines, according to the first feature value, an interval corresponding to the first feature value as a second interval from a preset correspondence between the feature value and the interval. In some embodiments, the analysis module 403 may further determine, according to the extracted first feature value, a threshold value corresponding to the first feature value as the load threshold from a preset correspondence between the feature value and the threshold.
In some embodiments, the analysis module 403 sends the determined second interval to the performance detection module 404. The performance detection module 404 determines whether the second interval and/or the load threshold can meet the current performance requirements of the electronic device 100. For example, taking the performance requirement of the frame rate of 60fps as an example, it is determined whether the second interval and/or the load threshold determined by the analysis module 403 meet the delay requirement at the frame rate of 60fps, and if not, the performance detection module 404 sends the adjustment policy to the analysis module 403. For example, the adjustment strategy may include a first adjustment strategy, which may be to decrease the second interval, and/or a second adjustment strategy, which may be to decrease the load threshold. The ratio of decreasing the second interval and/or the ratio of decreasing the load threshold may be sent to the analysis module 403 by the performance detection module 404, or the analysis module 403 may decrease the second interval according to a preset first ratio and/or decrease the load threshold according to a preset second ratio, and then send the decreased second interval and/or the decreased load threshold to the performance detection module 404. A determination is made by the performance detection module 404 as to whether the reduced second interval and/or the reduced load threshold meets the current performance requirements of the electronic device 100. Until the analysis module 403 receives the notification of the performance detection being satisfied sent by the performance detection module 404, the analysis module 403 sends a second interval and/or a load threshold satisfying the performance detection to the storage controller 121. And the storage controller 121 updates the setting of the load threshold according to the determined load threshold, and/or the storage controller 121 sends the second interval to the statistics module 401, so that the statistics module 401 updates the setting of the second interval according to the determined second interval. It should be noted that, when the second interval and/or the load threshold cannot be adjusted continuously, the analysis module 403 may select the second interval and/or the load threshold at which the performance and the power consumption are optimal from the adjustment process, and send the selected second interval and/or the selected load threshold to the storage controller 121.
In addition, it should be noted that, a secondary load threshold may also be preset in the electronic device 100, and when the electronic device 100 uses a load threshold determined based on the obtained at least two second loads, if a frame drop event occurs during operation of the electronic device 100 and the electronic device 100 cannot continuously adjust the load threshold determined based on the obtained at least two second loads, the load threshold may be directly adjusted to the secondary load threshold, so that the electronic device 100 may quickly adjust the operating frequency of the internal memory to the highest frequency, and ensure performance of the system. The secondary load threshold may also include an upper frequency modulation threshold and a lower frequency modulation threshold, where when the first load is greater than the upper frequency modulation threshold, the electronic device 100 adjusts the operating frequency of the internal memory to a highest frequency supported by the internal memory, and when the first load is less than the lower frequency modulation threshold, the electronic device 100 adjusts the operating frequency of the internal memory to a first frequency, where the first frequency may be one of frequencies supported by the internal memory that is less than the highest frequency. In addition, the secondary load threshold may not be distinguished from the upper frequency modulation threshold and the lower frequency modulation threshold, and when the electronic device 100 sets the load threshold as the secondary load threshold, the operating frequency of the internal memory may be directly adjusted to the highest frequency supported by the internal memory.
For example, in the preset correspondence relationship between the feature value and the interval, when the feature value indicates that the performance requirement of the electronic device changes within the duration of one frame. Illustratively, the duration of a frame may be 16.67 ms. E.g., from a low performance requirement to a high performance requirement, or from a high performance requirement to a low performance requirement, etc., the sampling interval corresponding to the eigenvalues is less than the duration of one frame, e.g., 1ms, 5ms, etc. For another example, when the characteristic value indicates that the performance requirement of the electronic device does not substantially change within the duration of one frame, such as a high performance requirement, a medium performance requirement, or a low performance requirement, the duration of the sampling interval corresponding to the characteristic value may be the duration of one frame, or may be greater, such as 20 ms. Take 5 second loads collected during the first time period 1 as shown in fig. 7 as an example. As can be seen from fig. 7: the electronic device 100 is in a low performance requirement before the time t1 and after the time t3 in the first duration 1, and is in a high performance requirement between the time t1 and the time t3, so that the size of the second load is greatly different in the first duration 1, in which case the first characteristic value extracted by the electronic device 100 is used to indicate that the performance requirement of the electronic device 100 changes in the first duration 1. Thus, the second interval corresponding to the first characteristic value determined by the electronic device 100 is less than the first duration 1, for example, the first duration 1 is a duration of one frame, and the second interval may be, for example, 1ms, 5ms, and so on. Thereby helping to shorten the interval for adjusting the operating frequency of the internal memory.
For example, the first characteristic value may be a maximum value or a minimum value of the number of two or more commands for accessing the internal memory, an average value of the number of two or more commands for accessing the internal memory, or the like. In some embodiments, the electronic device 100 may further determine a performance requirement of the electronic device 100 according to the number of the plurality of commands for accessing the internal memory in the first time period, and then determine a characteristic value corresponding to the performance requirement of the electronic device 100 according to a corresponding relationship between the performance requirement and the characteristic value. Wherein the correspondence between the performance requirements and the characteristic values may be preset in the electronic device 100. For example, the electronic device 100 may determine a time-dependent curve of the number of commands for accessing the internal memory according to the plurality of second loads for the first time period. Electronic device 100 may determine the performance requirements of electronic device 100 based on a number of commands to access internal memory versus time. In addition, the algorithm for extracting the first feature value is not particularly limited in the embodiment of the present application.
For example, in the preset correspondence relationship between the feature value and the threshold, when the feature value indicates that the performance requirement of the electronic device changes within the duration of one frame, for example, the performance requirement changes from a low performance requirement to a high performance requirement, or from the high performance requirement to the low performance requirement, the threshold corresponding to the feature value is smaller, and the like. For another example, when the characteristic value indicates that the performance requirement of the electronic device does not substantially change within the duration of one frame, such as a continuous high performance requirement, the threshold corresponding to the characteristic value may be a minimum value. For another example, if the characteristic value indicates that the performance requirement of the electronic device continues to be a low performance requirement for the duration of one frame, the threshold corresponding to the characteristic value may be a maximum value, and so on.
It should be noted that, in the embodiment of the present application, the load threshold may include an upper frequency modulation threshold and a lower frequency modulation threshold, so as to help reduce the possibility of the ping-pong effect.
In step 503, the electronic device 100 determines a target frequency from at least two frequencies supported by the internal memory according to the size relationship. In a specific implementation, the memory controller 121 of the electronic device 100 determines the target frequency from at least two frequencies supported by the internal memory according to the size relationship.
For example, the correspondence between the magnitude relationship between the load and the load threshold and the frequency may be preset in the electronic device 100. For example, a correspondence table as shown in table 1.
TABLE 1
Figure PCTCN2018110302-APPB-000002
In some embodiments, the electronic device 100 may first search a corresponding relationship table corresponding to the load threshold according to the load threshold currently configured by the electronic device 100, and then determine a target frequency from the searched corresponding relationship table, where the target frequency is a frequency corresponding to a size relationship between the first load and the load threshold.
For example, the internal memory is LPDDR 4X. The highest frequency supported by LPDDR is 2133MHz, the lowest frequency is 415MHz, and in addition, a frequency of 830MHz is supported. Taking the upper frequency modulation threshold and the lower frequency modulation threshold included in the load threshold as an example, if the electronic device 100 is pre-configured with two sets of load thresholds, the load threshold 1 includes 32000 and 29000, and the load threshold 2 includes 20000 and 19000. The table of the correspondence between the load and the load threshold 1 and the frequency is shown in table 2, and the table of the correspondence between the load and the load threshold 2 and the frequency is shown in table 3.
TABLE 2
Load and load threshold 1 magnitude relationship Frequency of
The load is larger than 32000 830MHz
The load is less than 29000 415MHz
TABLE 3
Magnitude relation between load and load threshold 2 Frequency of
The load is more than 20000 2133MHz
The load is less than 19000 415MHz
In the above scenario, when the first load is 40000 and the load threshold is 1, the target frequency determined by the electronic device 100 is 830 MHz. When the first load is 10000 and the load threshold is 1, the target frequency determined by the electronic device 100 is 415 MHz. When the first load is 30000 and the load threshold is load threshold 1, if the operating frequency of the internal memory currently set by the electronic device 100 is 830MHz, the determined target frequency is 830 MHz. When the first load is 30000 and the load threshold is load threshold 1, if the operating frequency of the internal memory currently set by the electronic device 100 is 415MHz, the determined target frequency is 415 MHz. However, when the first load is 30000 and the load threshold is load threshold 1, if the operating frequency of the internal memory currently set by the electronic device 100 is 2133MHz, the determined target frequency may be any one of 415MHz and 830 MHz.
In step 504, the electronic device 100 adjusts the operating frequency of the internal memory according to the target frequency. In a specific implementation, the memory controller 121 in the electronic device 100 adjusts the operating frequency of the internal memory according to the target frequency.
If the operating frequency of the internal memory currently set by the electronic device 100 is different from the target frequency, the electronic device 100 adjusts the operating frequency of the internal memory to the target frequency; when the operating frequency of the internal memory currently set by the electronic device 100 is the same as the target frequency, the electronic device 100 does not adjust the operating frequency of the memory.
For example, if the operating frequency of the internal memory currently set by the electronic device 100 is 415MHz, if the determined target frequency is 415MHz, the operating frequency of the internal memory is kept unchanged in the electronic device 100. For another example, if the operating frequency of the internal memory currently set by the electronic device 100 is 2133MHz, and if the determined target frequency is 415MHz, the operating frequency of the internal memory is adjusted to 415MHz in the electronic device 100.
In the embodiment of the application, the setting mode of the first interval and the second interval may be set based on the performance requirement of the electronic device, for example, when the number of commands for accessing the internal memory is higher, the second interval may be smaller, so that the determined load threshold better meets the performance requirement of the current operation scenario of the electronic device, and the electronic device may adjust the operating frequency of the internal memory in time. For example, as shown in fig. 8, the load threshold of the electronic device 100 includes an upper frequency modulation threshold 1 and a lower frequency modulation threshold 1, where the upper frequency modulation threshold 1 and the lower frequency modulation threshold 1 are determined based on the second load, and can meet the current performance requirement of the electronic device 100. Therefore, when the method for adjusting the working frequency of the internal memory is adopted, the intra-frame frequency modulation can be realized. As can be seen from a and B in fig. 8: when the electronic device 100 acquires the first load at the first interval, the first load can be acquired at the time t1 and the time t2, the upper frequency modulation threshold is greater than the upper frequency modulation threshold 1 when the first load is acquired at the time t1, and the electronic device 100 adjusts the operating frequency of the internal memory to the high frequency Fre at the time t1highAnd the electronic device 100 adjusts the operating frequency of the internal memory to the high frequency Fre at time t2 when the first load acquired at time t2 is less than the lower tuning thresholdlow. The internal memory of the electronic device 100 thus operates at the high frequency Fre between times t1 and t2highAnd internal memory after time t2The memory works at a low frequency, and intra-frame frequency modulation is realized, so that when the electronic device 100 has a large number of commands for accessing the internal memory, the internal memory works at a high frequency, and when the electronic device 100 has a small number of commands for accessing the internal memory, the internal memory works at a low frequency, which is beneficial to ensuring normal operation of the electronic device 100 and reducing power consumption of the device.
A certain game application at a frame rate of 60fps runs on a cell phone model number of Hua Mate10 and an internal memory of DDR, wherein the DDR supports frequencies of 415MHz, 830MHz, 1244MHz and 1866 MHz.
When the DDR working frequency is adjusted based on the bandwidth size of a memory controller for accessing a memory, wherein the statistical cycle of the bandwidth size is 16ms during frequency modulation, and 20ms during frequency modulation; the frequency modulation interval is 16ms, when the bandwidth size is larger than 7.3GB/s, the working frequency of the DDR is adjusted to 1244MHz, however, under the scene of 60fps frame rate, the 7GB/s bandwidth works at 830M frequency, the game frame rate falls below 50, and the game experience is seriously affected, so the performance of the mobile phone is ensured by forcibly increasing the working frequency of the DDR, through tests, in the process of running the game at the 60fps frame rate, the DDR 85% of time works at the frequency of 1244MHz, and 15% of time works at the frequency of 830 MHz. The total power consumption of the mobile phone is 500mw, wherein the power consumption of the mobile phone when the inner DDR works at the frequency of 1244MHz is 436mw, and the power consumption of the mobile phone when the DDR works at the frequency of 830MHz is 64 mw.
However, when the frequency modulation method according to the embodiment of the present application is adopted, where the lower frequency modulation threshold is 32000/s, the upper frequency modulation threshold is 48000/s, the second interval is 1ms, and the first interval is 4ms, when the mobile phone runs a game with a frame rate of 60fps, it is expected that, when the frame rate is sufficient, DDR 55% of the time operates at a frequency of 1244MHz, 15% of the time operates at 830MHz, and 30% of the time operates at a frequency of 415 MHz. The total power consumption of the electronic equipment is reduced to 438.4mw, wherein the power consumption of the DDR is 282mw when the working frequency of the DDR is 1244MHz, the power consumption of the DDR is 64mw when the working frequency of the DDR is 830MHz, and the power consumption of the DDR is 92.4mw when the working frequency of the DDR is 415 MHz.
For example, as shown in a in fig. 9, the operating frequency of the internal memory varies with time in the case of a certain game application program with a frame rate of 60fps being executed by the electronic device. It can be seen from the graph shown in fig. 9 that the duration of the adjustment interval of the operating frequency of the internal memory is changed, and the operating frequency of the internal memory is changed correspondingly with the change of time. In fig. 9, B is a schematic diagram showing the change of power consumption with time in a scenario where the electronic device runs a certain game application at a frame rate of 60 fps. It can be seen from B in fig. 9 and a in fig. 9 that the larger the operating frequency of the internal memory is, the larger the power consumption of the electronic device is, and thus the trend of the change in the power consumption of the electronic device with time is the same as the trend of the change in the operating frequency of the internal memory with time.
It is to be understood that the various embodiments described herein may be used alone or in combination with one another.
In the embodiments provided in the present application, the method provided in the embodiments of the present application is described from the perspective of an electronic device as an execution subject. In order to implement the functions in the method provided by the embodiments of the present application, the electronic device may include a hardware structure and/or a software module, and the functions are implemented in the form of a hardware structure, a software module, or a hardware structure and a software module. Whether any of the above-described functions is implemented as a hardware structure, a software module, or a hardware structure plus a software module depends upon the particular application and design constraints imposed on the technical solution.
As shown in fig. 10, an embodiment of the present application discloses an electronic device 1000, where the electronic device 1000 may include: one or more processors 1001, a memory 1002, the memory 1002 including an internal memory, and a plurality of applications 1003; and one or more computer programs 1004, which may be connected via one or more communication buses 1005. Wherein the one or more computer programs 1004 are stored in the memory 1002 and configured to be executed by the one or more processors 1001 to implement the method for dynamically tuning the internal memory as shown in fig. 5 according to the embodiment of the present application.
The processors referred to in the various embodiments above may be general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules may be located in a Random Access Memory (RAM), a flash memory, a read-only memory (ROM), a programmable ROM, an electrically erasable programmable memory, a register, or other storage media that are well known in the art. The storage medium is located in a memory, and a processor reads instructions in the memory and combines hardware thereof to complete the steps of the method.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions that can be made by those skilled in the art within the technical scope of the present application disclosed in the present application should be covered by the scope of the present application, and therefore the scope of the present application should be subject to the scope of the claims.

Claims (10)

  1. A method for dynamically tuning an internal memory, the method being applied to an electronic device, the electronic device comprising the internal memory, the method comprising:
    the electronic equipment acquires a first load, wherein the first load is the number of commands for accessing the internal memory;
    the electronic equipment compares the first load with a load threshold; the load threshold is determined by the electronic device according to at least two second loads, wherein the at least two second loads are command numbers which are periodically acquired by the electronic device in a first period and used for accessing the internal memory;
    the electronic equipment determines that the frequency corresponding to the magnitude relation of the first load and the load threshold is a target frequency from the corresponding relation of the magnitude relation and the frequency of the preset load and load threshold;
    and the electronic equipment adjusts the working frequency of the internal memory according to the target frequency.
  2. The method of claim 1, wherein the load threshold is determined by the electronic device based on at least two second loads, comprising:
    the electronic equipment determines a first characteristic value according to the at least two second loads, wherein the first characteristic value is used for indicating the current operation scene or performance requirement of the electronic equipment;
    and the electronic equipment determines that the threshold corresponding to the first characteristic value in the preset corresponding relation between the characteristic value and the threshold is the load threshold.
  3. The method of claim 2, wherein the electronic device determines a first characteristic value based on the at least two second loads, comprising:
    the electronic equipment determines that the first characteristic value is the minimum value or the maximum value of the at least two loads; alternatively, the first and second electrodes may be,
    the electronic device determines the first characteristic value to be an average of the at least two loads.
  4. A method according to any one of claims 1 to 3, wherein the method further comprises:
    and when the electronic equipment detects that the load threshold does not meet the performance requirement, adjusting the load threshold according to a preset first strategy.
  5. A method according to any one of claims 1 to 4, wherein the loading thresholds comprise an upper and a lower frequency modulation threshold.
  6. The method of any of claims 1 to 5, wherein the duration of the period during which the electronic device acquires the second load is determined by the electronic device based on the at least two second loads.
  7. The method of any of claims 1 to 6, wherein the electronic device obtaining the first load comprises:
    the electronic device periodically acquires the first load.
  8. The method of claim 7, wherein a duration of the period in which the electronic device acquires the first load is the same as a duration of the period in which the electronic device acquires the second load.
  9. An electronic device, comprising: one or more processors and memory;
    the memory stores one or more computer programs that, when executed, cause the terminal to implement the method of any of claims 1 to 8.
  10. An internal memory, characterized in that the internal memory comprises one or more computer programs which, when run on an electronic device, cause the electronic device to perform the method of any of claims 1 to 8.
CN201880097064.4A 2018-10-15 2018-10-15 Method for dynamically modulating frequency of internal memory and electronic equipment Active CN112639675B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/110302 WO2020077508A1 (en) 2018-10-15 2018-10-15 Dynamic frequency adjustment method for internal memory, and electronic apparatus

Publications (2)

Publication Number Publication Date
CN112639675A true CN112639675A (en) 2021-04-09
CN112639675B CN112639675B (en) 2023-10-20

Family

ID=70282913

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201880097064.4A Active CN112639675B (en) 2018-10-15 2018-10-15 Method for dynamically modulating frequency of internal memory and electronic equipment

Country Status (2)

Country Link
CN (1) CN112639675B (en)
WO (1) WO2020077508A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117130458A (en) * 2023-02-27 2023-11-28 荣耀终端有限公司 Data processing method, electronic device and storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114647521A (en) * 2020-12-21 2022-06-21 深圳市万普拉斯科技有限公司 Drawing pipeline adjusting method and device, computer equipment and storage medium
CN117130770A (en) * 2023-02-25 2023-11-28 荣耀终端有限公司 Frequency modulation method and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103324270A (en) * 2013-06-25 2013-09-25 东莞宇龙通信科技有限公司 Mobile terminal and method for adjusting CPU (Central Processing Unit) frequency thereof
CN103426453A (en) * 2012-05-25 2013-12-04 华为技术有限公司 Dynamic voltage frequency scaling method and system
CN103455382A (en) * 2013-09-03 2013-12-18 北京安兔兔科技有限公司 Processor operation frequency control method and system
CN105975050A (en) * 2016-05-24 2016-09-28 青岛海信移动通信技术股份有限公司 Terminal power consumption control method and device
CN106210895A (en) * 2016-07-08 2016-12-07 乐视控股(北京)有限公司 Processor frequencies control method, device and terminal
WO2018059489A1 (en) * 2016-09-29 2018-04-05 华为技术有限公司 Method for power control and terminal device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103426453A (en) * 2012-05-25 2013-12-04 华为技术有限公司 Dynamic voltage frequency scaling method and system
CN103324270A (en) * 2013-06-25 2013-09-25 东莞宇龙通信科技有限公司 Mobile terminal and method for adjusting CPU (Central Processing Unit) frequency thereof
CN103455382A (en) * 2013-09-03 2013-12-18 北京安兔兔科技有限公司 Processor operation frequency control method and system
CN105975050A (en) * 2016-05-24 2016-09-28 青岛海信移动通信技术股份有限公司 Terminal power consumption control method and device
CN106210895A (en) * 2016-07-08 2016-12-07 乐视控股(北京)有限公司 Processor frequencies control method, device and terminal
WO2018059489A1 (en) * 2016-09-29 2018-04-05 华为技术有限公司 Method for power control and terminal device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117130458A (en) * 2023-02-27 2023-11-28 荣耀终端有限公司 Data processing method, electronic device and storage medium

Also Published As

Publication number Publication date
WO2020077508A1 (en) 2020-04-23
CN112639675B (en) 2023-10-20

Similar Documents

Publication Publication Date Title
CN110347269B (en) Empty mouse mode realization method and related equipment
CN114489533A (en) Screen projection method and device, electronic equipment and computer readable storage medium
CN112639675B (en) Method for dynamically modulating frequency of internal memory and electronic equipment
CN112334860A (en) Touch method of wearable device, wearable device and system
CN113448482A (en) Sliding response control method and device of touch screen and electronic equipment
WO2022257592A1 (en) Switch switching method and related device
CN114880251A (en) Access method and access device of storage unit and terminal equipment
CN111651254A (en) Method and device for executing application
CN111492678B (en) File transmission method and electronic equipment
CN113490291B (en) Data downloading method and device and terminal equipment
CN111819830B (en) Information recording and displaying method and terminal in communication process
CN114221402A (en) Charging method and device of terminal equipment and terminal equipment
CN112099741B (en) Display screen position identification method, electronic device and computer readable storage medium
CN115714890A (en) Power supply circuit and electronic device
CN115514844A (en) Volume adjusting method, electronic equipment and system
CN111061410B (en) Screen freezing processing method and terminal
CN109285563B (en) Voice data processing method and device in online translation process
CN113674258B (en) Image processing method and related equipment
CN113467747B (en) Volume adjusting method, electronic device and storage medium
CN113867520A (en) Device control method, electronic device, and computer-readable storage medium
CN114844542A (en) Antenna selection method and device, electronic equipment and readable storage medium
CN114116610A (en) Method, device, electronic equipment and medium for acquiring storage information
WO2023020420A1 (en) Volume display method, electronic device, and storage medium
WO2023207715A1 (en) Screen-on control method, electronic device, and computer-readable storage medium
CN116048772B (en) Method and device for adjusting frequency of central processing unit and terminal equipment

Legal Events

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