CN109889896B - Method for dynamically adjusting CPU operation frequency, mobile terminal and storage medium - Google Patents

Method for dynamically adjusting CPU operation frequency, mobile terminal and storage medium Download PDF

Info

Publication number
CN109889896B
CN109889896B CN201910240031.7A CN201910240031A CN109889896B CN 109889896 B CN109889896 B CN 109889896B CN 201910240031 A CN201910240031 A CN 201910240031A CN 109889896 B CN109889896 B CN 109889896B
Authority
CN
China
Prior art keywords
cpu
playing
video
frequency
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910240031.7A
Other languages
Chinese (zh)
Other versions
CN109889896A (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.)
Nubia Technology Co Ltd
Original Assignee
Nubia 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201910240031.7A priority Critical patent/CN109889896B/en
Publication of CN109889896A publication Critical patent/CN109889896A/en
Application granted granted Critical
Publication of CN109889896B publication Critical patent/CN109889896B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the invention discloses a method, a system, a mobile terminal and a storage medium for dynamically adjusting the running frequency of a CPU, relating to the technical field of mobile terminals. The method comprises the following steps: when video playing is detected, sampling a currently played video according to a preset frequency; calculating a CPU playing weighted value of the current sampling point according to the sampling information of the current sampling point and a preset playing weighted value calculation strategy; determining the target operation frequency of the CPU according to the CPU playing weighted value and the mapping relation between the preset CPU playing weighted value and the operation frequency of the CPU; and controlling the CPU to operate according to the target operation frequency. The embodiment of the invention can realize dynamic adjustment of the running frequency of the CPU according to the video content, not only can ensure the smoothness of video playing, but also can save the power consumption of the mobile terminal and reduce the heat productivity of the CPU.

Description

Method for dynamically adjusting CPU running frequency, mobile terminal and storage medium
Technical Field
The embodiment of the invention relates to the technical field of mobile terminals, in particular to a method for dynamically adjusting CPU (Central processing Unit) operating frequency, a mobile terminal and a storage medium.
Background
Currently, when a mobile terminal plays a video, no matter what the content of the video is, the operating frequency of a Central Processing Unit (CPU) of the mobile terminal is consistent, but actually affected by factors such as a shooting environment and post-production, different videos are provided, for example: different types of videos or videos with different image qualities have different requirements on the running frequency of a CPU during playing, and if the same running frequency is adopted for playing control of different videos, potential problems of playing jamming or heating of a mobile terminal, fast electric quantity consumption and the like exist.
Disclosure of Invention
In view of this, an embodiment of the present invention provides a method, a mobile terminal and a storage medium for dynamically adjusting a CPU running frequency, so as to solve the above potential problems of playing jamming or fast power consumption of the mobile terminal, which may occur when playing control is performed on different videos by using the same running frequency.
The technical scheme adopted by the embodiment of the invention for solving the technical problems is as follows:
according to an aspect of the embodiments of the present invention, there is provided a method for dynamically adjusting a CPU operating frequency, which is applied to a mobile terminal, and the method for dynamically adjusting a CPU operating frequency includes:
when video playing is detected, sampling a currently played video according to a preset frequency;
calculating a CPU playing weighted value of the current sampling point according to the sampling information of the current sampling point and a preset playing weighted value calculation strategy;
determining the target operation frequency of the CPU according to the CPU playing weighted value and the mapping relation between the preset CPU playing weighted value and the operation frequency of the CPU;
and controlling the CPU to operate according to the target operation frequency.
On the basis of the above technical solution, the method further includes, after detecting that the video is played:
acquiring a video type of a currently played video, wherein the video type comprises a game video and a non-game video;
if the currently played video is a game video, the step of sampling the currently played video according to a preset frequency is carried out; or,
if the currently played video is a non-game video, identifying whether plot prompt points exist in the currently played video;
if a scenario prompt point exists, dividing the currently played video into a plurality of video segments according to the scenario prompt point, and sampling each video segment according to the preset frequency;
and if the plot prompt point does not exist, the step of sampling the currently played video according to the preset frequency is carried out.
On the basis of the technical scheme, the sampling information of the current sampling point comprises one or more items of video types, the number of people in a frame image where the current sampling point is located, the number of articles, color saturation, image quality information and whether special-effect lens information exists.
On the basis of the above technical solution, before determining the target operating frequency of the CPU according to the CPU playing weighting value and the mapping relationship between the preset CPU playing weighting value and the operating frequency of the CPU, the method further includes:
judging whether the difference value between the CPU playing weighted value of the current sampling point and the CPU playing weighted value of the last sampling point is smaller than a preset threshold value or not;
if the sampling frequency is smaller than the preset threshold value, controlling the CPU to continuously operate according to the operating frequency corresponding to the last sampling point;
and if the CPU playing weight value is larger than or equal to the preset threshold value, determining the target running frequency of the CPU according to the CPU playing weight value and the mapping relation between the preset CPU playing weight value and the running frequency of the CPU.
According to another aspect of the embodiments of the present invention, there is provided a system for dynamically adjusting a CPU operating frequency, which is applied to a mobile terminal, the system for dynamically adjusting a CPU operating frequency including:
the video content sampling unit is used for sampling the currently played video according to a preset frequency when the video playing is detected;
the playing weighted value calculating unit is used for calculating the CPU playing weighted value of the current sampling point according to the sampling information of the current sampling point and a preset playing weighted value calculating strategy;
the running frequency acquiring unit is used for determining the target running frequency of the CPU according to the CPU playing weighted value and the mapping relation between the preset CPU playing weighted value and the running frequency of the CPU;
and the running frequency adjusting unit is used for controlling the CPU to run according to the target running frequency.
On the basis of the technical scheme, the method further comprises the following steps:
the video type acquisition unit is used for acquiring the video type of a currently played video, wherein the video type comprises a game video and a non-game video;
the video content sampling unit is specifically configured to:
if the currently played video is a game video, sampling the currently played video according to a preset frequency; or,
if the currently played video is a non-game video, identifying whether plot prompt points exist in the currently played video;
if a scenario prompt point exists, dividing the currently played video into a plurality of video segments according to the scenario prompt point, and sampling each video segment according to the preset frequency;
and if the plot prompt points do not exist, sampling the currently played video according to a preset frequency.
On the basis of the technical scheme, the sampling information of the current sampling point comprises one or more items of video types, the number of people in a frame image where the current sampling point is located, the number of articles, color saturation, image quality information and whether special-effect lens information exists.
On the basis of the technical scheme, the method further comprises the following steps:
the judging unit is used for judging whether the difference value between the CPU playing weighted value of the current sampling point and the CPU playing weighted value of the last sampling point is smaller than a preset threshold value or not;
the operating frequency acquiring unit is specifically configured to:
if the sampling point is smaller than the preset threshold, taking the running frequency corresponding to the last sampling point as the target running frequency of the CPU;
and if the CPU playing weight value is greater than or equal to the preset threshold value, determining the target running frequency of the CPU according to the CPU playing weight value and the mapping relation between the preset CPU playing weight value and the running frequency of the CPU.
According to another aspect of the embodiments of the present invention, there is provided a mobile terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the method for dynamically adjusting the operating frequency of the CPU as described in any one of the above.
According to a further aspect of the embodiments of the present invention, there is provided a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method for dynamically adjusting the operating frequency of a CPU as described in any one of the above.
According to the method, the system, the mobile terminal and the storage medium for dynamically adjusting the running frequency of the CPU provided by the embodiment of the invention, when the video playing is detected, the currently played video is sampled according to the preset frequency; calculating a CPU (Central processing Unit) playing weighted value of the current sampling point according to the sampling information of the current sampling point and a preset playing weighted value calculation strategy; determining the target operation frequency of the CPU according to the CPU playing weighted value and the mapping relation between the preset CPU playing weighted value and the operation frequency of the CPU; and controlling the CPU to operate according to the target operation frequency, thereby realizing dynamic adjustment of the operation frequency of the CPU according to the video content, not only ensuring the smoothness of video playing, but also saving the power consumption of the mobile terminal and reducing the heat productivity of the CPU.
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 embodiments or the prior art descriptions will be briefly described 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 inventive exercise.
Fig. 1 is a schematic hardware structure diagram of a mobile terminal for implementing various embodiments of the present invention;
fig. 2 is a schematic flowchart of a specific implementation of a method for dynamically adjusting the operating frequency of a CPU according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of a specific implementation of the method for dynamically adjusting the operating frequency of the CPU according to the second embodiment of the present invention;
fig. 4 is a schematic structural diagram of a system for dynamically adjusting the operating frequency of a CPU according to a third embodiment of the present invention;
fig. 5 is a schematic internal structure diagram of a mobile terminal according to a fourth embodiment of the present invention.
Detailed Description
In order to make the technical problems, technical solutions and advantageous effects to be solved by the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
The mobile terminal may be implemented in various forms. For example, the mobile terminal described in the present invention may include mobile terminals such as a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and the like, and fixed mobile terminals such as a Digital TV, a desktop computer, and the like.
The following description will be given by way of example of a mobile terminal, and it will be understood by those skilled in the art that the construction according to the embodiment of the present invention can be applied to a mobile terminal of a stationary type, in addition to elements particularly used for moving purposes.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present invention, the mobile terminal 100 may include: RF (Radio Frequency) unit 101, WiFi module 102, audio output unit 103, a/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 1 is not intended to be limiting of mobile terminals, which may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, receive downlink information of a base station and then process the downlink information to the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA2000(Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division duplex Long Term Evolution), and TDD-LTE (Time Division duplex Long Term Evolution).
WiFi belongs to short-distance wireless transmission technology, and the mobile terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 102, and provides wireless broadband internet access for the user. Although fig. 1 shows the WiFi module 102, it is understood that it does not belong to the essential constitution of the mobile terminal, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive audio or video signals. The a/V input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, the Graphics processor 1041 Processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sounds (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, or the like, and can process such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or a backlight when the mobile terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 1071 (e.g., an operation performed by the user on or near the touch panel 1071 using a finger, a stylus, or any other suitable object or accessory), and drive a corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, and are not limited to these specific examples.
Further, the touch panel 1071 may cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although the touch panel 1071 and the display panel 1061 are shown in fig. 1 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 108 serves as an interface through which at least one external device is connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and external devices.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The mobile terminal 100 may further include a power supply 111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described in detail herein.
Based on the hardware structure of the mobile terminal, the invention provides various embodiments of the method.
Example one
Fig. 2 is a schematic flowchart of a specific implementation of the method for dynamically adjusting the operating frequency of the CPU according to an embodiment of the present invention, where an execution main body of the method is the mobile terminal shown in fig. 1. Referring to fig. 2, the method for dynamically adjusting the operating frequency of the CPU provided in this embodiment includes the following steps:
step S201, when video playing is detected, sampling a currently played video according to a preset frequency.
In this embodiment, the preset frequency is to sample the currently played video once every 300 ms. The sampling information of each sampling point includes, but is not limited to, one or more items of video type, number of people in a frame image where the current sampling point is located, number of articles, color saturation, image quality information, and whether special effect shot information exists.
Step S202, calculating the CPU playing weighted value of the current sampling point according to the sampling information of the current sampling point and a preset playing weighted value calculation strategy.
In this embodiment, a corresponding weight is allocated to the sampling information of each attribute in advance, and after the mobile terminal obtains the sampling information of each attribute of the current sampling point, a weight value allocated to the sampling information of each attribute in advance can be further obtained, and the weight values allocated to the sampling information of each attribute are superimposed to obtain a CPU playing weight value of the current sampling point.
For example: in a specific implementation example, the preset playing weight value calculation policy includes: the weight corresponding to the video type of the non-game video is 4, and the weight corresponding to the video type of the game video is 6; the weight of the number of the human objects in the image is less than 3, the weight is 4, and the weight of the human objects in the image is greater than or equal to 3, the weight is 6; the weight of the number of the articles in the image, which is less than 3, is 4, and the weight of the articles, which is greater than or equal to 3, is 6; the weight of the color saturation of the image, which is less than the preset color threshold value, is 4, and the weight of the image, which is greater than or equal to the preset color threshold value, is 6; the weight of the image quality resolution smaller than the preset resolution threshold is 4, and the weight of the image quality resolution larger than the preset color resolution is 6; the weight of the image without the special effect shot is 4, and the weight of the image with the special effect shot is 6. Assuming that the sampling information of the current sampling point is: the method comprises the steps that a non-game type video is obtained, the number of people in a frame image of a current sampling point is 1, the number of articles is 1, the color saturation is larger than a preset color saturation threshold, the image quality resolution is larger than a preset resolution threshold, and a special effect lens exists in the image, so that the CPU weighted value n of the current sampling point is 4+4+4+6+6+ 48. Of course, in other implementation examples, different weights may be assigned to the sampling information with different attributes.
Step S203, determining the target operating frequency of the CPU according to the CPU playing weighted value and the mapping relationship between the preset CPU playing weighted value and the operating frequency of the CPU.
In this embodiment, the mapping relationship is obtained by manually marking, analyzing, and mining the acquired data through a background server, and the mapping relationship may be stored in the background server or locally stored in the mobile terminal. When the mapping relation is stored in a background server, the mobile terminal accesses the background server according to the CPU playing weighted value so as to obtain the target running frequency of the CPU corresponding to the CPU playing weighted value; when the mapping relation is stored locally in the mobile terminal, the mobile terminal can directly access the locally stored mapping relation according to the CPU playing weighted value to acquire the target running frequency of the CPU.
And step S204, controlling the CPU to operate according to the target operation frequency.
In this embodiment, after the mobile terminal obtains the target operating frequency corresponding to the current sampling point, the CPU is directly controlled to switch the current operating frequency to the target operating frequency, and operate according to the target operating frequency. The mobile terminal can continuously sample the played video according to the preset frequency in the video playing process, the target running frequency of the CPU is obtained again after each sampling, and the running of the CPU is controlled in real time according to the newly obtained target frequency of the CPU, so that the mobile terminal can dynamically adjust the running frequency of the CPU according to the video playing content, the running frequency of the CPU is matched with the frequency required by the playing content, the smoothness of video playing can be guaranteed under the condition that the running frequency of the CPU is high due to video playing, the power consumption of the mobile terminal can be saved under the condition that the running frequency of the CPU is low due to video playing, and the heat productivity of the mobile terminal is reduced.
As can be seen from the above, in the method for dynamically adjusting the operating frequency of the CPU provided by this embodiment, when video playing is detected, the currently played video is sampled according to the preset frequency; calculating a CPU (Central processing Unit) playing weighted value of the current sampling point according to the sampling information of the current sampling point and a preset playing weighted value calculation strategy; determining the target running frequency of the CPU according to the CPU playing weighted value and the mapping relation between the preset CPU playing weighted value and the running frequency of the CPU; and controlling the CPU to operate according to the target operation frequency, thereby realizing dynamic adjustment of the operation frequency of the CPU according to the video content, not only ensuring the smoothness of video playing, but also saving the power consumption of the mobile terminal and reducing the heat productivity of the CPU.
Example two
Fig. 3 is a schematic flow chart of an implementation of the method for dynamically adjusting the operating frequency of the CPU according to the third embodiment of the present invention, where an execution subject of the method is the mobile terminal shown in fig. 1. Referring to fig. 3, the method for dynamically adjusting the operating frequency of the CPU provided in this embodiment includes the following steps:
step S301, when video playing is detected, acquiring the video type of a currently played video, wherein the video type comprises a game video and a non-game video; if the currently played video is a non-game video, the step S302 is entered; if the currently played video is a game video, the process proceeds to step S304.
Step S302, identifying whether a plot prompt point exists in the currently played video; if the plot prompt point exists, the step S303 is executed; if there is no scenario prompt point, the process proceeds to step S304.
Step S303, dividing the currently played video into a plurality of video segments according to the plot prompt point, and sampling each video segment according to the preset frequency.
And step S304, sampling the currently played video according to a preset frequency.
The mobile terminal can identify the video type of the currently played video through the source of the currently played video. The non-game video comprises but is not limited to videos of the types of TV dramas, movies and the like in the video APP; the game video comprises video played when the game APP runs. Because the scenario prompt points do not exist in the game videos generally, and only the non-game videos of TV dramas and movies types have the scenario prompt points, when the currently played video is identified as the game video, the currently played video is directly sampled according to the preset frequency; when the currently played video is identified to be a non-game video, whether a scenario cue point exists is further identified, because the scenario cue point is usually a starting point of scene, role, scenario switching, and therefore an image picture of video playing corresponding to the scenario cue point is very important, in this embodiment, when the scenario cue point exists in the currently played video, the currently played video is divided into a plurality of video segments according to the scenario cue point, and then each video segment is respectively sampled according to the preset frequency from the starting point of each video segment (i.e. the scenario cue point of each video segment), so that it can be ensured that a video playing image corresponding to each scenario cue point is acquired, and a subsequent analysis result is more accurate.
Step S305, calculating the CPU playing weighted value of the current sampling point according to the sampling information of the current sampling point and a preset playing weighted value calculation strategy.
Step S306, judging whether the difference value between the CPU playing weighted value of the current sampling point and the CPU playing weighted value of the last sampling point is smaller than a preset threshold value; if the value is smaller than the preset threshold value, the step S307 is executed; if the threshold value is greater than or equal to the preset threshold value, the process proceeds to step S308.
And step S307, controlling the CPU to continuously operate according to the operating frequency corresponding to the last sampling point.
In this embodiment, after acquiring the CPU playing weighted value of the current sampling point, the mobile terminal compares the CPU playing weighted value with the CPU playing weighted value corresponding to the previous sampling point, and determines whether the difference between the two values is smaller than a preset threshold, and if the difference is smaller than the preset threshold, the CPU playing weighted values corresponding to the two sampling points are located in the same interval, and the operating frequencies of the corresponding CPUs are the same, so that the CPU is controlled to continue to operate according to the operating frequency corresponding to the previous sampling point; otherwise, it indicates that the CPU playing weighting values corresponding to the two sampling points are located in different intervals, and the operating frequencies of the CPUs corresponding to the two sampling points are different, so that the step S208 needs to be performed to obtain the target operating frequency of the CPU corresponding to the current sampling point again.
Step S308, determining the target operation frequency of the CPU according to the CPU playing weighted value and the mapping relation between the preset CPU playing weighted value and the operation frequency of the CPU.
And step S309, controlling the CPU to operate according to the target operation frequency.
It should be noted that step S305, step S308, and step S309 in this embodiment are completely the same as the implementation of step S202 to step S204 in the previous embodiment, and therefore are not described herein again.
Compared with the previous embodiment, in the embodiment, when a scenario prompt point exists in a currently played video, the currently played video is divided into a plurality of video segments according to the scenario prompt point, and each video segment is respectively sampled according to the preset frequency, so that the video characteristics of the corresponding video segment can be accurately reflected by a sampled image frame, and the target running frequency of a subsequently calculated CPU is more accurate; after the CPU playing weighted value of the current sampling point is obtained through calculation, whether the CPU playing weighted value corresponding to the previous sampling point is in the same interval or not is judged, and if the CPU playing weighted value is in the same interval, the current running frequency of the CPU is kept unchanged; if the sampling points are not in the same interval, the corresponding target running frequency is obtained according to the CPU playing weighted value of the current sampling point, and the current running frequency of the CPU is adjusted to the target running frequency, so that the running frequency adjusting efficiency of the CPU can be improved.
EXAMPLE III
Fig. 4 is a schematic structural diagram of a system for dynamically adjusting an operating frequency of a CPU according to a third embodiment of the present invention. The system is applied to the mobile terminal shown in fig. 1. For convenience of explanation, only the portions related to the present embodiment are shown.
Referring to fig. 4, the system 4 for dynamically adjusting the operating frequency of the CPU provided in this embodiment includes:
a video content sampling unit 41, configured to sample a currently played video according to a preset frequency when video playing is detected;
the playing weighted value calculating unit 42 is used for calculating the CPU playing weighted value of the current sampling point according to the sampling information of the current sampling point and a preset playing weighted value calculating strategy;
an operating frequency obtaining unit 43, configured to determine a target operating frequency of the CPU according to the CPU playing weighted value and a mapping relationship between a preset CPU playing weighted value and an operating frequency of the CPU;
and an operation frequency adjusting unit 44, configured to control the CPU to operate according to the target operation frequency.
Optionally, the system 4 for dynamically adjusting the operating frequency of the CPU further includes:
a video type obtaining unit 45, configured to obtain a video type of a currently playing video, where the video type includes a game video and a non-game video;
the video content sampling unit 41 is specifically configured to:
if the currently played video is a game video, sampling the currently played video according to a preset frequency; or,
if the currently played video is a non-game video, identifying whether plot prompt points exist in the currently played video;
if a scenario prompt point exists, dividing the currently played video into a plurality of video segments according to the scenario prompt point, and sampling each video segment according to the preset frequency;
and if the plot prompt points do not exist, sampling the currently played video according to a preset frequency.
Optionally, the sampling information of the current sampling point includes one or more items of video type, number of people in a frame image where the current sampling point is located, number of articles, color saturation, image quality information, and whether special effect lens information exists.
Optionally, the system 4 for dynamically adjusting the operating frequency of the CPU further includes:
a judging unit 46, configured to judge whether a difference between the CPU playing weighted value of the current sampling point and the CPU playing weighted value of the previous sampling point is smaller than a preset threshold;
the operating frequency obtaining unit 43 is specifically configured to:
if the sampling point is smaller than the preset threshold, taking the running frequency corresponding to the last sampling point as the target running frequency of the CPU;
and if the CPU playing weight value is greater than or equal to the preset threshold value, determining the target running frequency of the CPU according to the CPU playing weight value and the mapping relation between the preset CPU playing weight value and the running frequency of the CPU.
It should be noted that, because the system for dynamically adjusting the operating frequency of the CPU provided in this embodiment belongs to the same concept as the method for dynamically adjusting the operating frequency of the CPU provided in the first and second embodiments, specific implementation processes thereof are detailed in the method embodiment, and technical features in the method embodiment are applicable in this device embodiment, which is not described herein again.
It will be understood by those of ordinary skill in the art that all or some of the steps of the disclosed methods of the present embodiments may be implemented as software, firmware, hardware, or any suitable combination thereof.
Example four
Fig. 5 is a schematic internal structure diagram of a mobile terminal according to a fourth embodiment of the present invention. For convenience of explanation, only the portions related to the present embodiment are shown.
Referring to fig. 5, the mobile terminal 5 provided in this embodiment includes a memory 51, a processor 52, and a computer program 53 stored in the memory 51 and capable of running on the processor 52, where when the computer program 53 is executed by the processor 52, the steps of the method for dynamically adjusting the operating frequency of the CPU as described in the first embodiment or the second embodiment are implemented.
It should be noted that, because the mobile terminal provided in this embodiment belongs to the same concept as the method for dynamically adjusting the CPU operating frequency provided in the first and second embodiments, specific implementation processes thereof are detailed in the method embodiments, and technical features in the method embodiments are applicable in the device embodiments, and are not described herein again.
It will be understood by those of ordinary skill in the art that all or some of the steps of the disclosed methods of the present embodiments may be implemented as software, firmware, hardware, or any suitable combination thereof.
EXAMPLE five
A fifth embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the method for dynamically adjusting the operating frequency of the CPU as in the first embodiment or the second embodiment is implemented.
It should be noted that, because the computer-readable storage medium provided in this embodiment belongs to the same concept as the method for dynamically adjusting the CPU operating frequency provided in the first embodiment and the second embodiment, specific implementation processes thereof are detailed in the method embodiment, and technical features in the method embodiment are applicable to both embodiments of the apparatus, which is not described herein again.
It will be understood by those of ordinary skill in the art that all or some of the steps of the disclosed methods of the present embodiments may be implemented as software, firmware, hardware, or any suitable combination thereof.
In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
The preferred embodiments of the present invention have been described above with reference to the accompanying drawings, and are not to be construed as limiting the scope of the invention. Any modifications, equivalents and improvements which may occur to those skilled in the art without departing from the scope and spirit of the present invention are intended to be within the scope of the claims.

Claims (10)

1. A method for dynamically adjusting the running frequency of a CPU is applied to a mobile terminal, and is characterized in that the method for dynamically adjusting the running frequency of the CPU comprises the following steps:
when video playing is detected, sampling a currently played video according to a preset frequency;
calculating a CPU playing weighted value of the current sampling point according to the sampling information of the current sampling point and a preset playing weighted value calculation strategy;
determining the target operation frequency of the CPU according to the CPU playing weighted value and the mapping relation between the preset CPU playing weighted value and the operation frequency of the CPU;
controlling the CPU to operate according to the target operating frequency;
wherein, the calculating the CPU playing weighted value of the current sampling point according to the sampling information of the current sampling point and the preset playing weighted value calculating strategy comprises:
and distributing corresponding weight to the sampling information of each attribute in advance, and superposing the sampling information of each attribute of the current sampling point according to the corresponding weight to obtain the CPU playing weighted value of the current sampling point.
2. The method for dynamically adjusting the operating frequency of a CPU as set forth in claim 1, further comprising, after said detecting video playback:
acquiring a video type of a currently played video, wherein the video type comprises a game video and a non-game video;
if the currently played video is a game video, the step of sampling the currently played video according to a preset frequency is carried out; or,
if the currently played video is a non-game video, identifying whether plot prompt points exist in the currently played video;
if a scenario prompt point exists, dividing the currently played video into a plurality of video segments according to the scenario prompt point, and sampling each video segment according to the preset frequency;
and if the plot prompt point does not exist, entering the step of sampling the currently played video according to the preset frequency.
3. The method according to claim 1, wherein the sampling information of the current sampling point includes one or more of video type, number of people in a frame image where the current sampling point is located, number of articles, color saturation, image quality information, and presence or absence of special effect shot information.
4. The method of claim 1, wherein before determining the target operating frequency of the CPU according to the CPU playing weight and the mapping relationship between the preset CPU playing weight and the operating frequency of the CPU, the method further comprises:
judging whether the difference value between the CPU playing weighted value of the current sampling point and the CPU playing weighted value of the last sampling point is smaller than a preset threshold value or not;
if the sampling frequency is smaller than the preset threshold value, controlling the CPU to continuously operate according to the operating frequency corresponding to the last sampling point;
and if the CPU playing weight value is larger than or equal to the preset threshold value, determining the target running frequency of the CPU according to the CPU playing weight value and the mapping relation between the preset CPU playing weight value and the running frequency of the CPU.
5. A system for dynamically adjusting CPU running frequency is applied to a mobile terminal, and is characterized in that the system for dynamically adjusting CPU running frequency comprises:
the video content sampling unit is used for sampling the currently played video according to a preset frequency when the video playing is detected;
the playing weighted value calculating unit is used for calculating the CPU playing weighted value of the current sampling point according to the sampling information of the current sampling point and a preset playing weighted value calculating strategy;
the running frequency acquiring unit is used for determining the target running frequency of the CPU according to the CPU playing weighted value and the mapping relation between the preset CPU playing weighted value and the running frequency of the CPU;
the running frequency adjusting unit is used for controlling the CPU to run according to the target running frequency;
wherein, the calculating the CPU playing weighted value of the current sampling point according to the sampling information of the current sampling point and the preset playing weighted value calculating strategy comprises:
and distributing corresponding weight to the sampling information of each attribute in advance, and superposing the sampling information of each attribute of the current sampling point according to the corresponding weight to obtain the CPU playing weighted value of the current sampling point.
6. The system for dynamically adjusting the operating frequency of a CPU as set forth in claim 5, further comprising:
the video type acquisition unit is used for acquiring the video type of a currently played video, wherein the video type comprises a game video and a non-game video;
the video content sampling unit is specifically configured to:
if the currently played video is a game video, sampling the currently played video according to a preset frequency; or,
if the currently played video is a non-game video, identifying whether plot prompt points exist in the currently played video;
if a scenario prompt point exists, dividing the currently played video into a plurality of video segments according to the scenario prompt point, and sampling each video segment according to the preset frequency;
and if the plot prompt points do not exist, sampling the currently played video according to a preset frequency.
7. The system according to claim 5, wherein the sampling information of the current sampling point includes one or more of video type, number of people in the frame image where the current sampling point is located, number of items, color saturation, image quality information, and presence or absence of special effect shot information.
8. The system for dynamically adjusting the operating frequency of a CPU of claim 5, further comprising:
the judging unit is used for judging whether the difference value between the CPU playing weighted value of the current sampling point and the CPU playing weighted value of the last sampling point is smaller than a preset threshold value or not;
the operating frequency acquiring unit is specifically configured to:
if the sampling point is smaller than the preset threshold, taking the running frequency corresponding to the last sampling point as the target running frequency of the CPU;
and if the CPU playing weight value is greater than or equal to the preset threshold value, determining the target running frequency of the CPU according to the CPU playing weight value and the mapping relation between the preset CPU playing weight value and the running frequency of the CPU.
9. A mobile terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the method for dynamically adjusting the operating frequency of a CPU as claimed in any one of claims 1 to 4.
10. A storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the method of dynamically adjusting the operating frequency of a CPU as claimed in any one of claims 1 to 4.
CN201910240031.7A 2019-03-27 2019-03-27 Method for dynamically adjusting CPU operation frequency, mobile terminal and storage medium Active CN109889896B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910240031.7A CN109889896B (en) 2019-03-27 2019-03-27 Method for dynamically adjusting CPU operation frequency, mobile terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910240031.7A CN109889896B (en) 2019-03-27 2019-03-27 Method for dynamically adjusting CPU operation frequency, mobile terminal and storage medium

Publications (2)

Publication Number Publication Date
CN109889896A CN109889896A (en) 2019-06-14
CN109889896B true CN109889896B (en) 2022-05-27

Family

ID=66934738

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910240031.7A Active CN109889896B (en) 2019-03-27 2019-03-27 Method for dynamically adjusting CPU operation frequency, mobile terminal and storage medium

Country Status (1)

Country Link
CN (1) CN109889896B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112764933A (en) * 2021-01-27 2021-05-07 惠州Tcl移动通信有限公司 CPU configuration method, device, terminal and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7106759B1 (en) * 2000-10-12 2006-09-12 Sprint Communications Company L.P. Network timing reference for an integrated services hub
CN104407690A (en) * 2014-12-19 2015-03-11 中科创达软件股份有限公司 Method, device and mobile terminal for regulating operating frequency of CPU (Central Processing Unit)
CN105933702A (en) * 2016-04-19 2016-09-07 北京工商大学 Power consumption control method based on task sensitivity
CN106097479A (en) * 2016-05-30 2016-11-09 北京奇虎科技有限公司 The recording method and device of running information
CN107465929A (en) * 2017-07-21 2017-12-12 山东大学 DVFS control methods, system, processor and storage device based on HEVC

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1459692A (en) * 2002-05-21 2003-12-03 联想(北京)有限公司 Method of CPU frequency controlling based on the insertion system of computer platform
JP4828167B2 (en) * 2005-06-16 2011-11-30 株式会社 ソキア・トプコン Distance measuring apparatus and method
US8370663B2 (en) * 2008-02-11 2013-02-05 Nvidia Corporation Power management with dynamic frequency adjustments
CN104394422B (en) * 2014-11-12 2017-11-17 华为软件技术有限公司 A kind of Video segmentation point acquisition methods and device
CN105404381A (en) * 2015-11-06 2016-03-16 珠海全志科技股份有限公司 Terminal device operation frequency control method and system
CN106249844A (en) * 2016-07-29 2016-12-21 宇龙计算机通信科技(深圳)有限公司 Processor working frequency and/or the work method of adjustment of check figure, device and terminal
CN106527666A (en) * 2016-11-18 2017-03-22 宇龙计算机通信科技(深圳)有限公司 Control method of central processing unit and terminal equipment
CN107678855B (en) * 2017-09-19 2020-06-12 中国电子产品可靠性与环境试验研究所 Processor dynamic adjustment method and device and processor chip
CN108200473B (en) * 2018-02-01 2020-12-08 深圳创维-Rgb电子有限公司 CPU power control method, smart television and storage medium
CN108958450A (en) * 2018-06-11 2018-12-07 江苏食品药品职业技术学院 Intelligence adjusts the computer of running frequency and power consumption
CN108919939A (en) * 2018-07-20 2018-11-30 中新国际电子有限公司 A kind of video broadcasting method, device, equipment and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7106759B1 (en) * 2000-10-12 2006-09-12 Sprint Communications Company L.P. Network timing reference for an integrated services hub
CN104407690A (en) * 2014-12-19 2015-03-11 中科创达软件股份有限公司 Method, device and mobile terminal for regulating operating frequency of CPU (Central Processing Unit)
CN105933702A (en) * 2016-04-19 2016-09-07 北京工商大学 Power consumption control method based on task sensitivity
CN106097479A (en) * 2016-05-30 2016-11-09 北京奇虎科技有限公司 The recording method and device of running information
CN107465929A (en) * 2017-07-21 2017-12-12 山东大学 DVFS control methods, system, processor and storage device based on HEVC

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
《Accurate Probing of RF Amplifiers Using Vertical Interconnect Boards》;Krishna Naishadham;《56th ARFTG Conference Digest》;20070412;全文 *
《多线程H.264视频传输的动态能量控制》;郑琳俊;《电视技术》;20080317;全文 *

Also Published As

Publication number Publication date
CN109889896A (en) 2019-06-14

Similar Documents

Publication Publication Date Title
CN108073458B (en) Memory recovery method, mobile terminal and computer-readable storage medium
CN108196776B (en) Terminal screen splitting method, terminal and computer readable storage medium
US11165950B2 (en) Method and apparatus for shooting video, and storage medium
CN109144441B (en) Screen adjusting method, terminal and computer readable storage medium
CN112102780B (en) Display frame rate regulation and control method, device and computer readable storage medium
CN109348019B (en) Display method and device
CN110719119B (en) Anti-interference method and device
CN110650294A (en) Video shooting method, mobile terminal and readable storage medium
CN110062273B (en) Screenshot method and mobile terminal
CN107153500B (en) Method and equipment for realizing image display
CN110401870B (en) Method for adjusting screen recording frame rate, terminal and computer readable storage medium
CN109995391B (en) Picture display method, intelligent wearable terminal and computer readable storage medium
CN111158815B (en) Dynamic wallpaper blurring method, terminal and computer readable storage medium
CN115463414A (en) Game operation method, system and computer readable storage medium
CN108932505B (en) Image processing method and electronic equipment
CN108366171B (en) Temperature rise control method and mobile terminal
CN109889896B (en) Method for dynamically adjusting CPU operation frequency, mobile terminal and storage medium
CN110060617B (en) Screen light spot compensation method and device, terminal and readable storage medium
CN107872584A (en) A kind of multi-media processing method, multimedia equipment and terminal
CN109799937B (en) Input control method, input control equipment and computer readable storage medium
CN109450508B (en) Antenna determination method and device and mobile terminal
CN109889652B (en) Eye protection mode display control method, terminal and computer readable storage medium
CN107562305B (en) Method for setting dynamic icon, terminal and computer readable storage medium
CN115083330A (en) Screen parameter adjusting method, mobile terminal and computer readable storage medium
CN113419701A (en) Sound effect setting method and related equipment

Legal Events

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