CN112639675B - 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
CN112639675B
CN112639675B CN201880097064.4A CN201880097064A CN112639675B CN 112639675 B CN112639675 B CN 112639675B CN 201880097064 A CN201880097064 A CN 201880097064A CN 112639675 B CN112639675 B CN 112639675B
Authority
CN
China
Prior art keywords
electronic device
load
internal memory
threshold
electronic equipment
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.)
Active
Application number
CN201880097064.4A
Other languages
Chinese (zh)
Other versions
CN112639675A (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

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

Abstract

A method for dynamically frequency-modulating an internal memory and an electronic device (100), which relate to the technical field of terminals and are applied to the electronic device (100), wherein the electronic device (100) comprises an internal memory (122), and the method comprises the following steps: the electronic device (100) acquires a first load (501), the electronic device (100) compares the magnitude relation (502) between the first load and a load threshold, then the electronic device (100) determines that the frequency corresponding to the magnitude relation between the first load and the load threshold is a target frequency (503) from the preset magnitude relation between the load and the load threshold and the frequency according to the magnitude relation, and finally the electronic device (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 numbers of commands the electronic device (100) periodically accesses the internal memory (122) during a first period of time. Thus, the method helps to reduce power consumption of the electronic device (100) while improving smoothness of operation of the electronic device (100).

Description

Method for dynamically modulating frequency of internal memory and electronic equipment
Technical Field
The present application 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 more and more functions of electronic devices (such as mobile phones and tablet computers), the requirements for data reading and writing of internal memories in the electronic devices are higher and higher, so that the smoothness of operation of the electronic devices in different application scenes is met.
The higher the working frequency of the internal memory is, the faster the data reading and writing speed is, and the smoother the electronic equipment operates. 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, the greater the power consumption of the electronic device, and the lower the operating frequency of the internal memory, the lower the power consumption of the electronic device. However, when the operating frequency of the internal memory is low, the smoothness of the operation of the electronic device may be affected. Therefore, it is of great practical importance to study the method of adjusting the operating frequency of the internal memory in the electronic device.
Disclosure of Invention
The application provides a method for dynamically modulating frequency of an internal memory and electronic equipment, which are beneficial to improving the operation smoothness of the electronic equipment and reducing the power consumption of the electronic equipment.
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 an internal memory, and the method includes:
the electronic equipment acquires a first load, compares the magnitude relation between the first load and a load threshold, then determines the frequency corresponding to the magnitude relation between the first load and the load threshold as a target frequency from the preset magnitude relation between the load and the load threshold and the frequency, and finally adjusts the working frequency of the internal memory according to the target frequency. Wherein the first load is a command number for accessing the internal memory; the load threshold is determined by the electronic device according to at least two second loads, and the at least two second loads are command numbers which are periodically acquired by the electronic device in a 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 at least two second loads, so that the electronic equipment 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 working frequency of the internal memory can be adjusted to better meet the performance requirement of the electronic equipment, thereby being beneficial to reducing the power consumption of the electronic equipment while improving the running smoothness of the electronic equipment.
In one possible design, the electronic device determines a first feature value according to at least two second loads, where the first feature value is used to indicate a current operation scene or performance requirement of the electronic device; and determining a threshold corresponding to the first characteristic value in the corresponding relation between the preset characteristic value and the threshold as a load threshold. Through the technical scheme, the implementation mode for determining the load threshold is simplified.
In one possible design, the electronic device determines the first characteristic value as 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 at least two loads. Through the technical scheme, the implementation mode for determining the first characteristic value is 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. The method is beneficial to enabling the load threshold determined by the electronic equipment to meet the performance requirement of the electronic equipment.
In one possible design, the load threshold includes an up-modulation threshold and a down-modulation threshold. Helping to reduce the likelihood of ping-pong effects occurring.
In one possible design, the duration of the period in which the electronic device acquires the second loads is determined by the electronic device from at least two second loads. The method is beneficial to enabling the sampling of the electronic device to meet the performance requirement or the operation scene.
In one possible design, the electronic device periodically obtains the first load. Thereby helping to simplify implementation.
In one possible design, the duration of the period in which the electronic device obtains the first load is the same as the duration of the period in which the electronic device obtains the second load. Which helps to reduce the power consumption of the electronic device.
In a second aspect, an electronic device provided by an embodiment of the present application includes: one or more processors, memory, and one or more computer programs; wherein one or more computer programs are stored in a memory comprising an internal memory, which when executed by an electronic device, implements the method of the first aspect of the embodiments of the application and any of the possible designs provided by the first aspect.
In a third aspect, an embodiment of the present application provides a chip, where the chip is coupled to a memory in an electronic device, so that the chip invokes, when running, a computer program stored in the memory, to implement the first aspect of the embodiment of the present application and any one of the possible designs of the method provided by the first aspect.
In a fourth aspect, an internal memory according to an embodiment of the present application stores a computer program that, when run on an electronic device, causes the electronic device to perform the method of the first aspect and any one of the possible designs of the first aspect.
In a fifth aspect, a computer program product of an embodiment of the application, when run on an electronic device, causes the electronic device to perform the method of the first aspect and any one of the possible designs of the first aspect.
In addition, the technical effects of any one of the possible design manners in the second aspect to the fifth aspect may be referred to as technical effects of different design manners in the first aspect, which are not described herein.
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 embodiment of a memory module according to the present application;
FIG. 4 is a schematic diagram of a memory module according to another embodiment of the present application;
FIG. 5 is a flow chart of a method for dynamically tuning an internal memory according to an embodiment of the application;
FIG. 6 is a schematic diagram of a first interval according to an embodiment of the application;
FIG. 7 is a diagram illustrating the command number sampling according to an embodiment of the present application;
FIG. 8 is a schematic diagram showing the load and the operating frequency of the internal memory according to the embodiment of the present application with time;
FIG. 9 is a schematic diagram showing the time-dependent change of the operating frequency and power consumption of the internal memory according to the embodiment of the present application;
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 in embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "and/or", describes an association relationship of the association object, indicating that three relationships may exist. For example, a and/or B may represent the following three relationships: a is present alone, while A and B are present together, and B is present alone. Wherein A, B can be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one (item) below" or the like, refers to any combination of these items, including any combination of single item(s) or plural items(s). 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, tablet computer, wearable device with wireless communication capabilities (e.g., smart watch), vehicle-mounted device, and the like. Exemplary embodiments of portable electronic devices include, but are not limited to, piggy-back Or other operating system. The portable electronic device may also be a portable electronic device such as a Laptop computer (Laptop) having a touch sensitive surface, e.g. a touch panel. It should also be appreciated that in other embodiments of the present application, electronic device 100 may also be a desktop computer having a touch-sensitive surface (e.g., a touch panel).
For example, fig. 1 shows a schematic hardware structure of an electronic device to which the 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 151, a subscriber identity module (subscriber identification module, SIM) card interface 152, a camera 153, keys 154, a sensor module 160, a universal serial bus (universal serial bus, USB) interface 170, a charge management module 180, a power management module 181, and a battery 182. In other embodiments, the electronic device 100 may also include a motor, an indicator, and the like.
Wherein the processor 110 may include one or more processing units. For example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural-Network Processor (NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
In some embodiments, a memory may also be provided in the 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 the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Thereby helping to avoid duplicate accesses, reducing the latency of the processor 110 and thus improving 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 appreciated that the memory controller 121 is configured to handle all access instructions to the internal memory 122 and external memory coupled to the external memory interface 123. In some embodiments, the memory controller 121 includes a first memory controller for accessing all access instructions to the internal memory 122 and a second memory controller for accessing all access instructions to external memory coupled to the external memory interface 123.
Internal memory 122 may be used to store computer-executable program code. The executable program code includes instructions. The electronic device 100 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 122. The internal memory 122 may include a stored program area and a stored data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, and the like. The storage data area may store data created during use of the electronic device (e.g., audio data, phonebook, etc.), and so on. 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 storage device, a flash memory device, a general-purpose flash memory (universal flash storage, UFS), a double-rate synchronous dynamic random access memory (double data rate synchronous dynamic random access memory, DDR SDRAM), a low power consumption double-rate synchronous dynamic random access memory (low power DDR SDRAM, LPDDR), X3D (3D Xpoint), etc., wherein the DDR SDRAM may also be simply referred to as DDR, LPDDR SDRAM and may also be simply referred to as LPDDR.
The external memory interface 123 may be used to connect an external memory card (e.g., a Micro SD card) to enable expansion of the memory capabilities of the electronic device 100. The external memory card communicates with the processor 110 via an external memory interface 123 to implement data storage functions. For example, files such as music, video, etc. are stored 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 may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into 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 for wireless communication including 2G/3G/4G/5G or the like applied to the electronic device 100. The mobile communication module 131 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 131 may receive the electromagnetic wave signal from the antenna 1, perform processes such as filtering and amplifying on the received electromagnetic wave signal, and transmit the electromagnetic wave signal to the modem processor for demodulation. The mobile communication module 131 can amplify the signal modulated by the modem processor, and convert the signal into an electromagnetic wave signal through the antenna 1 to radiate. In some embodiments, at least some 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 provided in the same device as at least some of the modules of the processor 110. For example, the mobile communication module 131 may transmit voice to other electronic devices, and may also receive voice transmitted by other electronic devices.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the 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 transmits the demodulated low frequency baseband signal to the 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 sound signals through an audio device (not limited to the speaker 140A, the receiver 140B, etc.), or displays images or videos through the display 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 module, independent of the processor 110.
The wireless communication module 132 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wi-Fi network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., applied on the electronic device 100. The wireless communication module 132 may be one or more devices that integrate at least one communication processing module. The wireless communication module 132 receives the electromagnetic wave signal via the antenna 2, modulates the electromagnetic wave signal, filters 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, frequency modulate and amplify the signal, and convert the signal into an electromagnetic wave signal through the antenna 2 to radiate.
In some embodiments, antenna 1 and mobile communication module 131 of electronic device 100 are coupled, and antenna 2 and wireless communication module 132 are coupled, such that electronic device 100 may communicate with a network and other devices through wireless communication techniques. The wireless communication techniques may include a global system for mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband 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 techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS), and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The electronic device 100 may implement audio functions through an audio module 140, a speaker 140A, a receiver 140B, a microphone 140C, an earphone interface 140D, an application processor, and the like. 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.
Speaker 140A, also known as a "horn," is used to convert audio electrical signals into sound signals. The electronic device 100 may listen to music, or to listen to hands-free calls, through the speaker 140A.
A receiver 140B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. When electronic device 100 is answering a telephone call or voice message, voice may be received by placing receiver 140B in close proximity to the human ear.
Microphone 140C, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can sound through his mouth near the microphone 140C, and the microphone 140C can be used to collect 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, and may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further be provided with three, four, or more microphones 140C to enable sound signal collection, noise reduction, to also identify the source of sound, to enable directional recording functions, etc.
The earphone interface 140D is used to connect a wired earphone. The earphone interface 140D may be a USB interface 130, or may be a 3.5mm open mobile electronic device platform (open mobile terminal platform, OMTP) standard interface, a american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface, or the like.
The electronic device 100 may implement display functions through a GPU, a display screen 151, an application processor, and the like. 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. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display 151 may be used to display images, video, etc. The display 151 may include a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (FLED), a Miniled, microLed, micro-oeled, a quantum dot light-emitting diode (quantum dot light emitting diodes, 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 device 100 may implement a photographing function through an ISP, a camera 153, a video codec, a GPU, a display 151, an application processor, and the like.
The ISP may be used to process data fed back by the camera 153. For example, when photographing, a shutter is opened, an optical signal is collected by the camera 153, and then the camera 153 converts the collected optical signal into an electrical signal, and the electrical signal is transmitted to an ISP for processing and is converted into an image visible to the naked eye. ISP can also perform algorithm optimization on noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature, etc. of the photographed scene. In some embodiments, the ISP may be provided in the 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 graphics sensor. The image sensor may be a charge coupled device (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 transfers the electrical signal to the ISP to be converted into a digital image signal. 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 the like 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, etc. The keys 154 may be mechanical keys. Or may be a touch key. The electronic device may receive key inputs, generating key signal inputs related to user settings and function controls of the electronic device 100.
The sensor module 160 may include one or more sensors. For example, a touch sensor 160A, a fingerprint sensor 160B, a gyro sensor 160C, a pressure sensor 160D, an 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 referred to as a "touch screen". The touch sensor 160A is used to detect a touch operation acting thereon or thereabout. The touch sensor 160A may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to a touch operation may be provided through the display screen 151. In other embodiments, the touch sensor 160A may also be disposed on the surface of the electronic device 100 at a different location than the display 151.
The fingerprint sensor 160 may be used to collect a fingerprint. The electronic device 100 may utilize the collected fingerprint characteristics to realize fingerprint unlocking, access an application lock, fingerprint photographing, fingerprint incoming call answering, and the like.
The gyro sensor 160C may be used to determine a motion gesture 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 gyro 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 the shake angle of the electronic device 100, calculates the distance to be compensated by the lens module according to the angle, and makes the lens counteract the shake of the electronic device 100 through the reverse motion, so as to realize anti-shake. The gyro sensor 160C may also be used for navigating, somatosensory game scenes.
The pressure sensor 160D is used for sensing a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 160D may be provided to the display screen 151. The pressure sensor 160D is of various kinds, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a capacitive pressure sensor comprising at least two parallel plates with conductive material. The capacitance between the electrodes changes when a force is applied to the pressure sensor 180A. 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 touch operation intensity according to the pressure sensor 180A. The electronic device 100 may also calculate the location of the touch based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations that act on the same touch location, but at different touch operation strengths, may correspond to different operation instructions. For example: and executing an instruction for checking the short message when the touch operation with the touch operation intensity smaller than the first pressure threshold acts on the short message application icon. And executing an instruction for newly creating the short message when the touch operation with the touch operation intensity being greater than or equal to the first pressure threshold acts on the short message application icon.
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 may be detected when the electronic device 100 is stationary. The method can also be used for identifying the gesture of the electronic equipment 100 and applied to applications such as horizontal and vertical screen switching, pedometers and the like.
In other embodiments, the processor 110 may also include one or more interfaces. For example, the interface may be a SIM card interface 152. As another example, the interface may also be a USB interface 170. For another example, the interface may be an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, or the like. It will be appreciated that the processor 110 of the present embodiment may interface with different modules of the electronic device 100, thereby enabling the electronic device 100 to perform different functions. Such as photographing, processing, etc. It should be noted that, the connection manner of the interface in the electronic device 100 is not limited in the embodiment of the present application.
Wherein the SIM card interface 152 may be used to connect a SIM card. The SIM card may be inserted into the SIM card interface 152 or removed from the SIM card interface 152 to enable contact and separation with the electronic device 100. 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 Nano SIM cards, micro SIM cards, and the like. The same SIM card interface 152 may be used to insert multiple cards simultaneously. 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 external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, i.e.: 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, USB interface 170 may include a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 170 may be used to connect a charger to charge the electronic device 100, and may also be used to transfer data between the electronic device 100 and a peripheral device. And can also be used for connecting with a headset, and playing audio through the headset. The USB interface 170 may also be used to connect other electronic devices, such as augmented reality (augmented reality, AR) devices, etc.
The charge management module 180 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 180 may receive a charging input of a wired charger through the USB interface 170. In some wireless charging embodiments, the charge management module 180 may receive 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 charge management module 180 and the processor 110. The power management module 181 receives input from the battery 182 and/or the charge management module 180 to power the processor 110, the internal memory 121, the external memory, the display 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 battery capacity, battery cycle times, battery health (leakage, impedance), etc. In other embodiments, the power management module 181 may also be provided in the processor 110. In other embodiments, the power management module 181 and the charging management module 180 may also be provided 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 present 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 an embodiment of the present application in detail using 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 reduce the number of times that the modules are used to access the internal memory by presetting a sufficiently large buffer space on the modules that are used to access the internal memory to implement the corresponding functions, such as the processor 110, the camera 153, the audio module 140, etc., so as to help shorten the adjustment interval of the working frequency of the internal memory in the electronic device 100 to be even within 5ms under the condition that the electronic device 100 is operating normally, thereby achieving rapid adjustment of the working frequency of the internal memory and further helping to achieve the purpose of saving power consumption.
It should be noted that, the working frequency of the internal memory in the embodiment of the present application refers to the frequency used when the internal memory is running. It should be understood that in the embodiment of the present application, the internal memory may support at least two frequencies, and the operating frequency of the internal memory is typically one of the frequencies supported by the internal memory. Take the example of LPDDR4X as the internal memory. The highest frequency supported by LPDDR is 2133MHz, the lowest frequency is 415MHz, and the frequency of 830MHz is also supported. Thus, the operating frequency of LPDDR4X may be one of 2133MHz, 415MHz or 830MHz in general.
In some embodiments, the embodiments of 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 tuning module 400 includes a statistics module 401, a feature value extraction module 402, and an analysis module 403. In some embodiments smart tuning module 400 may also include a performance detection module 404. In this 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 following describes the frequency modulation method according to the embodiment of the present application in detail with reference to the schematic structure of the intelligent frequency modulation module 400 shown in fig. 4.
An exemplary flow chart of a method for dynamically tuning an internal memory according to an embodiment of the present application is shown in fig. 5. Comprising the following steps.
In step 501, the electronic device 100 obtains a first load. Wherein the first load is a command number for accessing the internal memory. In a specific implementation, 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. The period of acquiring the first load in the embodiment of the application is a first interval. The first load obtained may be, for example, the total number of commands for accessing the internal memory in the first interval, the number of commands for accessing the internal memory at a time in the first interval, or an average value of commands for accessing the internal memory in the first interval, which is not limited thereto. Taking fig. 6 as an example, the electronic device 100 obtains the first load at time t1, and obtains the first load at time t 2. Wherein the interval between the time t1 and the time t2 is a first interval. Taking 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 the electronic device 100 at time t2, or may be the total number of commands for accessing the internal memory by the electronic device 100 in the first interval. Wherein the first interval is from time t1 to time t 2.
In some embodiments, the first interval may be preset in the electronic device 100, for example, 5ms, may be less than 5ms, for example, 3ms, 1ms, and may be greater than 5ms, for example, 10ms.
In other embodiments, the electronic device 100 presets different time intervals, so that the electronic device 100 may choose to select one time interval from the preset different time intervals as the first interval according to different application scenarios or performance requirements. For example, when the remaining power of the electronic device 100 is less than the first threshold, the first interval is determined to be a maximum value of at least one preset time interval. For example, the first threshold may be 20%, 10%, or the like. As another example, the electronic device 100 may determine that the first interval is a minimum value among at least one preset time interval when the remaining power is greater than or equal to the second threshold. For example, the second threshold may be 50% or 80%, or the like, and the second threshold and the first threshold may be the same or different. For example, the preset time intervals are 1ms, 5ms, 10ms, 16ms, and 20ms, and taking the case that the first threshold and the second threshold are 10% each, the electronic device 100 determines that the first time interval is 20ms from 1ms, 5ms, 10ms, 16ms, and 20ms when the remaining power is less than 10%, and the electronic device 100 determines that the first time interval is 1ms from 1ms, 5ms, 10ms, 16ms, and 20ms when the remaining power is greater than or equal to 10%.
In other embodiments, the electronic device 100 may also obtain the first load in response to a triggering event, such as a performance requirement of the electronic device 100 or some particular operating scenario, etc. The embodiment of the application does not limit the acquisition mode of the first load.
At step 502, the electronic device 100 compares the magnitude relation of the first load and the load threshold. In particular implementations, the memory controller 121 in the electronic device 100 compares the magnitude relationship of the first load to 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 magnitude relationship between the number of commands for accessing the internal memory and the load threshold after each acquisition of the number of commands for accessing the internal memory.
In this embodiment of the present application, the load threshold may be a value, or may be set to a value of the number of commands for accessing the internal memory in a unit duration (for example, 1 s). For example, when the unit time length is ms, the first interval may also be used. By way of example, the load threshold may be 32000/ms. In this case, if the first interval is 1ms, if the number of commands for accessing the internal memory is 30000 in 1ms, the first load is 30000, the magnitude relation 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 is 40000 in 2ms, 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 load threshold may be 32000/s when the first load is the cumulative 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 load is the number of commands for accessing the internal memory at a certain time in the acquired first interval. As another example, the embodiment of the present application may also set different load thresholds for different operation scenarios or performance requirements of the electronic device 100. For example, for a game scene with high frame rate and high speed variation, the performance requirement is higher, and the preset load threshold is smaller; for application scenes 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 requirement and then determine a load threshold corresponding to the current performance requirement. By way of example, the electronic device 100 may determine the current performance requirements from the currently running application, or may determine the current performance requirements based on other means, without limitation.
In some embodiments, the electronic device 100 may also determine the load threshold by periodically retrieving a second load, the second load being the number of commands for accessing the internal memory. The second load may be the total number of commands for accessing the internal memory in the second interval, or the number of commands for accessing the internal memory at a time in the second interval. The relevant description may be referred to as 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.
The period of acquiring the second load is a second interval. The second interval may be different from the first interval or the same. The second interval in the embodiment of the present application may be 1ms, 3ms, 5ms, 10ms, 16ms, 20ms, etc. 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; or 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 (may be the second load) acquired at intervals of the first interval (or the second interval), and may determine the target frequency based on the first load (may be the second load) acquired at intervals of the first interval (or the second interval), thereby helping to reduce the sampling frequency of the electronic device and further helping to reduce the power consumption of the electronic device. By way of example, the second interval is preset in the electronic device 100, for example 1ms, 5ms, 3ms, 10ms, etc. As another example, the electronic device 100 presets different time intervals, so that the electronic device 100 may choose to 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 of high frame rate and high speed change (e.g., a scene of a game run by the electronic device 100), the second interval may be set to a smaller duration of 1ms, 2ms, or the like. For a scenario where the read-write requirements of the internal memory are low (e.g. a scenario where the electronic device 100 is running a clock, calendar, phone), 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 save power consumption while meeting performance requirements.
In still other embodiments, the electronic device 100 may also determine the second interval based on the second load. When the electronic device 100 may just start to acquire the second load, because the number of acquired second loads is smaller, the performance requirement of the electronic device 100 cannot be identified, and a default second interval may be adopted. For example, the default second interval may be determined by referring to a description of the preset second interval. After the number of the second loads acquired by the electronic device 100 is sufficiently large, the electronic device 100 may determine the second interval according to the acquired plurality of second loads. In some embodiments, the electronic device 100 determines the load threshold based on a plurality of second loads acquired during the first time period. The first duration may be preset, or may be determined based on a preset policy. For example, the electronic device 100 may determine the second interval at intervals of the first time period according to the plurality of second loads acquired in the first time period. As yet another example, the electronic device 100 may also determine the second interval from a plurality of second loads acquired during the first duration in response to a trigger event (e.g., performance requirement, etc.). For example, the first duration may be 10 minutes, 20 minutes, etc. The first time period may be variable or may be fixed. For example, as shown in fig. 7, the electronic device 100 acquires the second loads at intervals of 1 in the first period of time 1, and if the second intervals determined by the electronic device 100 according to the 5 second loads acquired in the first period of time 1 are 2 intervals, the electronic device 100 acquires the second loads at intervals of 2 intervals from the time t 4. When the electronic apparatus 100 determines the second interval once every first time length, as shown in fig. 7, the electronic apparatus 100 determines the second interval according to the acquired 4 second loads within the first time length 2. If the electronic device 100 determines that the second interval is the second interval 3 according to the 4 second loads acquired in the first time period 2, when the second interval 3 is equal to the second interval 2, the electronic device 100 continues to acquire the second load with the second interval 2 from the time point 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 with the second interval 3 from the time point t 8. For another example, when the electronic device 100 determines the second interval according to the plurality of second loads acquired in the first period of time in response to the trigger event, as shown in fig. 7, if the electronic device 100 responds to the trigger event at the time T, the electronic device 100 determines the second interval to be the second interval 2 according to the 4 second loads acquired in the first period of time 2.
For example, the manner in which the electronic device 100 determines the second interval according to the plurality of second loads acquired in the first duration may be as follows:
the electronic device 100 extracts the first characteristic value according to the plurality of second loads acquired in the first duration. And then determining the interval corresponding to the first characteristic value as a second interval from the corresponding relation between the preset 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, from a preset correspondence between feature values and thresholds, that a threshold value corresponding to the first feature value is a load threshold. It should be noted that, the electronic device 100 may further determine the load threshold according to the second feature value from the preset correspondence between the feature value and the threshold. 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 obtained periodically by the electronic device 100, or may be obtained by event triggering of the electronic device 100, which is not limited. When the third load is periodically acquired by the electronic device 100, a period of time of the electronic device 100 for acquiring the third load may be different from the first interval and the second interval, wherein the determining manner of the period of time of the third load may be referred to the determining manner of the second interval. The relevant interpretation of the third load may be referred to as the relevant interpretation of the first load. In the following, 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 determining the second interval, the electronic device 100 determines whether the determined second interval and/or the load threshold meets the performance requirements of the current operating scenario of the electronic device 100. For example, the performance requirements may be frame rate, latency, etc. If not, the electronic device 100 adjusts the second interval according to the preset first policy and/or adjusts the load threshold according to the 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 continues to determine whether the reduced second interval and/or load threshold meets the performance requirements of the current operating scenario of the electronic device 100. Until the performance requirements are met. When the second interval and/or the load threshold is adjusted to the limit value and cannot be adjusted continuously, the electronic device 100 may select the second interval and/or the load threshold with optimal performance and power consumption from the adjustment process. Such that the electronic device 100 may update the settings of the second interval based on the newly determined second interval and/or the settings of the load threshold based on 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 in 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, that the interval corresponding to the first feature value is the second interval from the 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, from a preset correspondence between feature values and thresholds, that a threshold value corresponding to the first feature value is a load 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 a 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 meets the latency requirement at a frame rate of 60fps, and if not, the performance detection module 404 sends an adjustment policy to the analysis module 403. For example, the adjustment policy may include a first adjustment policy that may be to reduce the second interval and/or a second adjustment policy that may be to reduce the load threshold. The ratio of decreasing the second interval and/or the ratio of decreasing the load threshold may be sent by the performance detection module 404 to the analysis module 403, or the analysis module 403 may decrease the second interval according to a preset first ratio and/or send the decreased second interval and/or the decreased load threshold to the performance detection module 404 after decreasing the load threshold according to a preset second ratio. The performance detection module 404 continues to determine whether the reduced second interval and/or the reduced load threshold meet the current performance requirements of the electronic device 100. Until the analysis module 403 receives the notification that the performance detection module 404 has been sent to meet the performance detection, the analysis module 403 sends a second interval and/or a load threshold that meets the performance detection to the storage controller 121. And updating, by the memory controller 121, the settings of the load threshold based on the determined load threshold, and/or the memory controller 121 sends the second interval to the statistics module 401, so that the statistics module 401 updates the settings of the second interval based on the determined second interval. It should be noted that, when the second interval and/or the load threshold cannot be continuously adjusted, the analysis module 403 may select the second interval and/or the load threshold when the performance and the power consumption reach the best in the adjustment process, and send the selected second interval and/or the load threshold to the storage controller 121.
In addition, it should be noted that, when the electronic device 100 uses the load threshold determined based on the obtained at least two second loads, if a frame dropping event occurs during operation of the electronic device 100, and the load threshold determined by the electronic device 100 based on the obtained at least two second loads cannot be continuously adjusted, the load threshold may be directly adjusted to the second load threshold, so that the electronic device 100 may quickly adjust the working frequency of the internal memory to the highest frequency, thereby ensuring the performance of the system. The second-level load threshold may also include an up-threshold and a down-threshold, where when the first load is greater than the up-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 down-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 the frequencies supported by the internal memory that is less than the highest frequency. In addition, the second-level load threshold may not distinguish between the upper frequency modulation threshold and the lower frequency modulation threshold, and when the electronic device 100 sets the load threshold to the second-level 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 corresponding relation between the preset 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. By way of example, the duration of a frame may be 16.67ms. For example, 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 characteristic value is less than the duration of one frame, for example, 1ms, 5ms, etc. For another example, when the feature value indicates that the performance requirement of the electronic device does not substantially change during a duration of one frame, for example, the performance requirement is continuously high, or the performance requirement is continuously medium, or the performance requirement is continuously low, the duration of the sampling interval corresponding to the feature value may be the duration of one frame, or may be greater, for example, 20ms, or the like. Take 5 second loads collected in 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 time length 1, and in a high performance requirement between the time t1 and the time t3, so that the magnitude of the second load is greatly different in the first time length 1, and in this case, the first characteristic value extracted by the electronic device 100 is used to indicate that the performance requirement of the electronic device 100 in the first time length 1 changes. Thus, the second interval corresponding to the first feature value determined by the electronic device 100 is smaller than the first duration 1, e.g. the first duration 1 is a duration of one frame, and the second interval may be, e.g., 1ms, 5ms, etc. Thereby helping to shorten the interval of adjusting the operating frequency of the internal memory.
The first characteristic value may be, for example, a maximum value or a minimum value of two or more command numbers for accessing the internal memory, an average value of two or more command numbers 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 a plurality of command numbers for accessing the internal memory in the first period, and then determine a feature value corresponding to the performance requirement of the electronic device 100 according to a correspondence between the performance requirement and the feature 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 command number versus time for accessing the internal memory based on the plurality of second loads over the first period of time. The electronic device 100 may determine the performance requirements of the electronic device 100 based on a number of commands to access the internal memory versus time. In addition, it should be noted that, in the embodiment of the present application, the algorithm for extracting the first feature value is not specifically limited.
For example, in the corresponding relation between the preset 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 is changed from low performance requirement to high performance requirement, or the performance requirement is changed from high performance requirement to low performance requirement, etc., the threshold corresponding to the feature value is smaller, etc. As another example, the threshold corresponding to the feature value may be a minimum value when the feature value indicates that the performance requirements of the electronic device do not substantially change, e.g., continue to high performance requirements, for a duration of one frame. For another example, the characteristic value indicates that the performance requirement of the electronic device continues to be low for a duration of one frame, then the threshold corresponding to the characteristic value may be a maximum value, or the like.
It should be noted that, in the embodiment of the present application, the load threshold may include an up-frequency modulation threshold and a down-frequency modulation threshold, so as to help reduce the possibility of 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.
For example, the correspondence between the magnitude relation 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
In some embodiments, the electronic device 100 may first search a corresponding relationship table corresponding to a 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 corresponds to 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 the frequency of 830MHz is also supported. Taking an example of an up-frequency modulation threshold and a down-frequency modulation threshold included in the load threshold, if the electronic device 100 is preconfigured with two groups 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 magnitude relation of the load and the load threshold 1 and the frequency is shown in table 2, and the table of the correspondence between the magnitude relation of the load and the load threshold 2 and the frequency is shown in table 3.
TABLE 2
Magnitude relation between load and load threshold 1 Frequency of
Load of more than 32000 830MHz
Load less than 29000 415MHz
TABLE 3 Table 3
Magnitude relation between load and load threshold 2 Frequency of
The load is more than 20000 2133MHz
Load less than 19000 415MHz
Then in the above scenario, when the first load is 40000 and the load threshold is load threshold 1, the target frequency determined by the electronic device 100 is 830MHz. When the first load is 10000 and the load threshold is 1, the target frequency determined by the electronic device 100 is 415MHz. When the first load is 30000 and the load threshold is load threshold 1, if the working frequency of the internal memory currently set by the electronic device 100 is 830MHz, the determined target frequency is 830MHz. When the first load is 30000 and the load threshold is load threshold 1, if the working frequency of the internal memory currently set by the electronic device 100 is 415MHz, the determined target frequency is 415MHz. However, when the first load is 30000 and the load threshold is 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 830MHz.
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, for example.
When the working frequency of the internal memory currently set by the electronic device 100 is different from the target frequency, the electronic device 100 adjusts the working 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 internal 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. As another example, if the operating frequency of the internal memory currently set by the electronic device 100 is 2133MHz, if the determined target frequency is 415MHz, the operating frequency of the internal memory is adjusted to 415MHz by the electronic device 100.
Because the setting modes of the first interval and the second interval in the embodiment of the application can be set based on the performance requirements of the electronic equipment, for example, when the number of the commands for accessing the internal memory is higher, the second interval can be smaller, so that the determined load threshold is more in line with the performance requirements of the running scene of the current electronic equipment, and the electronic equipment can be helped to adjust the working frequency of the internal memory in time. As shown in fig. 8, the load threshold of the electronic device 100 includes an up-tuning threshold 1 and a down-tuning threshold 1, where the up-tuning threshold 1 and the down-tuning threshold 1 are determined based on the second load, and can satisfy the electronic device 100 current performance requirements. Therefore, when the method for adjusting the working frequency of the internal memory is adopted, 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 electronic device 100 can acquire the first load at the time t1 and the time t2, and the frequency up threshold is greater than the frequency up threshold 1 when the first load acquired at the time t1 is acquired, and the electronic device 100 adjusts the operating frequency of the internal memory to be high frequency Fre at the time t1 high And the electronic device 100 is smaller than the frequency-down threshold when the first load obtained at time t2, the operating frequency of the internal memory is adjusted to be high frequency Fre at time t2 low . The internal memory of the electronic device 100 thus operates at a high frequency Fre between time t1 and time t2 high And the internal memory works at a low frequency after the time t2, so that the intra-frame frequency modulation is realized, so that the internal memory works at a high frequency when the number of commands for accessing the internal memory by the electronic equipment 100 is large, and the internal memory works at a low frequency when the number of commands for accessing the internal memory by the electronic equipment 100 is small, thereby being beneficial to ensuring the normal operation of the electronic equipment 100 and reducing the power consumption of the equipment.
Some game application at a frame rate of 60fps runs on a cell phone model number of Mate10 and the internal memory is DDR, with DDR supporting frequencies of 415MHz, 830MHz, 1244MHz and 1866 MHz.
When the DDR operating frequency is adjusted based on the bandwidth size of the memory accessed by the memory controller, wherein the bandwidth size statistics period is 16ms when in up-frequency modulation and 20ms when in down-frequency modulation; the frequency modulation interval is 16ms, when the bandwidth size is greater than 7.3GB/s, the DDR operating frequency is adjusted to 1244MHz, however, for the scene of 60fps frame rate, 7GB/s bandwidth is operated at 830MHz, the game frame rate can drop below 50, and the game experience is seriously affected, so that the mobile phone can ensure the performance by forcedly increasing the DDR operating frequency, and through test, 85% of the DDR operates at 1244MHz and 15% of the DDR operates at 830MHz in the process of running the game with 60fps frame rate. The total power consumption of the cell phone was 500mw, with the cell phone power consumption at 1244MHz for internal DDR being 436mw and at 830MHz for DDR being 64mw.
However, when the frequency modulation method of the embodiment of the present application is adopted, wherein 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 the DDR55% 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 415MHz under the condition that the frame rate is sufficient. The total power consumption of the electronic device is reduced to 438.4mw, wherein the power consumption is 282mw when the DDR operating frequency is 1244MHz, 64mw when the DDR operating frequency is 830MHz, and 92.4mw when the DDR operating frequency is 415 MHz.
For example, as shown in a of fig. 9, a schematic diagram of the time-dependent change of the operating frequency of the internal memory in the scenario where the electronic device runs a certain game application with a frame rate of 60 fps. As can be seen from the graph shown in fig. 9, the duration of the adjustment interval of the operating frequency of the internal memory is changed, and the change of the operating frequency of the internal memory with time is also changed accordingly. B in fig. 9 is a schematic diagram showing power consumption over time in a scenario in which an electronic device runs a game application with a frame rate of 60 fps. As can be seen from B in fig. 9 and a in fig. 9, the larger the operating frequency of the internal memory, the larger the power consumption of the electronic device, and thus the trend of the power consumption of the electronic device over time is the same as the trend of the operating frequency of the internal memory over time.
It should be understood that the various embodiments of the application may be used alone or in combination with one another.
In the embodiments of the present application described above, the method provided in the embodiments of the present application is described in terms of the electronic device as the execution subject. In order to implement the functions in the method provided by the embodiment of the present application, the electronic device may include a hardware structure and/or a software module, where the functions are implemented in the form of a hardware structure, a software module, or a hardware structure plus a software module. Some of the functions described above are performed in a hardware configuration, a software module, or a combination of hardware and software modules, depending on the specific application of the solution and design constraints.
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, implement a method for dynamically frequency modulating an internal memory as shown in fig. 5 according to an embodiment of the present application.
The processors referred to in the various embodiments described above may be general purpose processors, digital signal processors (digital signal processor, DSP), application specific integrated circuits (application specific integrated circuit, ASIC), off-the-shelf programmable gate arrays (field programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The disclosed methods, steps, and logic blocks 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 embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a memory medium well known in the art such as random access memory (random access memory, RAM), flash memory, read-only memory (ROM), programmable read-only memory, or electrically erasable programmable memory, registers, and the like. The storage medium is located in a memory, and the processor reads instructions from the memory and, in combination with its hardware, performs the steps of the method described above.
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 solution. The skilled person may use different methods for each specific application to achieve the described functionality.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown 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 may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in 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 this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk, etc.
The foregoing is merely illustrative of the present application, and the scope of the present application is not limited thereto, and any conceivable changes or substitutions within the technical scope of the present application should be covered by the scope of the present application, which is defined by the claims.

Claims (21)

1. A method for dynamically tuning an internal memory, applied to an electronic device, the electronic device including an internal memory, the method comprising:
the electronic equipment acquires a first load, wherein the first load is the command number for accessing the internal memory;
the electronic equipment compares the magnitude relation between the first load and a load threshold; the load threshold is determined by the electronic equipment according to at least two second loads, and the at least two second loads are command numbers which are periodically acquired by the electronic equipment in a first time period and used for accessing the internal memory;
the electronic equipment determines the frequency corresponding to the magnitude relation between the first load and the load threshold as a target frequency from the magnitude relation between the preset load and the load threshold and the frequency corresponding to the magnitude relation;
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 corresponding relation between the preset characteristic value and the threshold is the load threshold.
3. The method of claim 2, wherein the electronic device determining a first characteristic value from the at least two second loads comprises:
the electronic equipment determines the first characteristic value as the minimum value or the maximum value of the at least two loads; or alternatively, the process may be performed,
the electronic device determines the first characteristic value as an average value 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, the load threshold is adjusted according to a preset first strategy.
5. A method as claimed in any one of claims 1 to 3, wherein the load threshold comprises an up-modulation threshold and a down-modulation threshold.
6. The method of claim 4, wherein the loading threshold comprises an up-modulation threshold and a down-modulation threshold.
7. A method according to any one of claims 1 to 3, wherein the duration of the period in which the electronic device obtains the second loads is determined by the electronic device in dependence on the at least two of the second loads.
8. The method of claim 4, wherein the duration of the period in which the electronic device obtains the second load is determined by the electronic device based on the at least two of the second loads.
9. The method of claim 5, wherein the duration of the period in which the electronic device obtains the second load is determined by the electronic device based on the at least two of the second loads.
10. The method of claim 6, wherein the duration of the period in which the electronic device obtains the second load is determined by the electronic device based on the at least two of the second loads.
11. A method according to any one of claims 1 to 3, wherein the electronic device acquiring the first load comprises:
The electronic equipment periodically acquires the first load.
12. The method of claim 4, wherein the electronic device acquiring the first load comprises:
the electronic equipment periodically acquires the first load.
13. The method of claim 5, wherein the electronic device acquiring the first load comprises:
the electronic equipment periodically acquires the first load.
14. The method of claim 6, wherein the electronic device acquiring the first load comprises:
the electronic equipment periodically acquires the first load.
15. The method of claim 7, wherein the electronic device acquiring the first load comprises:
the electronic equipment periodically acquires the first load.
16. The method of claim 8, wherein the electronic device acquiring the first load comprises:
the electronic equipment periodically acquires the first load.
17. The method of claim 9, wherein the electronic device acquiring the first load comprises:
the electronic equipment periodically acquires the first load.
18. The method of claim 10, wherein the electronic device acquiring the first load comprises:
The electronic equipment periodically acquires the first load.
19. The method of claim 11, wherein a duration of a period in which the electronic device obtains the first load is the same as a duration of a period in which the electronic device obtains the second load.
20. An electronic device, comprising: one or more processors and memory;
the memory stores one or more computer programs that, when executed, cause the electronic device to implement the method of any of claims 1-19.
21. An internal memory, characterized in that the internal memory comprises one or more computer programs, which when executed on an electronic device, cause the electronic device to perform the method of any of claims 1-19.
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 CN112639675A (en) 2021-04-09
CN112639675B true 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)

Families Citing this family (3)

* 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
CN117130458A (en) * 2023-02-27 2023-11-28 荣耀终端有限公司 Data processing method, electronic device and storage medium

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

Also Published As

Publication number Publication date
CN112639675A (en) 2021-04-09
WO2020077508A1 (en) 2020-04-23

Similar Documents

Publication Publication Date Title
CN111757477B (en) Method for reporting capability and user equipment
CN113905179A (en) Method for switching camera by terminal and terminal
CN112639675B (en) Method for dynamically modulating frequency of internal memory and electronic equipment
CN114490174B (en) File system detection method, electronic device and computer readable storage medium
CN114880251B (en) Memory cell access method, memory cell access device and terminal equipment
CN113485173B (en) Switch switching method and related device
CN113490291B (en) Data downloading method and device and terminal equipment
CN113472861A (en) File transmission method and electronic equipment
CN113126948B (en) Audio playing method and related equipment
CN112099741A (en) Display screen position identification method, electronic device and computer readable storage medium
CN114466238B (en) Frame demultiplexing method, electronic device and storage medium
CN114554012B (en) Incoming call answering method, electronic equipment and storage medium
CN113674258A (en) Image processing method and related equipment
CN116048769B (en) Memory recycling method and device and terminal equipment
CN116048772B (en) Method and device for adjusting frequency of central processing unit and terminal equipment
CN116055870B (en) Photographing method and electronic equipment
CN114125144B (en) Method, terminal and storage medium for preventing false touch
WO2023020420A1 (en) Volume display method, electronic device, and storage medium
CN116744392B (en) Dual-card communication method and device and terminal equipment
CN116389884B (en) Thumbnail display method and terminal equipment
CN116345147B (en) Antenna tuning method and terminal equipment
WO2023207715A1 (en) Screen-on control method, electronic device, and computer-readable storage medium
CN117729420A (en) Continuous shooting method and electronic equipment
CN113992767A (en) Protocol loading method, electronic device and storage medium
CN117707988A (en) Method and device for recycling memory

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