CN115048221A - Load processing method and device, electronic equipment and computer readable storage medium - Google Patents

Load processing method and device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN115048221A
CN115048221A CN202210745474.3A CN202210745474A CN115048221A CN 115048221 A CN115048221 A CN 115048221A CN 202210745474 A CN202210745474 A CN 202210745474A CN 115048221 A CN115048221 A CN 115048221A
Authority
CN
China
Prior art keywords
thread
display frame
key
processor
key thread
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.)
Pending
Application number
CN202210745474.3A
Other languages
Chinese (zh)
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202210745474.3A priority Critical patent/CN115048221A/en
Publication of CN115048221A publication Critical patent/CN115048221A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5044Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering hardware capabilities

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)

Abstract

The application discloses a load processing method, a load processing device, an electronic device and a computer readable storage medium. The method comprises the following steps: acquiring the display duration of a current display frame; acquiring load data of a key thread in key thread information in a display duration; the key thread is a preset thread, or the key thread information is provided by a previous display frame of the current display frame; based on the load data, the processor frequency associated with the next display frame is adjusted. By the method, the adjustment amplitude of the processor frequency can be reduced, the performance requirement can be met, and the power consumption can be saved.

Description

Load processing method and device, electronic equipment and computer readable storage medium
Technical Field
The present application relates to the field of load processing technologies, and in particular, to a load processing method and apparatus, an electronic device, and a computer-readable storage medium.
Background
Electronic devices currently have more and more functions. Such as a game-like application that may be run on the electronic device to allow the user to experience the game. Such as a video-type application that may be run on the electronic device to allow the user to experience watching a video.
The electronic device needs to perform load tracking to control hardware parameters in the electronic device to provide better user experience when supporting the operation of these applications.
Disclosure of Invention
The application provides a load processing method, a load processing device, an electronic device and a computer readable storage medium, which can reduce the adjustment amplitude of the processor frequency, not only can meet the performance requirement, but also can save the power consumption.
In a first aspect, the present application provides a load handling method, including: acquiring the display duration of a current display frame; acquiring load data of a key thread in key thread information in a display duration; the key thread is a preset thread, or the key thread information is provided by a previous display frame of the current display frame; based on the load data, the processor frequency associated with the next display frame is adjusted.
In a second aspect, the present application provides a load handling device comprising: the first acquisition module is used for acquiring the display duration of the current display frame; the second acquisition module is used for acquiring load data of the key thread in the key thread information in the display duration; the key thread is a preset thread, or the key thread information is provided by a previous display frame of the current display frame; an adjustment module to adjust a processor frequency associated with a next display frame based on the load data.
In a third aspect, the present application provides an electronic device comprising a processor and a memory coupled to the processor; wherein the memory is adapted to store a computer program and the processor is adapted to execute the computer program to implement the method as provided in the first aspect above.
In a fourth aspect, the present application provides a computer readable storage medium storing a computer program which, when executed by a processor, implements the method as provided in the first aspect above.
The beneficial effect of this application is: different from the prior art, the load processing method, the load processing device, the electronic equipment and the computer-readable storage medium are provided by the application. According to the method, the display duration of the current display frame is used as the load statistical window, compared with the load statistics performed by using a fixed window in the related technology, the display duration of each display frame is used as the load statistical window, the load condition in each display frame can be reflected more truly, the statistics is more accurate, further, the load statistics of non-critical threads can be reduced by obtaining the load data of the critical threads in the critical thread information in the display duration of each display frame, and further, when the frequency of a processor related to the next display frame is adjusted, the adjustment range of the frequency of the processor can be reduced, the performance requirements can be met, and the power consumption can be saved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts. Wherein:
fig. 1 is a schematic flowchart of a first embodiment of a load handling method provided in the present application;
FIG. 2 is a schematic flow chart of an embodiment of step 11 in FIG. 1;
fig. 3 is a schematic flowchart of a second embodiment of a load handling method provided in the present application;
FIG. 4 is a schematic flow chart of one embodiment of step 33 in FIG. 3;
FIG. 5 is a schematic flow chart of another embodiment of step 33 in FIG. 3;
FIG. 6 is a schematic diagram of an embodiment of a load handling apparatus provided herein;
FIG. 7 is a schematic structural diagram of an embodiment of an electronic device provided in the present application;
FIG. 8 is a schematic structural diagram of another embodiment of an electronic device provided herein;
FIG. 9 is a schematic structural diagram of an embodiment of a computer-readable storage medium provided in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In some embodiments, the processor Load Tracing algorithm WALT (Windows-Assist Load Tracing, Windows assisted Load Tracing). The WALT algorithm is mainly applied to scenes with more man-machine interaction, and can better reflect the instantaneous change of the load of a system processor, such as Android mobile phones.
The inventors have long studied and found that the following problems exist:
the window size of the WALT algorithm is fixed, and is set to 16.66ms when FPS (Frames Per Second, frame Per Second) is 60, for example. 60 FPS, the corresponding frame length is ideally 16.66ms, but this is only an ideal value, and it is possible that the frame length of this frame is 15ms, the frame length of the next frame is 18ms, and the frame length fluctuates around 16.66 ms. The window size of the WALT algorithm and the window of the display frame are therefore misaligned and do not accurately reflect the amount of processor load per frame.
The WALT algorithm introduces the aggregation load of the top-app thread group, but the threads in the top-app thread group are too many, for example, when a user uses a game application program, the number of threads of the game application program is one to two hundred, which causes the phenomena that the aggregation load is too large in statistics and the frequency of a processor is easy to be adjusted too high.
Based on this, the present application proposes any one of the following embodiments to solve at least one of the problems described above.
Referring to fig. 1, fig. 1 is a schematic flow chart of a load handling method according to a first embodiment of the present application. The method comprises the following steps:
step 11: and acquiring the display duration of the current display frame.
The execution subject of the embodiment may be an electronic device such as a mobile terminal, a terminal device, or the like. The electronic device may have a display. The display is used for displaying image data. In units of frames in displaying an image. Wherein FPS (Frames Per Second) may be 60, 70, 80, 100, or 120. I.e. the display may display 60 frames, 70 frames, 80 frames, 100 frames or 120 frames in one second.
And the electronic equipment is provided with a corresponding operating system. Such as the Android operating system, the IOS operating system, and the microsoft operating system.
In some embodiments, the content of the display frame is to be drawn in Buffer, and this Buffer is applied from Buffer queue through dequeue Buffer (). After applying for the Buffer, and after filling the content into the Buffer, the Buffer needs to be returned to the surfaceFlinger through the queue Buffer () for synthesis and display. Then, when the surfaceFlinger needs to start synthesizing, acquireBuffer () needs to be called to take a Buffer from the BufferQueue to synthesize, and the Buffer is returned to the BufferQueue through relesaBuffer () after the synthesis is finished.
In some embodiments, referring to fig. 2, step 11 may be the following flow:
step 21: a first start time of a current display frame is acquired, and a second start time of a next display frame is acquired.
In some embodiments, the queueBuffer time instant of the current display frame is taken as the first start time and the queueBuffer time instant of the next display frame is taken as the second start time.
Step 22: and taking the time difference between the second starting time and the first starting time as the display time length.
If the second starting time is A and the first starting time is B, the display time length is A-B. If a is 567 ms and B is 551 ms, the display duration of the current display frame is 16 ms.
Step 12: acquiring load data of a key thread in key thread information in a display duration; the key thread is a preset thread, or the key thread information is provided by a previous display frame of the current display frame.
A thread is the smallest unit that an operating system can perform computational scheduling.
In some embodiments, the critical thread in the critical thread information may be a default thread. For example, when the current display frame is the first frame, the number of the preset threads is plural. The preset thread may be determined in advance based on a specific display frame. For example, when an application is loaded, the initial display of consecutive frames is a basic introduction to the application, and the threads of the display frames can be almost fixed, so that the threads can be determined as the preset threads.
In some embodiments, the preset thread may be determined from the display frame. For example, in an application program, when the content of a display frame is fixed, the next corresponding thread may be directly determined as a preset thread.
In some embodiments, there is a degree of dependency between adjacent display frames, such as a portion of the content in a previous display frame that will still be displayed in the current display frame. Based on this, the key thread determined in the previous display frame may be provided to the current display frame as an initial key thread for the current display frame.
In some embodiments, within the display duration of the previous display frame, detecting that any key thread is closed before the display duration of the previous display frame, the closed key thread is deleted, and the remaining key threads are provided to the current display frame. For example, key thread C, key thread D, key thread E, key thread F, and key thread G are all relevant in the key thread information during the display duration of the previous display frame. And before the display duration of the previous display frame is reached, closing the thread of the key thread D, and deleting the key thread D from the key thread information to update the key thread information. And providing the updated key thread information to the current display frame. Namely, key thread C, key thread E, key thread F, and key thread G are relevant to the key thread provided to the current display frame.
In some embodiments, a newly turned on thread may appear within the display duration of the current display frame, and the newly turned on thread may be added to the key thread information.
The load data may be statistical information of a sum of the number of critical threads being processed and waiting for processing by the processor within the display duration of the current display frame.
Step 13: based on the load data, the processor frequency associated with the next display frame is adjusted.
In some embodiments, the display duration of each display frame is short, so threads between adjacent display frames have strong correlation. For example, the thread of the previous display frame may still be running in the current display frame, so the processor frequency associated with the next display frame may be adjusted according to the load data of the current display frame. For example, the load data of the current display frame can be used as the predicted load data of the next display frame, and the processor frequency related to the next display frame can be adjusted in advance based on the load data.
In some embodiments, the solution of the present embodiment may be applied to a mobile terminal, such as when a user uses an application program in the mobile terminal.
Optionally, when the mobile terminal uses the game application program, the user performs load aggregation on the key thread of each display frame in the game application program by using the above scheme, so as to optimize the processor frequency of the next display frame.
Optionally, when the user uses the video application program at the mobile terminal, by using the above scheme, the load aggregation is performed on the key thread of each display frame in the video application program, so as to optimize the processor frequency of the next display frame.
Optionally, when the mobile terminal uses the shooting application program, the user performs load aggregation on the key thread of each display frame in the shooting application program by using the above scheme, so as to optimize the processor frequency of the next display frame.
By the method, prediction can be accurately provided for the calculation force demand of the next frame by using the historical frame load, and the performance of heavy load scenes can be met to save the power consumption of the electronic equipment.
In some embodiments, the processor may include a central processor and an image processor, whereby step 13 may be adjusting the frequency of the central processor and the frequency of the image processor based on the load data.
In some embodiments, processor core selection and processor frequency adjustment may be performed based on load data.
In this embodiment, the display duration of the current display frame is used as the load statistics window, and compared with the load statistics performed by using a fixed window in the related art, the display duration of each display frame is used as the load statistics window, which can reflect the load condition in each display frame more truly, so that the statistics is more accurate.
Referring to fig. 3, fig. 3 is a schematic flowchart of a load handling method according to a second embodiment of the present disclosure. The method comprises the following steps:
step 31: and acquiring the display duration of the current display frame.
Step 31 has the same or similar technical solutions as those in the above embodiments, and is not described herein.
Step 32: acquiring a target thread group; the target thread group includes a plurality of target threads.
In some embodiments, threads running on the electronic device may be divided into three groups by default. Such as a top-app thread group (a combination of threads for applications and some system threads that have focus), a forkround thread group (a combination of threads for applications and some system threads that are visible to the user but lose focus), an other thread group (a combination of other threads of the system).
In the related art, the WALT calculates the aggregate load of the top-app thread group by default, and the aggregate load is used for the core selection of the thread CPU and the adjustment of the CPU frequency.
However, when the aggregate load of the top-app thread group is counted, threads in the top-app thread group are too many, for example, when a user uses a game application program, the number of threads of the game application program is one to two hundred, and a key thread and a normal thread which are closely related to user experience are not distinguished, so that the aggregate load is counted too much, and the CPU frequency is easily adjusted too high.
Based on this, the embodiment proposes to determine the key thread from the top-app thread group and perform load statistics.
Step 33: and determining a key thread from the plurality of target threads to form key thread information.
In other embodiments, the critical thread may be determined from all threads.
In some embodiments, referring to fig. 4, step 33 may be the following flow:
step 41: acquiring a thread white list; the thread white list comprises preset threads.
The thread whitelist may be set in advance. The thread whitelist may be used directly, such as when the currently displayed frame is the first frame. The thread white list comprises a plurality of preset threads.
Step 42: and taking a target thread corresponding to a preset thread in the plurality of target threads as a key thread, and further forming key thread information.
In some embodiments, a preset thread in the thread white list is matched with a target thread in the target thread group in a traversal manner, if the target thread group has the matched target thread, the target thread is used as a key thread, and then key thread information is formed after matching with the preset thread in the thread white list is completed.
In some embodiments, the thread whitelist may be changed during display of the display frame. If a newly added key thread occurs in the display process of the current display frame and the thread white list does not have the newly added key thread, the newly added key thread can be added into the thread white list.
In some embodiments, referring to fig. 5, step 33 may also be the following flow:
step 51: and detecting that any one of the target threads is awakened in the display duration.
If the thread is awakened due to the association relationship in the display duration of the current frame, step 52 may be executed to determine the awakened target thread as the key thread.
Step 52: and determining the awakened target thread as a key thread to form key thread information.
And determining the awakened target thread as a key thread, and further updating the key thread information.
In some embodiments, within the display duration of the previous display frame, detecting that any key thread in the key thread information is closed before the display duration of the previous display frame reaches, deleting the closed key thread from the key thread information, and providing the key thread information after deleting the key thread to the current display frame.
Step 34: and acquiring load data of the key thread in the key thread information in the display duration.
Step 35: based on the load data, the processor frequency associated with the next display frame is adjusted.
In some embodiments, the processor includes a central processor and an image processor, and step 35 may adjust the frequency of the central processor and the frequency of the image processor based on the load data.
In some embodiments, within the display duration of the previous display frame, detecting that any key thread is closed before the display duration of the previous display frame, the closed key thread is deleted, and the remaining key threads are provided to the current display frame.
In an application scenario, any of the above embodiments of the present application is applied to a game application program, so that when a user operates the game application program, the game performance can be satisfied, and meanwhile, the power consumption optimization is pursued to be extreme, so as to achieve dynamic balance between the performance and the power consumption.
For example, a GPA (Game Performance Adaptive) function is proposed. The main functions of GPA are as follows:
1. and comprehensively considering information such as the target frame rate set by the game application program, the temperature condition of the mobile terminal, the frame output condition when the game application program is used and the like to obtain the target frame rate of one catch-up frame.
2. A critical thread is identified at runtime of the game-like application.
3. And counting the aggregate load of the key threads in each frame in the game application program.
4. And predicting the computational power requirement of the next frame in use according to the aggregate load of the key thread framing of the game application program of the historical frame and the frame output condition of the game application program in use.
5. And calculating the frequency of the hardware such as the CPU, the GPU and the like according to the calculation power requirement, and setting.
Specifically, the aggregate load of the key threads in each frame in the above statistical game-like application may be, so in the related art, as mentioned in the description of the disadvantage of the WALT load tracking algorithm, the window size of the WALT algorithm is fixed, and the window displaying the frame is not aligned, which cannot accurately reflect the load size of each frame of the game, and cannot achieve the purpose of single-frame guard of the game.
Therefore, the present application proposes the queue buffer time of the previous display frame as the starting point of the CPU load tracking window, and the queue buffer time of the next display frame as the end point of the CPU load tracking window, where the starting point of the load tracking and the window size are dynamic and consistent with the frame-out duration of each display frame. The statistical CPU load truly reflects the load size of each frame of the game.
Further, the application classifies the threads into a key thread and a common thread which are closely related to user experience. The critical thread may include: 1) rendering thread of game graphic engine relevant to vision and thread of strong dependence; 2) a critical thread of the game sound engine related to hearing; 3) a scheduled thread of touch events related to haptics. The remaining threads may be normal threads.
The method and the device only count the aggregate load of the key threads, so that the counted aggregate load just expresses the performance guarantee required by the system to meet the experience requirements of users, and the power consumption optimization of the mobile terminal using the application program is pursued to be extreme while the performance is met.
In this embodiment, the display duration of the current display frame is used as the load statistics window, and compared with the load statistics performed by using a fixed window in the related art, the display duration of each display frame is used as the load statistics window, which can reflect the load condition in each display frame more truly, so that the statistics is more accurate.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an embodiment of a load handling device provided in the present application. The load handling device 70 includes: a first acquisition module 71, a second acquisition module 72 and an adjustment module 73.
The first obtaining module 71 is configured to obtain a display duration of a current display frame.
The second obtaining module 72 is configured to obtain load data of a key thread in the key thread information within the display duration; the key thread is a preset thread, or the key thread information is provided by a previous display frame of the current display frame.
The adjusting module 73 is configured to adjust the processor frequency associated with the next display frame based on the load data.
The load processing device 70 can implement the method of any of the above embodiments by using the first acquiring module 71, the second acquiring module 72 and the adjusting module 73.
Referring to fig. 7, fig. 7 is a schematic structural diagram of an embodiment of an electronic device provided in the present application. The electronic device 110 includes a processor 111 and a memory 112 coupled to the processor 111;
wherein the memory 112 is used for storing computer programs and the processor 111 is used for executing the computer programs to realize the following methods:
acquiring the display duration of a current display frame; acquiring load data of a key thread in key thread information in a display duration; the key thread is a preset thread, or the key thread information is provided by a previous display frame of the current display frame; based on the load data, the processor frequency associated with the next display frame is adjusted.
It will be appreciated that the processor 111 is arranged to execute a computer program to implement the method of any of the above embodiments.
Referring to fig. 8, fig. 8 is a schematic structural diagram of another embodiment of the electronic device provided in the present application. The electronic device 110 may be, for example, a mobile electronic device, and the electronic device 110 may include: a memory 112, a processor (CPU) 111, a circuit board (not shown), a power supply circuit, and a microphone 123. The circuit board is arranged in a space enclosed by the shell; the processor 111 and the memory 112 are disposed on the circuit board; the power supply circuit is used for supplying power to each circuit or device of the electronic equipment; the memory 112 is used to store executable program code; the processor 111 executes a computer program corresponding to the executable program code by reading the executable program code stored in the memory 112 to recognize the identification information to implement the unlocking and waking functions.
The electronic device may further include: peripheral interface 114, RF (Radio Frequency) circuitry 116, audio circuitry 117, speakers 122, power management chip 119, input/output (I/O) subsystems 120, other input/control devices 121, display 124, and external port 115, which communicate via one or more communication buses or signal lines 118.
The memory 112 may be accessed by the processor 111, the peripheral interface 114, and the like, and the memory 112 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other volatile solid-state storage devices. The peripheral interface 114 may connect input and output peripherals of the device to the processor 111 and the memory 112.
The I/O subsystem 120 may connect input and output peripherals on the device, such as a display 124 and other input/control devices 121, to the peripheral interface 114. The I/O subsystem 120 may include a display controller 1201 and one or more input controllers 1202 for controlling other input/control devices 121. Where one or more input controllers 1202 receive electrical signals from or transmit electrical signals to other input/control devices 121, other input/control devices 121 may include physical buttons (push buttons, rocker buttons, etc.), dials, slide switches, joysticks, click wheels, etc. It is worth noting that the input controller 1202 may be connected with any one of the following: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
The display 124 is an input interface and an output interface between the user electronic device and the user, displaying visual output to the user, which may include graphics, text, icons, video, and the like.
The display controller 1201 in the I/O subsystem 120 receives electrical signals from the display 124 or sends electrical signals to the display 124. The display 124 detects a contact on the touch screen, and the display controller 1201 converts the detected contact into an interaction with a user interface object displayed on the display 124, i.e., implements a human-machine interaction, which may be an icon for running a game, an icon networked to a corresponding network, or the like, displayed on the display 124.
The RF circuit 116 is mainly used to establish communication between the handset and the wireless network (i.e., the network side), and implement data transmission and reception between the handset and the wireless network. Such as sending and receiving short messages, e-mails, etc. In particular, the RF circuitry 116 receives and transmits RF signals, also referred to as electromagnetic signals, by which the RF circuitry 116 converts electrical signals to or from electromagnetic signals and communicates with communication networks and other devices. The RF circuitry 116 may include known circuitry for performing these functions including, but not limited to, an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a CODEC (CODEC) chipset, a Subscriber Identity Module (SIM), and so forth.
The audio circuit 117 is mainly used to receive audio data from the peripheral interface 114, convert the audio data into an electric signal, and transmit the electric signal to the speaker 122. And a speaker 122 for converting voice signals received by the handset from the wireless network through the RF circuit 116 into sound and playing the sound to the user. And a power management chip 119 for supplying power and managing power to the hardware connected to the processor 111, the I/O subsystem 120, and the peripheral interface 114.
Referring to fig. 9, fig. 9 is a schematic structural diagram of an embodiment of a computer-readable storage medium provided in the present application. The computer-readable storage medium 80 stores a computer program 81, the computer program 81, when executed by a processor, implementing the method of:
acquiring the display duration of a current display frame; acquiring load data of a key thread in key thread information in a display duration; the key thread is a preset thread, or the key thread information is provided by a previous display frame of the current display frame; based on the load data, the processor frequency associated with the next display frame is adjusted.
It will be appreciated that the computer program 81, when executed by a processor, is also capable of implementing the method of any of the embodiments described above.
In summary, in the present application, the display duration of the current display frame is used as the load statistics window, and compared with the related art that a fixed window is used for load statistics, the display duration of each display frame is used as the load statistics window, which can more truly reflect the load condition in each display frame, so that the statistics is more accurate.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other manners. For example, the above-described device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed.
The integrated units in the other embodiments described above may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the purpose of illustrating embodiments of the present application and is not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application or are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.

Claims (10)

1. A method of load handling, the method comprising:
acquiring the display duration of a current display frame;
acquiring load data of a key thread in the key thread information in the display duration; the key thread is a preset thread, or the key thread information is provided by a previous display frame of the current display frame;
adjusting a processor frequency associated with a next display frame based on the load data.
2. The method of claim 1, wherein obtaining the display duration of the current display frame comprises:
acquiring a first starting time of the current display frame and acquiring a second starting time of the next display frame;
and taking the time difference between the second starting time and the first starting time as the display time length.
3. The method according to claim 1, wherein the obtaining load data of the critical thread in the critical thread information in the display duration comprises:
acquiring a target thread group; the target thread group comprises a plurality of target threads;
determining a key thread from a plurality of target threads to form key thread information;
and acquiring load data of the key thread in the key thread information in the display duration.
4. The method of claim 3, wherein determining a critical thread from the plurality of target threads, and forming the critical thread information comprises:
acquiring a thread white list; the thread white list comprises preset threads;
and taking a target thread corresponding to the preset thread in the target threads as the key thread, and further forming the key thread information.
5. The method of claim 3, wherein determining a critical thread from the plurality of target threads, and forming the critical thread information comprises:
within the display duration, detecting that any one of the target threads is awakened;
and determining the awakened target thread as a key thread to form the key thread information.
6. The method of claim 1, wherein the critical thread information is provided by a display frame that is previous to the current display frame, comprising:
and in the display duration of the previous display frame, detecting that any key thread in the key thread information is closed before the display duration of the previous display frame reaches, deleting the closed key thread from the key thread information, and providing the key thread information after key thread deletion to the current display frame.
7. The method of claim 1, wherein the processor comprises a central processor and an image processor, and wherein adjusting the processor frequency associated with a next display frame based on the load data comprises:
adjusting a frequency of the central processor and a frequency of the image processor based on the load data.
8. A load handling device, comprising:
the first acquisition module is used for acquiring the display duration of the current display frame;
the second acquisition module is used for acquiring load data of the key thread in the key thread information in the display duration; the key thread is a preset thread, or the key thread information is provided by a previous display frame of the current display frame;
an adjustment module to adjust a processor frequency associated with a next display frame based on the load data.
9. An electronic device, comprising a processor and a memory coupled to the processor;
wherein the memory is adapted to store a computer program and the processor is adapted to execute the computer program to implement the method according to any of claims 1-7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, implements the method of any one of claims 1-7.
CN202210745474.3A 2022-06-27 2022-06-27 Load processing method and device, electronic equipment and computer readable storage medium Pending CN115048221A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210745474.3A CN115048221A (en) 2022-06-27 2022-06-27 Load processing method and device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210745474.3A CN115048221A (en) 2022-06-27 2022-06-27 Load processing method and device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN115048221A true CN115048221A (en) 2022-09-13

Family

ID=83162991

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210745474.3A Pending CN115048221A (en) 2022-06-27 2022-06-27 Load processing method and device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN115048221A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116737357A (en) * 2022-09-28 2023-09-12 荣耀终端有限公司 Method and device for adjusting processor frequency

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116737357A (en) * 2022-09-28 2023-09-12 荣耀终端有限公司 Method and device for adjusting processor frequency

Similar Documents

Publication Publication Date Title
CN109157839B (en) Frame rate regulation and control method, device, storage medium and terminal
US11086697B2 (en) Broadcast-controlling method in operating system and mobile terminal
EP3591947A1 (en) Broadcast receiver queue adjustment method, apparatus, storage medium, and electronic device
CN109460364A (en) Application program detection method, device, storage medium and mobile terminal
CN106844069A (en) Adjust method, device and the terminal of broadcast message queue
CN108693948B (en) Frame rate adjusting method and device, terminal equipment and storage medium
CN110618801A (en) Smooth picture frame rate expression method and device, terminal device and storage medium
CN115048221A (en) Load processing method and device, electronic equipment and computer readable storage medium
US10990460B2 (en) Method of generating broadcast queue, storage medium, and terminal
CN108594982B (en) Frame rate adjusting method and device, terminal equipment and storage medium
CN110856196B (en) WLAN service optimization method, terminal device and storage medium
CN111767136B (en) Process management method, terminal and device with storage function
CN111459410B (en) Memory space allocation method and device, electronic equipment and storage medium
CN115469816B (en) Method, device, equipment and storage medium for switching reading and writing of memory
CN106933684A (en) A kind of control method of broadcast recipients, device and mobile terminal
CN110968523A (en) Memory defragmentation method and device
CN108712556B (en) Frame rate adjusting method and device, terminal equipment and storage medium
CN113407277B (en) Display element color setting method, device, equipment and storage medium
CN110767950B (en) Charging method, charging device, terminal equipment and computer readable storage medium
CN108810596B (en) Video editing method and device and terminal
CN113098754A (en) Group revocation method and device, electronic equipment and storage medium
CN112328351A (en) Animation display method, animation display device and terminal equipment
CN106919461B (en) Method and device for adjusting broadcast receiver queue and terminal equipment
CN112306667B (en) Animation playing method and device, computer equipment and storage medium
CN113260069B (en) Carrier resource scheduling method and device and electronic 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