Frame rate adaptive adjustment method and device, electronic equipment and storage medium
By monitoring and dynamically adjusting the frame rate of mobile devices in real time, the problem of frame rate adjustment methods being unable to adapt to performance fluctuations has been solved, achieving smooth screen display and a stable user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-16
- Publication Date
- 2026-04-14
AI Technical Summary
In existing technologies, the frame rate adjustment methods for mobile devices cannot adapt to performance fluctuations during device use, resulting in stuttering or frame drops, which affects the user experience.
By monitoring the actual operating frame rate of the device in real time, the target frame rate is dynamically adjusted, including frame rate decrease or increase. Historical average frame rate information is used to filter instantaneous load, thereby achieving step-by-step control of the frame rate and avoiding visual abrupt changes.
It effectively avoids stuttering or frame drops, improves user experience, ensures the accuracy and stability of frame rate adjustment, and adapts to different performance and operating environments.
Smart Images

Figure CN121865034A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and more specifically, to a frame rate adaptive adjustment method, apparatus, electronic device, and storage medium. Background Technology
[0002] In the current environment, mobile devices are becoming increasingly diverse in type and performance, leading to higher demands from users for smoother visuals. Frame rate, as a core indicator of visual smoothness, directly impacts the user's visual experience and operational performance.
[0003] In existing technologies, a preset fixed frame rate is usually set for the user based on the device performance rating when the user logs into the device for the first time. The screen is then displayed according to this preset frame rate during the user's use of the device.
[0004] The above methods cannot adapt to the performance fluctuations of the device during use, resulting in lag or frame drops, which affects the user experience. Summary of the Invention
[0005] The purpose of this application is to address the shortcomings of the prior art by providing a frame rate adaptive adjustment method, apparatus, electronic device, and storage medium, so as to achieve dynamic adaptive adjustment of the frame rate and ensure the best picture display effect.
[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows: In a first aspect, embodiments of this application provide a frame rate adaptive adjustment method, including: During the execution of the target application, based on the frame rate information of the target device collected in real time, the historical average frame rate information of the target device within a continuous preset duration corresponding to the current moment is determined; the frame rate information includes: logical frame rate or rendering frame rate; The frame rate adjustment method is determined based on the historical average frame rate information within the continuous preset time period and the current target frame rate information; the frame rate adjustment method includes: frame rate decrease or frame rate increase; According to the frame rate adjustment method, the current target frame rate information is adjusted to obtain new target frame rate information, and the target device is controlled to run according to the new target frame rate information.
[0007] Secondly, embodiments of this application also provide a frame rate adaptive adjustment device, including: a determining module and a processing module; The determining module is used to determine the historical average frame rate information of the target device within a continuous preset duration corresponding to the current moment, based on the frame rate information of the target device collected in real time during the operation of the target application; the frame rate information includes: logical frame rate or rendering frame rate; The determining module is used to determine the frame rate adjustment method based on the historical average frame rate information within the continuous preset time period and the current target frame rate information; the frame rate adjustment method includes: frame rate decrease or frame rate increase; The processing module is used to adjust the current target frame rate information according to the frame rate adjustment method to obtain new target frame rate information, and control the target device to run according to the new target frame rate information.
[0008] Thirdly, embodiments of this application provide an electronic device, including: a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the frame rate adaptive adjustment method provided in the first aspect.
[0009] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, performs the frame rate adaptive adjustment method as provided in the first aspect.
[0010] The beneficial effects of this application are: This application provides a frame rate adaptive adjustment method, apparatus, electronic device, and storage medium, comprising: during the operation of a target application, determining the historical average frame rate information of the target device within a continuous preset duration corresponding to the current moment based on the real-time collected frame rate information of the target device; determining a frame rate adjustment method based on the historical average frame rate information within the continuous preset duration and the current target frame rate information; adjusting the current target frame rate information according to the frame rate adjustment method to obtain new target frame rate information, and controlling the target device to run according to the new target frame rate information. This solution controls and realizes the dynamic adjustment of the target device's running frame rate by using the actual frame rate information of the target device during operation and the real-time target frame rate information. This allows the real-time running frame rate of the target device to dynamically adapt to the device's operation under different performance and environmental conditions, thereby enabling the target device to maintain smooth screen display, provide optimal frame rate effects, effectively avoid stuttering or frame drops, and improve user experience. Among them, the frame rate adjustment judgment is made by using the historical average frame rate information within a continuous preset time period. This can effectively filter out the brief stuttering caused by instantaneous load, avoid frequent jittering caused by misjudging performance insufficiency due to a single frame drop, and ensure the accuracy of frame rate adjustment control.
[0011] Secondly, the frame rate reduction and frame rate increase processing methods of this solution ensure that both frame rate reduction and frame rate increase are carried out step by step, realizing hierarchical control logic and avoiding visual abrupt changes caused by jump frame rate reduction or increase processing. Attached Figure Description
[0012] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 Flowchart of the frame rate adaptive adjustment method provided in the embodiments of this application Figure 1 ; Figure 2 Flowchart of the frame rate adaptive adjustment method provided in the embodiments of this application Figure 2 ; Figure 3 Flowchart of the frame rate adaptive adjustment method provided in the embodiments of this application Figure 3 ; Figure 4 Flowchart of the frame rate adaptive adjustment method provided in the embodiments of this application Figure 4 ; Figure 5 Flowchart of the frame rate adaptive adjustment method provided in the embodiments of this application Figure 5 ; Figure 6 Flowchart of the frame rate adaptive adjustment method provided in the embodiments of this application Figure 6 ; Figure 7 Flowchart of the frame rate adaptive adjustment method provided in the embodiments of this application Figure 7 ; Figure 8 Flowchart of the frame rate adaptive adjustment method provided in the embodiments of this application Figure 8 ; Figure 9 A complete flowchart of a frame rate adaptive adjustment method provided in this application embodiment is shown below; Figure 10 A schematic diagram of a frame rate adaptive adjustment device provided in an embodiment of this application; Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0014] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.
[0015] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0016] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.
[0017] With the rapid development of mobile computing technology, smart mobile devices (such as smartphones and tablets) have made significant progress in hardware performance, screen display, and graphics processing capabilities. At the same time, the quality and complexity of mobile applications, especially mobile games, are constantly increasing, and users' demands for smooth interaction, visual fidelity, and overall experience are also rising. Among these, frame rate (Frames Per Second, FPS), as a core indicator for measuring the visual smoothness of an application, directly affects the user's immersion and operational experience.
[0018] On high-performance devices, supporting high frame rates (such as 90fps, 120fps, or even 144fps) has become an important means of improving user experience. However, due to the severe fragmentation of the mobile device market, there are significant differences in hardware performance between different brands, models, and even the same model under different usage conditions. In addition, the same application may experience dynamic load fluctuations due to changes in scene complexity (such as large-scale battles, dense particle effect rendering, etc.), leading to unstable frame rates. Research shows that users often prefer a stable frame rate to a theoretically high frame rate. For example, most players would rather maintain a stable 30fps gaming experience than experience frequent fluctuations between 60fps and 20fps, the latter of which can easily cause visual stuttering, operational lag, or even dizziness, seriously affecting game playability and satisfaction.
[0019] To address the aforementioned issues, existing technologies typically employ a static performance grading strategy based on device model to preset the initial frame rate. Specifically, when a user launches the application for the first time, the system identifies the device's brand, model, or hardware configuration (such as the central processing unit (CPU), graphics processing unit (GPU), and memory), queries a pre-built device performance grading table, and sets a recommended target frame rate accordingly. This method is simple to implement and can adapt to the performance levels of mainstream devices to a certain extent.
[0020] However, this static adaptation mechanism has obvious drawbacks: First, the rapid pace of device updates and the constant emergence of new models make it difficult to maintain and synchronize the performance rating table in a timely manner, resulting in incomplete coverage or inaccurate evaluation. Second, this method only sets the frame rate once during the initialization phase, lacking the ability to dynamically adjust it at runtime, and cannot respond to performance fluctuations caused by changes in game scenarios or real-time device status (such as temperature, background task interference, etc.). Third, the actual performance of the same model of device may vary greatly under different usage environments (such as low battery power, poor heat dissipation), and static settings cannot reflect individual differences, easily leading to frequent frame drops under high settings and performance waste under low settings.
[0021] Therefore, existing frame rate control schemes struggle to meet the dual demands of stability and adaptability in diverse devices and dynamic operating environments. There is an urgent need for a technical solution that can monitor performance in real time during runtime and automatically adjust the target frame rate based on actual frame rate feedback, thereby maximizing visual quality and improving user experience while ensuring smoothness.
[0022] Based on this, this solution provides a frame rate adaptive adjustment method. By monitoring the actual frame rate of the device in real time, it automatically reduces the device's frame rate when the actual frame rate falls below a certain percentage of the target frame rate. When the actual frame rate remains above a certain threshold of the target frame rate, it attempts to restore the previous higher frame rate setting based on the reduced frame rate recorded in the target data stack. This achieves dynamic frame rate adjustment based on the actual running frame rate of the device, reducing screen stuttering or frame drops and improving the user experience.
[0023] Figure 1 Flowchart of the frame rate adaptive adjustment method provided in the embodiments of this application Figure 1 The implementation entity of this plan is computer equipment, such as... Figure 1 As shown, the method may include: S101. During the operation of the target application, based on the real-time collected frame rate information of the target device, determine the historical average frame rate information of the target device within a continuous preset duration corresponding to the current moment.
[0024] Frame rate information includes: logical frame rate or rendering frame rate.
[0025] This solution is mainly used for adjusting the device frame rate in game scenarios. The target application can refer to any game application, and the target application runs on the target device.
[0026] During the operation of the target device, frame rate information can be collected in real time. This frame rate information can refer to the actual value of the frame rate, i.e., the frame rate magnitude. Frame rate information can be, for example, the logical frame rate or the rendered frame rate.
[0027] It's worth noting that this solution targets adjustments to either the logical frame rate or the rendering frame rate. The logical frame rate refers to the frequency at which the game engine executes game logic (such as character movement, collision detection, AI decision-making, and state updates) per second. The rendering frame rate refers to the number of frames successfully drawn and submitted to the screen buffer per second by the graphics subsystem, reflecting the rendering speed of the graphics processing unit (GPU), and is significantly affected by factors such as model complexity, lighting calculations, and post-production effects. The essence of adjusting the logical frame rate or rendering frame rate is to reduce the workload of the game engine.
[0028] The system can trigger the acquisition of the actual frame rate information at a preset time interval, and determine the historical average frame rate information within the preset duration based on the historical actual frame rates of each moment within the corresponding consecutive preset duration. It's worth noting that the preset duration corresponding to the current moment can refer to a time period consisting of the current moment and multiple consecutive historical moments.
[0029] S102. Determine the frame rate adjustment method based on the historical average frame rate information within a continuous preset time period and the current target frame rate information.
[0030] Frame rate adjustment methods include: frame rate decrease or frame rate increase.
[0031] The historical average frame rate information of the target device over a continuous preset time period at the current moment can, to some extent, reflect the true performance trend of the target device, thus avoiding misjudgments caused by instantaneous fluctuations in frame rate. Typically, during actual operation, the frame rate may experience momentary stutters due to sudden GPU rendering pressure, resource contention by background system tasks, memory reclamation, or screen refresh synchronization delays. Adjusting the frame rate based solely on the frame rate at a single moment will result in frequent fluctuations, causing the user to perceive inconsistent display quality and negatively impacting the user experience.
[0032] Target frame rate information refers to the frame rate value that the system expects the device to achieve and maintain. It can be understood as a predefined frame rate standard value, usually determined by user settings or initial system recommendations, such as 30fps, 60fps, 90fps, 120fps, and 144fps. It is not the currently actual running frame rate, but a set value, similar to the set temperature of an air conditioner.
[0033] In this scheme, the target frame rate information serves as the reference benchmark for the entire adaptive adjustment system. All subsequent judgments are based on the target frame rate information, determining the calculation method for the trigger thresholds of frame rate reduction and increase. By analyzing the deviation between the actual running frame rate information and the target frame rate information, it is possible to assess whether the target device experiences stuttering, whether frame rate reduction is necessary, or whether the system has recovered and whether frame rate increase is required.
[0034] This solution uses the historical average frame rate information of the target device within a continuous preset time period at the current moment and the target frame rate as the basis for judgment, which can make the determined frame rate adjustment method more accurate and ensure the smoothness of the adjusted picture.
[0035] It's worth noting that the target frame rate information is not fixed; the target frame rate information may differ at each current moment due to frame rate adjustments. Therefore, at each current moment, it's necessary to determine the frame rate adjustment method based on the current target frame rate information.
[0036] S103. Adjust the current target frame rate information according to the frame rate adjustment method to obtain new target frame rate information, and control the target device to run according to the new target frame rate information.
[0037] Based on the frame rate adjustment method determined at the current moment, the current target frame rate information can be processed by downgrading or upgrading the frame rate.
[0038] Since the actual running frame rate of the target device is a result variable rather than a controllable input, we cannot directly increase or decrease the actual running frame rate of the target device. Therefore, we can obtain new target frame rate information by adjusting the current target frame rate, and then use the new target frame rate information to control the actual running frame rate of the target device to tend towards the new target frame rate information.
[0039] Moreover, directly adjusting the actual frame rate of the target device, such as by forcibly dropping or inserting frames, can cause screen skipping, operation delays, or visual blurring and discomfort, and in severe cases, system instability.
[0040] In this embodiment, frame rate adjustment refers to the dynamic adjustment of the target frame rate information, which is the frame rate value that the game system expects to achieve. Since the actual frame rate is affected by multiple factors such as scene complexity, hardware performance, and system load, it cannot be directly and precisely controlled. Therefore, by adjusting the target frame rate information, the system can be guided to approach the target value as stably as possible in the current environment, thereby achieving the optimal balance between smoothness and performance.
[0041] In summary, the frame rate adaptive adjustment method provided in this embodiment includes: during the operation of the target application, determining the historical average frame rate information of the target device within a continuous preset duration corresponding to the current moment based on the real-time collected frame rate information of the target device; determining the frame rate adjustment method based on the historical average frame rate information within the continuous preset duration and the current target frame rate information; adjusting the current target frame rate information according to the frame rate adjustment method to obtain new target frame rate information, and controlling the target device to run according to the new target frame rate information. This solution controls and realizes the dynamic adjustment of the target device's running frame rate by using the actual frame rate information of the target device during operation and the real-time target frame rate information, so that the real-time running frame rate of the target device can dynamically adapt to the device's operation under different performance and different environments, thereby enabling the target device to maintain smooth screen display, provide the best frame rate effect, effectively avoid stuttering or frame drops, and improve the user experience. Among them, the frame rate adjustment judgment is made by using the historical average frame rate information within a continuous preset time period. This can effectively filter out the brief stuttering caused by instantaneous load, avoid frequent jittering caused by misjudging performance insufficiency due to a single frame drop, and ensure the accuracy of frame rate adjustment control.
[0042] Optionally, in step S101, determining the historical average frame rate information of the target device within a continuous preset duration corresponding to the current moment based on the real-time collected frame rate information of the target device includes: determining the historical average frame rate information of the target device within a first preset duration corresponding to the current moment or the historical average frame rate information of the target device within a second preset duration corresponding to the current moment based on the real-time collected frame rate information of the target device; the second preset duration is longer than the first preset duration, and the second preset duration includes the first preset duration.
[0043] In some embodiments, the historical average frame rate information of the target device within a first preset duration corresponding to the current moment may refer to the historical average frame rate information within a continuous 5 seconds including the current moment; the historical average frame rate information of the target device within a second preset duration corresponding to the current moment may refer to the historical average frame rate information within a continuous 10 seconds including the current moment. Of course, in practical applications, the first preset duration is not limited to 5 seconds, and the second preset duration is not limited to 10 seconds; the most reasonable data can be selected based on actual experimental results.
[0044] Typically, the second preset duration can include the first preset duration, but it can be longer than the first preset duration.
[0045] In other words, the aforementioned continuous 10 seconds includes a continuous 5 seconds, and are not two completely separate time periods. Frame rate reduction can be determined using the historical average frame rate information for the first preset duration, while frame rate increase can be determined using the historical average frame rate information for the second preset duration.
[0046] Optionally, by setting a second preset duration longer than the first preset duration, a frame rate adjustment mechanism of short-term frame drop and long-term frame increase can be implemented. This allows for a rapid response to performance bottlenecks and prevents stuttering when there is a stutter. When restoring the frame rate, a slow recovery can prevent screen tremors, thus implementing a conservative recovery strategy to ensure the safety and sustainability of frame rate increases.
[0047] In other words, through the above processing, an asymmetric control strategy can be formed to quickly respond to insufficient performance and cautiously restore high frame rates, effectively avoiding frequent frame rate fluctuations caused by short-term performance fluctuations, and improving system stability and user experience.
[0048] Figure 2 Flowchart of the frame rate adaptive adjustment method provided in the embodiments of this application Figure 2 Optionally, in step S102, the frame rate adjustment method is determined based on the historical average frame rate information over a continuous preset time period and the current target frame rate information, including: S201. Determine the first comparison frame rate information based on the current target frame rate information and the first ratio.
[0049] It should be noted that the target frame rate information can be determined from multiple set frame rate standard values. Whether the target frame rate information is downgraded or upgraded, the new target frame rate information obtained after processing is also one of multiple frame rate standard values, thus allowing the target device to be controlled to run at an ideal frame rate.
[0050] In this embodiment, the first ratio can be 3 / 4, that is, 3 / 4 of the current target frame rate information can be used as the first comparison frame rate information, and the first comparison frame rate information can be used as the judgment threshold when downsizing.
[0051] S202. Determine whether the historical average frame rate information within the first preset time period and the first comparison frame rate information meet the first condition.
[0052] The processing operation corresponding to different comparison results can be determined by comparing the historical average frame rate information within the first preset time period with the first comparison frame rate information.
[0053] S203. If satisfied, determine whether the current target frame rate information has reached the preset frame rate information.
[0054] In some embodiments, when the historical average frame rate information within a first preset time period and the first comparison frame rate information meet a first condition, it is further determined whether the current target frame rate information reaches the preset frame rate information. The preset frame rate information can be the lowest frame rate value among predefined frame rate standard values.
[0055] S204. If the target is not reached, then the frame rate adjustment method is set to frame rate decrease.
[0056] If it is determined that the current target frame rate is already the minimum frame rate, then the current target frame rate will be maintained without further processing. Forcibly reducing the frame rate beyond the minimum frame rate would result in severe blurring or stuttering. The process then returns to the main loop and re-analyzes at the next time interval.
[0057] If it is determined that the current target frame rate has not reached the minimum frame rate, it proves that the current target frame rate still has some margin to be reduced. At this time, it can be determined that the frame rate adjustment method is frame rate reduction.
[0058] Figure 3 Flowchart of the frame rate adaptive adjustment method provided in the embodiments of this application Figure 3 In step S202, determining whether the historical average frame rate information within the first preset time period and the first comparison frame rate information satisfy the first condition includes: S301. Determine whether the historical average frame rate information within the first preset time period has not reached the first comparison frame rate information.
[0059] Taking a first preset duration of 5 consecutive seconds as an example, in one implementation, it can be determined whether the historical average frame rate value of the 5 consecutive seconds including the current moment has not reached 3 / 4 of the current target frame rate information.
[0060] S302. If so, then determine that the historical average frame rate information within the first preset time period and the first comparison frame rate information satisfy the first condition.
[0061] If the historical average frame rate information for the consecutive 5 seconds including the current moment does not reach 3 / 4 of the current target frame rate information, then the historical average frame rate information within the first preset time period and the first comparison frame rate information are considered to meet the first condition. At this time, if the current target frame rate information does not reach the minimum frame rate, then the frame rate adjustment method is determined to be frame rate reduction, that is, frame rate reduction processing needs to be performed.
[0062] Frame rate reduction is only implemented when the historical average frame rate information for 5 consecutive seconds fails to meet the requirements, ensuring that the frame rate reduction is determined based on real and persistent performance bottlenecks.
[0063] The minimum frame rate refers to the lowest acceptable frequency of image updates that a system can maintain under specific application scenarios. The minimum frame rate is typically a safety boundary set after comprehensively considering availability, watchability, and hardware limitations. The minimum frame rate is equivalent to setting the lower limit saturation point of a negative feedback system, ensuring that the system always remains within a controllable range.
[0064] If the current target frame rate is already the lowest possible frame rate, further frame rate reduction will only make the video slower, but it will not significantly reduce the load, because the bottleneck may already be in the CPU logic, memory bandwidth, or driver scheduling.
[0065] In some embodiments, if the historical average frame rate reaches 3 / 4 of the current target frame rate for at least one second within a consecutive 5 seconds, frame rate adjustment is not performed. Instead, the current target frame rate is maintained, and the system returns to the main loop. This is because if the average frame rate reaches 3 / 4 of the current target frame rate for at least one second within the monitoring time, the system is considered to still have the ability to recover briefly. In this case, frame rate reduction should not be performed immediately to avoid erroneous frame rate reduction caused by brief load spikes.
[0066] Optionally, in step S203, determining whether the current target frame rate information reaches the preset frame rate information includes: determining whether the current target frame rate information reaches the specified frame rate information in the preset standard frame rate sequence based on the standard frame rate information recorded in the preset standard frame rate sequence.
[0067] In some embodiments, a preset standard frame rate sequence can be defined in advance. The standard frame rate sequence records multiple standard frame rate values in sequence. For example, the standard frame rate sequence can be {30, 45, 60, 90, 120, 144}.
[0068] The specified frame rate information here refers to the lowest frame rate information in the standard frame rate sequence, which is 30. Determining whether the current target frame rate information reaches the specified frame rate information in the standard frame rate sequence means determining whether the current target frame rate information is already the lowest frame rate of 30.
[0069] Optionally, this method further includes: after the target application starts, initializing and creating a target data stack with empty data; the target data stack is used to record frame rate information during the historical frame reduction process.
[0070] The target data stack is a predefined stack used to record historical frame drop data. Its data characteristics are first-in, last-out, and the top element of the stack is always the last data that was just pushed onto the stack.
[0071] After the game starts, an empty data stack can be initialized as the target data stack. Subsequently, during each frame drop process, the frame drop data is written into the target data stack to achieve a smooth and orderly performance recovery when the frame rate increases.
[0072] Figure 4 Flowchart of the frame rate adaptive adjustment method provided in the embodiments of this application Figure 4 Optionally, in step S103, the current target frame rate information is adjusted according to the frame rate adjustment method to obtain new target frame rate information, including: S401. Write the current target frame rate information into the target data stack.
[0073] In some embodiments, when it is determined that frame rate reduction is required, the current target frame rate information can be written to the target data stack first.
[0074] It should be noted that in this embodiment, the current target frame rate information is written to the target data stack each time the frame rate is reduced. This is to ensure that when the system load decreases in the future, the system can accurately determine the frame rate to restore during the frame rate increase process, thereby achieving a smooth and orderly performance recovery. In other words, the target data stack records from which frame rate the frame rate dropped each time, so that when device performance recovers, it can determine at each frame rate increase point to achieve a smooth frame rate increase.
[0075] S402. Based on the preset standard frame rate sequence, the current target frame rate information is downgraded to obtain new target frame rate information.
[0076] Optionally, the current target frame rate information can be reduced to a lower standard frame rate in the preset standard frame rate sequence to obtain new target frame rate information.
[0077] Figure 5 Flowchart of the frame rate adaptive adjustment method provided in the embodiments of this application Figure 5 Optionally, in step S402, the current target frame rate information is downgraded according to a preset standard frame rate sequence to obtain new target frame rate information, including: S501. Determine the target position of the current target frame rate information in the standard frame rate sequence according to the standard frame rate information arranged in order in the preset standard frame rate sequence.
[0078] In some embodiments, the standard frame rate information in the standard frame rate sequence is arranged in descending or ascending order of frame rate. Based on the arrangement, the target position of the current target frame rate information in the standard frame rate sequence can be determined.
[0079] S502. The current target frame rate information is downgraded to the standard frame rate information indicated by the next position corresponding to the target position in the standard frame rate sequence to obtain the new target frame rate information.
[0080] When the standard frame rate information in the standard frame rate sequence is sorted from smallest to largest, the current target frame rate information can be adjusted down to the standard frame rate information in the position to the left of the target position. Conversely, when the standard frame rate information in the standard frame rate sequence is sorted from largest to smallest, the current target frame rate information can be adjusted down to the standard frame rate information in the position to the right of the target position.
[0081] For example, consider a standard frame rate sequence of {30, 45, 60, 90, 120, 144}. If the current target frame rate is 90, then a frame rate reduction will lower the target frame rate to 60, resulting in a new target frame rate of 60. Conversely, if the current target frame rate is 60, then a frame rate reduction will lower the target frame rate to 45, resulting in a new target frame rate of 45.
[0082] Figure 6 Flowchart of the frame rate adaptive adjustment method provided in the embodiments of this application Figure 6 Optionally, this method also includes: S601. Determine the second comparison frame rate information based on the current target frame rate information and the second ratio.
[0083] The second ratio can be 4 / 5, where 4 / 5 of the current target frame rate information can be used as the second comparison frame rate information.
[0084] S602. If the historical average frame rate information within the first preset time period does not satisfy the first condition with the first comparison frame rate information, and there is a stack top element in the target data stack, then determine whether the historical average frame rate information within the second preset time period satisfies the second condition with the second comparison frame rate information.
[0085] Optionally, the fact that the historical average frame rate information within the first preset time period does not meet the first condition can mean that the historical average frame rate information within the first preset time period all reach the first comparison frame rate information.
[0086] That is, if the historical average frame rate information for the consecutive 5 seconds including the current time reaches 3 / 4 of the current target frame rate information, and if it is determined that there is a stack top element in the target data stack, it proves that the frame rate reduction process has been performed before. It can be further determined whether the historical average frame rate information within the second preset time period and the second comparison frame rate information meet the second condition.
[0087] S603. If satisfied, then the frame rate adjustment method is determined to be frame rate boost.
[0088] When the historical average frame rate information within the second preset time period and the second comparison frame rate information meet the second condition, the frame rate adjustment method can be determined to be frame rate enhancement.
[0089] It is worth noting that if there is no top element in the target data stack, that is, the target data stack is empty, it means that no frame rate reduction has been performed before, and the current target frame rate information may remain at the highest frame rate. In this case, no frame rate increase will be performed.
[0090] Figure 7 Flowchart of the frame rate adaptive adjustment method provided in the embodiments of this application Figure 7 Optionally, in step S602, determining whether the historical average frame rate information within the second preset time period and the second comparison frame rate information satisfy the second condition includes: S701. Determine whether the historical average frame rate information within the second preset time period has reached the second comparison frame rate information.
[0091] Taking a second preset duration of 10 consecutive seconds including the current moment as an example, it can be determined whether the historical average frame rate information within the 10 consecutive seconds including the current moment has reached 4 / 5 of the current target frame rate information.
[0092] S702. If so, then determine that the historical average frame rate information within the second preset time period and the second comparison frame rate information satisfy the second condition.
[0093] If the historical average frame rate information within the current 10 consecutive seconds reaches 4 / 5 of the current target frame rate information, then the frame rate adjustment method is determined to be frame rate boost.
[0094] Frame rate boosting is only performed when the historical average frame rate information within the second preset time period reaches the second comparison frame rate information. This is also to effectively filter out the risk of misjudgment caused by instantaneous performance fluctuations and ensure the accuracy of frame rate boosting.
[0095] If, within a continuous 10-second period including the current moment, the average frame rate information for at least one second is less than 4 / 5 of the current target frame rate information, then the current target frame rate information is maintained unchanged, and the process returns to the main loop, waiting for the next time interval to be re-analyzed.
[0096] Figure 8 Flowchart of the frame rate adaptive adjustment method provided in the embodiments of this application Figure 8 Optionally, in step S103, the current target frame rate information is adjusted according to the frame rate adjustment method to obtain new target frame rate information, including: S801. Get the current top element from the target data stack.
[0097] In some embodiments, when performing frame rate boosting processing, the current top element of the stack can be extracted from the target data stack, that is, the frame rate information most recently pushed onto the stack can be extracted.
[0098] S802: Promote the current target frame rate information to the frame rate information indicated by the top element of the stack to obtain the new target frame rate information.
[0099] This allows the current target frame rate information to be boosted to the frame rate information indicated by the top element of the stack, resulting in a new target frame rate. This method of frame rate boosting enables a smooth recovery of the frame rate, avoiding screen jitter caused by large frame rate fluctuations.
[0100] For example, at the first moment, the target frame rate information decreases from 90 to 60, and the target frame rate information 90 is pushed onto the stack; at the second moment, the target frame rate information decreases from 60 to 45, and the target frame rate information 60 is pushed onto the stack; at the third moment, a frame rate boost is needed. At this time, the top element of the target data stack is the frame rate information 60 written at the second moment, so the target frame rate information can be boosted from 45 to 60; at the fourth moment, a frame rate boost is still needed. At this time, since 60 has been popped from the stack, the current top element of the target data stack is 90, so the target frame rate information can be boosted from 60 to 90.
[0101] By performing frame rate reduction and increase in this way, both frame rate reduction and increase are carried out step by step, realizing hierarchical control logic and avoiding visual abrupt changes caused by jump frame rate reduction or increase.
[0102] Optionally, the method further includes: adjusting the current target frame rate information according to the user-inputted adjustment frame rate information to obtain new target frame rate information, and clearing the data in the target data stack.
[0103] In some embodiments, this solution also supports users manually changing the target frame rate. Users can input their own adjusted frame rate information at any of the above steps. Once the user's setting information is received, the target data stack will be cleared immediately, and the current target frame rate information will be adjusted to the adjusted frame rate information set by the user. In this way, the target device can be controlled to run according to the frame rate set by the user until the next time interval arrives, and the frame rate will be adjusted again based on the above solution.
[0104] Figure 9 This is a complete flowchart of a frame rate adaptive adjustment method provided in an embodiment of this application. The steps in the figure have been described in detail above and will not be repeated here.
[0105] The frame rate adaptive adjustment method provided in this embodiment includes: during the operation of the target application, determining the historical average frame rate information of the target device within a continuous preset time period corresponding to the current moment based on the real-time collected frame rate information of the target device; determining the frame rate adjustment method based on the historical average frame rate information within the continuous preset time period and the current target frame rate information; adjusting the current target frame rate information according to the frame rate adjustment method to obtain new target frame rate information, and controlling the target device to run according to the new target frame rate information. This solution controls the dynamic adjustment of the target device's running frame rate by using the actual frame rate information of the target device during operation and the real-time target frame rate information, so that the real-time running frame rate of the target device can dynamically adapt to the device's operation under different performance and different environments, thereby enabling the target device to maintain smooth screen display, provide the best frame rate effect, effectively avoid stuttering or frame drops, and improve the user experience. Among them, the frame rate adjustment judgment is made by using the historical average frame rate information within a continuous preset time period. This can effectively filter out the brief stuttering caused by instantaneous load, avoid frequent jittering caused by misjudging performance insufficiency due to a single frame drop, and ensure the accuracy of frame rate adjustment control.
[0106] Secondly, the frame rate reduction and frame rate increase processing methods of this solution ensure that both frame rate reduction and frame rate increase are carried out step by step, realizing hierarchical control logic and avoiding visual abrupt changes caused by jump frame rate reduction or increase processing.
[0107] The following describes the apparatus, device, and storage medium used to implement the frame rate adaptive adjustment method provided in this application. The specific implementation process and technical effects are described above and will not be repeated below.
[0108] Figure 10 This is a schematic diagram of a frame rate adaptive adjustment device provided in an embodiment of this application. The function implemented by this frame rate adaptive adjustment device corresponds to the steps performed by the above-described method. Figure 10 As shown, the device may include: a determining module 100 and a processing module 200; The determination module 100 is used to determine the historical average frame rate information of the target device within a continuous preset duration corresponding to the current moment, based on the frame rate information of the target device collected in real time during the operation of the target application; the frame rate information includes: logical frame rate or rendering frame rate; The determining module 100 is used to determine the frame rate adjustment method based on the historical average frame rate information within a continuous preset time period and the current target frame rate information; the frame rate adjustment method includes: frame rate decrease or frame rate increase; The processing module 200 is used to adjust the current target frame rate information according to the frame rate adjustment method to obtain new target frame rate information, and control the target device to run according to the new target frame rate information.
[0109] Optionally, the determining module 100 is specifically used to determine the historical average frame rate information of the target device within a first preset duration corresponding to the current moment or the historical average frame rate information of the target device within a second preset duration corresponding to the current moment, based on the frame rate information of the target device collected in real time; the second preset duration is longer than the first preset duration, and the second preset duration includes the first preset duration.
[0110] Optionally, the determining module 100 is specifically used to determine the first comparison frame rate information based on the current target frame rate information and the first ratio; Determine whether the historical average frame rate information within the first preset time period and the first comparison frame rate information meet the first condition; If satisfied, determine whether the current target frame rate information has reached the preset frame rate information; If the desired frame rate is not achieved, then the frame rate adjustment method will be set to frame rate decrease.
[0111] Optionally, the determining module 100 is specifically used to determine whether the historical average frame rate information within the first preset time period has not reached the first comparison frame rate information. If so, then it is determined that the historical average frame rate information within the first preset time period and the first comparison frame rate information satisfy the first condition.
[0112] Optionally, the determining module 100 is specifically used to determine whether the current target frame rate information reaches the specified frame rate information in the standard frame rate sequence based on the standard frame rate information recorded in the preset standard frame rate sequence.
[0113] Optionally, it also includes a creation module; the creation module is used to initialize and create an empty target data stack after the target application starts; the target data stack is used to record frame rate information during the historical frame reduction process.
[0114] Optionally, the processing module 200 is specifically used to write the current target frame rate information into the target data stack; Based on a preset standard frame rate sequence, the current target frame rate information is downgraded to obtain new target frame rate information.
[0115] Optionally, the processing module 200 is specifically used to determine the target position of the current target frame rate information in the standard frame rate sequence based on the standard frame rate information arranged in order in the preset standard frame rate sequence. The current target frame rate information is downgraded to the standard frame rate information indicated by the next position corresponding to the target position in the standard frame rate sequence to obtain the new target frame rate information.
[0116] Optionally, the determining module 100 is further configured to determine the second comparison frame rate information based on the current target frame rate information and the second ratio; If the historical average frame rate information within the first preset time period does not meet the first condition with the first comparison frame rate information, and there is a stack top element in the target data stack, then determine whether the historical average frame rate information within the second preset time period meets the second condition with the second comparison frame rate information. If the conditions are met, then the frame rate adjustment method is determined to be frame rate boost.
[0117] Optionally, the determining module 100 is specifically used to ensure that the historical average frame rate information within the first preset time period reaches the first comparison frame rate information.
[0118] Optionally, the determining module 100 is specifically used to determine whether the historical average frame rate information within the second preset time period has reached the second comparison frame rate information. If so, then it is determined that the historical average frame rate information within the second preset time period and the second comparison frame rate information satisfy the second condition.
[0119] Optionally, the processing module 200 is specifically used to obtain the current top element of the stack from the target data stack; The current target frame rate information is promoted to the frame rate information indicated by the top element of the stack to obtain the new target frame rate information.
[0120] Optionally, the processing module 200 is also used to adjust the current target frame rate information according to the user-inputted adjustment frame rate information, obtain new target frame rate information, and clear the data in the target data stack.
[0121] These modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more digital signal processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a system-on-a-chip (SOC).
[0122] The modules described above can be connected or communicate with each other via wired or wireless connections. Wired connections can include metal cables, optical fibers, hybrid cables, or any combination thereof. Wireless connections can include connections via LAN, WAN, Bluetooth, ZigBee, or NFC, or any combination thereof. Two or more modules can be combined into a single module, and any module can be divided into two or more units. Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the method embodiments, and will not be repeated here.
[0123] Figure 11 A schematic diagram of an electronic device provided in this application embodiment includes: a processor 801, a storage medium 802, and a bus 803. The storage medium 802 stores machine-readable instructions executable by the processor 801. When the electronic device runs a frame rate adaptive adjustment method as described in the embodiment, the processor 801 communicates with the storage medium 802 via the bus 803. The processor 801 executes the machine-readable instructions to perform the following steps: During the execution of the target application, based on the real-time collected frame rate information of the target device, the historical average frame rate information of the target device within a continuous preset duration corresponding to the current moment is determined; the frame rate information includes: logical frame rate or rendering frame rate; The frame rate adjustment method is determined based on the historical average frame rate information over a continuous preset time period and the current target frame rate information; the frame rate adjustment method includes: frame rate decrease or frame rate increase; Based on the frame rate adjustment method, the current target frame rate information is adjusted to obtain new target frame rate information, and the target device is controlled to operate according to the new target frame rate information.
[0124] In one feasible implementation, when the processor 801 executes the process of determining the historical average frame rate information of the target device within a continuous preset duration corresponding to the current moment based on the frame rate information of the target device collected in real time, it is specifically used to: determine the historical average frame rate information of the target device within a first preset duration corresponding to the current moment or the historical average frame rate information of the target device within a second preset duration corresponding to the current moment based on the frame rate information of the target device collected in real time; the second preset duration is longer than the first preset duration, and the second preset duration includes the first preset duration.
[0125] In one feasible implementation, when the processor 801 determines the frame rate adjustment method based on the historical average frame rate information within a continuous preset time period and the current target frame rate information, it is specifically used to: determine the first comparison frame rate information based on the current target frame rate information and the first ratio. Determine whether the historical average frame rate information within the first preset time period and the first comparison frame rate information meet the first condition; If satisfied, determine whether the current target frame rate information has reached the preset frame rate information; If the desired frame rate is not achieved, then the frame rate adjustment method will be set to frame rate decrease.
[0126] In one feasible implementation, when the processor 801 executes the process of determining whether the historical average frame rate information within the first preset time period and the first comparison frame rate information meet the first condition, it is specifically used to: determine whether the historical average frame rate information within the first preset time period has not reached the first comparison frame rate information. If so, then it is determined that the historical average frame rate information within the first preset time period and the first comparison frame rate information satisfy the first condition.
[0127] In one feasible implementation, when the processor 801 performs the task of determining whether the current target frame rate information has reached the preset frame rate information, it specifically performs the following: based on the standard frame rate information recorded in the preset standard frame rate sequence, it determines whether the current target frame rate information has reached the specified frame rate information in the standard frame rate sequence.
[0128] In one feasible implementation, the processor 801 is also used to initialize and create an empty target data stack after the target application starts; the target data stack is used to record frame rate information during historical frame reduction processing.
[0129] In a feasible implementation, when the processor 801 performs the operation of adjusting the current target frame rate information according to the frame rate adjustment method to obtain new target frame rate information, it specifically performs the following: writing the current target frame rate information into the target data stack. Based on a preset standard frame rate sequence, the current target frame rate information is downgraded to obtain new target frame rate information.
[0130] In a feasible implementation, when the processor 801 performs frame reduction processing on the current target frame rate information according to a preset standard frame rate sequence to obtain new target frame rate information, it is specifically used to: determine the target position of the current target frame rate information in the standard frame rate sequence according to the standard frame rate information arranged in order in the preset standard frame rate sequence. The current target frame rate information is downgraded to the standard frame rate information indicated by the next position corresponding to the target position in the standard frame rate sequence to obtain the new target frame rate information.
[0131] In one feasible implementation, the processor 801 is further configured to perform: determining second comparison frame rate information based on the current target frame rate information and the second ratio; If the historical average frame rate information within the first preset time period does not meet the first condition with the first comparison frame rate information, and there is a stack top element in the target data stack, then determine whether the historical average frame rate information within the second preset time period meets the second condition with the second comparison frame rate information. If the conditions are met, then the frame rate adjustment method is determined to be frame rate boost.
[0132] In one feasible implementation, the historical average frame rate information within a first preset time period and the first comparison frame rate information do not meet the first condition, including: the historical average frame rate information within the first preset time period all reach the first comparison frame rate information.
[0133] In one feasible implementation, when the processor 801 executes the process of determining whether the historical average frame rate information within the second preset time period and the second comparison frame rate information meet the second condition, it is specifically used to: determine whether the historical average frame rate information within the second preset time period has reached the second comparison frame rate information. If so, then it is determined that the historical average frame rate information within the second preset time period and the second comparison frame rate information satisfy the second condition.
[0134] In a feasible implementation, when the processor 801 performs the adjustment of the current target frame rate information according to the frame rate adjustment method to obtain new target frame rate information, it specifically performs the following: obtaining the current top element of the target data stack; The current target frame rate information is promoted to the frame rate information indicated by the top element of the stack to obtain the new target frame rate information.
[0135] In one feasible implementation, the processor 801 is further configured to perform adjustments to the current target frame rate information based on the user-inputted frame rate adjustment information, obtain new target frame rate information, and clear the data in the target data stack.
[0136] The storage medium 802 stores program code, which, when executed by the processor 801, causes the processor 801 to perform various steps in the frame rate adaptive adjustment method according to various exemplary embodiments of this application as described in the "Exemplary Methods" section above.
[0137] The processor 801 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.
[0138] Storage medium 802, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The memory can include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic memory, magnetic disk, optical disk, etc. Memory is any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. Storage medium 802 in the embodiments of this application can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.
[0139] Optionally, embodiments of this application also provide a computer-readable storage medium storing a computer program, which is executed by a processor, and the processor performs the following steps: During the execution of the target application, the historical average frame rate information of the target device within a continuous preset duration corresponding to the current moment is determined based on the frame rate information of the target device collected in real time; the frame rate information includes: logical frame rate or rendering frame rate.
[0140] The frame rate adjustment method is determined based on the historical average frame rate information over a continuous preset time period and the current target frame rate information; the frame rate adjustment method includes: frame rate decrease or frame rate increase; Based on the frame rate adjustment method, the current target frame rate information is adjusted to obtain new target frame rate information, and the target device is controlled to operate according to the new target frame rate information.
[0141] In one feasible implementation, when the processor 801 executes the process of determining the historical average frame rate information of the target device within a continuous preset duration corresponding to the current moment based on the frame rate information of the target device collected in real time, it is specifically used to: determine the historical average frame rate information of the target device within a first preset duration corresponding to the current moment or the historical average frame rate information of the target device within a second preset duration corresponding to the current moment based on the frame rate information of the target device collected in real time; the second preset duration is longer than the first preset duration, and the second preset duration includes the first preset duration.
[0142] In one feasible implementation, when the processor 801 determines the frame rate adjustment method based on the historical average frame rate information within a continuous preset time period and the current target frame rate information, it is specifically used to: determine the first comparison frame rate information based on the current target frame rate information and the first ratio. Determine whether the historical average frame rate information within the first preset time period and the first comparison frame rate information meet the first condition; If satisfied, determine whether the current target frame rate information has reached the preset frame rate information; If the desired frame rate is not achieved, then the frame rate adjustment method will be set to frame rate decrease.
[0143] In one feasible implementation, when the processor 801 executes the process of determining whether the historical average frame rate information within the first preset time period and the first comparison frame rate information meet the first condition, it is specifically used to: determine whether the historical average frame rate information within the first preset time period has not reached the first comparison frame rate information. If so, then it is determined that the historical average frame rate information within the first preset time period and the first comparison frame rate information satisfy the first condition.
[0144] In one feasible implementation, when the processor 801 performs the task of determining whether the current target frame rate information has reached the preset frame rate information, it specifically performs the following: based on the standard frame rate information recorded in the preset standard frame rate sequence, it determines whether the current target frame rate information has reached the specified frame rate information in the standard frame rate sequence.
[0145] In one feasible implementation, the processor 801 is also used to initialize and create an empty target data stack after the target application starts; the target data stack is used to record frame rate information during historical frame reduction processing.
[0146] In a feasible implementation, when the processor 801 performs the operation of adjusting the current target frame rate information according to the frame rate adjustment method to obtain new target frame rate information, it specifically performs the following: writing the current target frame rate information into the target data stack. Based on a preset standard frame rate sequence, the current target frame rate information is downgraded to obtain new target frame rate information.
[0147] In a feasible implementation, when the processor 801 performs frame reduction processing on the current target frame rate information according to a preset standard frame rate sequence to obtain new target frame rate information, it is specifically used to: determine the target position of the current target frame rate information in the standard frame rate sequence according to the standard frame rate information arranged in order in the preset standard frame rate sequence. The current target frame rate information is downgraded to the standard frame rate information indicated by the next position corresponding to the target position in the standard frame rate sequence to obtain the new target frame rate information.
[0148] In one feasible implementation, the processor 801 is further configured to perform: determining second comparison frame rate information based on the current target frame rate information and the second ratio; If the historical average frame rate information within the first preset time period does not meet the first condition with the first comparison frame rate information, and there is a stack top element in the target data stack, then determine whether the historical average frame rate information within the second preset time period meets the second condition with the second comparison frame rate information. If the conditions are met, then the frame rate adjustment method is determined to be frame rate boost.
[0149] In one feasible implementation, the historical average frame rate information within a first preset time period and the first comparison frame rate information do not meet the first condition, including: the historical average frame rate information within the first preset time period all reach the first comparison frame rate information.
[0150] In one feasible implementation, when the processor 801 executes the process of determining whether the historical average frame rate information within the second preset time period and the second comparison frame rate information meet the second condition, it is specifically used to: determine whether the historical average frame rate information within the second preset time period has reached the second comparison frame rate information. If so, then it is determined that the historical average frame rate information within the second preset time period and the second comparison frame rate information satisfy the second condition.
[0151] In a feasible implementation, when the processor 801 performs the adjustment of the current target frame rate information according to the frame rate adjustment method to obtain new target frame rate information, it specifically performs the following: obtaining the current top element of the target data stack; The current target frame rate information is promoted to the frame rate information indicated by the top element of the stack to obtain the new target frame rate information.
[0152] In one feasible implementation, the processor 801 is further configured to perform adjustments to the current target frame rate information based on the user-inputted frame rate adjustment information, obtain new target frame rate information, and clear the data in the target data stack.
[0153] In this embodiment, the computer program, when run by the processor, can also execute other machine-readable instructions to perform other methods as described in the embodiments. For details on the specific execution steps and principles, please refer to the description of the embodiments, which will not be repeated here.
[0154] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0155] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0156] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.
[0157] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A frame rate adaptation method, characterized by, include: During the execution of the target application, the historical average frame rate information of the target device within a continuous preset duration corresponding to the current moment is determined based on the frame rate information of the target device collected in real time. The frame rate information includes: logical frame rate or rendering frame rate; The frame rate adjustment method is determined based on the historical average frame rate information within the continuous preset time period and the current target frame rate information; the frame rate adjustment method includes: frame rate decrease or frame rate increase; According to the frame rate adjustment method, the current target frame rate information is adjusted to obtain new target frame rate information, and the target device is controlled to run according to the new target frame rate information.
2. The method according to claim 1, characterized in that, The step of determining the historical average frame rate information of the target device within a continuous preset duration corresponding to the current moment based on the real-time collected frame rate information of the target device includes: Based on the frame rate information of the target device collected in real time, determine the historical average frame rate information of the target device within a first preset duration corresponding to the current time or the historical average frame rate information of the target device within a second preset duration corresponding to the current time; the second preset duration is longer than the first preset duration, and the second preset duration includes the first preset duration.
3. The method according to claim 2, characterized in that, The step of determining the frame rate adjustment method based on the historical average frame rate information within the continuous preset time period and the current target frame rate information includes: Based on the current target frame rate information and the first ratio, the first comparison frame rate information is determined; Determine whether the historical average frame rate information within the first preset time period and the first compared frame rate information satisfy the first condition; If satisfied, then determine whether the current target frame rate information has reached the preset frame rate information; If the desired effect is not achieved, then the frame rate adjustment method is determined to be frame rate reduction.
4. The method according to claim 3, characterized in that, The step of determining whether the historical average frame rate information within the first preset time period and the first compared frame rate information satisfy the first condition includes: Determine whether the historical average frame rate information within the first preset time period has not reached the first comparison frame rate information; If so, then it is determined that the historical average frame rate information within the first preset time period and the first comparison frame rate information satisfy the first condition.
5. The method according to claim 3, characterized in that, Determining whether the current target frame rate information has reached the preset frame rate information includes: Based on the standard frame rate information recorded in the preset standard frame rate sequence, determine whether the current target frame rate information reaches the specified frame rate information in the standard frame rate sequence.
6. The method according to claim 1, characterized in that, Also includes: After the target application starts, an empty target data stack is initialized and created; the target data stack is used to record frame rate information during historical frame reduction processing.
7. The method according to any one of claims 1-6, characterized in that, The step of adjusting the current target frame rate information according to the frame rate adjustment method to obtain new target frame rate information includes: Write the current target frame rate information into the target data stack; According to a preset standard frame rate sequence, the current target frame rate information is downgraded to obtain the new target frame rate information.
8. The method according to claim 7, characterized in that, The step of reducing the current target frame rate information according to a preset standard frame rate sequence to obtain the new target frame rate information includes: Based on the standard frame rate information arranged in sequence in the preset standard frame rate sequence, determine the target position of the current target frame rate information in the standard frame rate sequence; The current target frame rate information is downgraded to the standard frame rate information indicated by the next position corresponding to the target position in the standard frame rate sequence to obtain the new target frame rate information.
9. The method according to claim 3, characterized in that, Also includes: Based on the current target frame rate information and the second ratio, determine the second comparison frame rate information; If the historical average frame rate information within the first preset time period does not satisfy the first condition with the first comparison frame rate information, and there is a stack top element in the target data stack, then determine whether the historical average frame rate information within the second preset time period and the second comparison frame rate information satisfy the second condition. If the condition is met, then the frame rate adjustment method is determined to be frame rate boost.
10. The method according to claim 9, characterized in that, The historical average frame rate information within the first preset time period and the first compared frame rate information do not satisfy the first condition, including: The historical average frame rate information within the first preset time period all reach the first comparison frame rate information.
11. The method according to claim 9, characterized in that, The step of determining whether the historical average frame rate information within the second preset time period and the second compared frame rate information satisfy the second condition includes: Determine whether the historical average frame rate information within the second preset time period has reached the second comparison frame rate information; If so, then it is determined that the historical average frame rate information within the second preset time period and the second comparison frame rate information satisfy the second condition.
12. The method according to any one of claims 9-11, characterized in that, The step of adjusting the current target frame rate information according to the frame rate adjustment method to obtain new target frame rate information includes: Obtain the current top element of the target data stack; The current target frame rate information is promoted to the frame rate information indicated by the top element of the stack to obtain the new target frame rate information.
13. The method according to claim 1, characterized in that, Also includes: Based on the user-inputted frame rate adjustment information, the current target frame rate information is adjusted to obtain the new target frame rate information, and the data in the target data stack is cleared.
14. A frame rate adaptive adjustment device, characterized in that, include: Determine the module and the processing module; The determining module is used to determine the historical average frame rate information of the target device within a continuous preset duration corresponding to the current moment, based on the frame rate information of the target device collected in real time during the operation of the target application. The frame rate information includes: logical frame rate or rendering frame rate; The determining module is used to determine the frame rate adjustment method based on the historical average frame rate information within the continuous preset time period and the current target frame rate information; the frame rate adjustment method includes: frame rate decrease or frame rate increase; The processing module is used to adjust the current target frame rate information according to the frame rate adjustment method to obtain new target frame rate information, and control the target device to run according to the new target frame rate information.
15. An electronic device, characterized in that, include: The device includes a processor, a storage medium, and a bus, wherein the storage medium stores program instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to perform the frame rate adaptive adjustment method as described in any one of claims 1 to 13.
16. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, performs the frame rate adaptive adjustment method as described in any one of claims 1 to 13.