WO2020191685A1 - 一种应用于终端的频率调整方法、装置及电子设备 - Google Patents
一种应用于终端的频率调整方法、装置及电子设备 Download PDFInfo
- Publication number
- WO2020191685A1 WO2020191685A1 PCT/CN2019/079953 CN2019079953W WO2020191685A1 WO 2020191685 A1 WO2020191685 A1 WO 2020191685A1 CN 2019079953 W CN2019079953 W CN 2019079953W WO 2020191685 A1 WO2020191685 A1 WO 2020191685A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- frame
- time
- image
- soc
- duration
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G5/00—Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
- G09G5/001—Arbitration of resources in a display system, e.g. control of access to frame buffer by video controller and/or main processor
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G3/00—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
- G09G3/006—Electronic inspection or testing of displays and display drivers, e.g. of LED or LCD displays
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/32—Means for saving power
- G06F1/3203—Power management, i.e. event-based initiation of a power-saving mode
- G06F1/3234—Power saving characterised by the action undertaken
- G06F1/324—Power saving characterised by the action undertaken by lowering clock frequency
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G5/00—Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
- G09G5/003—Details of a display terminal, the details relating to the control arrangement of the display terminal and to the interfaces thereto
- G09G5/006—Details of the interface to the display terminal
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G2320/00—Control of display operating conditions
- G09G2320/02—Improving the quality of display appearance
- G09G2320/0247—Flicker reduction other than flicker reduction circuits used for single beam cathode-ray tubes
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G2320/00—Control of display operating conditions
- G09G2320/02—Improving the quality of display appearance
- G09G2320/0252—Improving the response speed
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G2320/00—Control of display operating conditions
- G09G2320/04—Maintaining the quality of display appearance
- G09G2320/041—Temperature compensation
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G2330/00—Aspects of power supply; Aspects of display protection and defect management
- G09G2330/02—Details of power systems and of start or stop of display operation
- G09G2330/021—Power management, e.g. power saving
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G2340/00—Aspects of display data processing
- G09G2340/04—Changes in size, position or resolution of an image
- G09G2340/0407—Resolution change, inclusive of the use of different resolutions for different screen areas
- G09G2340/0435—Change or adaptation of the frame rate of the video stream
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G2350/00—Solving problems of bandwidth in display systems
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G2360/00—Aspects of the architecture of display systems
- G09G2360/08—Power processing, i.e. workload management for processors involved in display operations, such as CPUs or GPUs
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- This application relates to the field of electronic technology, and in particular to a frequency adjustment method, device and electronic equipment applied to a terminal.
- the embodiments of the present application provide a frequency adjustment method, device, and electronic equipment applied to a terminal, which can reduce power consumption and improve the stability of the frame rate.
- an embodiment of the present application provides a frequency adjustment method applied to a terminal, including: monitoring the drawing time of the first frame of image; when the drawing time exceeds the first drawing duration, acquiring the current state of the system-on-chip SOC,
- the current state is any one or a combination of the following parameters: the current temperature of the SOC and the current load of the SOC; determine whether the current state exceeds the first preset threshold; if not, increase the operating frequency of the SOC within a period of time, and After the increase of the working frequency ends, the working frequency is restored; when the drawing of the first frame of image is completed, the actual drawing time of the first frame of image is obtained; when the actual drawing time does not exceed the second drawing time, the drawing time of the second frame of image is monitored, Wherein, the second drawing duration is determined according to the pre-configured highest frame rate, and the first drawing duration is less than the second drawing duration.
- the time range may be a preset time period, or the time range may be the length of time between the start time point of increasing the operating frequency of the SOC and the end time point of drawing the first frame of image.
- the preset time is delayed to notify the application first The frame image is drawn. Reduce the working frequency of the SOC by controlling the drawing duration, thereby ensuring the stability of the frame rate.
- the operating frequency of the SOC is increased to ensure the stability of the frame rate under the sudden high demand for resources.
- the first drawing duration is 13ms or 15ms
- the first preset threshold is 70% or 80%.
- the actual frame rate can be monitored to determine whether the actual drawing time of each frame of image exceeds the theoretical drawing time, if it exceeds, obtain the current load of the SOC, and determine whether the current load of the SOC exceeds the preset threshold. If it exceeds, a single frame pulse frequency modulation is performed. By dynamically monitoring the actual drawing time and current load, adjust the operating frequency of the SOC to ensure the stability of the frame rate.
- the actual frame rate can be monitored to determine whether the actual rendering time of the multi-frame image is relatively stable, and if not, the current temperature of the SOC is obtained to determine whether the current temperature exceeds a preset threshold. If it exceeds, reduce the SOC operating frequency or current load. By dynamically monitoring the actual drawing time and current temperature, the operating frequency of the SOC is adjusted to ensure the stability of the frame rate.
- the actual frame rate can be monitored to determine whether the actual drawing time of each frame of image exceeds the theoretical drawing time. Obtain the current temperature of the SOC and the current load of the SOC, and determine whether there is a possibility of increasing the frame rate according to the current temperature and the current load. On the premise that the frame rate is stable, the operating frequency of the SOC is increased to increase the timely supply of the SOC and increase the frame rate to a relatively high stable state.
- the operating frequency of the SOC can be adjusted to the preset maximum frequency to increase the operating frequency of the SOC.
- the working frequency of the SOC is increased according to a preset frequency modulation combination, which includes the preset frequency corresponding to each SOC.
- the drawing time of each frame of image can be increased according to the preset gear time, and the operating frequency of the SOC can be reduced by controlling the drawing time of each frame of image.
- the embodiments of the present application provide a frequency adjustment device applied to a terminal.
- the frequency adjustment is configured to implement the methods and functions performed by the electronic device in the first aspect, and is implemented by hardware/software.
- the software includes modules corresponding to the above functions.
- an embodiment of the present application provides an electronic device, including: a processor, a memory, and a communication bus, where the communication bus is used to implement connection and communication between the processor and the memory, and the processor executes the program stored in the memory. To implement the steps in a frequency adjustment method applied to a terminal provided in the first aspect.
- the electronic device provided in the embodiment of the present application may include a module corresponding to the behavior of the frequency adjustment device applied to the terminal in the above method design.
- the module can be software and/or hardware.
- the processor and memory can also be integrated.
- the electronic device may be a chip.
- the embodiments of the present application provide a computer-readable storage medium, and the computer-readable storage medium stores instructions, which when run on a computer, cause the computer to execute the methods of the foregoing aspects.
- the embodiments of the present application provide a computer program product containing instructions, which when run on a computer, cause the computer to execute the methods of the foregoing aspects.
- FIG. 1 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
- Fig. 2 is a block diagram of a software structure provided by an embodiment of the present application.
- FIG. 3 is a schematic flowchart of a frequency adjustment method applied to a terminal according to an embodiment of the present application
- FIG. 4(A) is a schematic diagram of frame rate fluctuation provided by an embodiment of the present application.
- FIG. 4(B) is a schematic diagram of a stable frame rate provided by an embodiment of the present application.
- FIG. 5 is a schematic flowchart of another frequency adjustment method applied to a terminal according to an embodiment of the present application.
- FIG. 6(A) is a schematic diagram of the relationship between temperature and frame rate according to an embodiment of the present application.
- FIG. 6(B) is another schematic diagram of the relationship between temperature and frame rate provided by an embodiment of the present application.
- FIG. 7 is a schematic diagram of a single frame pulse frequency modulation provided by an embodiment of the present application.
- FIG. 8 is a schematic flowchart of another frequency adjustment method applied to a terminal according to an embodiment of the present application.
- FIG. 9 is a schematic flowchart of yet another frequency adjustment method applied to a terminal according to an embodiment of the present application.
- FIG. 10 is a schematic flowchart of another frequency adjustment method applied to a terminal according to an embodiment of the present application.
- FIG. 11 is a schematic flowchart of yet another frequency adjustment method applied to a terminal according to an embodiment of the present application.
- FIG. 12 is a schematic structural diagram of a frequency adjustment device applied to a terminal according to an embodiment of the present application.
- FIG. 13 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
- the SOC can include the central processing unit (CPU), the graphics processing unit (GPU), and the double-rate synchronous dynamic random access memory (double speed). data rate, DDR).
- the current SOC scheduling of the Android system uses a load-based scheduling algorithm, but the scheduling algorithm of the scheduling algorithm has a long scheduling period and a conservative scheduling strategy. There is no timely and sufficient scheduling according to the resource requirements of the game scene. Therefore, this scheduling is adopted. Algorithms, frame rate fluctuations will also occur. In some special scenarios (such as severe fever), the frequency of the SOC is limited, and it is impossible to guarantee the timely and sufficient supply of the SOC. If a relatively high frame rate is still required, the frame rate will fluctuate greatly.
- FIG. 1 shows a schematic structural diagram of an electronic device 100.
- the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2.
- Mobile communication module 150 wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195, etc.
- SIM Subscriber identification module
- the sensor module 180 may include pressure sensor 180A, gyroscope sensor 180B, air pressure sensor 180C, magnetic sensor 180D, acceleration sensor 180E, distance sensor 180F, proximity light sensor 180G, fingerprint sensor 180H, temperature sensor 180J, touch sensor 180K, ambient light Sensor 180L, bone conduction sensor 180M, etc.
- the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100.
- the electronic device 100 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components.
- the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
- the processor 110 may include one or more processing units.
- the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU), etc.
- AP application processor
- modem processor modem processor
- GPU graphics processing unit
- image signal processor image signal processor
- ISP image signal processor
- controller video codec
- digital signal processor digital signal processor
- DSP digital signal processor
- NPU neural-network processing unit
- the different processing units may be independent devices or integrated in one or more processors.
- the controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.
- a memory may also be provided in the processor 110 to store instructions and data.
- the memory in the processor 110 is a cache memory.
- the memory can store instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
- the processor 110 may include one or more interfaces.
- the interface may include 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, and a universal asynchronous transmitter (universal asynchronous transmitter) interface.
- I2C integrated circuit
- I2S integrated circuit built-in audio
- PCM pulse code modulation
- PCM pulse code modulation
- UART universal asynchronous transmitter
- MIPI mobile industry processor interface
- GPIO general-purpose input/output
- SIM subscriber identity module
- USB Universal Serial Bus
- the I2C interface is a two-way synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL).
- the processor 110 may include multiple sets of I2C buses.
- the processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc. through different I2C bus interfaces.
- the processor 110 may couple the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through an I2C bus interface to implement the touch function of the electronic device 100.
- the I2S interface can be used for audio communication.
- the processor 110 may include multiple sets of I2S buses.
- the processor 110 may be coupled with the audio module 170 through an I2S bus to realize communication between the processor 110 and the audio module 170.
- the audio module 170 may transmit audio signals to the wireless communication module 160 through an I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
- the PCM interface can also be used for audio communication to sample, quantize and encode analog signals.
- the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
- the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
- the UART interface is a universal serial data bus used for asynchronous communication.
- the bus can be a two-way communication bus. It converts the data to be transmitted between serial communication and parallel communication.
- the UART interface is generally used to connect the processor 110 and the wireless communication module 160.
- the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.
- the audio module 170 may transmit audio signals to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a Bluetooth headset.
- the MIPI interface can be used to connect the processor 110 with the display screen 194, the camera 193 and other peripheral devices.
- the MIPI interface includes camera serial interface (camera serial interface, CSI), display serial interface (display serial interface, DSI), etc.
- the processor 110 and the camera 193 communicate through a CSI interface to implement the shooting function of the electronic device 100.
- the processor 110 and the display screen 194 communicate through a DSI interface to realize the display function of the electronic device 100.
- the GPIO interface can be configured through software.
- the GPIO interface can be configured as a control signal or as a data signal.
- the GPIO interface can be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and so on.
- GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
- the USB interface 130 is an interface that complies with the USB standard specification, and specifically may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and so on.
- the USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones and play audio through the headphones. This interface can also be used to connect other electronic devices, such as AR devices.
- the interface connection relationship between the modules illustrated in the embodiment of the present application is merely a schematic description, and does not constitute a structural limitation of the electronic device 100.
- the electronic device 100 may also adopt different interface connection modes in the foregoing embodiments, or a combination of multiple interface connection modes.
- the charging management module 140 is used to receive charging input from the charger.
- the charger can be a wireless charger or a wired charger.
- the charging management module 140 may receive the charging input of the wired charger through the USB interface 130.
- the charging management module 140 may receive the wireless charging input through the wireless charging coil of the electronic device 100. While the charging management module 140 charges the battery 142, it can also supply power to the electronic device through the power management module 141.
- the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
- the power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160.
- the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
- the power management module 141 may also be provided in the processor 110.
- the power management module 141 and the charging management module 140 may also be provided in the same device.
- the wireless communication function of the electronic device 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.
- the antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals.
- Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
- antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
- the antenna can be used in combination with a tuning switch.
- the mobile communication module 150 can provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the electronic device 100.
- the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.
- the mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform processing such as filtering, amplifying and transmitting the received electromagnetic waves to the modem processor for demodulation.
- the mobile communication module 150 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic waves for radiation via the antenna 1.
- at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110.
- at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
- the modem processor may include a modulator and a demodulator.
- the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
- the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. Then the demodulator 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 passed to the application processor.
- the application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays an image or video through the display screen 194.
- the modem processor may be an independent device.
- the modem processor may be independent of the processor 110 and be provided in the same device as the mobile communication module 150 or other functional modules.
- the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), and global navigation satellites.
- WLAN wireless local area networks
- BT wireless fidelity
- GNSS global navigation satellite system
- FM frequency modulation
- NFC near field communication technology
- infrared technology infrared, IR
- the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
- the wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110.
- the wireless communication module 160 can also receive the signal to be sent from the processor 110, perform frequency modulation, amplify it, and convert it into electromagnetic wave radiation via the antenna 2.
- the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
- the wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
- the GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite-based augmentation systems (SBAS).
- GPS global positioning system
- GLONASS global navigation satellite system
- BDS Beidou navigation satellite system
- QZSS quasi-zenith satellite system
- SBAS satellite-based augmentation systems
- the electronic device 100 implements a display function through a GPU, a display screen 194, and an application processor.
- the GPU is a microprocessor for image processing, connected to the display 194 and the application processor.
- the GPU is used to perform mathematical and geometric calculations for graphics rendering.
- the processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
- the display screen 194 is used to display images, videos, etc.
- the display screen 194 includes a display panel.
- the display panel can adopt liquid crystal display (LCD), organic light-emitting diode (OLED), active-matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode).
- LCD liquid crystal display
- OLED organic light-emitting diode
- active-matrix organic light-emitting diode active-matrix organic light-emitting diode
- AMOLED flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (QLED), etc.
- the electronic device 100 may include one or N display screens 194, and N is a positive integer greater than one.
- the electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
- the ISP is used to process the data fed back from the camera 193. For example, when taking a picture, the shutter is opened, the light is transmitted to the photosensitive element of the camera through the lens, the light signal is converted into an electrical signal, and the photosensitive element of the camera transfers the electrical signal to the ISP for processing and is converted into an image visible to the naked eye.
- ISP can also optimize the image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
- the ISP may be provided in the camera 193.
- the camera 193 is used to capture still images or videos.
- the object generates an optical image through the lens and projects it to the photosensitive element.
- the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
- CMOS complementary metal-oxide-semiconductor
- the photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
- ISP outputs digital image signals to DSP for processing.
- DSP converts digital image signals into standard RGB, YUV and other formats.
- the electronic device 100 may include 1 or N cameras 193, and N is a positive integer greater than 1.
- Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects the frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
- Video codecs are used to compress or decompress digital video.
- the electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in a variety of encoding formats, such as: moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
- MPEG moving picture experts group
- NPU is a neural-network (NN) computing processor.
- NN neural-network
- the NPU can realize applications such as intelligent cognition of the electronic device 100, such as image recognition, face recognition, voice recognition, text understanding, and so on.
- the external memory interface 120 may be used 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 realize the data storage function. For example, save music, video and other files in an external memory card.
- the internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions.
- the internal memory 121 may include a storage program area and a storage data area.
- the storage program area can store an operating system, at least one application program (such as a sound playback function, an image playback function, etc.) required by at least one function.
- the data storage area can store data (such as audio data, phone book, etc.) created during the use of the electronic device 100.
- the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc.
- the processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
- the electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. For example, music playback, recording, etc.
- the audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal.
- the audio module 170 can also be used to encode and decode audio signals.
- the audio module 170 may be provided in the processor 110, or part of the functional modules of the audio module 170 may be provided in the processor 110.
- the speaker 170A also called a “speaker” is used to convert audio electrical signals into sound signals.
- the electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
- the receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
- the electronic device 100 answers a call or voice message, it can receive the voice by bringing the receiver 170B close to the human ear.
- the microphone 170C also called “microphone”, “microphone”, is used to convert sound signals into electrical signals.
- the user can approach the microphone 170C through the mouth to make a sound, and input the sound signal to the microphone 170C.
- the electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can implement noise reduction functions in addition to collecting sound signals. In some other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions.
- the earphone interface 170D is used to connect wired earphones.
- the earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
- OMTP open mobile terminal platform
- CTIA cellular telecommunications industry association
- the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
- the pressure sensor 180A may be provided on the display screen 194.
- the capacitive pressure sensor may include at least two parallel plates with conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes.
- the electronic device 100 determines the intensity of the pressure according to the change in capacitance.
- the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
- the electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
- touch operations that act on the same touch location but have different touch operation strengths may correspond to different operation instructions. For example: when a touch operation whose intensity of the touch operation is less than the first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
- the gyro sensor 180B may be used to determine the movement posture of the electronic device 100.
- the angular velocity of the electronic device 100 around three axes ie, x, y, and z axes
- the gyro sensor 180B can be used for image stabilization.
- the gyro sensor 180B detects the shake angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shake of the electronic device 100 through reverse movement to achieve anti-shake.
- the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
- the air pressure sensor 180C is used to measure air pressure.
- the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
- the magnetic sensor 180D includes a Hall sensor.
- the electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip holster.
- the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D.
- features such as automatic unlocking of the flip cover are set.
- the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and used in applications such as horizontal and vertical screen switching, pedometers, etc.
- the electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
- the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector such as a photodiode.
- the light emitting diode may be an infrared light emitting diode.
- the electronic device 100 emits infrared light to the outside through the light emitting diode.
- the electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100.
- the electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power.
- the proximity light sensor 180G can also be used in leather case mode, and the pocket mode will automatically unlock and lock the screen.
- the ambient light sensor 180L is used to sense the brightness of the ambient light.
- the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived brightness of the ambient light.
- the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
- the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in the pocket to prevent accidental touch.
- the fingerprint sensor 180H is used to collect fingerprints.
- the electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, access application locks, fingerprint photographs, fingerprint answering calls, etc.
- the temperature sensor 180J is used to detect temperature.
- the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device 100 executes to reduce the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection.
- the electronic device 100 when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature.
- the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
- Touch sensor 180K also called “touch device”.
- the touch sensor 180K may be disposed on the display screen 194, and the touch screen is composed of the touch sensor 180K and the display screen 194, which is also called a “touch screen”.
- the touch sensor 180K is used to detect touch operations applied on or near it.
- the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
- the visual output related to the touch operation can be provided through the display screen 194.
- the touch sensor 180K may also be disposed on the surface of the electronic device 100, which is different from the position of the display screen 194.
- the bone conduction sensor 180M can acquire vibration signals.
- the bone conduction sensor 180M can obtain the vibration signal of the vibrating bone mass of the human voice.
- the bone conduction sensor 180M can also contact the human pulse and receive the blood pressure pulse signal.
- the bone conduction sensor 180M may also be provided in the earphone, combined with the bone conduction earphone.
- the audio module 170 can parse the voice signal based on the vibration signal of the vibrating bone block of the voice obtained by the bone conduction sensor 180M, and realize the voice function.
- the application processor may analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M, and realize the heart rate detection function.
- the button 190 includes a power button, a volume button, and so on.
- the button 190 may be a mechanical button. It can also be a touch button.
- the electronic device 100 may receive key input, and generate key signal input related to user settings and function control of the electronic device 100.
- the motor 191 can generate vibration prompts.
- the motor 191 can be used for incoming call vibration notification, and can also be used for touch vibration feedback.
- touch operations applied to different applications can correspond to different vibration feedback effects.
- Acting on touch operations in different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects.
- Different application scenarios for example: time reminding, receiving information, alarm clock, games, etc.
- the touch vibration feedback effect can also support customization.
- the indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, or to indicate messages, missed calls, notifications, and so on.
- the SIM card interface 195 is used to connect to the SIM card.
- the SIM card can be inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to achieve contact and separation with the electronic device 100.
- the electronic device 100 may support 1 or N SIM card interfaces, and N is a positive integer greater than 1.
- the SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.
- the same SIM card interface 195 can insert multiple cards 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 may also be compatible with external memory cards.
- the electronic device 100 interacts with the network through the SIM card to implement functions such as call and data communication.
- the electronic device 100 adopts an eSIM, that is, an embedded SIM card.
- the eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
- the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
- the embodiment of the present application takes a layered Android system as an example to illustrate the software structure of the electronic device 100.
- FIG. 2 is a block diagram of the software structure of the electronic device 100 according to an embodiment of the present application.
- the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Communication between layers through software interface.
- the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
- the application layer can include a series of application packages.
- the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
- the application framework layer provides application programming interfaces (application programming interface, API) and programming frameworks for applications in the application layer.
- the application framework layer includes some predefined functions.
- the application framework layer can include a window manager, a content provider, a view system, a phone manager, a resource manager, and a notification manager.
- the window manager is used to manage window programs.
- the window manager can obtain the size of the display, determine whether there is a status bar, lock the screen, take a screenshot, etc.
- the content provider is used to store and retrieve data and make these data accessible to applications.
- the data may include video, image, audio, phone calls made and received, browsing history and bookmarks, phone book, etc.
- the view system includes visual controls, such as controls that display text and controls that display pictures.
- the view system can be used to build applications.
- the display interface can be composed of one or more views.
- a display interface that includes a short message notification icon may include a view that displays text and a view that displays pictures.
- the phone manager is used to provide the communication function of the electronic device 100. For example, the management of the call status (including connecting, hanging up, etc.).
- the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, etc.
- the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and it can disappear automatically after a short stay without user interaction.
- the notification manager is used to notify the download completion, message reminder, etc.
- the notification manager can also be a notification that appears in the status bar at the top of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, text messages are prompted in the status bar, prompt sounds, electronic devices vibrate, and indicator lights flash.
- Android Runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
- the core library consists of two parts: one part is the function functions that the java language needs to call, and the other part is the core library of Android.
- the application layer and the application framework layer run in a virtual machine.
- the virtual machine executes the java files of the application layer and the application framework layer as binary files.
- the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
- the system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), three-dimensional graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc.
- the surface manager is used to manage the display subsystem and provides a combination of 2D and 3D layers for multiple applications.
- the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files.
- the media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
- the 3D graphics processing library is used to realize 3D graphics drawing, image rendering, synthesis, and layer processing.
- the 2D graphics engine is a drawing engine for 2D drawing.
- the kernel layer is the layer between hardware and software.
- the kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
- the corresponding hardware interrupt is sent to the kernel layer.
- the kernel layer processes the touch operation into the original input event (including touch coordinates, time stamp of the touch operation, etc.).
- the original input events are stored in the kernel layer.
- the application framework layer obtains the original input event from the kernel layer, and identifies the control corresponding to the input event. Taking the touch operation as a touch click operation, and the control corresponding to the click operation is the control of the camera application icon as an example, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer.
- the camera 193 captures still images or videos.
- the frequency adjustment method of the embodiment of the present application in detail with reference to the structure of the electronic device shown in FIG. 1 and the software structure block diagram shown in FIG. 2.
- the function of dynamic frequency adjustment is turned on to adjust the operating frequency of the SOC.
- a prompt box will pop up to prompt the user whether to use the frequency dynamic adjustment function.
- the embodiment of the present application does not limit the activation mode of the frequency dynamic adjustment function.
- FIG. 3 is a schematic flowchart of a frequency adjustment method applied to a terminal according to an embodiment of the present application. As shown in the figure, the steps in the embodiment of the present application at least include:
- the electronic device After the frequency dynamic adjustment function is activated, the electronic device starts to monitor the actual frame rate of the video game screen. In some embodiments, the electronic device starts to obtain the actual frame rate of the game scene, and obtains the actual drawing duration of each frame of the image through the actual frame rate.
- S302 Determine whether the actual drawing time of each frame of image exceeds the theoretical drawing time.
- step S303 is executed.
- the theoretical drawing time can be calculated from the target frame rate, and the target frame rate can be the highest frame rate designed for the game.
- S303 Count the drawing duration of the multi-frame image according to the preset period, and determine whether the frame rate change of the multi-frame image is in a relatively stable state.
- the actual drawing time length of N frames can be obtained cyclically (the drawing time length of N frames of images is obtained in the first cycle, and the drawing time length of another N frames of images is obtained in the second cycle, ).
- N can be 3, 4 or 5 and so on. Then compare whether the drawing time lengths of multiple N frames of images are the same or approximately the same. If the drawing time lengths of multiple N frames of images are the same or approximately the same, it means that the frame rate changes of multiple frames of images are relatively stable, that is, the frame rate is not If a large fluctuation occurs, step S304 is executed.
- FIG. 4(A) is a schematic diagram of frame rate fluctuation provided by an embodiment of the present application. As the drawing time passes, the frame rate fluctuates sharply at certain points in time, which is not stable state. As shown in FIG. 4(B), FIG. 4(B) is a schematic diagram of a stable frame rate provided by an embodiment of the present application. With the passage of drawing time, the frame rate fluctuates slightly and is in a relatively stable state.
- S303 can be directly executed, and the frame rate change of the multi-frame image can be determined by counting the actual drawing duration of the multi-frame image.
- S304 Acquire the current temperature of the SOC or the current load of the SOC. Or, obtain the current temperature of the SOC and the current load of the SOC.
- the average temperature during a period of time during which the SOC is running may be used as the current temperature of the GPU.
- the number of tasks processed by the current SOC can be obtained, and then the number of tasks can be divided by the maximum number of tasks that the SOC can handle to calculate the current load of the SOC.
- S305 Determine whether there is a possibility of increasing the frame rate according to the current temperature and the current load.
- the current temperature exceeds the first preset threshold or the current load of the SOC exceeds the second preset threshold, it is determined that there is no possibility of increasing the frame rate, and skip to S301 to continue monitoring the frame rate. If the current temperature does not exceed the first preset threshold or the current load of the SOC does not exceed the second preset threshold, it is determined that there is a possibility of increasing the frame rate. Alternatively, if the current temperature does not exceed the first preset threshold and the current load of the SOC does not exceed the second preset threshold, it is determined that there is a possibility of increasing the frame rate. If there is a possibility of increasing the frame rate, execute S306.
- the first preset threshold may be the highest temperature of the SOC when the frame rate is kept stable, for example, the first preset threshold may be 40 degrees Celsius or 39 degrees Celsius, and the second preset threshold is the maximum load quantity of the SOC, such as the second preset The threshold can be 70% or 80%.
- the operating frequency of the SOC can be locked to a higher steady state (for example, the theoretical maximum frequency), and then restored to the operating frequency before adjustment after a period of time.
- the period of time may be 4 ms, or may be a theoretical drawing time.
- the theoretical drawing time may be 16.6 ms.
- the frame rate when the frame rate is stable, it can be determined whether there is a possibility of increasing the frame rate according to the current temperature or the current load. If there is a possibility of increasing the frame rate, increase the operating frequency of the SOC under the premise of ensuring the stability of the frame rate, so as to increase the timely supply of the SOC and increase the frame rate to a relatively high stable state.
- FIG. 5 is a schematic flowchart of another frequency adjustment method applied to a terminal according to an embodiment of the present application. As shown in the figure, the steps in the embodiment of the present application at least include:
- the current actual frame rate can be monitored, and the actual drawing duration of each frame of the M frame image can be calculated according to the actual frame rate, where the M is an integer greater than or equal to 1.
- S502 Determine whether the actual drawing duration of each frame of image exceeds the theoretical drawing duration. If not exceeded, skip to S501 and continue to monitor the actual frame rate. If it exceeds, S503 is executed.
- the theoretical drawing time can be calculated from the target frame rate, and the target frame rate can be the highest frame rate designed for the game.
- S503 Determine whether the current temperature of the SOC exceeds a first preset threshold. If the current temperature exceeds the first preset threshold, S504 is executed, and if the current temperature does not exceed the first preset threshold, S505 is executed.
- the first preset threshold may be the highest temperature of the SOC when the frame rate is kept stable. For example, the first preset threshold may be 40 degrees Celsius or 39 degrees Celsius.
- the SOC supply is high or the temperature is high, if a higher frame rate continues to be used to draw an image, the temperature will continue to rise, causing the operating frequency of the SOC to be limited, resulting in large fluctuations in the frame rate.
- the maximum main frequency of the CPU is 2.6GHz, and the current main frequency of the CPU has reached 2.6GHz. At this time, there is no room for resource supply. Or, the current temperature has exceeded 39 degrees Celsius. If you continue to increase the CPU frequency, the CPU power consumption will increase, the temperature will rise rapidly, and the frame rate will fluctuate greatly.
- S504 Reduce the operating frequency of the SOC or the current load.
- the operating frequency of the SOC can be reduced by controlling the actual drawing duration of each frame of image.
- the intermediate value of the actual drawing duration of the K frames of images in the multi-frame images can be determined; and then the actual drawing duration of each frame of image is adjusted to the intermediate value.
- the actual drawing duration of each frame of image may be increased according to the preset gear duration.
- K can be 3, 4 or 5 and so on.
- the actual drawing time of 3 frames of images can be counted, and the intermediate value of the actual drawing time of the 3 frames of images can be calculated, and then the frame rate can be performed during the interaction between the game application and the system interface. control. If the actual drawing duration of a certain frame of image is less than the intermediate value, the actual drawing duration of the frame of image is adjusted to the intermediate value, thereby reducing the frame rate. If the actual drawing duration of a certain frame of image is not less than the intermediate value, due to the higher current temperature or higher current load, the actual drawing duration can be maintained, and the actual drawing duration of the frame of image is not adjusted. After the above adjustments, count the actual drawing time of the 3 frames again.
- the frame rate can be set to the lowest value. For example, when controlling the frame rate of a game with 60 frames per second, the lowest value of the frame rate can be set to 45 frames per second, and the adjusted frame rate cannot be lower than 45 frames.
- the frame rate can be controlled in the following way: the game application needs to call the system interface when drawing each frame of the image.
- the system interface will notify the game application after the image is drawn. After the game application receives the notification, it will proceed to the next frame of image draw. Therefore, you can insert code in this system interface, and the system interface will delay the notification of the game application after the image is drawn. For example, after a certain frame of image is drawn, the system interface will delay the notification of the game application by 1ms, which is equivalent to an increase of every 1ms gear duration.
- the drawing duration of the frame image so that the actual drawing duration of each frame image is adjusted to 16.6ms+1ms.
- the upper curve is the temperature change curve
- the lower curve is the frame rate change curve.
- the frame rate began to fluctuate greatly.
- the average frame rate is 51.89
- the frame rate variance is 6.36
- the average GPU temperature is 52.92
- the average CPU temperature is 53.84
- the average battery temperature is 39.45
- the frame ratio is 32.49 %
- the volatility is 5.84.
- the frame rate variance can represent the variance between the actual rendering time of each frame of the image
- the frame number ratio can represent the ratio of the number of frames with a frame rate of less than 45 per second to the total number of frames drawn per second
- the volatility can be based on The fluctuation of the frame rate is determined.
- the upper part of the curve is the temperature change curve
- the lower part of the curve is the frame rate change curve.
- the average frame rate is 48.38
- the frame rate variance is 1.37
- the average GPU temperature is 49.47
- the average CPU temperature is 51.06
- the average battery temperature is 37.04
- the frame ratio is 2.75 %
- the volatility is 1.81.
- S505 Increase the operating frequency of the SOC.
- the operating frequency of the SOC can be adjusted to the preset maximum frequency through single-frame pulse frequency modulation.
- the operating frequency of the SOC can be locked to the theoretical maximum frequency, and after a period of time, it will be restored to the operating frequency before adjustment.
- the period of time can be 4ms or the theoretical drawing time, for example, the maximum frame rate is 60fps
- the theoretical drawing time is 16.6ms.
- each frame it can be judged whether the actual drawing time of each frame exceeds the ideal drawing time, if it exceeds, then the single frame pulse frequency modulation is started, and the single frame image drawing is completed When, the single frame pulse frequency modulation is finished, and then the next frame of image is drawn.
- the theoretical drawing time of each frame of image (also called refreshing screen period) is 16.6ms
- the actual drawing time of each frame of image exceeds 16.6ms
- the drawing speed of the image cannot keep up with the screen refreshing speed, so drawing cannot be completed
- the image is also provided to the screen for display, thus causing frame loss.
- the current load of the CPU and DDR can be obtained when each frame of image is drawn to 15ms. If the current load of the CPU or DDR is greater than 80%, a single frame pulse frequency modulation can be performed.
- FIG. 7 is a schematic diagram of a single frame pulse frequency modulation provided by an embodiment of the present application.
- the first line is the time progress bar for screen refresh. Assuming that the theoretical drawing time of each frame of image is 16.6ms, the electronic device refreshes the screen in a cycle of 16.6ms.
- the second line is the time progress bar for image drawing. From the first period of the second line, it can be seen that the actual drawing time required to complete a single frame of image is 20ms, which has exceeded the screen refresh cycle of 16.6ms. Therefore, the single frame image is drawn to At 15ms, it is judged whether the drawing of a single frame image is completed.
- the single frame pulse frequency modulation is performed to increase the frame rate and shorten the drawing of the single frame image duration. It can be seen from the second period of time in the second row that the actual drawing time required to complete a single frame image is 16.6ms, which is equal to the screen refresh period, and single frame pulse frequency modulation may not be performed. It can be seen from the third period of the second line that the actual drawing time required to complete the single frame image is 20ms, which has exceeded the screen refresh cycle 16.6ms. Therefore, when the single frame image is drawn to 15ms, it is judged whether the single frame image is drawn.
- a single frame pulse frequency modulation is performed to increase the frame rate and shorten the drawing time length of a single frame image. From the fourth and fifth periods of the second row, it can be seen that the actual drawing time required to complete a single frame image is 15ms, which is less than the screen refresh cycle 16.6ms, so there is no need for single frame pulse frequency modulation. For the next frames of images, if the actual drawing time exceeds the theoretical drawing time, you can perform single-frame pulse frequency modulation according to the above method.
- the electronic device continuously draws multiple frames of images (the first frame, the second frame, the third frame, the fourth frame, ...), if it is determined that the actual drawing time of the first frame image exceeds the theoretical length Drawing time, when the second frame of image is drawn to the theoretical drawing time, start single frame pulse frequency modulation, and when the second frame image is drawn, end single frame pulse frequency modulation, and then determine whether the actual drawing time of the third frame image exceeds The theoretical drawing time, if it exceeds, the single frame pulse frequency modulation starts when the fourth frame image is drawn to the theoretical drawing time length, and when the fourth frame image is drawn, the single frame pulse frequency modulation ends, and so on.
- S506 Determine whether the actual drawing time of each frame of image is shortened to a reasonable level. If yes, it means that the actual drawing time of each frame of image does not exceed the theoretical drawing time, and skip to S501 to continue monitoring the actual frame rate. If not, execute S507.
- the actual drawing duration of each frame of image is within a reasonable interval. For example, assuming that the theoretical drawing time is 16.6ms, before the operating frequency of the SOC is increased, the actual drawing time of each frame of image is 20ms. After the operating frequency of the SOC is increased, the actual drawing time of each frame of image is shortened to 15ms. The 15ms is within a reasonable interval and is the most ideal drawing time. Therefore, it can be determined that the actual drawing time of each frame of image has been shortened to a reasonable level.
- S507 Execute a process of determining a sudden high resource demand.
- the specific method can refer to the following embodiments.
- the operating frequency of the SOC is adjusted in combination with the current temperature and the actual drawing time, so as to control the stability of the frame rate.
- FIG. 8 is a schematic flowchart of another frequency adjustment method applied to a terminal according to an embodiment of the present application. As shown in the figure, the steps in the embodiment of the present application at least include:
- S801 Monitor the actual frame rate. For a specific implementation manner, refer to S301, and this step will not be repeated.
- S802 Determine whether the actual drawing time of each frame of image exceeds the theoretical drawing time. If it is not exceeded, skip to S801 and continue to monitor the actual frame rate. If it exceeds, S803 is executed.
- S803 Count the actual drawing duration of the multi-frame image according to the preset period, and determine whether the frame rate change of the multi-frame image is in a relatively stable state. If yes, skip to S802 and execute the steps of S802. If not, execute S804. For a specific implementation manner, refer to S303, and this step will not be repeated.
- S805 Determine whether the current temperature exceeds a first preset threshold. If it exceeds, go to S806. If it is not exceeded, execute S807.
- the first preset threshold may be the highest temperature of the SOC when the frame rate is kept stable. For example, the first preset threshold may be 40 degrees Celsius or 39 degrees Celsius.
- S806 Reduce the operating frequency or current load of the SOC. For a specific implementation manner, refer to S504, and this step will not be repeated. If the execution is completed, you can jump to S802 and continue to execute the steps of S802.
- the number of tasks processed by the current SOC can be obtained, and then the number of tasks can be divided by the maximum number of tasks that the SOC can handle to calculate the current load of the SOC.
- S808 Determine the change trend of the actual drawing duration of the multi-frame images.
- the sum of the actual drawing time lengths of every N frames of images in the multi-frame images may be counted, where N is an integer greater than or equal to 1, and then according to the sum of the drawing time lengths of the multiple N frames of images, Determine the increase of the sum of the drawing time lengths; finally, determine the change trend of the actual drawing time of the multi-frame images according to the increase of the sum of the drawing time lengths. For example, statistics may be performed every 5 frames of images, and the actual drawing duration of the 5 frames of images may be counted each time, so as to determine the changes in the actual drawing duration of multiple 5-frame images.
- S809 Determine whether it is a sudden high resource demand according to the current load of the SOC and the change trend of the actual drawing duration of multiple N frames of images. If yes, execute S810, if no, jump to S803.
- the second preset threshold may be the maximum load quantity of the SOC, for example, the second preset threshold is 70% or 80%, the third preset threshold may be the theoretical drawing duration 16.6ms, and the fourth preset threshold may also be the theoretical drawing duration 16.6ms and so on. All the above parameters can be set according to specific scenarios.
- the difference between the actual drawing time of each N frame image minus the theoretical drawing time is greater than the third preset threshold, and the increase between the actual drawing time of multiple N frame images If the amount is greater than the fourth preset threshold, it is determined as a sudden high resource demand.
- the theoretical drawing time of each frame of image is 16.6 ms. Monitor the actual drawing time of 5 frames of images in real time, compare the actual drawing time of 5 frames of images with the theoretical drawing time of 5 frames of images, if the actual total drawing time of 5 frames of images minus the difference of the theoretical drawing time of 5 frames of images The value is greater than 16.6ms, which can be determined as high resource demand. At the same time, the actual drawing time of the monitored 5 frames of images can be compared with the actual drawing time of the previously monitored 5 frames of images.
- S810 Increase the working frequency of the SOC and provide short-term high-resource supply. After the execution is completed, jump to S803 and execute the steps of S803.
- the SOC may include a CPU, a DDR, and a GPU, and each frequency modulation combination includes a frequency corresponding to the CPU, a frequency corresponding to the DDR, and a frequency corresponding to the GPU.
- Multiple FM combinations can be set in advance according to different gears, and the multiple FM combinations can be sorted according to the energy efficiency ratio of each FM combination, wherein as the gear increases, the energy efficiency ratio increases sequentially.
- the frequency modulation period in the embodiment of the present application may be a theoretical drawing duration (such as 16.6 ms), or may be a preset time period (such as 4 ms), which is not limited in the embodiment of the present application.
- the frame rate fluctuates greatly, it is determined whether it is a sudden high resource demand based on the actual drawing duration, the current load of the SOC, and the current temperature. Adjust the operating frequency of the SOC in the case of judging the sudden high demand for resources to ensure the timely and sufficient supply of the SOC, thereby reducing power consumption and large fluctuations in frame rate.
- FIG. 9 is a schematic flowchart of another frequency adjustment method applied to a terminal according to an embodiment of the present application. As shown in the figure, the steps in the embodiment of the present application at least include:
- S901 Monitor the actual frame rate. For a specific implementation manner, reference may be made to the foregoing embodiment, and this step will not be repeated.
- S902 Determine whether the actual drawing time of each frame of image exceeds the theoretical drawing time. If it is not exceeded, skip to S901 and continue to monitor the actual frame rate. If it exceeds, execute S903.
- S904 Determine whether the current load of the SOC exceeds a second preset threshold. For a specific implementation manner, reference may be made to the foregoing embodiment, and this step will not be repeated.
- FIG. 10 is a schematic flowchart of another frequency adjustment method applied to a terminal according to an embodiment of the present application. As shown in the figure, the steps in the embodiment of the present application at least include:
- S1002 Obtain the sum of the actual drawing durations of N frames of images, and determine the current load of the SOC when each frame of the N frames of images is drawn. For a specific implementation manner, reference may be made to the foregoing embodiment, and this step will not be repeated.
- S1003 Determine whether the sum of the actual drawing durations of the N frames of images is greater than a first preset threshold, if the sum of the actual drawing durations of the N frames of images is greater than the first preset threshold, and the actual drawing durations of the N frames of images are in an increasing trend , Then execute S1004. If the sum of the actual drawing time lengths of the N frames of images is not greater than the first preset threshold, or the actual drawing time length of the N frames of images does not show an increasing trend, then jump to S1002 and execute the step S1002.
- the first preset threshold may be an ideal drawing time of 16.6ms*N.
- N can be 3, 4, 5, and so on.
- S1004 Determine whether the current load of the SOC is greater than a second preset threshold, if it is greater, then execute S1005, if it is not greater, then jump to S1002, and execute S1002.
- the second preset threshold may be 70%.
- FIG. 11 is a schematic flowchart of another frequency adjustment method provided by an embodiment of the present application. As shown in the figure, the steps in the embodiment of the present application at least include:
- S1102 Determine whether the actual drawing duration of the multiple frames of images is in a relatively stable state. If yes, go to S1101, if no, go to S1103. For a specific implementation manner, reference may be made to the foregoing embodiment, and this step will not be repeated.
- S1103 Acquire the current temperature of the SOC. For a specific implementation manner, reference may be made to the foregoing embodiment, and this step will not be repeated.
- S1104 Determine whether the current temperature exceeds a first preset threshold.
- the first preset threshold may be the highest temperature of the SOC when the frame rate is maintained, for example, 39 degrees Celsius or 40 degrees Celsius. If it exceeds, S1105 is executed.
- FIG. 12 is a frequency adjustment device applied to a terminal according to an embodiment of the present application.
- the device in the embodiment of the present application may at least include:
- the monitoring module 1201 is used to monitor the drawing time of the first frame of image
- the obtaining module 1202 is configured to obtain the current state of the system-on-chip SOC when the drawing time exceeds the first drawing time period, where the current state is any one or a combination of the following parameters:
- the processing module 1203 is configured to determine whether the current state exceeds a first preset threshold
- the processing module 1203 is further configured to, if not, increase the operating frequency of the SOC within a period of time, and restore the operating frequency after the increase of the operating frequency ends;
- the obtaining module 1202 is further configured to obtain the actual drawing duration of the first frame of image when the drawing of the first frame of image is completed;
- the monitoring module 1201 is further configured to monitor the drawing time of the second frame of image when the actual drawing time does not exceed the second drawing time, where the second drawing time is determined according to the highest frame rate configured in advance, so The first drawing time period is less than the second drawing time period.
- the time range is a preset time period, or the time range is the length of time between the start time point of increasing the operating frequency of the SOC and the end time point of drawing the first frame of image.
- the processing module 1203 is further configured to, when the current state exceeds the first preset threshold, after the drawing of the first frame of image is completed, delay a preset period of time to notify the application that the drawing of the first frame of image is completed.
- the obtaining module 1202 is further configured to obtain the sum of the first time length from the second frame image to the Nth frame image, and the N+1th frame image to the Nth frame image when the actual drawing time length exceeds the second drawing time period.
- the processing module 1203 is further configured to increase the SOC when the value of the sum of the second duration minus the sum of the first duration is greater than a second preset threshold, and the current load is greater than a third preset threshold Working frequency.
- the first drawing duration is 13ms or 15ms
- the first preset threshold is 70% or 80%.
- each module can also refer to the corresponding description of the method embodiments shown in FIGS. 3 to 11 to execute the methods and functions performed by the electronic device in the above embodiments.
- the electronic device 1301 may include: at least one processor 1301, at least one communication interface 1302, at least one memory 1303, and at least one communication bus 1304.
- the processor 1301 may include a graphics drawing module 101, an image display module 102, a temperature acquisition module 103, an information acquisition module 104, and a frequency modulation module 105, etc.
- the processor and the memory may also be integrated.
- the electronic device may be a chip.
- the processor 1301 may implement or execute various exemplary logical blocks, modules, and circuits described in conjunction with the disclosure of this application.
- the processor may also be a combination that implements computing functions, for example, a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, and so on.
- the communication bus 1304 may be a standard PCI bus for interconnecting peripheral components or an extended industry standard structure EISA bus. The bus can be divided into address bus, data bus, control bus, etc. For ease of presentation, only one thick line is used in FIG. 13, but it does not mean that there is only one bus or one type of bus.
- the communication bus 1304 is used to implement connection and communication between these components.
- the memory 1303 may include volatile memory, such as nonvolatile random access memory (NVRAM), phase change RAM (PRAM), magnetoresistive random access memory (magetoresistive) RAM, MRAM), etc., can also include non-volatile memory, such as at least one disk storage device, electrically erasable programmable read-only memory (electrically erasable programmable read-only memory, EEPROM), flash memory devices, such as reverse or flash memory (NOR flash memory) or reverse flash memory (NAND flash memory), semiconductor devices, such as solid state disks (SSD), etc.
- the memory 1303 may also be at least one storage device located far away from the foregoing processor 1301.
- the memory 1303 may also store a group of program codes, and the processor 1301 may optionally also execute programs executed in the memory 1303.
- the current state of the system-on-chip SOC is acquired, and the current state is any one or a combination of the following parameters:
- the time range is a preset time period, or the time range is the length of time between the start time point of increasing the operating frequency of the SOC and the end time point of drawing the first frame of image.
- processor 1301 is further configured to perform the following operations:
- processor 1301 is further configured to perform the following operations:
- the sum of the first time length from the second frame image to the Nth frame image and the first time length from the N+1th frame image to the 2N-1th frame image are acquired.
- the operating frequency of the SOC is increased.
- the first drawing duration is 13ms or 15ms
- the first preset threshold is 70% or 80%.
- the processor may also cooperate with the memory and the communication interface to perform the operation of the frequency adjustment device applied to the terminal in the above application embodiment.
- the computer program product includes one or more computer instructions.
- the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
- the computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center.
- the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center integrated with one or more available media.
- the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, and a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)).
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Multimedia (AREA)
- General Engineering & Computer Science (AREA)
- Telephone Function (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
本申请实施例提供了一种应用于终端的频率调整方法、装置及电子设备,包括:监测第一帧图像的绘制时间;当绘制时间超过第一绘制时长时,获取系统级芯片SOC的当前状态,当前状态为以下参数的任意一项或多项组合:SOC的当前温度和SOC的当前负载;判断当前状态是否超过第一预设阈值;若否,在一段时间范围内提升SOC的工作频率,并在提升工作频率结束后恢复工作频率;在第一帧图像绘制完成时,获取第一帧图像的实际绘制时长;当实际绘制时长没有超过第二绘制时长时,监测第二帧图像的绘制时间,其中,第二绘制时长为根据预先配置的最高帧率确定的,第一绘制时长小于第二绘制时长。实施本申请实施例,可以减小帧率的大幅波动。
Description
本申请涉及电子技术领域,尤其涉及一种应用于终端的频率调整方法、装置及电子设备。
当前的电子设备(例如手机、平板)的游戏内容和界面设计复杂,呈现出重度化趋势。对于当前最流行的实时对战类的游戏,由于游戏场景变化很快、且没有规律性,对电子设备的系统级芯片(system on chip,SOC)的能力要求很高。由于没有针对具体的场景保障SOC及时充分供给,导致帧率大幅波动,经常出现卡顿的现象。
发明内容
本申请实施例提供了一种应用于终端的频率调整方法、装置及电子设备,可以减小功耗,提高帧率的稳定性。
第一方面,本申请实施例提供了一种应用于终端的频率调整方法,包括:监测第一帧图像的绘制时间;当绘制时间超过第一绘制时长时,获取系统级芯片SOC的当前状态,当前状态为以下参数的任意一项或多项组合:SOC的当前温度和SOC的当前负载;判断当前状态是否超过第一预设阈值;若否,在一段时间范围内提升SOC的工作频率,并在提升工作频率结束后恢复工作频率;在第一帧图像绘制完成时,获取第一帧图像的实际绘制时长;当实际绘制时长没有超过第二绘制时长时,监测第二帧图像的绘制时间,其中,第二绘制时长为根据预先配置的最高帧率确定的,第一绘制时长小于第二绘制时长。通过实时动态监控每帧图像的绘制时长、SOC的当前负载以及当前温度,调整SOC的工作频率,保障SOC的及时充分供给,从而减小帧率的大幅波动。
在一种可能的设计中,时间范围可以为预设的时间段,或时间范围为提升SOC的工作频率的开始时间点至绘制第一帧图像的结束时间点之间的时长。
在另一种可能的设计中,判断当前状态是否超过第一预设阈值,当所述当前状态超过第一预设阈值时,在第一帧图像绘制完成后,延迟预设时长通知应用第一帧图像绘制完成。通过控制绘制时长降低SOC的工作频率,从而保障帧率的稳定。
在另一种可能的设计中,当实际绘制时长超过第二绘制时长时,获取第二帧图像至第N帧图像的第一时长之和、以及第N+1帧图像至第2N-1帧图像的第二时长之和,以及获取SOC的当前负载,其中,N为大于2的正整数;当第二时长之和减去第一时长之和的值大于第二预设阈值、且当前负载大于第三预设阈值时,提升SOC的工作频率,实现在突发资源高需求下保障帧率的稳定性。
在另一种可能的设计中,第一绘制时长为13ms或15ms,第一预设阈值为70%或80%。
在另一种可能的设计中,可以监测实际帧率,确定每帧图像的实际绘制时长是否超过理论绘制时长,如果超过,获取SOC的当前负载,确定SOC的当前负载是否超过预设阈值,如果超过,则进行单帧脉冲调频。通过动态监控实际绘制时长和当前负载,调整SOC 的工作频率,保障帧率的稳定。
在另一种可能的设计中,可以监测实际帧率,获取N帧图像的实际绘制时长之和,并确定在绘制N帧图像中每帧图像时SOC的当前负载,若N帧图像的绘制时长之和大于第一预设阈值,并且N帧图像的实际绘制时长处于不断增长的趋势,则确定SOC的当前负载是否大于第二预设阈值,若大于,则提升SOC的工作频率。通过动态监控实际绘制时长和当前负载,调整SOC的工作频率,保障帧率的稳定。
在另一种可能的设计中,可以监测实际帧率,确定多帧图像的实际绘制时长是否处于相对稳定状态,若否,则获取SOC的当前温度,确定当前温度是否超过预设阈值。若超过,则降低SOC的工作频率或者当前负载。通过动态监控实际绘制时长和当前温度,调整SOC的工作频率,保障帧率的稳定。
在另一种可能的设计中,可以监测实际帧率,确定每帧图像的实际绘制时长是否超过理论绘制时长。获取SOC的当前温度和SOC的当前负载,根据当前温度和当前负载,确定是否存在提升帧率的可能性。在保障帧率稳定的前提下,提升SOC的工作频率,以便增加SOC的及时供给,提升帧率到一个相对较高的稳定状态。
在另一种可能的设计中,可以将SOC的工作频率调整为预设的最高频率,提升SOC的工作频率。
在另一种可能的设计中,按照预设的调频组合提升SOC的工作频率,调频组合包括各个SOC对应的预设频率。
在另一种可能的设计中,确定多帧图像中K帧图像的实际绘制时长的中间值;然后将每帧图像的实际绘制时长调整到中间值。通过控制每帧图像的绘制时长,降低SOC的工作频率。
另一种可能的设计中,可以按照预设的档位时长增加每帧图像的绘制时长,通过控制每帧图像的绘制时长,降低SOC的工作频率。
第二方面,本申请实施例提供了一种应用于终端的频率调整装置,该频率调整被配置为实现上述第一方面中电子设备所执行的方法和功能,由硬件/软件实现,其硬件/软件包括与上述功能相应的模块。
第三方面,本申请实施例提供了一种电子设备,包括:处理器、存储器和通信总线,其中,通信总线用于实现处理器和存储器之间连接通信,处理器执行存储器中存储的程序用于实现上述第一方面提供的一种应用于终端的频率调整方法中的步骤。
在一个可能的设计中,本申请实施例提供的电子设备可以包含用于执行上述方法设计中应用于终端的频率调整装置的行为相对应的模块。模块可以是软件和/或是硬件。
在另一种可能的设计中,处理器和存储器还可以集成在一起。该电子设备可以是芯片。
第四方面,本申请实施例提供了一种计算机可读存储介质,计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述各方面的方法。
第五方面,本申请实施例提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述各方面的方法。
为了更清楚地说明本申请实施例或背景技术中的技术方案,下面将对本申请实施例或背景技术中所需要使用的附图进行说明。
图1是本申请实施例提供的一种电子设备的结构示意图;
图2是本申请实施例提供的一种软件结构框图;
图3是本申请实施例提供的一种应用于终端的频率调整方法的流程示意图;
图4(A)是本申请实施例提供的一种帧率波动的示意图;
图4(B)是本申请实施例提供的一种帧率稳定的示意图;
图5是本申请实施例提供的另一种应用于终端的频率调整方法的流程示意图;
图6(A)是本申请实施例提供的一种温度与帧率关系的示意图;
图6(B)是本申请实施例提供的另一种温度与帧率关系的示意图;
图7是本申请实施例提供的一种单帧脉冲调频的示意图;
图8是本申请实施例提供的又一种应用于终端的频率调整方法的流程示意图;
图9是本申请实施例提供的又一种应用于终端的频率调整方法的流程示意图;
图10是本申请实施例提供的又一种应用于终端的频率调整方法的流程示意图;
图11是本申请实施例提供的又一种应用于终端的频率调整方法的流程示意图;
图12是本申请实施例提供的一种应用于终端的频率调整装置的结构示意图;
图13是本申请实施例提供的一种电子设备的结构示意图。
下面结合本申请实施例中的附图对本申请实施例进行描述。
游戏的流畅运行需要电子设备的SOC的及时充分供给,其中,SOC可以包括中央处理器(central processing unit,CPU)、图形处理器(graphics processing unit,GPU)、双倍速率同步动态随机存储器(double data rate,DDR)。在大多数场景下,Android系统当前的SOC调度采用基于负载的调度算法,但是该调度算法的调度周期长、调度策略保守,没有针对游戏场景的资源需求特点进行及时充分的调度,因此采用该调度算法,也会出现帧率波动。在一些特殊场景(例如发热严重)下,SOC的频率被限制,无法保证SOC及时充分供给,如果仍然要求比较高的帧率,这样也会出现帧率大幅波动。
在现有技术方案中,为了保障SOC的及时充分供给,在进入游戏应用之后,将游戏进程迁移到CPU大核,将CPU、GPU、DDR的工作频率锁定在一个比较高的频率。但是,由于每个场景对SOC的需求不同,如果在所有场景下将CPU、GPU、DDR的工作频率都锁定在一个比较高的频率,这样会导致功耗浪费,引起手机发热,仍然会出现帧率大幅波动。同时,这种简单的保障方式无法解决游戏突发高负载时的资源供给,依然会出现帧率陡然下降的情况。此外,温度过高也会导致CPU、GPU、DDR的工作频率受到限制。
为了解决上述技术问题,本申请实施例提供了如下解决方案。
图1示出了电子设备100的结构示意图。
电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串 行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间 的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统 (satellite based augmentation systems,SBAS)。
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指 令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器180G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作 用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。
图2是本申请实施例的电子设备100的软件结构框图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。
应用程序层可以包括一系列应用程序包。
如图2所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图2所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
2D图形引擎是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
下面结合捕获拍照场景,示例性说明电子设备100软件以及硬件的工作流程。
当触摸传感器180K接收到触摸操作,相应的硬件中断被发给内核层。内核层将触摸 操作加工成原始输入事件(包括触摸坐标,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层从内核层获取原始输入事件,识别该输入事件所对应的控件。以该触摸操作是触摸单击操作,该单击操作所对应的控件为相机应用图标的控件为例,相机应用调用应用框架层的接口,启动相机应用,进而通过调用内核层启动摄像头驱动,通过摄像头193捕获静态图像或视频。
下面结合图1所示的电子设备的结构以及图2所示的软件结构框图,对本申请实施例频率调整方法进行详细说明。在一些实施例中,当电子设备检测到游戏启动时,开启频率动态调整的功能,对SOC的工作频率进行调整。在另一些实施例中,电子设备监测到游戏启动后,会弹出提示框,提示用户是否使用频率动态调整的功能。本申请实施例对频率动态调整的功能的启动方式不做限定。
以下通过具体实施例进行介绍。
请参考图3,图3是本申请实施例提供的一种应用于终端的频率调整方法的流程示意图。如图所示,本申请实施例中的步骤至少包括:
S301,监测实际帧率。
启动频率动态调整的功能后,电子设备开始监测电子游戏画面的实际帧率。在一些实施例中,电子设备开始获取游戏场景的实际帧率,通过实际帧率得到每帧图像的实际绘制时长。其中,帧率可以表示每秒绘制图像的帧数。例如,假设当前实际帧率为80fps(每秒传输帧数),则当前每帧图像的实际绘制时长为1000ms/80=12.5ms。
S302,确定每帧图像的实际绘制时长是否超过理论绘制时长。
如果每帧图像的实际绘制时长没有超过理论绘制时长,则跳转到S301,继续监测实际帧率。如果每帧图像的实际绘制时长超过理论绘制时长,则执行步骤S303。
其中,理论绘制时长可以由目标帧率计算得到,目标帧率可以为游戏设计的最高帧率。例如,对于最高帧率为60fps的游戏,每帧图像的理论绘制时长为1000ms/60=16.6ms。
S303,按照预设周期统计多帧图像的绘制时长,判断多帧图像的帧率变化情况是否处于相对稳定状态。
具体实现中,可以循环获取N帧的实际绘制时长(在第1个周期内获取N帧图像的绘制时长,在第2个周期内获取另一N帧图像的绘制时长,……)。其中,N可以为3、4或5等等。然后分别比较多个N帧图像的绘制时长是否相同或者近似相同,如果多个N帧图像的绘制时长相同或者近似相同,则说明多帧图像的帧率变化情况处于相对稳定状态,即帧率没有出现大幅波动,执行步骤S304。如果多个N帧图像的绘制时长之间的差值很大,或者不断递增,则说明多帧图像的帧率变化情况处于不稳定状态,即帧率出现大幅波动。在此情况下,可以进行单帧脉冲调频或帧率控制,具体方法可以参见以下实施例中的详细说明。
例如,可以每隔3帧统计一次,统计多个3帧图像的绘制时长,计算每个3帧图像的绘制时长的平均值,根据每个3帧图像的绘制时长的平均值,计算每个3帧图像的帧率。平均值越大,帧率越小;平均值越小,帧率越大。然后对多个3帧图像的绘制的平均值进行比较,确定帧率是否出现大幅波动。如图4(A)所示,图4(A)是本申请实施例提供 的一种帧率波动的示意图,随着绘制时间的推移,帧率在某些时间点上出现大幅波动,处于不稳定状态。又如图4(B)所示,图4(B)是本申请实施例提供的一种帧率稳定的示意图,随着绘制时间的推移,帧率波动幅度较小,处于相对稳定状态。
需要说明的是,在执行S301之后,可以直接执行S303,通过统计多帧图像的实际绘制时长,确定多帧图像的帧率变化情况。
S304,获取SOC的当前温度或SOC的当前负载。或者,获取SOC的当前温度以及SOC的当前负载。
具体实现中,可以将SOC运行时一段时间内的平均温度作为GPU的当前温度。可以获取当前SOC的所处理的任务数量,然后将该任务数量除以SOC能够处理的最大任务数,计算得到SOC的当前负载。
S305,根据当前温度和当前负载,确定是否存在提升帧率的可能性。
具体实现中,如果当前温度超过第一预设阈值或者SOC的当前负载超过第二预设阈值,则确定不存在提升帧率的可能性,跳转到S301,继续监测帧率。如果当前温度没有超过第一预设阈值或者SOC的当前负载没有超过第二预设阈值,则确定存在提升帧率的可能性。或者,当前温度没有超过第一预设阈值以及SOC的当前负载没有超过第二预设阈值,则确定存在提升帧率的可能性。若存在提升帧率的可能性,则执行S306。其中,第一预设阈值可以为保持帧率稳定时SOC的最高温度,例如第一预设阈值可以为40摄氏度或39摄氏度,第二预设阈值为SOC的最大负载数量,例如第二预设阈值可以为70%或80%。
S306,在保障帧率稳定的前提下,提升SOC的工作频率,以便增加SOC的及时供给。
具体实现中,可以将SOC的工作频率锁定到一个较高的稳态(例如理论最高频率),持续一段时间后恢复为调整前的工作频率。其中,该一段时间可以为4ms,也可以是理论绘制时长,例如,对于最高帧率为60fps的游戏,该理论绘制时长可以为16.6ms。在完成调整工作频率之后,跳转到S302,确定下一帧图像的实际绘制时长是否超过理论绘制时长。
在本申请实施例中,在帧率稳定的情况下,可以根据当前温度或者当前负载,确定是否存在提升帧率的可能性。如果存在提升帧率的可能性,则在保障帧率稳定的前提下,提升SOC的工作频率,以便增加SOC的及时供给,提升帧率到一个相对较高的稳定状态。
请参考图5,图5是本申请实施例提供的另一种应用于终端的频率调整方法的流程示意图。如图所示,本申请实施例中的步骤至少包括:
S501,监测实际帧率。
具体实现中,可以监测当前实际帧率,根据实际帧率计算M帧图像中每帧图像的实际绘制时长,其中,所述M为大于等于1的整数。帧率可以表示每秒绘制图像的帧数。例如,假设当前实际帧率为80fps(每秒传输帧数),则每帧图像的实际绘制时长为1000ms/80=12.5ms。
S502,确定每帧图像的实际绘制时长是否超过理论绘制时长。如果未超过,则跳转到S501,继续监测实际帧率。如果超过,则执行S503。
其中,理论绘制时长可以由目标帧率计算得到,该目标帧率可以为游戏设计的最高帧率。例如,对于60fps的游戏,每帧图像的理论绘制时长为1000ms/60=16.6ms。
S503,确定SOC的当前温度是否超过第一预设阈值。若当前温度超过第一预设阈值,则执行S504,若当前温度没有超过第一预设阈值,则执行S505。其中,第一预设阈值可以为保持帧率稳定时SOC的最高温度,例如第一预设阈值可以为40摄氏度或39摄氏度。
应理解,在SOC供给较高或温度较高情况下,如果继续采用较高的帧率绘制图像,温度会持续上升,引发SOC的工作频率被限制,导致帧率大幅波动。例如,CPU的最大主频是2.6GHz,当前CPU主频已经到达2.6GHz,此时已经没有提供资源供给的空间。或者,当前温度已经超过39摄氏度,如果继续提升CPU的主频,会导致CPU耗电增大,温度快速上升,引起帧率大幅波动。
S504,降低SOC的工作频率或者当前负载。
具体实现中,可以通过控制所述每帧图像的实际绘制时长,降低所述SOC的工作频率。进一步的,可以确定所述多帧图像中K帧图像的实际绘制时长的中间值;然后将每帧图像的实际绘制时长调整到所述中间值。或者,可以按照预设的档位时长增加所述每帧图像的实际绘制时长。其中,K可以为3、4或5等等。
例如,在SOC的温度较高时,可以统计3帧图像的实际绘制时长,计算出该3帧图像的实际绘制时长的中间值,然后在接下来的游戏应用与系统接口交互过程中进行帧率控制。如果某帧图像的实际绘制时长小于该中间值,则将该帧图像的实际绘制时长调整到中间值,从而降低帧率。如果某帧图像的实际绘制时长不小于该中间值,由于当前温度较高或当前负载较高,可以维持该实际绘制时长,对该帧图像的实际绘制时长不进行调整。在经过上述调整后,再次统计3帧图像的实际绘制时长,如果帧率仍然不够稳定,可以按照1ms的档位时长增加每帧图像的实际绘制时长,继续降低帧率,控制温度上升直到帧率达到稳定。其中,帧率可以设置最低值。例如在对每秒60帧的游戏进行帧率控制时,帧率的最低值可以设置为每秒45帧,调整后的帧率不能低于45帧。
又如,可以通过以下方式进行帧率控制:游戏应用在绘制每帧图像时需要调用系统接口,系统接口绘制完成图像之后会通知游戏应用,游戏应用接收到通知后,再进行下一帧图像的绘制。因此,可以在这个系统接口处插入代码,系统接口绘制完成图像之后延迟通知游戏应用,例如在某一帧图像绘制完成后,系统接口延迟1ms通知游戏应用,相当于按照1ms的档位时长增加每帧图像的绘制时长,这样每帧图像的实际绘制时长调整到16.6ms+1ms。
如图6(A)所示,上部分曲线为温度变化曲线,下部分曲线为帧率变化曲线。随着温度的升高,帧率开始大幅波动。在图6(A)所示的帧率波动情况下,平均帧率为51.89,帧率方差为6.36,GPU平均温度为52.92,CPU平均温度为53.84,电池平均温度为39.45,帧数比值为32.49%,波动率为5.84。其中,帧率方差可以表示每帧图像的实际绘制时长之间的方差,帧数比值可以表示每秒钟内帧率小于45的帧数所占每秒绘制总帧数的比值,波动率可以根据帧率的波动情况确定。又如图6(B)所示,上部分曲线为温度变化曲线,下部分曲线为帧率变化曲线。在图6(B)所示的帧率稳定情况下,平均帧率为48.38,帧率方差为1.37,GPU平均温度为49.47,CPU平均温度为51.06,电池平均温度为37.04, 帧数比值为2.75%,波动率为1.81。可以看出,在控制平均帧率从51.89fps降低到48.38fps时,GPU、CPU以及电池的温度全部下降,帧率方差、帧数比值和波动率也都相应下降,此时帧率处于相对稳定状态。
S505,提升SOC的工作频率。
具体实现中,可以通过单帧脉冲调频将SOC的所述工作频率调整为预设的最高频率。例如,可以将SOC的工作频率锁定为理论最高频率,持续一段时间后恢复为调整前的工作频率,其中,该一段时间可以为4ms,也可以是理论绘制时长,例如,对于最高帧率为60fps的游戏,该理论绘制时长为16.6ms。
在一种可选的方式中,可以在每帧图像绘制过程中,判断每帧图像的实际绘制时长是否超过理想的绘制时长,如果超过,则开始单帧脉冲调频,并在单帧图像绘制完成时,结束单帧脉冲调频,然后进行下一帧图像的绘制。
例如,假设每帧图像的理论绘制时长(也可以称为刷新屏幕周期)为16.6ms,如果每帧图像的实际绘制时长超过16.6ms,则图像绘制的速度赶不上屏幕刷新的速度,因此无法绘制完成图像并提供给屏幕显示,因而导致丢帧。在此过程中,为了避免丢帧,可以在每帧图像绘制到15ms还未结束时,获取当前CPU和DDR的当前负载,如果CPU或DDR的当前负载大于80%,可以进行单帧脉冲调频。
如图7所示,图7是本申请实施例提供的一种单帧脉冲调频的示意图。第一行为屏幕刷新的时间进度条,假设每帧图像的理论绘制时长为16.6ms,电子设备按照16.6ms周期进行屏幕刷新。第二行为图像绘制的时间进度条,从第二行的第1段时间看出,绘制完成单帧图像需要的实际绘制时长是20ms,已经超过刷新屏幕周期16.6ms,因此在单帧图像绘制到15ms时,判断单帧图像是否绘制完成,如果没有绘制完成,则在单帧图像的绘制到15ms(最理想的绘制时长)时,进行单帧脉冲调频,提高帧率,缩短单帧图像的绘制时长。从第二行的第2段时间看出,绘制完成单帧图像需要的实际绘制时长是16.6ms,该实际绘制时长等于刷新屏幕周期,可以不进行单帧脉冲调频。从第二行的第3段时间看出,绘制完成单帧图像需要的实际绘制时长是20ms,已经超过刷新屏幕周期16.6ms,因此在单帧图像绘制到15ms时,判断单帧图像是否绘制完成,如果没有绘制完成,则在单帧图像的绘制到15ms(最理想的绘制时长)时,进行单帧脉冲调频,提高帧率,缩短单帧图像的绘制时长。从第二行的第4段时间和第5段时间看出,绘制完成单帧图像需要的实际绘制时长都是15ms,均小于刷新屏幕周期16.6ms,因此不需要进行单帧脉冲调频。对于接下来各帧图像,如果实际绘制时长超过理论绘制时长,都可以按照上述方法进行单帧脉冲调频。
在另一种可选的方式中,电子设备连续绘制多帧图像(第1帧、第2帧、第3帧、第4帧、……),如果确定第1帧图像的实际绘制时长超过理论绘制时长,则在第2帧图像绘制到理论绘制时长时,开始单帧脉冲调频,并在第2帧图像绘制完成时,结束单帧脉冲调频,然后确定第3帧图像的实际绘制时长是否超过理论绘制时长,如果超过,则在第4帧图像绘制到理论绘制时长时,开始单帧脉冲调频,并在第4帧图像绘制完成时,结束单帧脉冲调频,以此类推。
S506,确定每帧图像的实际绘制时长是否缩短到合理水平。若是,则说明每帧图像 的实际绘制时长没有超过理论绘制时长,跳转到S501,继续监测实际帧率。若否,则执行S507。
具体实现中,可以在提升SOC的工作频率之后,确定每帧图像的实际绘制时长是否位于合理区间。例如,假设理论绘制时长为16.6ms,在提升SOC的工作频率之前,每帧图像的实际绘制时长是20ms,在提升SOC的工作频率之后,每帧图像的实际绘制时长缩短到15ms,由于实际绘制时长15ms位于合理区间、且为最理想的绘制时长,因此可以确定每帧图像的实际绘制时长已经缩短到合理水平。
S507,执行确定突发资源高需求流程。具体方式可以参考如下实施例。
在本申请实施例中,在帧率出现大幅波动的情况下,结合当前温度和实际绘制时长,调整SOC的工作频率,以便控制帧率的稳定。
请参考图8,图8是本申请实施例提供的又一种应用于终端的频率调整方法的流程示意图。如图所示,本申请实施例中的步骤至少包括:
S801,监测实际帧率。具体实现方式可以参考S301,本步骤不再赘述。
S802,确定每帧图像的实际绘制时长是否超过理论绘制时长。如果没有超过,则跳转到S801,继续监测实际帧率。如果超过,则执行S803。
S803,按照预设周期统计多帧图像的实际绘制时长,确定多帧图像的帧率变化情况是否处于相对稳定状态。若是,则跳转到S802,执行S802的步骤。若否,则执行S804。具体实现方式可以参考S303,本步骤不再赘述。
S804,获取SOC的的当前温度。
S805,确定当前温度是否超过第一预设阈值。若超过,执行S806。若没有超过,则执行S807。其中,第一预设阈值可以为,保持帧率稳定时SOC的最高温度,例如第一预设阈值可以为40摄氏度或39摄氏度。
S806,降低SOC的工作频率或者当前负载。具体实现方式可以参考S504,本步骤不再赘述。若执行完毕,则可以跳转到S802,继续执行S802的步骤。
S807,获取SOC的当前负载。
具体实现中,可以获取当前SOC的所处理的任务数量,然后将该任务数量除以SOC能够处理的最大任务数,计算得到SOC的当前负载。
S808,确定多帧图像的实际绘制时长的变化趋势。
具体实现中,可以统计所述多帧图像中每N帧图像的实际绘制时长之和,所述N为大于等于1的整数;然后根据多个所述N帧图像的所述绘制时长之和,确定所述绘制时长之和的增长量;最后根据所述绘制时长之和的增长量,确定所述多帧图像的所述实际绘制时长的所述变化趋势。例如,可以每隔5帧图像统计一次,每次统计5帧图像的实际绘制时长,确定多个5帧图像的实际绘制时长的变化情况。
S809,根据SOC的当前负载以及多个N帧图像的实际绘制时长的变化趋势,确定是否为突发资源高需求。如果是,则执行S810,如果否,则跳转到S803。
具体实现中,可以确定SOC的当前负载是否超过第二预设阈值、每个N帧图像的实际绘制时长减去理论绘制时长的差值是否大于第三预设阈值、且多个N帧图像的实际绘制时长之间的增长量是否大于第四预设阈值,确定是否为突发资源高需求。其中,第二预 设阈值可以SOC的最大负载数量,例如第二预设阈值70%或80%,第三预设阈值可以为理论绘制时长16.6ms,第四预设阈值也可以为理论绘制时长16.6ms等等。以上各个参数均可以根据具体场景进行设置。如果SOC的当前负载超过第二预设阈值、每个N帧图像的实际绘制时长减去理论绘制时长的差值大于第三预设阈值、且多个N帧图像的实际绘制时长之间的增长量大于第四预设阈值,则确定为突发资源高需求。
例如,假设每帧图像的理论绘制时长为16.6ms。实时监控5帧图像的实际绘制时长,将该5帧图像的实际绘制时长与5帧图像的理论绘制时长进行比较,如果5帧图像的实际总绘制时长减去5帧图像的理论绘制时长的差值大于16.6ms,可以确定为资源高需求。同时,可以将监控到的5帧图像的实际绘制时长与之前监测到的5帧图像的实际绘制时长进行对比,如果该5帧图像的实际绘制时长大于之前监测到的5帧图像的实际绘制时长,且二者之间的增长值大于16.6ms,并且SOC的当前负载大于80%,则确定为突发资源高需求。
S810,提升SOC的工作频率,提供短时高资源供给。在执行完成后,跳转到S803,执行S803的步骤。
具体实现中,SOC可以包括CPU、DDR和GPU,每个调频组合包括CPU对应的频率、DDR对应的频率以及GPU对应的频率。可以预先按照不同的档位设置多个调频组合,并按照每个调频组合的能效比对多个调频组合进行排序,其中,随着档位提升,能效比依次递增。当需要提升SOC的工作频率时,可以提升调频组合的一个档位,然后监控5帧图像的实际绘制时长,确定该5帧图像的实际绘制时长是否降低到5帧图像的理论绘制时长内,如果降低到5帧图像的理论绘制时长内,则可以在连续2个调频周期内提升SOC的工作频率后结束。如果在提升一个档位之后5帧图像的实际绘制时长仍然超过5帧图像的理论绘制时长,则可以再次提升一个档位,依次类推。本申请实施例中的调频周期可以为一个理论绘制时长(如16.6ms),也可以为预设时间段(如4ms),本申请实施例不做限定。
在本申请实施例中,在帧率出现大幅波动的情况下,结合实际绘制时长、SOC的当前负载以及当前温度,判断是否为突发资源高需求。在判断突发资源高需求的情况下调整SOC的工作频率,保障SOC的及时充分供给,从而减小功耗以及帧率的大幅波动。
请参考图9,图9是本申请实施例提供的又一种应用于终端的频率调整方法的流程示意图。如图所示,本申请实施例中的步骤至少包括:
S901,监测实际帧率。具体实现方式可以参考上述实施例,本步骤不再赘述。
S902,确定每帧图像的实际绘制时长是否超过理论绘制时长。如果没有超过,则跳转到S901,继续监测实际帧率。如果超过,则执行S903。
S903,获取SOC的当前负载。具体实现方式可以参考上述实施例,本步骤不再赘述。
S904,确定SOC的当前负载是否超过第二预设阈值。具体实现方式可以参考上述实施例,本步骤不再赘述。
S905,单帧脉冲调频。
具体实现中,可以调用Android系统提供的CPU和DDR频率设置接口,将CPU和DDR的工作频率锁定为理论最高频率,持续一段时间后恢复为调整前的工作频率,其中, 该一段时间可以为4ms,也可以是理论绘制时长,例如,对于最高帧率为60fps的游戏,该理论绘制时长为16.6ms。具体实现方式可以参考上述实施例,本步骤不再赘述。在完成单帧脉冲调频之后,可以跳转到S902,确定下一帧图像的实际绘制时长是否超过理论绘制时长。
请参考图10,图10是本申请实施例提供的又一种应用于终端的频率调整方法的流程示意图。如图所示,本申请实施例中的步骤至少包括:
S1001,监测实际帧率,具体实现方式可以参考上述实施例,本步骤不再赘述。
S1002,获取N帧图像的实际绘制时长之和,并确定在绘制N帧图像中每帧图像时SOC的当前负载。具体实现方式可以参考上述实施例,本步骤不再赘述。
S1003,确定N帧图像的实际绘制时长之和是否大于第一预设阈值,若N帧图像的实际绘制时长之和大于第一预设阈值,并且N帧图像的实际绘制时长处于不断增长的趋势,则执行S1004。若N帧图像的实际绘制时长之和不大于第一预设阈值、或N帧图像的实际绘制时长没有出现不断增长的趋势,则跳转到S1002,执行S1002的步骤。其中,第一预设阈值可以为理想绘制时长16.6ms*N。N可以为3、4或5等等。
S1004,确定SOC的当前负载是否大于第二预设阈值,若大于,则执行S1005,若不大于,则跳转到S1002,执行S1002的步骤。其中,第二预设阈值可以为70%。
S1005,提升SOC的工作频率。具体实现方式可以参考上述实施例中S811的方法,本步骤不再赘述。
请参考图11,图11是本申请实施例提供的又一种频率调整方法的流程示意图。如图所示,本申请实施例中的步骤至少包括:
S1101,监测实际帧率。具体实现方式可以参考上述实施例,本步骤不再赘述。
S1102,确定多帧图像的实际绘制时长是否处于相对稳定状态。若是,则跳转到S1101,若否,则执行S1103。具体实现方式可以参考上述实施例,本步骤不再赘述。
S1103,获取SOC的当前温度。具体实现方式可以参考上述实施例,本步骤不再赘述。
S1104,确定当前温度是否超过第一预设阈值。其中,第一预设阈值可以为在保持帧率情况下SOC的最高温度,例如39摄氏度或40摄氏度等等。若超过,则执行S1105。
S1105,调整SOC的工作频率。降低SOC的工作频率或者当前负载。具体实现方式可以参考上述实施例,本步骤不再赘述。
如图12所示,图12是本申请实施例提供的一种应用于终端的频率调整装置。本申请实施例中的装置至少可以包括:
监测模块1201,用于监测第一帧图像的绘制时间;
获取模块1202,用于当所述绘制时间超过第一绘制时长时,获取系统级芯片SOC的当前状态,所述当前状态为以下参数的任意一项或多项组合:
所述SOC的当前温度和所述SOC的当前负载;
处理模块1203,用于判断所述当前状态是否超过第一预设阈值;
处理模块1203,还用于若否,在一段时间范围内提升所述SOC的工作频率,并在提升所述工作频率结束后恢复所述工作频率;
获取模块1202,还用于在所述第一帧图像绘制完成时,获取所述第一帧图像的实际绘制时长;
监测模块1201,还用于当所述实际绘制时长没有超过第二绘制时长时,监测第二帧图像的绘制时间,其中,所述第二绘制时长为根据预先配置的最高帧率确定的,所述第一绘制时长小于所述第二绘制时长。
其中,所述时间范围为预设的时间段,或所述时间范围为提升所述SOC的工作频率的开始时间点至绘制所述第一帧图像的结束时间点之间的时长。
处理模块1203,还用于当所述当前状态超过所述第一预设阈值时,在所述第一帧图像绘制完成后,延迟预设时长通知应用所述第一帧图像绘制完成。
获取模块1202,还用于当所述实际绘制时长超过所述第二绘制时长时,获取所述第二帧图像至第N帧图像的第一时长之和、以及第N+1帧图像至第2N-1帧图像的第二时长之和,以及获取所述SOC的当前负载,其中,所述N为大于2的正整数;
处理模块1203,还用于当所述第二时长之和减去所述第一时长之和的值大于第二预设阈值、且所述当前负载大于第三预设阈值时,提升所述SOC的工作频率。
其中,所述第一绘制时长为13ms或15ms,所述第一预设阈值为70%或80%。
需要说明的是,各个模块的实现还可以对应参照图3至图11所示的方法实施例的相应描述,执行上述实施例中电子设备所执行的方法和功能。
请继续参考图13,图13是本申请实施例提出的一种电子设备的结构示意图。如图13所示,该电子设备1301可以包括:至少一个处理器1301,至少一个通信接口1302,至少一个存储器1303和至少一个通信总线1304。其中,处理器1301可以包括图形绘制模块101、图像显示模块102、温度采集模块103、信息采集模块104以及调频模块105等等,当然,在有些实施方式中,处理器和存储器还可以集成在一起。该电子设备可以是芯片。
其中,处理器1301可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理器和微处理器的组合等等。通信总线1304可以是外设部件互连标准PCI总线或扩展工业标准结构EISA总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图13中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。通信总线1304用于实现这些组件之间的连接通信。其中,本申请实施例中设备的通信接口1302用于与其他节点设备进行信令或数据的通信。存储器1303可以包括易失性存储器,例如非挥发性动态随机存取内存(nonvolatile random access memory,NVRAM)、相变化随机存取内存(phase change RAM,PRAM)、磁阻式随机存取内存(magetoresistive RAM,MRAM)等,还可以包括非易失性存储器,例如至少一个磁盘存储器件、电子可擦除可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、闪存器件,例如反或闪存(NOR flash memory)或是反及闪存(NAND flash memory)、半导体器件,例如固态硬盘(solid state disk,SSD)等。存储器1303可选的还可以是至少一个位于远离前述处理器1301的存储装置。存储器1303中可选的还可以存储一组程序代码,且处理器1301可选的还可以执行存储器1303中所执行的程序。
监测第一帧图像的绘制时间;
当所述绘制时间超过第一绘制时长时,获取系统级芯片SOC的当前状态,所述当前状态为以下参数的任意一项或多项组合:
所述SOC的当前温度和所述SOC的当前负载;
判断所述当前状态是否超过第一预设阈值;
若否,在一段时间范围内提升所述SOC的工作频率,并在提升所述工作频率结束后恢复所述工作频率;
在所述第一帧图像绘制完成时,获取所述第一帧图像的实际绘制时长;
当所述实际绘制时长没有超过第二绘制时长时,监测第二帧图像的绘制时间,其中,所述第二绘制时长为根据预先配置的最高帧率确定的,所述第一绘制时长小于所述第二绘制时长。
其中,所述时间范围为预设的时间段,或所述时间范围为提升所述SOC的工作频率的开始时间点至绘制所述第一帧图像的结束时间点之间的时长。
可选的,处理器1301还用于执行如下操作:
当所述当前状态超过所述第一预设阈值时,在所述第一帧图像绘制完成后,延迟预设时长通知应用所述第一帧图像绘制完成。
可选的,处理器1301还用于执行如下操作:
当所述实际绘制时长超过所述第二绘制时长时,获取所述第二帧图像至第N帧图像的第一时长之和、以及第N+1帧图像至第2N-1帧图像的第二时长之和,以及获取所述SOC的当前负载,其中,所述N为大于2的正整数;
当所述第二时长之和减去所述第一时长之和的值大于第二预设阈值、且所述当前负载大于第三预设阈值时,提升所述SOC的工作频率。
其中,所述第一绘制时长为13ms或15ms,所述第一预设阈值为70%或80%。
进一步的,处理器还可以与存储器和通信接口相配合,执行上述申请实施例中应用于终端的频率调整装置的操作。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘solid state disk(SSD))等。
以上所述的具体实施方式,对本申请的目的、技术方案和有益效果进行了进一步详细说明。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。
Claims (13)
- 一种应用于终端的频率调整方法,其特征在于,所述方法包括:监测第一帧图像的绘制时间;当所述绘制时间超过第一绘制时长时,获取系统级芯片SOC的当前状态,所述当前状态为以下参数的任意一项或多项组合:所述SOC的当前温度和所述SOC的当前负载;判断所述当前状态是否超过第一预设阈值;若否,在一段时间范围内提升所述SOC的工作频率,并在提升所述工作频率结束后恢复所述工作频率;在所述第一帧图像绘制完成时,获取所述第一帧图像的实际绘制时长;当所述实际绘制时长没有超过第二绘制时长时,监测第二帧图像的绘制时间,其中,所述第二绘制时长为根据预先配置的最高帧率确定的,所述第一绘制时长小于所述第二绘制时长。
- 如权利要求1所述的方法,其特征在于,所述时间范围为预设的时间段,或所述时间范围为提升所述SOC的工作频率的开始时间点至绘制所述第一帧图像的结束时间点之间的时长。
- 如权利要求1或2所述的方法,其特征在于,所述判断所述当前状态是否超过第一预设阈值之后,还包括当所述当前状态超过所述第一预设阈值时,在所述第一帧图像绘制完成后,延迟预设时长通知应用所述第一帧图像绘制完成。
- 如权利要求1-3任一项所述的方法,其特征在于,所述方法还包括:当所述实际绘制时长超过所述第二绘制时长时,获取所述第二帧图像至第N帧图像的第一时长之和、以及第N+1帧图像至第2N-1帧图像的第二时长之和,以及获取所述SOC的当前负载,其中,所述N为大于2的正整数;当所述第二时长之和减去所述第一时长之和的值大于第二预设阈值、且所述当前负载大于第三预设阈值时,提升所述SOC的工作频率。
- 如权利要求1-4任一项所述的方法,其特征在于,所述第一绘制时长为13ms或15ms,所述第一预设阈值为70%或80%。
- 一种应用于终端的频率调整装置,其特征在于,所述装置包括:监测模块,用于监测第一帧图像的绘制时间;获取模块,用于当所述绘制时间超过第一绘制时长时,获取系统级芯片SOC的当前 状态,所述当前状态为以下参数的任意一项或多项组合:所述SOC的当前温度和所述SOC的当前负载;处理模块,用于判断所述当前状态是否超过第一预设阈值;所述处理模块,还用于若否,在一段时间范围内提升所述SOC的工作频率,并在提升所述工作频率结束后恢复所述工作频率;所述获取模块,还用于在所述第一帧图像绘制完成时,获取所述第一帧图像的实际绘制时长;所述监测模块,还用于当所述实际绘制时长没有超过第二绘制时长时,监测第二帧图像的绘制时间,其中,所述第二绘制时长为根据预先配置的最高帧率确定的,所述第一绘制时长小于所述第二绘制时长。
- 如权利要求6所述的装置,其特征在于,所述时间范围为预设的时间段,或所述时间范围为提升所述SOC的工作频率的开始时间点至绘制所述第一帧图像的结束时间点之间的时长。
- 如权利要求6或7所述的装置,其特征在于,所述处理模块,还用于当所述当前状态超过所述第一预设阈值时,在所述第一帧图像绘制完成后,延迟预设时长通知应用所述第一帧图像绘制完成。
- 如权利要求6-8任一项所述的装置,其特征在于,所述获取模块,还用于当所述实际绘制时长超过所述第二绘制时长时,获取所述第二帧图像至第N帧图像的第一时长之和、以及第N+1帧图像至第2N-1帧图像的第二时长之和,以及获取所述SOC的当前负载,其中,所述N为大于2的正整数;所述处理模块,还用于当所述第二时长之和减去所述第一时长之和的值大于第二预设阈值、且所述当前负载大于第三预设阈值时,提升所述SOC的工作频率。
- 如权利要求6-9任一项所述的装置,其特征在于,所述第一绘制时长为13ms或15ms,所述第一预设阈值为70%或80%。
- 一种电子设备,其特征在于,包括:存储器、通信总线以及处理器,其中,所述存储器用于存储程序代码,所述处理器用于调用所述程序代码,用于执行权利要求1-5任一项所述的方法。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行权利要求1-5任一项所述的方法。
- 一种包含指令的计算机程序产品,其特征在于,当其在计算机上运行时,使得计算机执行权利要求1-5任一项所述的方法。
Priority Applications (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP19922219.1A EP3926576A4 (en) | 2019-03-27 | 2019-03-27 | FREQUENCY ADJUSTMENT METHOD AND EQUIPMENT APPLIED TO TERMINAL AND ELECTRONIC DEVICE |
US17/598,024 US11430358B2 (en) | 2019-03-27 | 2019-03-27 | Frequency adjustment method and apparatus applied to terminal, and electronic device |
PCT/CN2019/079953 WO2020191685A1 (zh) | 2019-03-27 | 2019-03-27 | 一种应用于终端的频率调整方法、装置及电子设备 |
CN201980057042.XA CN112789651B (zh) | 2019-03-27 | 2019-03-27 | 一种应用于终端的频率调整方法、装置及电子设备 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2019/079953 WO2020191685A1 (zh) | 2019-03-27 | 2019-03-27 | 一种应用于终端的频率调整方法、装置及电子设备 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020191685A1 true WO2020191685A1 (zh) | 2020-10-01 |
Family
ID=72610845
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/079953 WO2020191685A1 (zh) | 2019-03-27 | 2019-03-27 | 一种应用于终端的频率调整方法、装置及电子设备 |
Country Status (4)
Country | Link |
---|---|
US (1) | US11430358B2 (zh) |
EP (1) | EP3926576A4 (zh) |
CN (1) | CN112789651B (zh) |
WO (1) | WO2020191685A1 (zh) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113936622A (zh) * | 2021-09-30 | 2022-01-14 | 联想(北京)有限公司 | 一种处理方法和装置 |
CN114510140A (zh) * | 2020-11-16 | 2022-05-17 | 深圳市万普拉斯科技有限公司 | 一种调频方法、装置及电子设备 |
CN115017003A (zh) * | 2021-12-22 | 2022-09-06 | 荣耀终端有限公司 | 负载预测方法和负载预测装置 |
Families Citing this family (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115499699B (zh) * | 2021-06-17 | 2024-09-17 | 华为技术有限公司 | 一种投屏方法 |
CN115904184B (zh) * | 2021-09-30 | 2024-03-19 | 荣耀终端有限公司 | 数据处理方法和相关装置 |
CN115017002B (zh) * | 2021-12-22 | 2023-04-18 | 荣耀终端有限公司 | 频率预测方法和频率预测装置 |
CN115639920B (zh) * | 2021-12-24 | 2023-12-22 | 荣耀终端有限公司 | 绘制方法、电子设备和可读存储介质 |
CN114579075B (zh) * | 2022-01-30 | 2023-01-17 | 荣耀终端有限公司 | 数据处理方法和相关装置 |
CN114265492B (zh) * | 2022-03-02 | 2022-08-23 | 荣耀终端有限公司 | 开机方法、装置和电子设备 |
CN114911336B (zh) * | 2022-03-17 | 2023-04-07 | 荣耀终端有限公司 | 调整频率的方法、装置、电子设备及可读存储介质 |
CN117896590A (zh) * | 2022-06-02 | 2024-04-16 | 荣耀终端有限公司 | 弹幕识别方法和相关装置 |
CN115103210B (zh) * | 2022-07-12 | 2024-02-20 | 北京字跳网络技术有限公司 | 信息处理方法、装置、终端和存储介质 |
CN116048772B (zh) * | 2022-08-26 | 2023-10-31 | 荣耀终端有限公司 | 中央处理单元频率的调整方法、装置和终端设备 |
CN116704087B (zh) * | 2022-10-17 | 2024-02-27 | 荣耀终端有限公司 | 一种参数调整方法及电子设备 |
CN115942131B (zh) * | 2023-02-09 | 2023-09-01 | 蔚来汽车科技(安徽)有限公司 | 保障车辆环视功能的方法、座舱系统及车辆、存储介质 |
CN117130459B (zh) * | 2023-04-06 | 2024-05-24 | 荣耀终端有限公司 | 帧率调整方法、设备及存储介质 |
CN117149409B (zh) * | 2023-05-16 | 2024-09-27 | 荣耀终端有限公司 | 一种调整cpu频率的方法及终端设备 |
CN116449961B (zh) * | 2023-06-14 | 2023-10-10 | 蔚来汽车科技(安徽)有限公司 | 输入事件控制方法、系统、电子设备、存储介质及车辆 |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140184619A1 (en) * | 2013-01-03 | 2014-07-03 | Samsung Electronics Co., Ltd. | System-on-chip performing dynamic voltage and frequency scaling |
CN106020990A (zh) * | 2016-06-30 | 2016-10-12 | 宇龙计算机通信科技(深圳)有限公司 | 一种中央处理器的控制方法及终端设备 |
CN108345513A (zh) * | 2018-03-20 | 2018-07-31 | 北京小米移动软件有限公司 | 终端运行方法及装置 |
Family Cites Families (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140089699A1 (en) * | 2012-09-27 | 2014-03-27 | Advanced Micro Devices | Power management system and method for a processor |
CN103077015B (zh) | 2012-12-25 | 2015-08-05 | 福州博远无线网络科技有限公司 | 一种动态控制游戏帧率的方法 |
CN103366391B (zh) | 2013-06-26 | 2016-07-06 | 广州市动景计算机科技有限公司 | 动态图像的画面渲染方法及画面渲染装置 |
US10008182B2 (en) * | 2014-09-12 | 2018-06-26 | Samsung Electronics Co., Ltd. | System-on-chip (SoC) devices, display drivers and SoC systems including the same |
CN105049609B (zh) | 2015-06-29 | 2019-05-03 | 惠州Tcl移动通信有限公司 | 一种优化游戏画面的方法及系统 |
US10147370B2 (en) * | 2015-10-29 | 2018-12-04 | Nvidia Corporation | Variable refresh rate gamma correction |
KR20170060980A (ko) * | 2015-11-25 | 2017-06-02 | 삼성전자주식회사 | 구동 주파수를 제어하는 전자 장치와 이의 동작 방법 |
EP3264268A1 (en) * | 2016-06-29 | 2018-01-03 | Intel Corporation | Distributed processing qos algorithm for system performance optimization under thermal constraints |
US11474591B2 (en) * | 2016-08-05 | 2022-10-18 | Ati Technologies Ulc | Fine-grain GPU power management and scheduling for virtual reality applications |
CN106816134B (zh) | 2017-01-24 | 2021-02-09 | Oppo广东移动通信有限公司 | 显示帧率调整方法、装置和终端设备 |
US10425615B2 (en) * | 2017-05-10 | 2019-09-24 | Mediatek Inc. | Apparatuses and methods for dynamic frame rate adjustment |
JP7429558B2 (ja) * | 2020-02-14 | 2024-02-08 | シャープ株式会社 | リフレッシュレート設定装置、リフレッシュレート設定方法、及びリフレッシュレート設定プログラム |
-
2019
- 2019-03-27 WO PCT/CN2019/079953 patent/WO2020191685A1/zh unknown
- 2019-03-27 US US17/598,024 patent/US11430358B2/en active Active
- 2019-03-27 EP EP19922219.1A patent/EP3926576A4/en active Pending
- 2019-03-27 CN CN201980057042.XA patent/CN112789651B/zh active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140184619A1 (en) * | 2013-01-03 | 2014-07-03 | Samsung Electronics Co., Ltd. | System-on-chip performing dynamic voltage and frequency scaling |
CN106020990A (zh) * | 2016-06-30 | 2016-10-12 | 宇龙计算机通信科技(深圳)有限公司 | 一种中央处理器的控制方法及终端设备 |
CN108345513A (zh) * | 2018-03-20 | 2018-07-31 | 北京小米移动软件有限公司 | 终端运行方法及装置 |
Non-Patent Citations (1)
Title |
---|
See also references of EP3926576A4 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114510140A (zh) * | 2020-11-16 | 2022-05-17 | 深圳市万普拉斯科技有限公司 | 一种调频方法、装置及电子设备 |
CN114510140B (zh) * | 2020-11-16 | 2024-04-16 | 深圳市万普拉斯科技有限公司 | 一种调频方法、装置及电子设备 |
CN113936622A (zh) * | 2021-09-30 | 2022-01-14 | 联想(北京)有限公司 | 一种处理方法和装置 |
CN115017003A (zh) * | 2021-12-22 | 2022-09-06 | 荣耀终端有限公司 | 负载预测方法和负载预测装置 |
Also Published As
Publication number | Publication date |
---|---|
US11430358B2 (en) | 2022-08-30 |
US20220165191A1 (en) | 2022-05-26 |
CN112789651B (zh) | 2023-07-18 |
EP3926576A1 (en) | 2021-12-22 |
CN112789651A (zh) | 2021-05-11 |
EP3926576A4 (en) | 2022-03-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020191685A1 (zh) | 一种应用于终端的频率调整方法、装置及电子设备 | |
WO2020259452A1 (zh) | 一种移动终端的全屏显示方法及设备 | |
WO2020253719A1 (zh) | 一种录屏方法及电子设备 | |
WO2021175213A1 (zh) | 刷新率切换方法和电子设备 | |
US11573829B2 (en) | Task processing method and apparatus, terminal, and computer readable storage medium | |
CN113726950B (zh) | 一种图像处理方法和电子设备 | |
US11818497B2 (en) | Recording frame rate control method and related apparatus | |
WO2020093988A1 (zh) | 一种图像处理方法及电子设备 | |
WO2021052070A1 (zh) | 一种帧率识别方法及电子设备 | |
CN111522425A (zh) | 一种电子设备的功耗控制方法及电子设备 | |
WO2022170856A1 (zh) | 建立连接的方法与电子设备 | |
WO2022170854A1 (zh) | 视频通话的方法与相关设备 | |
WO2023179123A1 (zh) | 蓝牙音频播放方法、电子设备及存储介质 | |
WO2022166435A1 (zh) | 分享图片的方法和电子设备 | |
WO2021052388A1 (zh) | 一种视频通信方法及视频通信装置 | |
CN112437341B (zh) | 一种视频流处理方法及电子设备 | |
CN116048831B (zh) | 一种目标信号处理方法和电子设备 | |
WO2022135195A1 (zh) | 显示虚拟现实界面的方法、装置、设备和可读存储介质 | |
CN117013660B (zh) | 一种充电图标显示方法及电子设备 | |
CN116915896B (zh) | 防止蓝牙音频Track音轨抖动的方法及相关设备 | |
RU2782255C1 (ru) | Способ управления частотой кадров записи и соответствующее устройство | |
WO2023197999A1 (zh) | 显示方法及电子设备 | |
CN118447141A (zh) | 图像显示方法及相关装置 | |
CN115033094A (zh) | 一种评估用户运动状态的方法及相关设备 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19922219 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
ENP | Entry into the national phase |
Ref document number: 2019922219 Country of ref document: EP Effective date: 20210917 |