CN112363842A - Frequency adjusting method and device for graphic processor, electronic equipment and storage medium - Google Patents

Frequency adjusting method and device for graphic processor, electronic equipment and storage medium Download PDF

Info

Publication number
CN112363842A
CN112363842A CN202011367581.4A CN202011367581A CN112363842A CN 112363842 A CN112363842 A CN 112363842A CN 202011367581 A CN202011367581 A CN 202011367581A CN 112363842 A CN112363842 A CN 112363842A
Authority
CN
China
Prior art keywords
frequency
characteristic information
historical
gpu
operation characteristic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011367581.4A
Other languages
Chinese (zh)
Other versions
CN112363842B (en
Inventor
常欣宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN202011367581.4A priority Critical patent/CN112363842B/en
Publication of CN112363842A publication Critical patent/CN112363842A/en
Application granted granted Critical
Publication of CN112363842B publication Critical patent/CN112363842B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/10Geometric effects
    • G06T15/20Perspective computation
    • G06T15/205Image-based rendering
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computing Systems (AREA)
  • Geometry (AREA)
  • Computer Graphics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a frequency adjustment method and device of a graphic processor, electronic equipment and a storage medium, and relates to the technical field of terminals. The method comprises the steps of obtaining current operation characteristic information of the electronic equipment, wherein the current operation characteristic information at least comprises current application scene information and current system state information, inputting the current operation characteristic information into a pre-trained frequency prediction model, obtaining expected working frequency of a graphic processor GPU output by the frequency prediction model, wherein the frequency prediction model is obtained by training based on a plurality of historical operation characteristic information and historical working frequency of the GPU corresponding to the historical operation characteristic information, and adjusting the working frequency of the GPU according to the expected working frequency. Therefore, after the working frequency of the GPU is adjusted according to the expected working frequency of the GPU predicted by the characteristic data of the current moment, the working frequency of the GPU can meet the habit of a user and the requirement of the user on the GPU, and the user experience is improved.

Description

Frequency adjusting method and device for graphic processor, electronic equipment and storage medium
Technical Field
The present application relates to the field of terminal technologies, and in particular, to a method and an apparatus for adjusting a frequency of a graphics processor, an electronic device, and a storage medium.
Background
With the rapid progress of the technology level and the living standard, electronic devices (such as tablet computers, smart phones, etc.) have become one of the most common consumer electronic products in people's daily life. A Graphic Processing Unit (GPU) is generally disposed in an existing electronic device to better complete rendering of an image, and an operating frequency is generally adjusted according to an actual operating condition during a use process of the electronic device. In the related art, a fixed strategy is usually adopted to adjust the operating frequency of the GPU, but such a way may not be consistent with the usage habit of the user, and may affect the usage experience of the user.
Disclosure of Invention
In view of the above, the present application provides a method and an apparatus for adjusting a frequency of a graphics processor, an electronic device, and a storage medium.
In a first aspect, an embodiment of the present application provides a method for adjusting a frequency of a graphics processor, where the method includes: acquiring current operation characteristic information of the electronic equipment, wherein the current operation characteristic information at least comprises current application scene information and current system state information; inputting the current operation characteristic information into a pre-trained frequency prediction model to obtain an expected working frequency of a Graphic Processor (GPU) output by the frequency prediction model, wherein the frequency prediction model is obtained by training based on a plurality of historical operation characteristic information and historical working frequencies of the GPUs corresponding to the historical operation characteristic information; and adjusting the working frequency of the GPU according to the expected working frequency.
In a second aspect, an embodiment of the present application provides an apparatus for adjusting a frequency of a graphics processor, the apparatus including: the device comprises an information acquisition module, a frequency prediction module and a frequency adjustment module. The information acquisition module is used for acquiring current operation characteristic information of the electronic equipment, wherein the current operation characteristic information at least comprises current application scene information and current system state information; the frequency prediction module is used for inputting the current operation characteristic information into a pre-trained frequency prediction model to obtain the expected working frequency of the GPU (graphics processing Unit) output by the frequency prediction model, wherein the frequency prediction model is obtained by training based on a plurality of historical operation characteristic information and the historical working frequency of the GPU corresponding to the historical operation characteristic information; and the frequency adjusting module is used for adjusting the working frequency of the GPU according to the expected working frequency.
In a third aspect, an embodiment of the present application provides an electronic device, including: one or more processors; a memory; one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of frequency adjustment for a graphics processor provided by the first aspect.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where a program code is stored in the computer-readable storage medium, and the program code may be called by a processor to execute the frequency adjustment method of the graphics processor provided in the first aspect.
According to the scheme, the current operation characteristic information of the electronic equipment is obtained, wherein the current operation characteristic information at least comprises current application scene information and current system state information, the current operation characteristic information is input into a pre-trained frequency prediction model to obtain the expected working frequency of the GPU output by the frequency prediction model, the frequency prediction model is obtained based on a plurality of historical operation characteristic information and historical working frequencies of GPUs corresponding to the historical operation characteristic information, and finally the working frequency of the GPU is adjusted according to the expected working frequency. Therefore, the frequency prediction model is obtained based on the historical operating characteristic information and the historical working frequency corresponding to the historical operating characteristic information through training, so that the frequency prediction model can learn the use habits of users and the requirements for the GPU under the condition of different historical characteristic information, and the working frequency of the GPU can be adjusted according to the expected working frequency of the GPU predicted by the characteristic data at the current moment, so that the working frequency of the GPU can meet the habits of the users and the requirements for the GPU, and the user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart illustrating a method for adjusting a frequency of a graphics processor according to an embodiment of the present disclosure.
Fig. 2 is a flowchart illustrating a method for adjusting a frequency of a graphics processor according to another embodiment of the present disclosure.
Fig. 3 is a flow chart illustrating sub-steps of step S210 shown in fig. 2 in one embodiment.
Fig. 4 is a flow chart illustrating sub-steps of step S212 shown in fig. 3 in one embodiment.
FIG. 5 is a flowchart illustrating a method for adjusting a frequency of a graphics processor according to another embodiment of the present application
Fig. 6 is a block diagram of a frequency adjustment apparatus of a graphics processor according to an embodiment of the present application.
Fig. 7 is a block diagram of an electronic device for executing a frequency adjustment method of a graphics processor according to an embodiment of the present application.
Fig. 8 is a memory unit for storing or carrying program codes for implementing a frequency adjustment method of a graphic processor according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
In the related art, the frequency of the GPU is usually adjusted by a GPU frequency modulation mechanism of a mobile phone manufacturer. For example, in a frequency modulation method based on a fixed condition of GPU load and power consumption, when the GPU load is high, the operating frequency of the GPU is increased, and when the GPU power consumption is high, the operating frequency of the GPU is decreased. However, in such a method, there may be a case where the habit of the user is not matched, and the user experience is not good.
In view of the above problems, the inventor provides a frequency adjustment method and device for a graphics processor, and an electronic device, which can obtain an expected operating frequency based on a frequency prediction model and current operating characteristic information, and since the frequency prediction model is obtained based on historical operating characteristic information and historical operating frequency corresponding to the historical operating characteristic information through training, the frequency prediction model can learn the use habits of a user and the requirements for a GPU under the condition of different historical characteristic information, so that the expected operating frequency of the GPU is predicted according to the characteristic data of the current time, and after the operating frequency of the GPU is adjusted, the operating frequency of the GPU can meet the user habits and the requirements for the GPU, and user experience is improved. This is described in detail below.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for adjusting a frequency of a graphics processor according to an embodiment of the present disclosure. The method for adjusting the frequency of the graphics processor according to the embodiment of the present application will be described in detail with reference to fig. 1. The frequency modulation method of the graphic processor can comprise the following steps:
step S110: and acquiring current operation characteristic information of the electronic equipment, wherein the current operation characteristic information at least comprises current application scene information and current system state information.
In this embodiment, the electronic device may be a mobile phone, a tablet computer, a smart watch, a game machine, and the like, and the current operation feature information of the electronic device may represent device features of the electronic device when the electronic device operates in a certain application field environment. The current operation characteristic information may include current application scenario information and current system state information of the electronic device. The application scene information may represent characteristics of an application scene of the electronic device during operation, and the system state information may represent characteristics of a system state of the electronic device during operation.
In some embodiments, the current application scenario information of the electronic device may include: the system comprises running application programs, currently running application functions, audio playing information, video playing information, game information, a current running mode, voice acquisition information, image acquisition information and the like; the current system state information of the electronic device may include at least one of load information of a Central Processing Unit (CPU) and a number of applications running in a background. The running application function program may be a specific software currently running on the electronic device, such as music software, game software, video software, or novel software; the currently running application function may be a function currently used by the electronic device, for example, an application function that the electronic device is currently playing music, playing video, or reading a novel; the audio playing information may include information such as whether to turn on a speaker when playing music, whether to access an earphone to the electronic device, the duration of music being played, and the volume of the music being played; the video playing information may include information such as whether to turn on a speaker when playing a video, whether to access an earphone to the electronic device, a duration of the video, a picture quality of the video, and a volume of the played video; the game information can comprise information such as the resolution of the game, the number of game characters, interface animation, picture quality, stroke of each game character and the like; the current operation mode may include an operation mode of the electronic device, such as a normal operation mode, a power saving mode, a do-not-disturb mode, or an airplane mode; the voice acquisition information may include information such as whether to turn on a microphone of the electronic device, a duration of the acquired voice information, and a volume of the acquired voice information; the image acquisition information may include information such as whether to turn on a camera, whether to turn on a flash, and the quality of a captured image; the load information of the CPU can be the working frequency, the working load size or the CPU running temperature of the central processing unit; the number of application functions running in the background may be the number of applications running in the background.
It can be understood that, when the electronic device is in a game, the electronic device needs to render each image frame in the game, the GPU requirements corresponding to the different numbers of characters in each image frame are also different, and the electronic device in the game has more requirements on the GPU, so the electronic device in the game needs a higher GPU frequency to render each image frame in the game; for the situation that if the electronic device is detected to start voice or audio playing, the user may switch to the interface for music playing or the call interface, correspondingly, the GPU is mainly used for rendering the image frames of the switched image, and the GPU is less required in the music playing process or the call process, so that the image of the electronic device can be rendered only with a lower GPU frequency in this situation. Therefore, the requirement on the GPU is related to the application scene, and therefore when the expected working frequency needs to be predicted to obtain the current running characteristic information, the current application scene information can be obtained.
Similarly, the load information of the CPU may also affect the rendering of the GPU, and the GPU is responsible for sending the image information to be rendered to the CPU for operation, it can be understood that the faster the operation speed of the CPU is, the better the performance of the GPU can be exerted, but if the operating frequency of the CPU is lower and the operation speed is lower, the electronic device may be stuck, for example, in the case of the electronic device in a game, even if the GPU is in a higher operating frequency, the game screen can be better rendered, and the image quality of the rendered game is higher, but because the operating frequency of the CPU is low, the performance of the CPU is limited, the game frame dropping or sticking may be caused, and even if the temperature of the CPU is too high in this case, the electronic device may be automatically turned off or restarted. In addition, the number of applications in the background of the electronic device may also affect the operating frequency of the CPU, and thus the rendering of the GPU on the screen. Therefore, the actual operation performance of the GPU is related to the system state information, so that when the expected working frequency needs to be predicted to obtain the current operation characteristic information, the current system state information can be obtained.
For example, the electronic device may be a mobile phone that is playing a video, and obtaining the current running characteristic information of the electronic device may be equivalent to obtaining current application scene information (video being played) of the mobile phone, and correspondingly, further obtain system state information in an application scene where the video is played, for example, CPU load information when the video is played and/or the number of applications that are running in the background of the mobile phone at the current time.
Step S120: and inputting the current operation characteristic information into a pre-trained frequency prediction model to obtain the expected working frequency of the GPU output by the frequency prediction model, wherein the frequency prediction model is obtained by training based on a plurality of historical operation characteristic information and the historical working frequency of the GPU corresponding to the historical operation characteristic information.
In this embodiment, a frequency prediction model trained in advance is stored in the electronic device, and when the prediction model is trained, the frequency prediction model may be obtained by training through a machine learning algorithm such as logistic regression or a neural network according to sample input and sample output, where the historical operating characteristic information may be used as the sample input, and the historical operating frequency of the GPU corresponding to the historical operating characteristic information may be used as the sample output, and the specific type and the training mode of the frequency prediction model are not limited in this embodiment.
Optionally, after acquiring the current operation feature information of the electronic device, inputting the current operation feature information into the frequency prediction model, and outputting, by the frequency prediction model, an expected operating frequency of the GPU, where the expected operating frequency of the GPU can be regarded as an expected operating frequency of a rendered image frame of the GPU at the next time.
Step S130: and adjusting the working frequency of the GPU according to the expected working frequency.
After the electronic device obtains the expected operating frequency output according to the frequency prediction model, the electronic device may adjust the operating frequency of the GPU according to the expected operating frequency, so that the GPU may subsequently complete the corresponding rendering work according to the adjusted operating frequency.
In this embodiment, the expected operating frequency of the GPU is obtained by obtaining the current operating characteristic information of the electronic device and inputting the current operating characteristic information of the electronic device to the pre-trained frequency prediction model, and then the operating frequency of the GPU is adjusted according to the expected operating frequency of the GPU, so that the GPU renders the image frame at the next moment under the adjusted operating frequency. Therefore, the frequency prediction model is obtained based on the historical operating characteristic information and the historical working frequency corresponding to the historical operating characteristic information through training, so that the frequency prediction model can learn the use habits of users and the requirements for the GPU under the condition of different historical characteristic information, and the working frequency of the GPU can be adjusted according to the expected working frequency of the GPU predicted by the characteristic data at the current moment, so that the working frequency of the GPU can meet the habits of the users and the requirements for the GPU, and the user experience is improved.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for adjusting a frequency of a graphics processor according to another embodiment of the present disclosure. The frequency adjustment method for the graphics processor provided by the embodiment of the present application will be described in detail with reference to fig. 2. The frequency adjustment method of the graphic processor can comprise the following steps:
step S210: obtaining a training sample set, wherein the training sample set comprises a plurality of historical operation characteristic information in the historical operation of the electronic equipment, and the historical operating frequency of the GPU marked by each piece of historical operation characteristic information.
In this example, a training sample set may be obtained first, where the training sample set may be used to train a frequency prediction model, where the training sample set may include a plurality of pieces of historical operating characteristic information in historical operation of the electronic device, and a historical operating frequency of a GPU labeled by each piece of historical operating characteristic information, and it may be understood that each piece of historical operating characteristic information has a historical operating frequency of a GPU corresponding to the historical operating characteristic information, that is, the historical operating frequency of each GPU may correspond to a label of one piece of historical characteristic information.
In some embodiments, referring to fig. 3, step S210 may include:
step S211: and acquiring a plurality of historical operation characteristic information in the historical operation of the electronic equipment and the historical working frequency of the GPU corresponding to each historical operation characteristic information.
In this embodiment, in an offline model training stage, the historical operating frequency of the GPU corresponding to the electronic device under different historical operating characteristic information may be obtained through a GPU analysis tool, where the obtaining frequency of obtaining the historical operating characteristic information and the historical operating frequency of the GPU is higher, and the obtaining frequency may be generally once per millisecond or once per second.
In some embodiments, training samples may be acquired while maintaining the same acquisition frequency (e.g., greater than 1 time/second) that is greater than a specified threshold.
In other embodiments, different acquisition frequencies may be used to acquire training samples for different time periods according to different times. For example, when the electronic device is a mobile phone of a user, the frequency of using the mobile phone by the user is high from 5 pm to 10 pm, and the number of applications of the used mobile phone is large, and correspondingly, the running characteristic information of the mobile phone changes quickly, and the obtaining frequency of obtaining the training sample in this time period is set as high as possible; during the period from 12 pm to 6 am, in general, the user is in a sleep state, the frequency of using the mobile phone is low, and correspondingly, the operation characteristic information of the mobile phone changes slowly or hardly at this time, so that the acquisition frequency of acquiring the training sample in this time period can be set to be low. Based on this, because the time periods are different, the change speeds of the operation characteristic information corresponding to the electronic device may also be different, and therefore, the training samples may be acquired at different acquisition frequencies in different time periods.
In another embodiment, when the number of the obtained training samples is sufficient according to the above embodiment, the training samples are used as initial training samples, and training samples with a better state can be selected as final training samples, where the determination condition with the best state can be that the historical operating frequency of the corresponding GPU must be greater than a preset frequency threshold value under the condition of determining certain historical operating characteristic information. Illustratively, aiming at the running characteristic information of the electronic equipment in a game, the obtained training samples are collected into the training sample with the historical working frequency of the GPU being more than 1200MHz as the final training sample, other training samples which do not meet the judgment condition are filtered, the preset frequency threshold can be the lowest working frequency which is set in advance and guarantees rendering fluency under certain running characteristic information, if the working frequency is lower than the preset frequency threshold, rendering is blocked, and fluency of the equipment can be influenced, so that the training samples with the historical working frequency being less than the preset frequency threshold can be predicted under the condition that the obtained training samples are enough, and the prediction accuracy of a frequency prediction model obtained according to training of the training samples is improved.
Step S212: if at least part of the historical operating characteristic information is the same and the historical operating frequencies corresponding to the at least part of the historical operating characteristic information are different, combining the historical operating frequencies corresponding to the at least part of the historical operating characteristic information to obtain the target operating frequency.
In this embodiment, in the stage of training the frequency prediction model, the sample inputs and the sample outputs of the training samples are required to be in one-to-one correspondence, and it can be understood that one sample input corresponds to one sample output, that is, the same historical operating characteristic information as the sample training only has one corresponding historical operating frequency, but in practical application, there may be a case that the operating frequencies of GPUs of the electronic device under the same operating characteristic information are different, and correspondingly, the historical operating frequencies corresponding to the same plurality of pieces of acquired historical characteristic information are also different, based on which, it is necessary to perform frequency merging processing on a part of training samples in the training sample set that have the same historical characteristic information but different corresponding historical operating frequencies, that is, adjust the sample outputs of the training samples that have the same historical characteristic information but different corresponding historical operating frequencies to the same target operating frequency, the method ensures that the sample input corresponds to the sample output one by one, and further ensures the prediction accuracy of the frequency prediction model obtained according to the sample training.
In some embodiments, referring to fig. 4, step S212 may include:
step S2121: and sequencing a plurality of historical operating frequencies corresponding to at least part of the historical operating characteristic information according to the sequence of the historical operating frequencies from large to small to obtain a target sequence, wherein the target sequence comprises numbers corresponding to the historical operating frequencies, and the numbers are sequentially increased along with the sequence of the historical operating frequencies in the target sequence.
In this embodiment, for training samples with the same historical characteristic information but different corresponding historical operating frequencies, a target sequence may be obtained by sorting the training samples according to the sizes of the historical operating frequencies from large to small, where the target sequence includes the number of each historical operating frequency, and the number increases sequentially along with the sequence of the operating frequencies.
Illustratively, the historical characteristic information is that the electronic device is in a playing video, and the acquired corresponding historical operating frequencies are 800MHz, 600MHz, 900MHz, and 950MHz, respectively. Arranging the historical working frequencies in descending order to obtain target sequences of 600MHz, 800MHz, 900MHz and 950MHz, wherein the number corresponding to 600MHz is 1, the number corresponding to 800MHz is 2, the number corresponding to 900MHz is 3 and the number corresponding to 950MHz is 4.
In this embodiment, the historical operating frequencies may be sorted in the order from small to large, or the historical operating frequencies may not be sorted, as long as a plurality of historical operating frequencies are numbered in sequence, and the numbering sequence is from small to large, and the sorting manner of the historical operating frequencies is not limited in this embodiment of the application.
Step S2122: obtaining a difference between a maximum number and a minimum number in the target sequence as a first target value, and obtaining a sum of all numbers as a second target value.
Step S2123: obtaining a ratio of the first target value to the second target value.
Step S2124: and obtaining the product of each historical working frequency and the ratio to obtain a fourth target value corresponding to each historical working frequency.
Step S2125: and acquiring a sum value of the fourth target values corresponding to the historical working frequencies to obtain the target working frequency.
In this embodiment, the formula for obtaining the target operating frequency may be expressed as:
P=(maxIndex-index)/indexSum*data
wherein, P represents the target operating frequency, maxIndex represents the position of the minimum data, i.e. the maximum number in the target sequence, index represents the position of the maximum data, i.e. the minimum number in the target sequence, indexSum represents the sum of all numbers in the target sequence, and data represents each historical operating frequency.
Further, after the historical operating frequencies are sorted according to the size of the historical operating frequencies to obtain the target sequence, the difference value between the maximum number and the minimum number in the target sequence and the sum value of all numbers are obtained. Also taking the example in step S212-1 as an example, the maximum number and the minimum number of the target sequence are 4 and 1, respectively, and the difference value is 3, and accordingly, the first target value is also 3, the sum of all numbers is 10, and correspondingly, the second target value is 10. Based on this, the ratio of the first step target value to the second target value is obtained as 0.3, and further, the product of each historical operating frequency and the ratio is obtained to obtain a fourth target value corresponding to each historical operating frequency, where the corresponding fourth target values corresponding to the four historical operating frequencies in the above example are: 180MHz, 240MHz, 270MHz and 285MHz, and then acquiring the sum of the fourth target values corresponding to each historical working frequency to obtain a target working frequency of 975 MHz. It can be seen that, by means of the merged target operating frequency being greater than the original four historical operating frequencies, it can be understood that, for the case that a part of historical operating characteristic information is the same but the corresponding historical operating frequencies thereof are different, a plurality of different historical operating frequencies corresponding to the same historical operating characteristic information can be merged into a unified target operating frequency by the above method, and by the above method, the output samples in the training samples can be adjusted to a level slightly higher than the actual historical operating frequency, the expected operating frequency output by the frequency prediction model trained according to such training samples can also be relatively higher, and the problem that the GPU is not enough in calculation capacity due to sudden changes in the GPU requirements after frequency adjustment can be prevented.
In some embodiments, for a case that a part of historical operating characteristic information is the same but corresponding historical operating frequencies thereof are different, a sum value between the historical operating frequencies may be obtained, an average value of a plurality of historical operating frequencies may be obtained according to the sum value, and then a fixed frequency value is added to the average value to obtain the target operating frequency. The purpose of adding a fixed frequency value to the average value is to adjust the output samples in the training samples to a level slightly higher than the actual historical operating frequency, the expected operating frequency output by the frequency prediction model trained according to the training samples is also relatively higher, and the problem that the GPU is insufficient in computing power due to sudden changes of GPU requirements after frequency adjustment can be prevented. Still taking the example in step S212-1 as an example, the four historical operating frequencies are 800MHz, 600MHz, 900MHz, and 950MHz, respectively, further, the sum value is 3250MHz, and further, the average value of the four historical operating frequencies is 812.5MHz, and if the fixed frequency value is 200MHz, correspondingly, the target operating frequency is 1012.5 MHz.
Step S213: and marking each historical operation characteristic information in the at least part of historical operation characteristic information as the target working frequency, and marking each historical operation characteristic information in other historical operation characteristic information as the corresponding historical working frequency to obtain the training sample set.
In this embodiment, each piece of historical operation characteristic information in at least part of the historical operation characteristic information is labeled as a target operating frequency, which is equivalent to that the same piece of historical operation characteristic information corresponds to the same target operating frequency, each piece of historical operation characteristic information in other pieces of historical operation characteristic information is labeled as a corresponding historical operating frequency, which is equivalent to that each piece of other different pieces of historical operation characteristic information has a corresponding historical operating frequency, and the part of the historical operation characteristic information, the target operating frequency labeled correspondingly thereto, and the other pieces of historical operation characteristic information and the historical operating frequency labeled correspondingly form a training sample set.
Step S220: and according to the training sample set, training an initial model by taking each historical operation characteristic information as input data and taking the historical working frequency corresponding to each historical operation characteristic information as output data to obtain the frequency prediction model.
Further, after a training sample set is obtained, taking each historical operating characteristic information in the sample set as input data, and taking a historical working frequency corresponding to each historical operating characteristic information as output data, wherein the input data is the sample input, and the output data is the sample output, and training the initial model according to machine learning algorithms such as logistic regression and neural network to obtain a frequency prediction model.
In this embodiment, different frequency prediction models can be obtained by training according to different training sample sets.
In some embodiments, because the user may have different requirements for the GPU in different time periods, training sample sets corresponding to different time periods may be obtained according to different time periods when training sample data is generated, and a frequency prediction model corresponding to each time period may also be trained according to the training sample sets corresponding to different time periods. Correspondingly, when frequency prediction is performed subsequently, the corresponding frequency prediction model can be selected according to the time period to which the current time belongs to perform frequency prediction.
In some embodiments, because the electronic device has different performance in various aspects when the electronic device has different electric quantities, and the user may also have different usage requirements for the GPU when the user has different electric quantities, the training sample set may be further divided into a plurality of sub-training sample sets according to historical data generated when the user has different electric quantities, where each training sub-training sample set may correspond to an electric quantity range. For example, the electric quantity range may be divided into three electric quantity ranges of 0% to 10%, 10% to 30%, and 30% to 100%, and according to the electric quantity range in which the corresponding electric quantity is located when each training sample is generated, the training subsets corresponding to the three electric quantity ranges may be divided, and in the case where the electric quantity is 70% to 100%, a plurality of sub-training sample sets in which the electric quantity is in the case are obtained. Then, training the initial model respectively aiming at each sub-training sample set to obtain a plurality of frequency prediction models, wherein each frequency prediction model corresponds to an electric quantity range. When the expected working frequency is predicted by using the frequency prediction model subsequently, the corresponding frequency prediction model can be selected according to the electric quantity range of the current electric quantity of the electronic equipment, and the expected working frequency is predicted.
In some embodiments, the frequency prediction model may also be updated periodically to account for aging of hardware facilities of the electronic device and changes in usage habits of a user corresponding to the electronic device. And acquiring new training samples according to a preset updating frequency, namely, acquiring new training samples for a fixed long time, and training the frequency prediction model based on the new training samples to obtain a latest frequency prediction model so as to improve the accuracy of the frequency prediction model in predicting the expected working frequency.
Step S230: and acquiring current operation characteristic information of the electronic equipment, wherein the current operation characteristic information at least comprises current application scene information and current system state information.
Step S240: and inputting the current operation characteristic information into a pre-trained frequency prediction model to obtain the expected working frequency of the GPU output by the frequency prediction model, wherein the frequency prediction model is obtained by training based on a plurality of historical operation characteristic information and the historical working frequency of the GPU corresponding to the historical operation characteristic information.
Step S250: and adjusting the working frequency of the GPU according to the expected working frequency.
In the embodiment of the present application, steps S230 to S250 may refer to the contents of steps S110 to S130 in the foregoing embodiment, and are not described herein again.
In this embodiment, a frequency prediction model is obtained by acquiring a training sample set of the electronic device in advance, current operation characteristic information of the electronic device is obtained, the current operation characteristic information of the electronic device is input to the pre-trained frequency prediction model, an expected operating frequency of the GPU is obtained, and then the operating frequency of the GPU is adjusted according to the expected operating frequency of the GPU, so that the GPU renders an image frame at the next time under the adjusted operating frequency. Therefore, the frequency prediction model is obtained based on the historical operating characteristic information and the historical working frequency corresponding to the historical operating characteristic information through training, so that the frequency prediction model can learn the use habits of users and the requirements for the GPU under the condition of different historical characteristic information, and the working frequency of the GPU can be adjusted according to the expected working frequency of the GPU predicted by the characteristic data at the current moment, so that the working frequency of the GPU can meet the habits of the users and the requirements for the GPU, and the user experience is improved.
Fig. 5 is a flowchart illustrating a method for adjusting a frequency of a graphics processor according to yet another embodiment of the present disclosure. The frequency adjustment method for the graphics processor provided by the embodiment of the present application will be described in detail with reference to fig. 5. The frequency adjustment method of the graphic processor can comprise the following steps:
step S510: and acquiring the current operation characteristic information of the electronic equipment according to a preset frequency.
In practical applications, the GPU requirements may change suddenly, and the GPU frequency modulation mechanism of the mobile phone manufacturer cannot cope with such a situation, that is, the GPU frequency cannot be adjusted in real time according to the change of the GPU requirements. For example, when GPU demand suddenly increases, if GPU frequency cannot be adjusted in real time, GPU computing power is insufficient, which may cause device stuck. For another example, when the GPU demand suddenly drops, if the GPU frequency cannot be adjusted in real time, the GPU frequency may still maintain a high level for a period of time, which may cause a waste of GPU power resources and increase additional unnecessary power consumption. Therefore, the current operation characteristic information of the electronic equipment can be obtained through a fixed preset frequency all the time. The preset frequency can be larger than a specified frequency threshold value, so that the operation characteristic information can be obtained at a higher frequency, and the expected working frequency can be obtained according to the current operation characteristic information, so that the working frequency can be timely adjusted when the operation characteristic information changes. For example, the specified frequency threshold may be 1 time/second, and the electronic device may perform the step of acquiring the current operating characteristic information of the electronic device according to 1 time/millisecond, to the step of adjusting the operating frequency of the GPU according to the expected operating frequency.
In some embodiments, the current operation characteristic information of the electronic device may also be obtained at different frequencies according to different time periods, for example, at 5 pm to 10 pm, the frequency of using the mobile phone by the user is high, and more applications of the mobile phone are used, and correspondingly, the higher frequency may be set to obtain the current operation characteristic information of the electronic device, where the frequency may be 1 time/second, so as to prevent the problem that the speed of predicting the expected operation frequency by the frequency prediction model cannot follow the speed of sudden change of the GPU demand due to frequent operation by the user, so that the image frame corresponding to the next time cannot be rendered at the appropriate operation frequency, and the image of the electronic device is jammed. For another example, during the period from 12 pm to 6 am, the user is generally in a sleep state, the frequency of using the mobile phone is low, correspondingly, the operation characteristic information of the mobile phone changes slowly or hardly at this time, correspondingly, the frequency of acquiring the current operation characteristic information of the electronic device can be appropriately adjusted down, and the frequency can be adjusted for 1 time/minute.
Step S520: and comparing the current operation characteristic information with the operation characteristic information obtained last time.
Step S530: and if the current operation characteristic information is different from the operation characteristic information obtained last time, executing the step of inputting the current operation characteristic information into a pre-trained frequency prediction model to obtain the expected working frequency of the GPU output by the frequency prediction model.
Further, after the current operation characteristic information is obtained, the current operation characteristic information is compared with the operation characteristic information obtained last time, and if the current operation characteristic information is different from the operation characteristic information obtained last time, the current operation characteristic information is input into a pre-trained frequency prediction model. For example, if the current running characteristic information is that the electronic device is in a game state, the running working frequency of the CPU is in a high-speed running state, and the number of background applications is 3; and further, inputting the current operation characteristic information into a pre-trained frequency prediction model to obtain the expected operation frequency of the GPU output by the frequency prediction model, and outputting the corresponding expected operation frequency by the frequency prediction model according to the input current operation characteristic information.
Step S540: and acquiring a frequency difference value between the expected working frequency and the current working frequency of the GPU.
In this embodiment, after the corresponding expected operating frequency is obtained according to the current operating characteristic information, a frequency difference between the expected operating frequency and the current operating frequency of the GPU is obtained. For example, if the obtained expected operating frequency is 1000MHz and the current operating frequency of the GPU is 680MHz, it may be determined that the frequency difference between the expected operating frequency and the current operating frequency of the GPU is 320 MHz.
Step S550: and if the frequency difference value is larger than a preset threshold value, adjusting the current working frequency of the GPU to the expected working frequency.
Further, after a frequency difference value between the expected operating frequency and the current operating frequency of the GPU is obtained, the frequency difference value and a preset threshold value need to be determined, where the preset threshold value is a fixed value set in advance, and if the frequency difference value is greater than the preset threshold value, the current operating frequency of the GPU is adjusted to the expected operating frequency, so that the GPU renders image frames at the expected operating frequency, and the GPU power consumption is guaranteed to be the lowest while the rendering speed is met. It can be understood that when the expected operating frequency is greater than the current operating frequency of the GPU and the difference value is greater than the preset threshold, if the operating frequency of the GPU is not adjusted to the expected operating frequency at this time, the GPU may not render the image frame at the next time in time, which may cause the display of the electronic device to be stuck; when the expected working frequency is less than the current working frequency of the GPU and the difference value is greater than the preset threshold, if the immediately-working frequency of the GPU is not adjusted to the expected working frequency at this time, although the GPU can fumigate the image frame at the next moment in time, maintaining a higher working frequency all the time causes a waste of computational resources of the GPU. Therefore, whether to adjust the current operating frequency of the GPU to the expected operating frequency may be determined by determining whether the frequency difference is greater than a preset threshold.
In this embodiment, the current operating characteristic information of the electronic device is input to a pre-trained frequency prediction model to obtain an expected operating frequency of the GPU, and the operating frequency of the GPU is adjusted according to the expected operating frequency of the GPU, so that the GPU renders an image frame at the next moment under the adjusted operating frequency. Therefore, the frequency prediction model is obtained based on the historical operating characteristic information and the historical working frequency corresponding to the historical operating characteristic information through training, so that the frequency prediction model can learn the use habits of users and the requirements for the GPU under the condition of different historical characteristic information, and the working frequency of the GPU can be adjusted according to the expected working frequency of the GPU predicted by the characteristic data at the current moment, so that the working frequency of the GPU can meet the habits of the users and the requirements for the GPU, and the user experience is improved.
Referring to fig. 6, a block diagram of a frequency adjustment apparatus 600 of a graphics processor according to an embodiment of the present disclosure is shown. The apparatus 600 may include: an information acquisition module 610, a frequency prediction module 620, and a frequency adjustment module 630.
The information obtaining module 610 is configured to obtain current operation feature information of the electronic device, where the current operation feature information at least includes current application scenario information and current system state information.
The frequency prediction module 620 is configured to input the current operation characteristic information to a pre-trained frequency prediction model to obtain an expected operating frequency of the GPU output by the frequency prediction model, where the frequency prediction model is obtained by training based on a plurality of historical operation characteristic information and historical operating frequencies of the GPUs corresponding to the historical operation characteristic information.
The frequency adjustment module 630 is configured to adjust the operating frequency of the GPU according to the expected operating frequency.
In some embodiments, the information obtaining module 610 may be specifically configured to obtain the current operating characteristic information of the electronic device according to a preset frequency.
In some embodiments, the frequency adjustment apparatus 600 of the graphic processor may further include: the device comprises an information comparison module and an information input module. The information comparison module may be configured to compare the current operation characteristic information with the operation characteristic information obtained last time. The information input module may be configured to, if the current operation feature information is different from the operation feature information acquired last time, execute the step of inputting the current operation feature information to a pre-trained frequency prediction model to obtain an expected operating frequency of the GPU output by the frequency prediction model.
In some embodiments, the frequency adjustment module 630 may further include: the device comprises a frequency difference value acquisition module and a frequency difference value judgment module. The frequency difference obtaining module may be configured to obtain a frequency difference between the expected operating frequency and a current operating frequency of the GPU. The frequency difference value determining module may be configured to adjust the current operating frequency of the GPU to the expected operating frequency if the frequency difference value is greater than a preset threshold.
In some embodiments, the frequency adjustment apparatus 600 of the graphic processor may further include: a training sample obtaining module and a model training module. The training sample acquisition module may be configured to acquire a training sample set, where the training sample set includes a plurality of pieces of historical operating characteristic information in historical operation of the electronic device, and a historical operating frequency of the GPU labeled by each piece of historical operating characteristic information. The model training module may be configured to train an initial model to obtain the frequency prediction model, according to the training sample set, using each piece of historical operation feature information as input data, and using a historical operating frequency corresponding to each piece of historical operation feature information as output data.
In this manner, the training sample obtaining module may further include: the device comprises a historical information acquisition unit, a target working frequency synthesis unit and a training sample set acquisition unit. The historical information acquiring unit may be configured to acquire a plurality of pieces of historical operation characteristic information in the historical operation of the electronic device, and a historical operating frequency of the GPU corresponding to each piece of historical operation characteristic information. The target operating frequency synthesizing unit may be configured to, if at least part of the historical operating characteristic information is the same and the historical operating frequencies corresponding to the at least part of the historical operating characteristic information are different, merge the historical operating frequencies corresponding to the at least part of the historical operating characteristic information to obtain the target operating frequency. The training sample set obtaining unit may be configured to label each historical operating characteristic information in the at least part of historical operating characteristic information as the target operating frequency, and identify each historical operating characteristic information in the other historical operating characteristic information as its corresponding historical operating frequency, so as to obtain the training sample set.
In this manner, the target operating frequency synthesis unit may be further specifically configured to: sequencing a plurality of historical operating frequencies corresponding to at least part of historical operating characteristic information according to the sequence of the historical operating frequencies from large to small to obtain a target sequence, wherein the target sequence comprises numbers corresponding to the historical operating frequencies, and the numbers are sequentially increased along with the sequence of the historical operating frequencies in the target sequence; acquiring a difference value between the maximum number and the minimum number in the target sequence as a first target value, and acquiring a sum value of all numbers as a second target value; acquiring the ratio of the first target value to the second target value; obtaining the product of each historical working frequency and the ratio to obtain a fourth target value corresponding to each historical working frequency; obtaining the sum of the fourth target values corresponding to the historical working frequencies to obtain the target working frequency
In some embodiments, the frequency adjustment apparatus 600 of the graphic processor may further include: and a model updating module. The model updating module may be configured to obtain a new training sample according to a preset updating frequency, and train the frequency prediction model based on the new training sample.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the coupling between the modules may be electrical, mechanical or other type of coupling.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
In summary, in the scheme provided in the embodiment of the present application, the expected operating frequency of the GPU is obtained by obtaining the current operating characteristic information of the electronic device and inputting the current operating characteristic information of the electronic device to the pre-trained frequency prediction model, and then the operating frequency of the GPU is adjusted according to the expected operating frequency of the GPU, so that the GPU renders the image frame at the next time under the adjusted operating frequency. Therefore, the working frequency when the image frame at the next moment is rendered can be predicted by utilizing the pre-trained frequency prediction model based on the current operation characteristic information of the electronic equipment, the real-time adjustment of the GPU frequency is realized, the GPU power consumption of the electronic equipment is the lowest while the image frame at the next moment is ensured to be rendered in time, and the purpose of improving the performance of the electronic equipment is achieved while the fluency of the application picture of the electronic equipment is improved.
An electronic device provided by the present application will be described with reference to fig. 7.
Referring to fig. 7, fig. 7 is a block diagram illustrating a structure of an electronic device 700 according to an embodiment of the present disclosure, where the electronic device 700 may perform a frequency adjustment method for a graphics processor according to the embodiment of the present disclosure.
The electronic device 700 in the embodiments of the present application may include one or more of the following components: a processor 701, a memory 702, and one or more applications, wherein the one or more applications may be stored in the memory 702 and configured to be executed by the one or more processors 701, the one or more programs configured to perform a method as described in the aforementioned method embodiments.
Processor 701 may include one or more processing cores. The processor 701 interfaces with various components throughout the electronic device 700 using various interfaces and circuitry to perform various functions of the electronic device 700 and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 702 and invoking data stored in the memory 702. Alternatively, the processor 701 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 701 may integrate one or a combination of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 701, but may be implemented by a communication chip.
The Memory 702 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 702 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 702 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like. The storage data area may also store data created by the electronic device 700 during use (such as the various correspondences described above), and so on.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the coupling or direct coupling or communication connection between the modules shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or modules may be in an electrical, mechanical or other form.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
Referring to fig. 8, a block diagram of a computer-readable storage medium according to an embodiment of the present application is shown. The computer-readable medium 800 has stored therein a program code that can be called by a processor to execute the method described in the above-described method embodiments.
The computer-readable storage medium 800 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer readable storage medium 800 has storage space for program code 810 to perform any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. The program code 810 may be compressed, for example, in a suitable form.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (12)

1. A frequency adjustment method of a graphic processor is applied to an electronic device, and the method comprises the following steps:
acquiring current operation characteristic information of the electronic equipment, wherein the current operation characteristic information at least comprises current application scene information and current system state information;
inputting the current operation characteristic information into a pre-trained frequency prediction model to obtain an expected working frequency of a Graphic Processor (GPU) output by the frequency prediction model, wherein the frequency prediction model is obtained by training based on a plurality of historical operation characteristic information and historical working frequencies of the GPUs corresponding to the historical operation characteristic information;
and adjusting the working frequency of the GPU according to the expected working frequency.
2. The method of claim 1, wherein the obtaining current operating characteristic information of the electronic device comprises:
and acquiring the current operation characteristic information of the electronic equipment according to a preset frequency.
3. The method of claim 2, wherein before inputting the current operating characteristic information into a pre-trained frequency prediction model to obtain an expected operating frequency of the GPU output by the frequency prediction model, the method further comprises:
comparing the current operation characteristic information with the operation characteristic information obtained last time;
and if the current operation characteristic information is different from the operation characteristic information obtained last time, executing the step of inputting the current operation characteristic information into a pre-trained frequency prediction model to obtain the expected working frequency of the GPU output by the frequency prediction model.
4. The method of claim 1, wherein before inputting the current operating characteristic information into a pre-trained frequency prediction model to obtain an expected operating frequency of the GPU output by the frequency prediction model, the method further comprises:
acquiring a training sample set, wherein the training sample set comprises a plurality of historical operation characteristic information in the historical operation of the electronic equipment and the historical working frequency of the GPU marked by each piece of historical operation characteristic information;
and according to the training sample set, training an initial model by taking each historical operation characteristic information as input data and taking the historical working frequency corresponding to each historical operation characteristic information as output data to obtain the frequency prediction model.
5. The method according to claim 4, wherein after the initial model is trained according to the training sample set by using each historical operating characteristic information as input data and the historical operating frequency corresponding to each historical operating characteristic information as output data to obtain the frequency prediction model, the method further comprises:
acquiring a new training sample according to a preset updating frequency;
training the frequency prediction model based on the new training samples.
6. The method of claim 4, wherein the obtaining a training sample set comprises:
acquiring a plurality of historical operation characteristic information in the historical operation of the electronic equipment and the historical working frequency of the GPU corresponding to each historical operation characteristic information;
if at least part of the historical operating characteristic information is the same and the historical operating frequencies corresponding to the at least part of the historical operating characteristic information are different, merging the historical operating frequencies corresponding to the at least part of the historical operating characteristic information to obtain a target operating frequency;
and marking each historical operation characteristic information in the at least part of historical operation characteristic information as the target working frequency, and marking each historical operation characteristic information in other historical operation characteristic information as the corresponding historical working frequency to obtain the training sample set.
7. The method according to claim 6, wherein the merging the historical operating frequencies corresponding to the at least part of the historical operating characteristic information to obtain a target operating frequency comprises:
sequencing a plurality of historical operating frequencies corresponding to at least part of historical operating characteristic information according to the sequence of the historical operating frequencies from large to small to obtain a target sequence, wherein the target sequence comprises numbers corresponding to the historical operating frequencies, and the numbers are sequentially increased along with the sequence of the historical operating frequencies in the target sequence;
acquiring a difference value between the maximum number and the minimum number in the target sequence as a first target value, and acquiring a sum value of all numbers as a second target value;
acquiring the ratio of the first target value to the second target value;
obtaining the product of each historical working frequency and the ratio to obtain a fourth target value corresponding to each historical working frequency;
and acquiring a sum value of the fourth target values corresponding to the historical working frequencies to obtain the target working frequency.
8. The method according to any of claims 1-7, wherein said adjusting the operating frequency of the GPU according to the expected operating frequency comprises:
acquiring a frequency difference value between the expected working frequency and the current working frequency of the GPU;
and if the frequency difference value is larger than a preset threshold value, adjusting the current working frequency of the GPU to the expected working frequency.
9. The method according to any of claims 1-7, wherein the application context information comprises: at least one of an operating application program, a currently operating application function, audio playing information, video playing information, voice acquisition information, and image acquisition information;
the system state information includes: at least one of load information of the central processing unit CPU and the number of application programs running in the background.
10. An apparatus for adjusting a frequency of a graphics processor, the apparatus comprising:
the information acquisition module is used for acquiring current operation characteristic information of the electronic equipment, wherein the current operation characteristic information at least comprises current application scene information and current system state information;
the frequency prediction module is used for inputting the current operation characteristic information into a pre-trained frequency prediction model to obtain the expected working frequency of the GPU output by the frequency prediction model, wherein the frequency prediction model is obtained by training based on a plurality of historical operation characteristic information and the historical working frequency of the GPU corresponding to the historical operation characteristic information;
and the frequency adjusting module is used for adjusting the working frequency of the GPU according to the expected working frequency.
11. An electronic device, comprising:
one or more processors;
a memory;
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-9.
12. A computer-readable storage medium, characterized in that a program code is stored in the computer-readable storage medium, which program code can be called by a processor to perform the method according to any of claims 1-9.
CN202011367581.4A 2020-11-27 2020-11-27 Frequency adjusting method and device for graphic processor, electronic equipment and storage medium Active CN112363842B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011367581.4A CN112363842B (en) 2020-11-27 2020-11-27 Frequency adjusting method and device for graphic processor, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011367581.4A CN112363842B (en) 2020-11-27 2020-11-27 Frequency adjusting method and device for graphic processor, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112363842A true CN112363842A (en) 2021-02-12
CN112363842B CN112363842B (en) 2023-01-06

Family

ID=74536315

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011367581.4A Active CN112363842B (en) 2020-11-27 2020-11-27 Frequency adjusting method and device for graphic processor, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112363842B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113487707A (en) * 2021-06-30 2021-10-08 北京达佳互联信息技术有限公司 Webpage animation processing method and device, electronic equipment and storage medium
CN113778663A (en) * 2021-07-28 2021-12-10 荣耀终端有限公司 Scheduling method of multi-core processor and electronic equipment
CN114911336A (en) * 2022-03-17 2022-08-16 荣耀终端有限公司 Method and device for adjusting frequency, electronic equipment and readable storage medium
CN115097927A (en) * 2022-06-27 2022-09-23 中国银行股份有限公司 Android system-oriented processor frequency modulation method and device
TWI782845B (en) * 2022-01-04 2022-11-01 國立高雄大學 Configuration setting prediction system and method for general-purpose graphics processor core functions
CN115981448A (en) * 2022-12-23 2023-04-18 摩尔线程智能科技(北京)有限责任公司 Method, apparatus, device, medium, and program product for controlling power consumption of GPU
CN116882333A (en) * 2023-09-05 2023-10-13 深圳宏芯宇电子股份有限公司 Chip limiting frequency prediction method, device, equipment and medium
CN117114961A (en) * 2023-04-07 2023-11-24 荣耀终端有限公司 Frequency adjustment method and electronic equipment
CN117492552A (en) * 2024-01-03 2024-02-02 芯瞳半导体技术(山东)有限公司 Dynamic voltage frequency adjustment method, controller, device, equipment and storage medium
WO2024027791A1 (en) * 2022-08-03 2024-02-08 Moore Threads Technology Co., Ltd. Machine learning based power and performance optimization system and method for graphics processing units
CN117687495A (en) * 2024-02-04 2024-03-12 荣耀终端有限公司 Data acquisition method, training method and electronic equipment

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150103085A1 (en) * 2013-10-14 2015-04-16 Marvell World Trade Ltd. Systems and Methods for Graphics Process Units Power Management
CN107844187A (en) * 2016-09-21 2018-03-27 龙芯中科技术有限公司 Power consumption management method, device and electronic equipment
CN107861606A (en) * 2017-11-21 2018-03-30 北京工业大学 A kind of heterogeneous polynuclear power cap method by coordinating DVFS and duty mapping
US20180300838A1 (en) * 2017-04-13 2018-10-18 Microsoft Technology Licensing, Llc Intra-frame real-time frequency control
CN109324902A (en) * 2018-09-21 2019-02-12 深圳市中科明望通信软件有限公司 A kind of method, mobile terminal and storage medium adjusting mobile terminal working frequency
CN109783770A (en) * 2018-11-27 2019-05-21 中国农业大学 Frequency analysis method and device
CN109800141A (en) * 2019-01-28 2019-05-24 Oppo广东移动通信有限公司 Determination method, apparatus, terminal and the storage medium of GPU performance bottleneck
CN110209501A (en) * 2019-06-03 2019-09-06 Oppo广东移动通信有限公司 Frequency adjusting method, device, terminal and the storage medium of graphics processor
CN110727561A (en) * 2019-10-22 2020-01-24 Oppo广东移动通信有限公司 Abnormal heat dissipation detection method and device, terminal and storage medium
CN111429333A (en) * 2020-03-25 2020-07-17 京东方科技集团股份有限公司 GPU dynamic frequency modulation method, device and system
CN111459682A (en) * 2020-04-09 2020-07-28 Oppo广东移动通信有限公司 Frequency adjustment method, frequency adjustment device, electronic device and storage medium
CN111708642A (en) * 2020-08-20 2020-09-25 北京爱奇艺智能科技有限公司 Processor performance optimization method and device in VR system and VR equipment

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150103085A1 (en) * 2013-10-14 2015-04-16 Marvell World Trade Ltd. Systems and Methods for Graphics Process Units Power Management
CN107844187A (en) * 2016-09-21 2018-03-27 龙芯中科技术有限公司 Power consumption management method, device and electronic equipment
US20180300838A1 (en) * 2017-04-13 2018-10-18 Microsoft Technology Licensing, Llc Intra-frame real-time frequency control
CN107861606A (en) * 2017-11-21 2018-03-30 北京工业大学 A kind of heterogeneous polynuclear power cap method by coordinating DVFS and duty mapping
CN109324902A (en) * 2018-09-21 2019-02-12 深圳市中科明望通信软件有限公司 A kind of method, mobile terminal and storage medium adjusting mobile terminal working frequency
CN109783770A (en) * 2018-11-27 2019-05-21 中国农业大学 Frequency analysis method and device
CN109800141A (en) * 2019-01-28 2019-05-24 Oppo广东移动通信有限公司 Determination method, apparatus, terminal and the storage medium of GPU performance bottleneck
CN110209501A (en) * 2019-06-03 2019-09-06 Oppo广东移动通信有限公司 Frequency adjusting method, device, terminal and the storage medium of graphics processor
CN110727561A (en) * 2019-10-22 2020-01-24 Oppo广东移动通信有限公司 Abnormal heat dissipation detection method and device, terminal and storage medium
CN111429333A (en) * 2020-03-25 2020-07-17 京东方科技集团股份有限公司 GPU dynamic frequency modulation method, device and system
CN111459682A (en) * 2020-04-09 2020-07-28 Oppo广东移动通信有限公司 Frequency adjustment method, frequency adjustment device, electronic device and storage medium
CN111708642A (en) * 2020-08-20 2020-09-25 北京爱奇艺智能科技有限公司 Processor performance optimization method and device in VR system and VR equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SHASHIKANT ILAGER等: "A Data-Driven Frequency Scaling Approach for Deadline-aware Energy Efficient Scheduling on Graphics Processing Units (GPUs)", 《2020 20TH IEEE/ACM INTERNATIONAL SYMPOSIUM ON CLUSTER, CLOUD AND INTERNET COMPUTING (CCGRID)》 *
陈屴: "基于Android系统的GPU动态调频方案", 《电子技术应用》 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113487707A (en) * 2021-06-30 2021-10-08 北京达佳互联信息技术有限公司 Webpage animation processing method and device, electronic equipment and storage medium
CN113778663A (en) * 2021-07-28 2021-12-10 荣耀终端有限公司 Scheduling method of multi-core processor and electronic equipment
TWI782845B (en) * 2022-01-04 2022-11-01 國立高雄大學 Configuration setting prediction system and method for general-purpose graphics processor core functions
CN114911336A (en) * 2022-03-17 2022-08-16 荣耀终端有限公司 Method and device for adjusting frequency, electronic equipment and readable storage medium
CN115097927A (en) * 2022-06-27 2022-09-23 中国银行股份有限公司 Android system-oriented processor frequency modulation method and device
WO2024027791A1 (en) * 2022-08-03 2024-02-08 Moore Threads Technology Co., Ltd. Machine learning based power and performance optimization system and method for graphics processing units
CN115981448A (en) * 2022-12-23 2023-04-18 摩尔线程智能科技(北京)有限责任公司 Method, apparatus, device, medium, and program product for controlling power consumption of GPU
CN117114961A (en) * 2023-04-07 2023-11-24 荣耀终端有限公司 Frequency adjustment method and electronic equipment
CN116882333A (en) * 2023-09-05 2023-10-13 深圳宏芯宇电子股份有限公司 Chip limiting frequency prediction method, device, equipment and medium
CN116882333B (en) * 2023-09-05 2024-01-09 深圳宏芯宇电子股份有限公司 Chip limiting frequency prediction method, device, equipment and medium
CN117492552A (en) * 2024-01-03 2024-02-02 芯瞳半导体技术(山东)有限公司 Dynamic voltage frequency adjustment method, controller, device, equipment and storage medium
CN117492552B (en) * 2024-01-03 2024-04-16 芯瞳半导体技术(山东)有限公司 Dynamic voltage frequency adjustment method, controller, device, equipment and storage medium
CN117687495A (en) * 2024-02-04 2024-03-12 荣耀终端有限公司 Data acquisition method, training method and electronic equipment

Also Published As

Publication number Publication date
CN112363842B (en) 2023-01-06

Similar Documents

Publication Publication Date Title
CN112363842B (en) Frequency adjusting method and device for graphic processor, electronic equipment and storage medium
CN109388367B (en) Sound effect adjusting method and device, electronic equipment and storage medium
EP3584676B1 (en) Method, device, medium, and electronic apparatus for dynamically adjusting power saving level of terminal
CN112631415B (en) CPU frequency adjusting method, device, electronic equipment and storage medium
CN110222649B (en) Video classification method and device, electronic equipment and storage medium
CN110727561B (en) Abnormal heat dissipation detection method, device, terminal and storage medium
CN113778663B (en) Scheduling method of multi-core processor and electronic equipment
CN107678858B (en) Application processing method, device, storage medium and electronic equipment
CN109284080B (en) Sound effect adjusting method and device, electronic equipment and storage medium
CN111341286A (en) Screen display control method and device, storage medium and terminal
CN108958828B (en) Application program preloading method and device, storage medium and terminal
US10783884B2 (en) Electronic device-awakening method and apparatus, device and computer-readable storage medium
CN103959197B (en) Reducing power for 3D workloads
CN109272917B (en) Screen brightness adjusting method and device, storage medium and electronic equipment
CN110414582B (en) Model training method and device, computing equipment and storage medium
CN111813492A (en) Display method and device of fast application, electronic equipment and storage medium
CN104618994A (en) Intelligent terminal power saving system and method
CN111124173A (en) Working state switching method and device of touch screen, mobile terminal and storage medium
CN112587920A (en) Device control method, device, electronic device and storage medium
CN107748697B (en) Application closing method and device, storage medium and electronic equipment
CN110830653B (en) Sensor control method, sensor control device, mobile terminal and storage medium
EP3869466A1 (en) Method and device for picture generation, electronic device, and storage medium
CN113055984B (en) Terminal control method and device, mobile terminal and storage medium
CN113050783B (en) Terminal control method and device, mobile terminal and storage medium
CN111565281A (en) Photographing method and device, electronic equipment and storage medium

Legal Events

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