Processor frequency adjusting method and electronic equipment
By adjusting the processor frequency according to the screen status and frequency modulation events, the performance requirements and heating problems of electronic devices in different scenarios are solved, efficient frequency regulation is achieved, and the user experience is improved.
Patent Information
- Application Number
- CN202410473047.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-18
- Publication Date
- 2025-10-24
AI Technical Summary
In different operating scenarios, electronic devices have different processor frequency and heat generation requirements. Existing technologies make it difficult to achieve dynamic adjustments to meet these requirements and reduce heat generation.
By using the screen status as the basis for adjusting the processor frequency, a lower frequency is used in the folded state to reduce heat and power consumption, and a higher frequency is used in the unfolded state to ensure performance, and flexible adjustments are made by combining frequency modulation events and screen status.
Dynamic adjustment of processor frequency is achieved in different operating scenarios to avoid lag, reduce heat generation and power consumption, and improve user experience.
Smart Images

Figure CN120832004A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of terminals, and in particular, to a processor frequency adjustment method and an electronic device. BACKGROUND
[0002] Processor frequency is the number of instructions executed by a processor per second, usually expressed in units of hertz (Hz). Processor frequency directly affects the performance of an electronic device. The higher the processor frequency, the faster the execution speed of instructions, and the better the performance of the electronic device. In addition, there is a close relationship between processor frequency and device heat generation. As the processor frequency increases, the device heat generation also increases.
[0003] Currently, when the electronic device is in different running scenarios, its demand for processor frequency and its requirement for device heat generation may be different. Therefore, how to dynamically adjust the processor frequency based on the running scenario so that the processor frequency can meet the demand of the electronic device in the current scenario and at the same time reduce the device heat generation as much as possible is a problem that needs to be solved at present. SUMMARY
[0004] Embodiments of the present application provide a processor frequency adjustment method, so that the electronic device uses the screen state as the basis for adjusting the processor frequency, uses a lower processor frequency when in a folded state, reduces heat generation, and reduces power consumption. When in an unfolded state, a higher processor frequency is used to ensure performance, prevent lag, and improve the overall experience of users.
[0005] In a first aspect, embodiments of the present application provide a processor frequency adjustment method, which is applied to an electronic device including a display screen, and the method includes: obtaining a screen state of the display screen, the screen state including a folded state and an unfolded state; and determining a processor frequency according to the screen state.
[0006] Because the demand for processor performance and the heat dissipation capacity of the electronic device are different in different screen states, by implementing the method, the electronic device can use the screen state as the basis for adjusting the processor frequency, use a lower processor frequency when in a folded state, reduce heat generation, and reduce power consumption. When in an unfolded state, a higher processor frequency is used to ensure performance, prevent lag, and improve the overall experience of users.
[0007] In combination with the first aspect, in some embodiments, the processor frequency corresponding to the folded state is less than the processor frequency corresponding to the unfolded state.
[0008] In combination with the first aspect, in some embodiments, the method further includes: in response to detecting a frequency adjustment event, determining the processor frequency according to the frequency adjustment event and the screen state of the display screen.
[0009] Therefore, the electronic device can flexibly adjust the processor frequency according to the frequency adjustment event and the screen state at the same time. The processor frequency can meet the needs of the electronic device in different running scenarios, avoid lag, and as far as possible reduce the heat and power consumption, and improve the overall experience of the user.
[0010] In combination with the first aspect, in some embodiments, the method further includes: in response to booting or restarting, the electronic device acquires a configuration file, the configuration file being used to indicate the correspondence between the screen state and the processor frequency.
[0011] In combination with the first aspect, in some embodiments, the frequency adjustment event includes at least one of the following: unlocking the device, starting the power saving mode, enabling the device split screen, running the application in the foreground, receiving the user operation, opening the camera, incoming / outgoing call, sending the Beidou message, and starting the applet.
[0012] In combination with the first aspect, in some embodiments, the processor frequency is determined according to the frequency adjustment event and the screen state of the display screen, specifically including: if the frequency adjustment event is a first frequency adjustment event and the screen state of the display screen is a folded state, the processor frequency is a fourth frequency. If the frequency adjustment event is the first frequency adjustment event and the screen state of the display screen is an unfolded state, the processor frequency is a fifth frequency. The fourth frequency and the fifth frequency are different.
[0013] The second aspect, the embodiment of the application provides a processor frequency adjustment method, the method is applied to an electronic device, the electronic device includes a processor module, a frequency adjustment event monitoring module, a display module and a frequency adjustment module, and the method includes: the display module sends a screen state to the frequency adjustment module, the screen state including a folded state and an unfolded state. The frequency adjustment module determines a first frequency according to the screen state. The frequency adjustment module sends a first instruction to the processor module, the first instruction being used to instruct to adjust the processor frequency to the first frequency.
[0014] In combination with the second aspect, in some embodiments, the first frequency corresponding to the folded state is less than the first frequency corresponding to the unfolded state.
[0015] In combination with the second aspect, in some embodiments, the method further includes: in response to restarting, the frequency adjustment module queries the screen state from the display module. The frequency adjustment module determines a second frequency according to the screen state. The frequency adjustment module sends a second instruction to the processor module, the second instruction being used to instruct to adjust the processor frequency to the second frequency.
[0016] In response to detecting the power-on booting and / or in response to detecting the abnormal situation, the frequency adjustment module can be restarted. Since the parameter indicating the screen state in the frequency adjustment module can be initialized when the frequency adjustment module is restarted, the screen state indicated by the parameter is inconsistent with the current screen state. Therefore, by this strategy, the frequency adjustment module can ensure the accuracy of the parameter indicating the screen state stored therein, and further ensure the accuracy of the processor frequency determined subsequently according to the parameter.
[0017] With reference to the second aspect, in some embodiments, the method further includes: the frequency adjustment event monitoring module sending a notification message to the frequency adjustment module, the notification message being used to notify the occurrence of the frequency adjustment event. The frequency adjustment module queries the display module for the screen state. The frequency adjustment module determines the third frequency according to the screen state. The frequency adjustment module sends a third instruction to the processor module, the instruction being used to instruct to adjust the processor frequency to the third frequency.
[0018] In the third aspect, an embodiment of the present application provides an electronic device, which includes a memory, a processor and a sensor, the memory is used to store a computer program, the processor is used to invoke the computer program, so that the electronic device executes the method as described in the first aspect or the second aspect.
[0019] In the fourth aspect, an embodiment of the present application provides a computer program product containing instructions, which, when executed on an electronic device, causes the electronic device to execute the method as described in the first aspect or the second aspect.
[0020] In the fifth aspect, an embodiment of the present application provides a computer readable storage medium, which includes instructions, when the instructions are executed on an electronic device, causes the electronic device to execute the method as described in the first aspect or the second aspect. BRIEF DESCRIPTION OF DRAWINGS
[0021] Figure 1 A structural schematic diagram of an electronic device 100 provided by an embodiment of the present application;
[0022] Figure 2 A software structure block diagram of an electronic device 100 provided by an embodiment of the present application;
[0023] Figure 3 A flowchart of a processor frequency adjustment method provided by an embodiment of the present application;
[0024] Figure 4 A flowchart of another processor frequency adjustment method provided by an embodiment of the present application;
[0025] Figure 5 Another structural schematic diagram of an electronic device 100 provided by an embodiment of the present application;
[0026] Figure 6Another flowchart of a processor frequency adjustment method provided by an embodiment of the present application is shown in FIG. 2. DETAILED DESCRIPTION
[0027] The technical solutions in the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all the other embodiments obtained by a person of ordinary skill in the art belong to the scope of protection of the present application.
[0028] During operation, the electronic device can adjust the processor frequency in response to a detected frequency adjustment event. The frequency adjustment event is an event that can affect the requirement of the electronic device on the processor performance, including an event triggering the electronic device to reduce the requirement on the processor performance, and an event triggering the electronic device to increase the requirement on the processor performance. The frequency adjustment event can include: unlocking the device, starting the power saving mode, enabling the device split screen, running the application in the foreground, receiving the user operation (such as touch operation, double-click operation, sliding operation, etc.), opening the camera, incoming / outgoing call, sending Beidou message, starting the applet, etc. For example, the electronic device starting the application can trigger the electronic device to increase the requirement on the processor performance. The electronic device starting the power saving mode can trigger the electronic device to reduce the requirement on the processor performance. In some implementations, the electronic device can store a corresponding relationship between one or more sets of frequency adjustment events and frequency adjustment frequencies. The frequency adjustment frequency is a processor frequency that can simultaneously meet the performance requirement and the heat requirement of the electronic device when the frequency adjustment event occurs. When no frequency adjustment event is detected, the processor in the electronic device can run at the base frequency. In response to detecting the frequency adjustment event, the electronic device can adjust the processor frequency from the base frequency to the frequency adjustment frequency corresponding to the frequency adjustment event. Thus, the dynamic adjustment of the processor frequency of the electronic device can be achieved.
[0029] A foldable screen device is a device that can be folded to form at least two screens. In some implementations, the foldable screen device can be folded along a folding edge or folding axis to form a first screen and a second screen. In other implementations, the foldable screen device can also be folded along a folding edge or folding axis to form a first screen, a second screen and a third screen. In practical applications, foldable screen devices can be classified into two categories: one category is an electronic device whose foldable screen is folded outward, and the other category is an electronic device whose foldable screen is folded inward. Taking an electronic device that forms a first screen and a second screen after being folded as an example, the electronic device whose foldable screen is folded outward has the first screen and the second screen facing away from each other after being folded. The electronic device whose foldable screen is folded inward has the first screen and the second screen facing each other after being folded. The screen state of the foldable screen device includes a folded state and an unfolded state. In the folded state, the screen remains bent. In this state, the device can be more portable and more suitable for single-handed operation. In the unfolded state, the screen remains unfolded. In this state, the device can provide a larger display and operation area for the user. The display area of the foldable screen device in the folded state is smaller than the display area of the foldable screen device in the unfolded state. Taking an electronic device that forms a first screen and a second screen after being folded as an example, the interface can be displayed on the first screen or the second screen when the electronic device is in the folded state. When the electronic device is in the unfolded state, the interface can be displayed on the first screen and the second screen simultaneously. Since the display area and the upper limit of the number of foreground running applications of the foldable screen device in the unfolded state are larger than those in the folded state, the requirement for the processor performance is also higher. In addition, based on the characteristics of the folding structure, the surface area of the foldable screen device in the unfolded state is larger than that in the folded state, and therefore, the heat dissipation capacity of the foldable screen device in the unfolded state is stronger.
[0030] For the foldable screen device, if the processor frequency is dynamically adjusted according to the frequency adjustment event, the processor frequency may be too high when the foldable screen device is in the folded state, resulting in serious heating and waste of power consumption. When the foldable screen device is in the unfolded state, the processor frequency may be too low, causing device lag and affecting user experience.
[0031] Figure 1 A structural diagram of an electronic device 100 is shown. The electronic device 100 can be implemented as a mobile phone, a tablet computer, etc. The specific type of the electronic device 100 is not limited in the embodiments of the present application.
[0032] As shown in FIG. 1, the electronic device 100 includes a processor 110, a memory 120, a display 130, a sensor 140 and a communication interface 150. Figure 1As shown, the electronic device 100 can include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headset jack 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 can include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0033] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can include more or fewer components than shown, or combine certain components, or split certain components, or different component arrangements. The components shown can be implemented in hardware, software, or a combination of software and hardware.
[0034] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices, or can be integrated into one or more processors.
[0035] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching instructions and executing instructions.
[0036] The processor 110 can also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can hold instructions or data that the processor 110 has just used or is using repeatedly. If the processor 110 needs to use the instructions or data again, it can call them directly from the memory. This avoids repeated access and reduces the latency of the processor 110, thus improving the efficiency of the system.
[0037] In some embodiments, the processor 110 can include one or more interfaces. The interfaces can include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0038] The charging management module 140 is configured to receive charging input from a charger. The charger can be a wireless charger or a wired charger. In some embodiments of wired charging, the charging management module 140 can receive charging input from a wired charger through the USB interface 130. In some embodiments of wireless charging, the charging management module 140 can receive wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 can charge the battery 142 while also supplying power to the electronic device through the power management module 141.
[0039] The power management module 141 is configured to connect the battery 142 and the charging management module 140 to the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 can also be configured to monitor parameters such as the battery capacity, the number of battery cycles, the battery health status (leakage, impedance), and the like. In some embodiments, the power management module 141 can also be disposed in the processor 110. In some other embodiments, the power management module 141 and the charging management module 140 can also be disposed in the same device.
[0040] The wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor, and the like.
[0041] The antenna 1 and the antenna 2 are configured to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be configured to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in combination with a tuning switch.
[0042] The mobile communication module 150 can provide a solution for wireless communication including 2G / 3G / 4G / 5G and the like applied to the electronic device 100. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), and the like. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter, amplify, and the like the received electromagnetic waves, and transmit the processed signals to the modem processor for demodulation. The mobile communication module 150 can also amplify signals modulated by the modem processor and radiate the signals as electromagnetic waves through the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be disposed in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 can be disposed in the same device.
[0043] The modem processor can include a modulator and a demodulator. The modulator is configured to modulate a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is configured to demodulate a 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 processed by the baseband processor is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a microphone 170B, etc.), or displays an image or a video through the display 194. In some embodiments, the modem processor can be a separate device. In other embodiments, the modem processor can be independent of the processor 110 and disposed in the same device as the mobile communication module 150 or other functional modules.
[0044] The wireless communication module 160 can provide a wireless communication solution including a wireless local area network (WLAN) (such as a wireless fidelity (Wi-Fi) network), Bluetooth (BT), a global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, and the like, which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives an electromagnetic wave via the antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signal, and transmits the processed signal to the processor 110. The wireless communication module 160 can also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification thereon, and radiate the signal as an electromagnetic wave via the antenna 2.
[0045] In some embodiments, the antenna 1 and the mobile communication module 150 of the electronic device 100 are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the electronic device 100 can communicate with a network and other devices through wireless communication technology. The wireless communication technology can include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS can include a global positioning system (GPS), a global navigation satellite system (GLONASS), a beidu navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and / or a satellite based augmentation systems (SBAS).
[0046] The electronic device 100 implements a display function through a GPU, a display screen 194, and an application processor, etc. The GPU is a microprocessor for image processing, which is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs, which execute program instructions to generate or change display information.
[0047] The display screen 194 is configured to display images, videos, and the like. The display screen 194 includes a display panel. The display panel can be made of a liquid crystal display (LCD). The display panel can also be made of an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniled, a microled, a micro-oled, a quantum dot light emitting diode (QLED), or the like. The display screen 194 can have a folded state and an unfolded state. The folded state and the unfolded state can be described in the foregoing embodiments, which will not be repeated here. In some embodiments, the electronic device can include one or N display screens 194, where N is a positive integer greater than 1.
[0048] The electronic device 100 can implement a photographing function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor.
[0049] The digital signal processor is configured to process digital signals. In addition to processing digital image signals, the digital signal processor can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is configured to perform Fourier transform on the frequency point energy, and the like.
[0050] The NPU is a neural-network (NN) computing processor. By drawing on the structure of a biological neural network, for example, by drawing on the transmission mode between human brain neurons, the NPU can quickly process input information and continuously self-learn. Through the NPU, the electronic device 100 can implement intelligent cognition applications such as image recognition, face recognition, voice recognition, and text understanding.
[0051] The external memory interface 120 can be configured to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, music, video, and the like files can be saved in the external memory card.
[0052] The internal memory 121 can be used to store computer executable program codes including instructions. The processor 110 performs various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required for a function (such as a sound playing function, an image playing function, etc.), and the like. The data storage area can store data (such as audio data, a phone book, etc.) created during the use of the electronic device 100, and the like. In addition, the internal memory 121 can include a high-speed random access memory, and can further include a non-volatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
[0053] The electronic device 100 can implement an audio function through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, an application processor, and the like. For example, music playing, recording, and the like.
[0054] The keys 190 include a power key, a volume key, and the like. The keys 190 can be mechanical keys. Alternatively, the keys 190 can be touch keys. The electronic device 100 can receive a key input, and generate a key signal input related to the user settings and function control of the electronic device 100.
[0055] The motor 191 can generate a vibration prompt. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations for different applications (such as taking pictures, playing audio, etc.) can correspond to different vibration feedback effects. Touch operations on different regions of the display screen 194 can also correspond to different vibration feedback effects of the motor 191. Different application scenarios (such as time reminders, received messages, alarms, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customizable.
[0056] The indicator 192 can be an indicator light, which can be used to indicate a charging state, a power change, and can also be used to indicate messages, missed calls, notifications, and the like.
[0057] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 100 by inserting it into or removing it from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, 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.
[0058] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present application, the Android system with a layered architecture is used as an example to illustrate the software structure of the electronic device 100.
[0059] Figure 2 It is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.
[0060] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: the application layer, the application framework layer, the system library layer, and the kernel layer.
[0061] The application layer can include a series of application packages.
[0062] like Figure 2 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
[0063] The application framework layer provides an application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0064] like Figure 2 As shown, the application framework layer may include a window manager, a content provider, a phone manager, a resource manager, a frequency modulation event monitoring module, a display module (DisplayEngineService), and the like.
[0065] The window manager is used to manage windows programs. The window manager can acquire the display screen size, determine whether there is a status bar, lock the screen, and capture the screen, etc.
[0066] The content provider is used to store and acquire data, and make the data accessible to the application programs. The data can include videos, images, audios, dialed and received calls, browsing history and bookmarks, phonebook, etc.
[0067] The telephony manager is used to provide the communication function of the electronic device 100. For example, the management of the call state (including call connection, call disconnection, etc.).
[0068] The resource manager provides various resources for the application programs, such as localized strings, icons, pictures, layout files, video files, etc.
[0069] The frequency tuning event monitoring module is used to monitor whether a frequency tuning event occurs. The frequency tuning event is a trigger condition for the electronic device 100 to adjust the processor frequency. In some implementations, in response to detecting that a frequency tuning event occurs, the frequency tuning event monitoring module can send a message to the frequency tuning module in the system library, the message being used to inform the type of the frequency tuning event. In response to detecting the end of the frequency tuning event, the frequency tuning event monitoring module can send a message to the frequency tuning module in the system library, the message being used to inform the elimination of the frequency tuning event.
[0070] The display module is used to monitor the screen state of the electronic device 100. As described above, the screen state of the electronic device 100 includes the folded state and the unfolded state. The description of the folded state and the unfolded state can refer to the related description in the foregoing embodiments, which will not be described here again. In some implementations, the display module can actively send the current screen state of the electronic device 100 to the frequency tuning module in the system library. In other implementations, the display module can respond to the request received from the frequency tuning module and return the current screen state of the electronic device 100 to the frequency tuning module.
[0071] The application program layer and the application program framework layer run in the virtual machine. The virtual machine executes the java files of the application program layer and the application program framework layer into binary files. The virtual machine is used to perform the management of the object life cycle, the management of the stack, the management of the thread, the management of the security and the exception, and the garbage collection, etc.
[0072] The system library can include a plurality of functional modules. For example: the surface manager, the three-dimensional graphics processing library (for example: OpenGL ES), the frequency tuning module, etc.
[0073] The surface manager is used to manage the display subsystem, and provides the fusion of 2D and 3D layers for a plurality of application programs.
[0074] The three-dimensional graphics processing library is used to implement three-dimensional graphics drawing, image rendering, composition, and layer processing, etc.
[0075] The frequency adjustment module is used to support the electronic device 100 to dynamically adjust the processor frequency. Specifically, in some implementations, the frequency adjustment module can determine the processor frequency according to the screen state of the electronic device 100, and instruct the processor to adjust the processor frequency to the processor frequency through the processor driver in the kernel layer. In other implementations, the frequency adjustment module can determine the processor frequency according to the screen state and the frequency adjustment event of the electronic device 100, and instruct the processor to adjust the processor frequency to the processor frequency through the processor driver in the kernel layer. The subsequent embodiments of the present application will be described in detail, which will not be described here.
[0076] The kernel layer is a layer between hardware and software. The kernel layer at least includes display driver, camera driver, audio driver, sensor driver, and processor driver.
[0077] The working flow of the software and hardware of the electronic device 100 will be described below in combination with the capturing and photographing scene.
[0078] When the touch sensor 180K receives the touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into a raw input event (including touch coordinates, timestamp of the touch operation, and other information). The raw input event is stored in the kernel layer. The application framework layer obtains the raw input event from the kernel layer, and identifies the control corresponding to the input event. Taking the touch operation as a touch single-click operation, and the control corresponding to the single-click operation as the control of the camera application icon as an example, the camera application calls the interface of the application framework layer, starts the camera application, and then starts the camera driver through the kernel layer, and captures the still image or video through the camera 193.
[0079] Figure 3 A flowchart of a processor frequency adjustment method provided by the embodiment of the present application. The method is applied to the electronic device 100. As shown in Figure 3 the method comprises:
[0080] Step S301, obtaining the screen state.
[0081] As described above, the screen state of the electronic device 100 includes the folded state and the unfolded state. The description of the folded state and the unfolded state can refer to the related description in the foregoing embodiments, which will not be described here.
[0082] The electronic device 100 can monitor the screen state. In some implementations, the electronic device 100 can query the screen state at a certain period. The period can be preset, for example, 1 minute. In some implementations, the electronic device 100 can acquire the screen state at a certain period. The period can be preset, for example, 1 minute. It can be understood that the embodiments of the present application do not make specific limitations on the manner in which the electronic device 100 acquires the screen state.
[0083] Step S302, adjusting the processor frequency according to the screen state.
[0084] There can be a corresponding relationship between the screen state and the processor frequency. Specifically, the folded state can correspond to a first frequency, and the unfolded state can correspond to a second frequency. The first frequency is different from the second frequency. In some implementations, the first frequency can be less than the second frequency. The electronic device 100 can determine the corresponding processor frequency according to the screen state, and adjust the processor frequency to the processor frequency corresponding to the screen state.
[0085] In some implementations, in response to booting or restarting, the electronic device 100 can acquire a configuration file, and the configuration file is used to indicate the corresponding relationship between the screen state and the processor frequency. For example, the configuration file can indicate that the folded state corresponds to the first frequency, and the unfolded state corresponds to the second frequency. The first frequency is different from the second frequency. As described above, since the electronic device 100 has different requirements for processor performance and heat dissipation ability in different screen states. Therefore, by using the above strategy, the electronic device 100 can use the screen state as a basis for adjusting the processor frequency, use a lower processor frequency when in the folded state, reduce heat generation, and reduce power consumption. When in the unfolded state, use a higher processor frequency to ensure performance, prevent lag, and improve the overall experience of the user.
[0086] Figure 4 Another flowchart of a processor frequency adjustment method provided by the embodiments of the present application. The method is applied to the electronic device 100. As shown in the figure, the method comprises: Figure 4
[0087] Step S401, in response to detecting a frequency adjustment event, adjusting the processor frequency according to the frequency adjustment event and the screen state.
[0088] The frequency adjustment event is an event that affects the requirement of the electronic device 100 for the processor performance. For the description of the frequency adjustment event, reference can be made to the related description in the foregoing embodiments, which will not be repeated here.
[0089] In some implementations, in response to detecting a frequency adjustment event, the electronic device 100 can acquire a screen state. In other implementations, the electronic device 100 can continuously monitor the screen state. As previously described, the screen state of the electronic device 100 includes a folded state and an unfolded state. For descriptions of the folded state and the unfolded state, reference can be made to the relevant descriptions in the foregoing embodiments, which will not be repeated here.
[0090] Different screen states can correspond to different processor frequencies, and different frequency adjustment events can also correspond to different processor frequencies. In the case of the same frequency adjustment event, the processor frequencies corresponding to different screen states can be different. Moreover, the processor frequency corresponding to the folded state can be less than the processor frequency corresponding to the unfolded state. The electronic device 100 can determine the processor frequency corresponding to the frequency adjustment event and the screen state, and adjust the processor frequency to the processor frequency corresponding to the frequency adjustment event and the screen state.
[0091] In some implementations, the electronic device 100 can store different frequency adjustment parameters for different frequency adjustment events. The frequency adjustment parameters include one or more sets of corresponding relationships between screen states and processor frequencies. In response to detecting a frequency adjustment event, the electronic device 100 can first determine the frequency adjustment parameters according to the detected frequency adjustment event. Then, by querying in the determined frequency adjustment parameters, the processor frequency corresponding to the screen state in the frequency adjustment parameters can be determined, and the processor frequency can be adjusted to the processor frequency corresponding to the screen state in the frequency adjustment parameters.
[0092] For the above implementation, in some examples, the frequency adjustment parameter corresponding to one frequency adjustment event can include two sets of corresponding relationship between screen state and processor frequency (corresponding relationship between folded state and processor frequency, and corresponding relationship between unfolded state and processor frequency). Therefore, when the frequency adjustment event is detected, regardless of the screen state, the electronic device 100 can determine the processor frequency corresponding to the screen state by querying in the frequency adjustment parameter corresponding to the frequency adjustment event, and adjust the processor frequency to the processor frequency corresponding to the screen state in the frequency adjustment parameter. Wherein, for the same frequency adjustment event, the processor frequency corresponding to different screen states can be different. In other examples, the frequency adjustment parameter corresponding to one frequency adjustment event can only include one set of corresponding relationship between screen state and processor frequency, for example, only include corresponding relationship between folded state and processor frequency, and not include corresponding relationship between unfolded state and processor frequency. Therefore, when the frequency adjustment event is detected, if in the folded state, the electronic device 100 can determine the processor frequency corresponding to the folded state by querying in the frequency adjustment parameter corresponding to the frequency adjustment event, and adjust the processor frequency to the processor frequency corresponding to the folded state in the frequency adjustment parameter. If in the unfolded state, since the frequency adjustment parameter corresponding to the frequency adjustment event does not include corresponding relationship between unfolded state and processor frequency, the electronic device 100 cannot determine the processor frequency corresponding to the unfolded state by querying in the frequency adjustment parameter corresponding to the frequency adjustment event. At this time, the electronic device 100 can not adjust the processor frequency.
[0093] In some implementations, the electronic device 100 can store different frequency adjustment parameters for different screen states. The frequency adjustment parameter includes one or more sets of corresponding relationship between frequency adjustment event and processor frequency. The electronic device 100 can first determine the frequency adjustment parameter according to the screen state. Then, in response to detecting the frequency adjustment event, the electronic device 100 can determine the processor frequency corresponding to the frequency adjustment event in the determined frequency adjustment parameter by querying in the frequency adjustment parameter, and adjust the processor frequency to the processor frequency corresponding to the frequency adjustment event in the frequency adjustment parameter.
[0094] For the above implementation manners, the correspondence between the frequency adjustment events included in the different frequency adjustment parameters and the processor frequencies can be the same or different. For example, the frequency adjustment parameters corresponding to the folded state can include the correspondence between 2 groups of frequency adjustment events and the processor frequencies. The frequency adjustment parameters corresponding to the unfolded state can include the correspondence between 5 groups of frequency adjustment events and the processor frequencies. For the same frequency adjustment event, the frequency adjustment parameters corresponding to the folded state can include the correspondence between the frequency adjustment event and the processor frequency, and the frequency adjustment parameters corresponding to the unfolded state can not include the correspondence between the frequency adjustment event and the processor frequency. In this case, when the frequency adjustment event is detected, if the electronic device 100 is in the folded state, the electronic device 100 can determine the processor frequency corresponding to the frequency adjustment event by querying the frequency adjustment parameters corresponding to the folded state, and adjust the processor frequency to the processor frequency corresponding to the frequency adjustment event in the frequency adjustment parameters. If the electronic device 100 is in the unfolded state, since the frequency adjustment parameters corresponding to the unfolded state do not include the processor frequency corresponding to the frequency adjustment event, the electronic device 100 can not adjust the processor frequency.
[0095] Based on the above strategy, the electronic device 100 can flexibly adjust the processor frequency according to the frequency adjustment event and the screen state. The processor frequency can meet the needs of the electronic device 100 in different running scenarios, avoid lag, and as much as possible reduce the heat and power consumption, and improve the overall experience of the user.
[0096] Figure 5 Another structural schematic diagram of an electronic device 100 is provided for the embodiments of the present application. As shown in the figure, the electronic device 100 includes a processor module, a frequency adjustment event monitoring module, a display module, and a frequency adjustment module. Among them, Figure 5
[0097] The processor module is used to execute instructions and process data. The processor module includes a processor driver.
[0098] The frequency adjustment event monitoring module is used to monitor whether a frequency adjustment event occurs. For the description of the frequency adjustment event, reference can be made to the related description in the foregoing embodiments, which will not be described here again.
[0099] The display module is used to display images, videos, etc. The display module can also include various display states, such as a folded state, an unfolded state, etc. For the description of the folded state and the unfolded state, reference can be made to the related description in the foregoing embodiments, which will not be described here again.
[0100] The frequency adjustment module is used to support the electronic device 100 to dynamically adjust the processor frequency. The subsequent embodiments of the present application will introduce the process in detail, which will not be described here in detail.
[0101] Figure 6 A flowchart of another processor frequency adjustment method provided by the embodiments of the present application. The method is applied to the electronic device 100 shown above. As shown in the figure, the method comprises three implementation manners. Among them: Figure 5 Figure 6 The method comprises three implementation manners. Among them:
[0102] Implementation manner 1
[0103] 1. The display module sends the screen state to the frequency adjustment module.
[0104] The screen state can comprise a folded state and an unfolded state. For the description of the folded state and the unfolded state, reference can be made to the related description in the foregoing embodiments, which will not be repeated here.
[0105] In some implementation manners, the display module can send the screen state to the frequency adjustment module at a certain period. The period can be preset, for example, 1 minute. In some implementation manners, the frequency adjustment module can query the screen state from the display module at a certain period. The period can be preset, for example, 1 minute. In another implementation manner, in response to the change of the screen state, the display module can send the screen state to the frequency adjustment module.
[0106] 2. The frequency adjustment module determines the first frequency according to the screen state.
[0107] For the process that the frequency adjustment module determines the first frequency according to the screen state, reference can be made to the related description in step S302 in the foregoing embodiments, which will not be repeated here.
[0108] 3. The frequency adjustment module sends an instruction to the processor module, and the instruction is used to instruct the processor module to adjust the processor frequency to the first frequency.
[0109] In this way, the screen state can be used as the basis for adjusting the processor frequency. A lower processor frequency is used when in the folded state, so as to reduce the heat and the power consumption. A higher processor frequency is used when in the unfolded state, so as to guarantee the performance, prevent the lag, and improve the overall experience of the user.
[0110] Implementation manner 2
[0111] 1. The frequency adjustment module is restarted.
[0112] In some implementation manners, in response to detecting the power-on, the frequency adjustment module can be restarted. In some implementation manners, in response to detecting the abnormal situation, the frequency adjustment module can also be restarted.
[0113] 2. The frequency adjustment module queries the screen state from the display module.
[0114] 3. The display module sends the screen state to the frequency adjustment module.
[0115] In some implementations, the frequency adjustment module can store a parameter indicating the screen state. The frequency adjustment module can determine the processor frequency according to the screen state indicated by the parameter.
[0116] Since the parameter indicating the screen state in the frequency adjustment module can be initialized when the frequency adjustment module is restarted, the screen state indicated by the parameter can be inconsistent with the current screen state. Therefore, through this step, the frequency adjustment module can ensure the accuracy of the parameter indicating the screen state stored therein, and further ensure the accuracy of the processor frequency determined subsequently according to the parameter.
[0117] 4. The frequency adjustment module determines a second frequency according to the screen state.
[0118] For the process of determining the second frequency by the frequency adjustment module according to the screen state, reference can be made to the related description in step S302 in the foregoing embodiments, which will not be repeated here.
[0119] 5. The frequency adjustment module sends an instruction to the processor module, the instruction being used to instruct the processor module to adjust the processor frequency to the second frequency.
[0120] In this way, the screen state can be used as a basis for adjusting the processor frequency, a lower processor frequency is used when in the folded state to reduce heat generation and power consumption, and a higher processor frequency is used when in the unfolded state to ensure performance, prevent lag, and improve the overall experience of the user.
[0121] Embodiment 3:
[0122] 1. The frequency adjustment event monitoring module sends a notification message to the frequency adjustment module, the notification message being used to notify the occurrence of the frequency adjustment event.
[0123] The frequency adjustment event is an event that can affect the requirement of the processor performance of the electronic device 100. For the description of the frequency adjustment event, reference can be made to the related description in the foregoing embodiments, which will not be repeated here.
[0124] 2. The frequency adjustment module determines a third frequency according to the frequency adjustment event and the screen state.
[0125] In some implementations, after receiving the notification message sent by the frequency adjustment module, the frequency adjustment module can obtain the screen state from the display module through querying.
[0126] In some implementations, the frequency adjustment module can also query the screen state from the display module at a certain period, or the display module can actively notify the screen state to the frequency adjustment module at a certain period. The period can be preset, for example, 1 minute. After receiving the notification message sent by the frequency adjustment event monitoring module, the frequency adjustment module can determine the third frequency according to the frequency adjustment event and the screen state obtained most recently.
[0127] In some implementations, the frequency adjustment module can store a parameter indicating the screen state. Upon power-on, the display module can actively send a notification message to the frequency adjustment module to notify the current screen state. The frequency adjustment module can set the parameter initially according to the notification message. Thereafter, in response to detecting a change in the screen state, the display module can send a notification message to the frequency adjustment module to notify the frequency adjustment module to update the parameter. In response to receiving the notification message sent by the frequency event monitoring module to notify the screen state, the frequency adjustment module can update the parameter according to the notification message.
[0128] After receiving the notification message sent by the frequency event monitoring module, the frequency adjustment module can determine the third frequency according to the frequency adjustment event and the screen state indicated by the parameter stored therein.
[0129] For the process of determining the third frequency by the frequency adjustment module according to the frequency adjustment event and the screen state, reference can be made to the relevant description in step S302 in the foregoing embodiments, which will not be described here again.
[0130] 3. The frequency adjustment module sends an instruction to the processor module, the instruction being used to instruct the processor module to adjust the processor frequency to the third frequency.
[0131] In this way, the processor frequency can be flexibly adjusted according to the frequency adjustment event and the screen state at the same time. The processor frequency can meet the needs of the electronic device 100 in different running scenarios, avoid lag, and at the same time, reduce the heat and power consumption as much as possible, and improve the overall experience of the user.
Claims
1. A method of processor frequency adjustment, comprising: The method is applied to an electronic device including a display screen, and the method comprises: obtaining a screen state of the display screen, the screen state comprising a folded state and an unfolded state; determining a processor frequency according to the screen state.
2. The method of claim 1, wherein the processor frequency corresponding to the folded state is less than the processor frequency corresponding to the unfolded state.
3. The method according to claim 1 or 2, characterized in that, The method further comprises: in response to detecting a frequency adjustment event, determining a processor frequency according to the frequency adjustment event and the screen state of the display screen.
4. The method according to any one of claims 1 to 3, characterized in that, The method further comprises: in response to booting up or restarting, the electronic device obtains a configuration file, the configuration file being used to indicate a correspondence between the screen state and the processor frequency.
5. The method according to claim 3 or 4, characterized in that, The frequency adjustment event comprises at least one of the following: unlocking the device, turning on the power saving mode, enabling the device split screen, running the application in the foreground, receiving the user operation, opening the camera, incoming / outgoing call, sending the Beidou message, and starting the applet.
6. The method according to any one of claims 3-5, characterized in that, Determining the processor frequency according to the frequency adjustment event and the screen state of the display screen specifically comprises: if the frequency adjustment event is a first frequency adjustment event and the screen state of the display screen is the folded state, then the processor frequency is a fourth frequency; if the frequency adjustment event is the first frequency adjustment event and the screen state of the display screen is the unfolded state, then the processor frequency is a fifth frequency; the fourth frequency and the fifth frequency are different.
7. A processor frequency adjustment method, characterized by, The method is applied to an electronic device including a processor module, a frequency adjustment event monitoring module, a display module, and a frequency adjustment module, and the method comprises: the display module sends a screen state to the frequency adjustment module, the screen state comprising a folded state and an unfolded state; the frequency adjustment module determines a first frequency according to the screen state; the frequency adjustment module sends a first instruction to the processor module, the first instruction being used to instruct to adjust the processor frequency to the first frequency.
8. The method of claim 7, wherein the first frequency corresponding to the folded state is less than the first frequency corresponding to the unfolded state.
9. The method according to claim 7 or 8, characterized in that, The method further comprises: in response to restarting, the frequency adjustment module queries the display module for the screen state; the frequency adjustment module determines a second frequency according to the screen state; the frequency adjustment module sends a second instruction to the processor module, the second instruction being used to instruct to adjust the processor frequency to the second frequency.
10. The method according to any one of claims 7-9, characterized in that, The method further comprises: the frequency adjustment event monitoring module sends a notification message to the frequency adjustment module, the notification message being used to notify the occurrence of the frequency adjustment event; the frequency adjustment module queries the display module for the screen state; the frequency adjustment module determines a third frequency according to the screen state; the frequency adjustment module sends a third instruction to the processor module, the instruction being used to instruct to adjust the processor frequency to the third frequency.
11. An electronic device, comprising: The electronic device comprises a memory, a processor, and a sensor, the memory being used to store a computer program, and the processor being used to call the computer program so that the electronic device executes the method of any one of claims 1-6.
12. A computer program product comprising instructions, characterized in that, The computer program product, when run on an electronic device, causes the electronic device to perform the method of any one of claims 1-6.
13. A computer-readable storage medium comprising instructions, wherein: The instructions, when run on an electronic device, cause the electronic device to perform the method of any one of claims 1-6.