Frequency adjustment method and device, electronic equipment and computer readable storage medium
By acquiring the first and second operating data of the terminal device and determining the target frequency with the frequency adjustment component, the time lag problem of the CPU frequency adjustment strategy in the prior art is solved, and fast and dynamic frequency adjustment is achieved, which improves the user experience.
Patent Information
- Application Number
- CN202510329806.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2025-07-11
AI Technical Summary
In the prior art, the CPU frequency adjustment strategy has a time lag and cannot be adjusted according to the load in time, resulting in poor user experience.
通过获取终端设备的第一运行数据和第二运行数据,结合频率调节组件确定目标频率,实现快速频率调整。
Dynamic frequency adjustment is realized based on the history and current load conditions of the terminal equipment, improving the real-time and user experience of CPU frequency adjustment.
Smart Images

Figure CN120295767A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and particularly to a frequency adjustment method, device, electronic device, and computer-readable storage medium. Background Art
[0002] In the prior art, a processor (CPU) frequency modulation strategy that combines a real-time operating system (e.g., QNX) and virtualization technology (e.g., Android Hypervisor) is mainly adopted.
[0003] By setting a frequency threshold in QNX and reading the current load of the CPU, when the load reaches the frequency threshold and lasts for a preset time, QNX is then used to determine the frequency that needs to be adjusted, and thus the CPU frequency is dynamically adjusted through the Hypervisor.
[0004] However, the existing frequency adjustment strategy has a time lag and cannot be adjusted according to the historical load conditions of the terminal device, resulting in that in some usage scenarios, the CPU operating frequency cannot meet the user's needs, bringing a poor user experience to the user. Summary of the Invention
[0005] The embodiments of the present application provide a frequency adjustment method, device, electronic device, and computer-readable storage medium, which can determine two adjustable frequency values by using different strategies according to the first running data and the second running data of the terminal device, and further determine a target frequency value from the two adjustable frequency values for frequency adjustment, so as to quickly adjust the operating frequency of the terminal device.
[0006] In a first aspect, the embodiments of the present application provide a frequency adjustment method, which is applied to a terminal device, and the method includes:
[0007] Obtain the first running data of the terminal device, where the first running data is the current running data of the terminal device;
[0008] Receive a first frequency from a frequency adjustment component, where the first frequency is determined according to the first running data;
[0009] Determine a second frequency according to the first running data;
[0010] Determine a target frequency according to the first frequency and the second frequency;
[0011] Control the operation of the terminal device according to the target frequency.
[0012] Optionally, in some embodiments of the present application, before receiving the first frequency from the frequency adjustment component, the method further includes:
[0013] Send the first operation data to the frequency adjustment component.
[0014] Optionally, in some embodiments of the present application, the determining the second frequency according to the first operation data includes:
[0015] Obtain the second operation data of the terminal device, where the second operation data is historical operation data;
[0016] Determine the first load of the central processing unit of the terminal device according to the first operation data;
[0017] Determine the second load of the central processing unit of the terminal device according to the second operation data;
[0018] Determine the second frequency according to the first load and the second load.
[0019] Optionally, in some embodiments of the present application, the determining the target frequency according to the first frequency and the second frequency includes:
[0020] Determine the maximum frequency among the first frequency and the second frequency;
[0021] Determine the maximum frequency as the target frequency.
[0022] Optionally, in some embodiments of the present application, the controlling the terminal device to operate according to the target frequency includes:
[0023] Determine the operation scenario information of the terminal device;
[0024] When the operation scenario information meets the preset scenario conditions, control the terminal device to operate according to the target frequency.
[0025] Optionally, in some embodiments of the present application, the controlling the terminal device to operate according to the target frequency further includes:
[0026] Determine the hardware support situation of the terminal device;
[0027] When the hardware support situation meets the preset hardware conditions, control the terminal device to operate according to the target frequency.
[0028] Optionally, in some embodiments of the present application, the method further includes:
[0029] Obtain the first operation data through a load tracking device and store the first operation data in a database;
[0030] Obtain the second operation data from the database.
[0031] Second aspect, an embodiment of the present application provides a frequency adjustment method, which is applied to a frequency adjustment component. The method includes:
[0032] Receiving first operation data from a terminal device, where the first operation data is the current operation data of the terminal device;
[0033] Determining a first frequency according to the first operation data;
[0034] Sending the first frequency to the terminal device.
[0035] Third aspect, an embodiment of the present application further provides a frequency adjustment device, which is applied to a terminal device. The device includes:
[0036] An acquisition module, configured to acquire the first operation data of the terminal device, where the first operation data is the current operation data of the terminal device;
[0037] A first receiving module, configured to receive a first frequency from a frequency adjustment component, where the first frequency is determined according to the first operation data;
[0038] A first processing module, configured to determine a second frequency according to the first operation data and the second operation data;
[0039] The first processing module is further configured to determine a target frequency according to the first frequency and the second frequency;
[0040] The first processing module is further configured to control the operation of the terminal device according to the target frequency.
[0041] Optionally, in some embodiments of the present application, the first processing module is further configured to:
[0042] Send the first operation data to the frequency adjustment component.
[0043] Optionally, in some embodiments of the present application, the first processing module is further configured to:
[0044] Acquire second operation data of the terminal device, where the second operation data is historical operation data;
[0045] Determine a first load of the central processing unit of the terminal device according to the first operation data;
[0046] Determine a second load of the central processing unit of the terminal device according to the second operation data;
[0047] Determine the second frequency according to the first load and the second load.
[0048] Optionally, in some embodiments of the present application, the first processing module is further configured to:
[0049] Determine the maximum frequency among the first frequency and the second frequency;
[0050] Determine the maximum frequency as the target frequency.
[0051] Optionally, in some embodiments of the present application, the first processing module is further configured to:
[0052] Determine the operation scenario information of the terminal device;
[0053] When the operation scenario information meets the preset scenario conditions, control the terminal device to operate according to the target frequency.
[0054] Optionally, in some embodiments of the present application, the first processing module is further configured to:
[0055] Determine the hardware support situation of the terminal device;
[0056] When the hardware support situation meets the preset hardware conditions, control the terminal device to operate according to the target frequency.
[0057] Optionally, in some embodiments of the present application, the first processing module is further configured to:
[0058] Obtain the first operation data through a load tracking device and store the first operation data in a database;
[0059] Obtain the second operation data from the database.
[0060] In a third aspect, an embodiment of the present application further provides a frequency adjustment device, which is applied to a frequency adjustment component. The device includes:
[0061] A second receiving module, configured to receive first operation data from a terminal device, where the first operation data is the current operation data of the terminal device;
[0062] A second processing module, configured to determine a first frequency according to the first operation data;
[0063] The second processing module is further configured to send the first frequency to the terminal device.
[0064] In a fourth aspect, an embodiment of the present application further provides an electronic device. The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps in the above frequency adjustment method are implemented.
[0065] In a fifth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above frequency adjustment method are implemented.
[0066] In a sixth aspect, an embodiment of the present application further provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the various alternative implementation manners of the embodiments of the present application.
[0067] In summary, in an embodiment of the present application, a terminal device obtains its own first operation data and second operation data, and sends the first operation data to a frequency adjustment component. After that, the terminal device receives a first frequency from the frequency adjustment component. In addition, the terminal device also needs to determine a second frequency according to the first operation data and the second operation data; determine a target frequency according to the received first frequency and the determined second frequency, and operate according to the target frequency. This solution can determine two adjustable frequency values by using different strategies according to the first operation data and the second operation data of the terminal device, and further determine a target frequency value from the two adjustable frequency values for frequency adjustment, thereby achieving the technical effect of quickly adjusting the operation frequency of the terminal device. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the technical solutions in the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative efforts.
[0069] Figure 1 is a schematic diagram of the scenario of the frequency adjustment method provided by the embodiment of the present application;
[0070] Figure 2 is a schematic flowchart of the frequency adjustment method provided by the embodiment of the present application Figure 1 ;
[0071] Figure 3 is a schematic overall flowchart of the frequency adjustment corresponding to the frequency adjustment method provided by the embodiment of the present application;
[0072] Figure 4 is a schematic flowchart of the frequency adjustment method provided by the embodiment of the present application Figure 2 ;
[0073] Figure 5It is a schematic diagram of the structure of the frequency adjustment device provided by the embodiment of the present application Figure 1 ;
[0074] Figure 6 It is a schematic diagram of the structure of the frequency adjustment device provided by the embodiment of the present application Figure 2 ;
[0075] Figure 7 It is a schematic diagram of the structure of the electronic device provided by the embodiment of the present application. Detailed implementation manners
[0076] Next, the technical solutions in the present application will be clearly and completely described in conjunction with the accompanying drawings in the present application. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts belong to the protection scope of the present invention.
[0077] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus cannot be understood as a limitation of the present invention. In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of the above features. In the description of the present invention, "a plurality" means two or more unless otherwise specifically defined.
[0078] In the present application, the term "exemplary" is used to mean "serving as an example, illustration, or description". Any embodiment described as "exemplary" in the present application is not necessarily to be construed as more preferred or more advantageous than other embodiments. In order for any person skilled in the art to implement and use the present invention, the following description is given. In the following description, details are set forth for the purpose of explanation. It should be understood by those skilled in the art that the present invention can be implemented without using these specific details. In other instances, well-known structures and processes are not elaborated in detail to avoid obscuring the description of the present invention with unnecessary details. Therefore, the present invention is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed in the present application.
[0079] First, the terms related to this application are explained as follows:
[0080] QNX: Refers to a Real-Time Operating System (RTOS).
[0081] Hypervisor: A virtualization technology. The Hypervisor is responsible for allocating CPU resources among different virtual machines (VMs). It can dynamically adjust the CPU frequency according to the requirements of each operating system.
[0082] Pelt / Walt: Per-Entity Load Tracking / Window-Assisted Load Tracking. Pelt is a load tracking mechanism in the Linux kernel used to calculate the load of each scheduling entity (such as a process or thread); Walt is also a load tracking mechanism that specifically optimizes the scheduling requirements of mobile devices.
[0083] Schedutil: A frequency scaling policy. Schedutil is a CPU frequency governor in the Linux kernel that is directly integrated with the scheduler to achieve more efficient frequency adjustment.
[0084] The embodiments of this application provide a frequency adjustment method, device, electronic device, and computer-readable storage medium. Specifically, the embodiments of this application provide a frequency adjustment device applicable to the frequency adjustment method. The frequency adjustment device includes a terminal device and a processor of the terminal device. The terminal device can be a television, mobile phone, tablet, computer, etc.
[0085] During the process of a user using a terminal device, the terminal device can adjust the operating frequency of its own processor (CPU, or it can also be DDR, GPU, etc.) in various ways. In the prior art, a frequency scaling policy that combines a real-time operating system (such as QNX) and a virtualization technology (such as Android Hypervisor) is mainly adopted.
[0086] Taking the process of adjusting the CPU operating frequency as an example, the terminal device can set a frequency threshold in QNX and read the current load of the CPU. When the load reaches the frequency threshold and lasts for a preset time (Xms), then determine the frequency that needs to be adjusted through QNX. For example, if the current CPU frequency is 100MHZ and the set parameter is 90%, 200ms, then the CPU load needs to reach 90% and continue to run for 200ms to be able to increase to the next CPU frequency gear (for example, 200MHZ); after meeting the conditions for frequency adjustment, the CPU frequency can be dynamically adjusted through the Hypervisor.
[0087] However, the existing frequency modulation strategies cannot adjust the frequency in a timely manner according to the load, and there is always a certain time lag. Nor can they predict the load based on historical load conditions and then determine the frequency modulation strategy.
[0088] Therefore, the frequency adjustment methods in the prior art cannot meet the user's needs and bring a poor user experience.
[0089] The embodiments of the present application provide a frequency adjustment method, device, electronic device, and computer-readable storage medium. The technical solution adopted is to obtain the first operation data and the second operation data of the terminal device, where the first operation data is the operation data of the current terminal device, and the second operation data is the operation data of the terminal device within a preset duration; receive the first frequency from the frequency adjustment component, where the first frequency is determined according to the first operation data; determine the second frequency according to the first operation data and the second operation data; determine the target frequency according to the first frequency and the second frequency; and control the operation of the terminal device according to the target frequency.
[0090] In summary, the frequency adjustment method in the embodiments of the present application can determine two adjustable frequency values by using different strategies according to the first operation data and the second operation data of the terminal device, and further determine the target frequency value from the two adjustable frequency values for frequency adjustment, thereby achieving the technical effect of quickly adjusting the operation frequency of the terminal device.
[0091] The following will be described in detail respectively. It should be noted that the description order of the following embodiments does not limit the priority order of the embodiments.
[0092] Please refer to Figure 1 , Figure 1 which is a schematic diagram of the scenario of the frequency adjustment method provided by the embodiments of the present application. The frequency adjustment system may include a terminal device 100 and a processor 701. The terminal device 100 and the processor 701 can be communicatively connected in any way, including but not limited to signal communication through electrical lines and communication through wireless signals. The wireless signals can be computer network communications such as the TCP / IP protocol suite (TCP / IP Protocol Suite, TCP / IP) and the User Datagram Protocol (UDP). The terminal device 100 can receive control signals on a remote control or a control panel. The terminal device 100 can also receive instruction information sent by the processor 701. The terminal device 100 can perform corresponding operations according to the corresponding instruction information, such as the frequency adjustment method in the present application.
[0093] In the embodiments of the present application, the terminal device 100 includes but is not limited to a television, a mobile phone, a tablet computer, a computer, etc.
[0094] Those skilled in the art can understand,Figure 1 The application environment shown is only one application scenario related to the solution of this application, and does not constitute a limitation on the application scenarios of the solution of this application. Other application environments may also include more or fewer terminal devices than those shown in Figure 1 For example, Figure 1 only 1 terminal device is shown in , and specific details are not limited here.
[0095] In addition, as Figure 1 shown, the processor 701 may include any hardware device such as a CPU or a single-chip microcomputer embedded inside the terminal device that can perform data processing and instruction sending. Specific details are not limited here.
[0096] It should be noted that Figure 1 the scenario schematic diagram of the frequency regulation system shown is only an example. The frequency regulation system and scenario described in the embodiments of this application are to more clearly illustrate the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those of ordinary skill in the art know that with the evolution of the frequency regulation system and the emergence of new service scenarios, the technical solutions provided by the embodiments of this application are equally applicable to similar technical problems.
[0097] Specifically, please refer to Figure 2 , Figure 2 which is the scenario schematic of the terminal device provided by the embodiments of this application for executing the frequency regulation method. Figure 1 Among them, the specific execution process of the terminal device for executing the frequency regulation method is as follows:
[0098] S201: Obtain the first operation data of the terminal device.
[0099] In the embodiments of this application, the terminal device can obtain the first operation data and the second operation data during its own operation through various methods. For example, the first operation data during operation can be obtained through a pre-set monitoring function and stored in the memory.
[0100] Optionally, in some embodiments of this application, obtaining the first operation data and the second operation data of the terminal device includes: obtaining the first operation data through a load tracking device and storing the first operation data in a database; obtaining the second operation data from the database.
[0101] In the embodiments of this application, a load tracking device can be used, for example, a device or apparatus with a load tracking mechanism (Pelt / Walt), to continuously obtain the usage situation of the terminal device.
[0102] Optionally, taking the CPU frequency adjustment process as an example, the terminal device can continuously obtain relevant information of the CPU through a load tracking device, including but not limited to: frequency levels, usage information of big and small cores, etc. The terminal device can also obtain historical information of the CPU within a preset time period from the memory, including but not limited to: historical frequency levels, historical usage information of big and small cores, etc.
[0103] It should be noted that the preset time period can be set or adjusted according to actual situations, and no specific limitation is made in the embodiments of this application.
[0104] S202: Receive a first frequency from a frequency adjustment component.
[0105] In the embodiments of this application, the terminal device receives the first frequency sent or forwarded by the frequency adjustment component. The first frequency is determined according to first operation data. For example, the frequency adjustment component can determine the first frequency according to the first operation data and send the first frequency to the terminal device.
[0106] It should be noted that the type of the frequency adjustment component is not specifically limited. In the embodiments of this application, the real-time operating system QNX is adopted.
[0107] Optionally, QNX is a device or equipment outside the terminal device and can establish a communication connection with the terminal device. For example: through communication methods such as shared memory or virtio. When QNX is initially connected to the terminal device, QNX can set itself according to the operation data of the terminal device so as to output a frequency value adapted to the terminal device.
[0108] Optionally, in some embodiments of this application, before receiving the first frequency from the frequency adjustment component, the method further includes: sending the first operation data to the frequency adjustment component.
[0109] In the embodiments of this application, after the terminal device obtains the first operation data, it can send the obtained first operation data to the frequency adjustment component, and can also store the first operation data in the memory for use in determining a second frequency in combination with second operation data.
[0110] S203: Determine a second frequency according to the first operation data and the second operation data.
[0111] In the embodiments of this application, the second operation data is historical operation data within a preset time period. Since QNX can only receive the first operation data, it is impossible to comprehensively judge the operating frequency of the terminal device in combination with the second operation data. The terminal device can determine the second frequency according to the first operation data and the second operation data, avoiding the technical problem in the prior art that the operating frequency cannot be predicted based on historical load conditions to determine the operating frequency.
[0112] Optionally, in some embodiments of the present application, determining the second frequency according to the first operation data includes: obtaining the second operation data of the terminal device, where the second operation data is historical operation data; determining the first load of the central processing unit of the terminal device according to the first operation data; determining the second load of the central processing unit of the terminal device according to the second operation data; and determining the second frequency according to the first load and the second load.
[0113] In the embodiments of the present application, the terminal device can obtain the first operation data and the second operation data during its own operation in various ways. For example, the first operation data during the operation can be obtained through a pre-set monitoring function and stored in the memory; for another example, the second operation data can also be directly obtained from the memory.
[0114] It should be noted that the first operation data is the operation data of the current terminal device, and the second operation data is the operation data of the terminal device within a preset duration, and the time length of the preset duration is not specifically limited.
[0115] In the embodiments of the present application, the terminal device can determine the first load of the CPU according to the currently obtained first operation data, and at the same time determine the second load of the CPU according to the obtained second operation data, and comprehensively judge the second frequency according to the two load information.
[0116] Optionally, the terminal device can also consider the first operation data and the second operation data at the same time, and directly determine the second frequency according to the current data and the historical data.
[0117] S204: Determine the target frequency according to the first frequency and the second frequency.
[0118] In the embodiments of the present application, after determining the first frequency and the second frequency, the target frequency is determined from the first frequency and the second frequency.
[0119] Optionally, in some embodiments of the present application, determining the target frequency according to the first frequency and the second frequency includes: determining the maximum frequency among the first frequency and the second frequency; and determining the maximum frequency as the target frequency.
[0120] In the embodiments of the present application, the larger frequency value can be selected as the target frequency by comparing the magnitudes of the first frequency and the second frequency.
[0121] Optionally, preset conditions can also be set for the first frequency and the second frequency. When a certain condition is met, the frequency value corresponding to the condition is selected as the target frequency. For example: when the user's current usage scenario requires a rapid increase in the frequency value, and there is a time lag in the first frequency value, and the frequency value corresponding to this scenario is the second frequency, then the second frequency can be selected as the target frequency in this scenario.
[0122] It should be noted that the process of determining the target frequency can be completed by the terminal device or by QNX. If QNX is required to determine the target frequency, the second frequency can be sent to QNX. The usage scenarios can include, but are not limited to, scenarios such as application startup, touch, sliding, and frame dropping.
[0123] S205: Control the operation of the terminal device according to the target frequency.
[0124] In the embodiments of the present application, after determining the target frequency, relevant components of the terminal device are controlled to operate according to the target frequency. For example, the CPU is controlled to operate according to the target frequency.
[0125] Specifically, as Figure 3 shown in the schematic diagram of the overall frequency adjustment process, the terminal device can obtain operation data at the system framework level and programming level, such as operation data during sliding and application startup, and operation data during the operation of applications and graphics processing components. And the obtained data is sent to QNX through the system service of the hardware abstraction layer, and the first frequency returned by QNX is received.
[0126] In addition, the terminal device obtains the second frequency according to the operation data in the kernel, and performs frequency aggregation on the first frequency and the second frequency, that is, selects the highest frequency as the target frequency, and sends the selected target frequency to the frequency service to operate according to this frequency. When operating according to the target frequency, the operating frequency of the CPU can be adjusted by means such as voltage regulation and dynamic power management.
[0127] Optionally, in some embodiments of the present application, controlling the operation of the terminal device according to the target frequency includes: determining the operation scenario information of the terminal device; controlling the terminal device to operate according to the target frequency when the operation scenario information meets the preset scenario conditions. And determining the hardware support situation of the terminal device; controlling the terminal device to operate according to the target frequency when the hardware support situation meets the preset hardware conditions.
[0128] In the embodiments of the present application, before using the target frequency to control the operation of the terminal device, it can be first determined whether the operation scenario and / or hardware condition of the terminal device meet the preset conditions, such as whether the current operation scenario is suitable for operating at the target frequency, and whether the hardware of the terminal device allows operating at the target frequency.
[0129] Optionally, please refer to Figure 4 , Figure 4 is the scenario schematic of the frequency adjustment component executing the frequency adjustment method provided by the embodiments of the present application Figure 2 , where the specific execution process of the frequency adjustment component executing the frequency adjustment method is as follows:
[0130] S401: Receive first operation data from a terminal device, where the first operation data is the operation data of the terminal device at present;
[0131] S402: Determine a first frequency according to the first operation data;
[0132] S403: Send the first frequency to the terminal device.
[0133] In an embodiment of the present application, the frequency adjustment component can be arranged inside or outside the terminal device, and can receive the first operation data through wired or wireless communication; and calculate the operation frequency in the current situation, that is, the first frequency, according to the first operation data; and return the first frequency to the terminal device.
[0134] In an embodiment of the present application, the terminal device obtains its own first operation data and second operation data, and sends the first operation data to the frequency adjustment component, and then receives the first frequency from the frequency adjustment component; in addition, the terminal device also needs to determine a second frequency according to the first operation data and the second operation data; determine a target frequency according to the received first frequency and the determined second frequency, and operate according to the target frequency. This solution can adopt different strategies to determine two adjustable frequency values according to the first operation data and the second operation data of the terminal device, and further determine a target frequency value from the two adjustable frequency values for frequency adjustment, thereby achieving the technical effect of quickly adjusting the operation frequency of the terminal device.
[0135] To facilitate better implementation of the frequency adjustment method of the present application, the present application also provides a frequency adjustment device based on the above frequency adjustment method. The meanings of the terms are the same as those in the above frequency adjustment method, and the specific implementation details can refer to the description in the method embodiment.
[0136] Please refer to Figure 5 , Figure 5 which is a schematic structural diagram of the frequency adjustment device provided by an embodiment of the present application Figure 1 , where the frequency adjustment device 500 is applied to a terminal device, and specifically can be as follows:
[0137] An acquisition module 501, configured to acquire first operation data of a terminal device, where the first operation data is the operation data of the terminal device at present;
[0138] A first receiving module 502, configured to receive a first frequency from a frequency adjustment component, where the first frequency is determined according to the first operation data;
[0139] A first processing module 503, configured to determine a second frequency according to the first operation data and the second operation data;
[0140] The first processing module 503 is further configured to determine a target frequency according to the first frequency and the second frequency;
[0141] The first processing module 503 is further configured to control the operation of the terminal device according to the target frequency.
[0142] Optionally, in some embodiments of the present application, the first processing module 503 is further configured to:
[0143] Send the first operation data to the frequency adjustment component.
[0144] Optionally, in some embodiments of the present application, the first processing module 503 is further configured to:
[0145] Obtain second operation data of the terminal device, where the second operation data is historical operation data;
[0146] Determine a first load of the central processing unit of the terminal device according to the first operation data;
[0147] Determine a second load of the central processing unit of the terminal device according to the second operation data;
[0148] Determine a second frequency according to the first load and the second load.
[0149] Optionally, in some embodiments of the present application, the first processing module 503 is further configured to:
[0150] Determine the maximum frequency among the first frequency and the second frequency;
[0151] Determine that the maximum frequency is the target frequency.
[0152] Optionally, in some embodiments of the present application, the first processing module 503 is further configured to:
[0153] Determine the operation scenario information of the terminal device;
[0154] When the operation scenario information meets the preset scenario conditions, control the terminal device to operate according to the target frequency.
[0155] Optionally, in some embodiments of the present application, the first processing module 503 is further configured to:
[0156] Determine the hardware support situation of the terminal device;
[0157] When the hardware support situation meets the preset hardware conditions, control the terminal device to operate according to the target frequency.
[0158] Optionally, in some embodiments of the present application, the first processing module 503 is further configured to:
[0159] Obtain the first operation data through the load tracking device and store the first operation data in the database;
[0160] Obtain the second operation data from the database.
[0161] In the embodiment of the present application, first, the acquisition module 501 acquires the first operation data and the second operation data of the terminal device. The first operation data is the operation data of the current terminal device, and the second operation data is the operation data of the terminal device within a preset duration. Next, the first receiving module 502 receives the first frequency from the frequency adjustment component, and the first frequency is determined according to the first operation data. Subsequently, the first processing module 503 determines the second frequency according to the first operation data and the second operation data. Then, the first processing module 503 determines the target frequency according to the first frequency and the second frequency, and controls the operation of the terminal device according to the target frequency.
[0162] Please refer to Figure 6 , Figure 6 which is the structural diagram of the frequency adjustment device provided by the embodiment of the present application Figure 2 , and the frequency adjustment device 600 is applied to the frequency adjustment component, specifically as follows:
[0163] The second receiving module 601 is configured to receive the first operation data from the terminal device, and the first operation data is the operation data of the current terminal device;
[0164] The second processing module 602 is configured to determine the first frequency according to the first operation data;
[0165] The second processing module 602 is further configured to send the first frequency to the terminal device.
[0166] In addition, the present application further provides an electronic device, as Figure 7 shown, which shows the structural diagram of the electronic device involved in the present application. Specifically:
[0167] The electronic device may include a processor 701 with one or more processing cores, a memory 702 with one or more computer-readable storage media, a power supply 703, an input unit 704, and other components. Those skilled in the art can understand that Figure 7 the structure of the electronic device shown in
[0168] The processor 701 is the control center of the electronic device, connecting various parts of the entire electronic device through various interfaces and circuits. By running or executing software programs and / or modules stored in the memory 702, and by calling the data stored in the memory 702, it executes various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 701 may include one or more processing cores; preferably, the processor 701 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 701 either.
[0169] The memory 702 can be used to store software programs and modules. The processor 701 executes various functional applications and data processing by running the software programs and modules stored in the memory 702. The memory 702 mainly includes a program storage area and a data storage area. Among them, the program storage area can store the operating system, application programs required for at least one function (such as the sound playback function, image playback function, etc.); the data storage area can store data created according to the use of the electronic device. In addition, the memory 702 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 devices. Correspondingly, the memory 702 may also include a memory controller to provide the processor 701 with access to the memory 702.
[0170] The electronic device further includes a power supply 703 for powering each component. Preferably, the power supply 703 can be logically connected to the processor 701 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 703 may also include any components such as one or more DC or AC power supplies, a recharge system, a power device debugging circuit, a power converter or inverter, and a power status indicator.
[0171] The electronic device may further include an input unit 704, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.
[0172] Although not shown, the electronic device may further include a display unit, etc., which will not be elaborated here. Specifically, in this embodiment, the processor 701 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 702 according to the following instructions, and the processor 701 will run the application programs stored in the memory 702, so as to implement the steps in any one of the frequency adjustment methods provided in the embodiments of the present application.
[0173] In the embodiments of the present application, the terminal device obtains its own first operation data and second operation data, and sends the first operation data to the frequency adjustment component. After that, the terminal device receives the first frequency from the frequency adjustment component. In addition, the terminal device also needs to determine the second frequency according to the first operation data and the second operation data; determine the target frequency according to the received first frequency and the determined second frequency, and operate according to the target frequency. This solution can determine two adjustable frequency values by adopting different strategies according to the first operation data and the second operation data of the terminal device, and further determine the target frequency value from the two adjustable frequency values for frequency adjustment, thereby achieving the technical effect of quickly adjusting the operation frequency of the terminal device.
[0174] For the specific implementation of each of the above operations, reference can be made to the previous embodiments, which will not be elaborated here.
[0175] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling relevant hardware through instructions. The instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0176] For this reason, the present application provides a computer-readable storage medium, on which a computer program is stored. The computer program can be loaded by a processor to execute the steps in any one of the frequency adjustment methods provided by the present application.
[0177] For the specific implementation of each of the above operations, reference can be made to the previous embodiments, which will not be elaborated here.
[0178] Among them, the computer-readable storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, etc.
[0179] Since the instructions stored in the computer-readable storage medium can execute the steps in any one of the frequency adjustment methods provided by the present application, the beneficial effects that can be achieved by any one of the frequency adjustment methods provided by the present application can be realized. For details, reference can be made to the previous embodiments, which will not be elaborated here.
[0180] The above has introduced in detail a frequency adjustment method, device, electronic device, and computer-readable storage medium provided by the present application. Specific examples are used in this article to elaborate on the principles and implementation manners of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A frequency adjustment method, characterized in that, Applied to a terminal device, the method includes: Obtain first operation data of the terminal device, where the first operation data is the current operation data of the terminal device; Receive a first frequency from a frequency adjustment component, where the first frequency is determined according to the first operation data; Determine a second frequency according to the first operation data; Determine a target frequency according to the first frequency and the second frequency; Control the operation of the terminal device according to the target frequency.
2. The method according to claim 1, wherein Before receiving the first frequency from the frequency adjustment component, the method further includes: Send the first operation data to the frequency adjustment component.
3. The method according to claim 1, wherein The determining the second frequency according to the first operation data includes: Obtain second operation data of the terminal device, where the second operation data is historical operation data; Determine a first load of a central processing unit of the terminal device according to the first operation data; Determine a second load of the central processing unit of the terminal device according to the second operation data; Determine the second frequency according to the first load and the second load.
4. The method according to claim 1, wherein The determining the target frequency according to the first frequency and the second frequency includes: Determine the maximum frequency among the first frequency and the second frequency; Determine the maximum frequency as the target frequency.
5. The method according to claim 1, characterized in that, The controlling the operation of the terminal device according to the target frequency includes: Determine operation scenario information of the terminal device; When the operation scenario information meets a preset scenario condition, control the terminal device to operate according to the target frequency.
6. The method according to claim 1, wherein The controlling the operation of the terminal device according to the target frequency further includes: Determine the hardware support situation of the terminal device; When the hardware support situation meets a preset hardware condition, control the terminal device to operate according to the target frequency.
7. The method according to claim 3, wherein The method further includes: Obtain the first operation data through a load tracking device and store the first operation data in a database; Obtain the second operation data from the database.
8. A frequency adjustment method, characterized in that, Applied to a frequency adjustment component, the method includes: Receive first operation data from a terminal device, where the first operation data is the current operation data of the terminal device; Determine a first frequency according to the first operation data; Send the first frequency to the terminal device.
9. A frequency adjustment device, characterized in that, Applied to a terminal device, the apparatus includes: An obtaining module, configured to obtain first operation data and second operation data of the terminal device, where the first operation data is the current operation data of the terminal device, and the second operation data is the operation data of the terminal device within a preset duration; A first receiving module, configured to receive a first frequency from a frequency adjustment component, where the first frequency is determined according to the first operation data; A first processing module, configured to determine a second frequency according to the first operation data and the second operation data; The first processing module is further configured to determine a target frequency according to the first frequency and the second frequency; The first processing module is further configured to control the operation of the terminal device according to the target frequency.
10. A frequency adjustment device, characterized in that, Applied to a frequency adjustment component, the apparatus includes: A second receiving module, configured to receive first operation data from a terminal device, where the first operation data is operation data of the terminal device currently; A second processing module, configured to determine a first frequency according to the first operation data; The second processing module is further configured to send the first frequency to the terminal device.
11. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the steps in the frequency adjustment method according to any one of claims 1-8 are implemented.
12. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, the steps in the frequency adjustment method according to any one of claims 1-8 are implemented.