Frame rate adjustment method, device, and computer-readable storage medium

By dynamically adjusting the frame rate of the game application and matching the frame rate range between the view scene and the game scene, the problem of increased power consumption caused by high frame rate rendering in the game application is solved, thus improving the user experience.

WO2025260771A1PCT designated stage Publication Date: 2025-12-26HUAWEI TECH CO LTD

Patent Information

Application Number
PCT/CN2025/075303
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-06-20
Filing Date
2025-01-26
Publication Date
2025-12-26

AI Technical Summary

Technical Problem

High frame rate rendering in gaming applications leads to increased power consumption and decreased performance in electronic devices, impacting user experience.

Method used

By dynamically adjusting the frame rate in the game, and controlling the image display time based on the frame rate range that matches the view scene and the game scene, the power consumption of electronic devices is reduced.

Benefits of technology

The frame rate is dynamically adjusted when the view scene and game scene change, reducing the power consumption of electronic devices and improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025075303_26122025_PF_FP_ABST
    Figure CN2025075303_26122025_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application relate to the technical field of terminals, and provide a frame rate adjustment method, a device, and a computer-readable storage medium. The method comprises: in the rendering process, acquiring a rendering instruction for a first image; by means of rendering data carried in the rendering instruction, determining a view scene corresponding to the first image; acquiring a first frame rate matching the view scene; and displaying the first image on the basis of the first frame rate. In the embodiments of the present application, when the view scene changes, the frame rate in an application can be dynamically adjusted, and by displaying an image at a dynamic frame rate, the power consumption of an electronic device running the application can be reduced. Moreover, the determination of the first frame rate on the basis of the view scene is not affected by the similarity between two adjacent frames in the application, achieving high applicability.
Need to check novelty before this filing date? Find Prior Art

Description

Frame rate adjustment method, device and computer readable storage medium

[0001] The present application claims priority from the Chinese patent application No. 202410807804.6 filed on June 20, 2024, and entitled "Frame rate adjustment method, device and computer readable storage medium", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] Embodiments of the present application relate to the technical field of terminals, and more particularly to a frame rate adjustment method, device and computer readable storage medium. BACKGROUND

[0003] With the development of terminal technology, more and more electronic devices support game applications. In order to meet the increasing needs of users for game experience, game manufacturers have increasingly high scene richness, rendering quality and frame rate of game rendering on electronic devices. When a scene-rich game is rendered at a high frame rate on a mobile platform, it will increase the power consumption of the electronic device and occupy more memory, thereby reducing the performance of the electronic device. At present, there are still problems of serious heating and high power consumption during game running, which affect the user experience. SUMMARY

[0004] Embodiments of the present application provide a frame rate adjustment method, device and computer readable storage medium to dynamically adjust the frame rate in a game and reduce power consumption.

[0005] In a first aspect, the embodiments of the present application provide a frame rate adjustment method. In the rendering process, the method obtains a rendering instruction of a first image. The view scene corresponding to the first image is determined through the rendering data carried in the rendering instruction. A first frame rate matching the view scene is obtained. The first image rendered in real time is displayed based on the first frame rate.

[0006] Based on the first aspect, the view scene is identified based on the rendering data carried in the rendering instruction, the target frame rate is determined based on the view scene, and then the image is displayed according to the target frame rate. In this way, when the view scene changes, the frame rate of the view display can be dynamically adjusted, and by displaying at a dynamic frame rate, the power consumption of the electronic device running the application can be reduced. Moreover, the first frame rate is determined based on the view scene, and is not affected by the similarity between adjacent two frames in the game, so the applicability is high.

[0007] In a possible implementation, the timing of displaying the first image can be controlled by controlling the display time of the first image, so as to flexibly control the frame rate.

[0008] In a possible implementation, the first frame rate matched with the view scene is acquired, specifically implemented as follows: a frame rate range matched with the view scene is acquired; and the first frame rate is determined from the frame rate range according to a frame rate determination condition. Optionally, the frame rate determination condition includes at least one of a touch area of the touch operation, a motion parameter of the camera in the application, and a picture change rate. The motion parameter is a change amount obtained with reference to the camera in the application; and the picture change rate is used to indicate a picture similarity between the first image and a historical image that has been rendered.

[0009] Based on the possible implementation, in the frame rate adjustment, the target frame rate is determined through at least one of the touch area of the touch operation, the motion parameter of the camera in the application, and the picture change rate, thereby improving the reliability of the target frame rate. The frame rate in the application can be dynamically adjusted, and the power consumption of the electronic device when running the application can be reduced by displaying at a dynamic frame rate. Moreover, the first frame rate is determined based on at least one of the touch area of the touch operation, the motion parameter of the camera in the application, and the picture change rate, and is not affected by the similarity between adjacent two frames in the game, thereby having high applicability.

[0010] In a possible implementation, specifically implemented as follows: in a case where the frame rate determination condition includes the touch area of the touch operation, the touch area includes a first area and a second area. The first area includes an operation control. The second area includes a perspective area of a target object. In the implementation of determining the first frame rate from the frame rate range according to the frame rate determination condition, in a case where the touch area of the touch operation is the first area, the first frame rate is related to a number of historical touch operations triggered in the first area. In a case where the touch area of the touch operation is the second area, the first frame rate is a maximum frame rate in the frame rate range.

[0011] Since the skill release area in the game scene may need to display skill special effect animations, and usually needs to be displayed at a high frame rate to improve the visual effect. However, for the operation control area, it is usually displayed in the form of a map, and the frame rate requirement is not high. Therefore, in this possible implementation, when the touch area is the second area, the maximum frame rate in the frame rate range can be used to obtain a better visual effect. When the touch area is the first area, the first frame rate is acquired in combination with the frequency of the historical touch operation in the touch area, thereby reducing the power consumption of the electronic device.

[0012] In a possible implementation, specifically implemented as follows: in a case where the touch area of the touch operation is the first area, and the number of historical touch operations triggered in the first area is greater than a first threshold, a first frame rate matched with the number of historical touch operations is determined from the frame rate range based on a corresponding relationship between the number and the frame rate.

[0013] Since the frequency of the historical touch operations in the touch area affects the number of triggering of the rendering instructions of the game application, when the frequency of the historical touch operations occurring in the touch area is high, the interface needs to frequently switch views, and if displayed at a low frame rate, the interface may be stuck, affecting the visual effect. When the frequency of the historical touch operations occurring in the touch area is not high, if displayed at a high frame rate, the power consumption of the electronic device is increased. Therefore, in this possible implementation manner, the first frame rate is obtained in combination with the frequency of the historical touch operations in the touch area, the reliability of the first frame rate is improved, and the power consumption of the electronic device is reduced.

[0014] In a possible implementation manner, the following is specifically implemented: in a case where the touch area of the touch operation is the first area, in a case where the number of historical touch operations triggered in the first area is not greater than a first threshold value, the first frame rate is determined from the frame rate range according to the motion parameter of the camera in the application and / or the picture change rate between the first image and the historical image that has been rendered.

[0015] Since in a case where the number of historical touch operations triggered in the first area is not greater than the first threshold value, the target object in the scene can be in a running state, or other objects in the game scene are in a motion state, the interface may be stuck due to a low frame rate, affecting the visual effect. Therefore, to improve the visual effect of the interface display and reduce the power consumption of the electronic device, in this possible implementation manner, in a case where the number of historical touch operations triggered in the first area is not greater than the first threshold value, the first frame rate can be determined from the frame rate range according to the motion parameter of the camera in the application and / or the picture change rate between the first image and the historical image that has been rendered. In this way, the scene in which the frame rate can be adjusted can be comprehensively covered, and the reliability and accuracy of the first frame rate are improved.

[0016] In a possible implementation manner, the following is specifically implemented: in a case where the touch area of the touch operation is the second area, after the touch operation ends, the second frame rate is determined from the frame rate range based on at least one of the number of historical touch operations in the second area and the frequency of the historical touch operations. The third image is displayed at the second frame rate. The third image is an image whose display time is later than the display time of the first image.

[0017] Since in a case where the frequency of the touch operation triggered in the second area is low after the touch operation ends, if the electronic device displays at the maximum frame rate in the frame rate range for a long time, the power consumption of the electronic device is increased. Therefore, in this possible implementation manner, after it is monitored that the touch operation ends, the frame rate can be adjusted in a timely manner according to the frequency of the historical touch operation triggered in the second area, the electronic device displays at the adjusted frame rate, and the power consumption is reduced.

[0018] In a possible implementation, when the frame rate determination condition comprises the motion parameter of the camera, the first frame rate is related to the motion parameter of the camera in the application.

[0019] In this way, the first frame rate can be determined based on the motion parameter when the target object in the view scene is in a running state, and the accuracy of the first frame rate is improved.

[0020] In a possible implementation, the first frame rate is determined from the frame rate range according to the frame rate determination condition, and specifically, when the motion state level of the target object represented by the motion parameter is greater than or equal to the level threshold, the first frame rate that matches the motion parameter of the camera is determined from the frame rate range according to the correspondence between the motion parameter and the frame rate.

[0021] In this way, the first frame rate is determined based on the motion parameter when the target object in the view scene is in a running state, and the accuracy of the first frame rate is improved through the motion state level.

[0022] In a possible implementation, the first frame rate is determined from the frame rate range according to the frame rate determination condition, and specifically, when the motion state level of the target object represented by the motion parameter is not greater than the level threshold, the first frame rate is determined from the frame rate range according to the picture change rate between the first image and the rendered historical image.

[0023] When the motion level of the target object in the view scene is relatively low, but other objects in the view scene are in motion, if the frame rate is not set reasonably, there may be a problem of frame loss or interface lag. Therefore, to ensure the visual effect of the application and reduce the power consumption of the electronic device, in this possible implementation, when the motion state level of the target object represented by the motion parameter is not greater than the level threshold, it is determined whether other objects are in motion according to the picture change rate in the view scene, and a more reliable first frame rate is obtained. In this way, the reason for adjusting the frame rate in the view scene can be covered, and the power consumption of the electronic device can be reduced and the smoothness of the interface display can be ensured by timely adjusting the frame rate and ensuring the accuracy of the frame rate.

[0024] In a possible implementation, the change amount obtained with the camera in the application as a reference includes at least one of a movement amount and a rotation angle, and the corresponding motion parameter includes the movement amount and / or the rotation angle of the camera. Before the first frame rate is determined from the frame rate range according to the frame rate determination condition, the first camera position information corresponding to the first image, the first observation matrix, and the first clipping matrix, and the second camera position information corresponding to the second image and the second near-clipping plane position information are obtained. The second image is a previous frame image of the first image. The movement amount of the camera is obtained according to the first camera position information and the second camera position information. The first near-clipping plane position information corresponding to the first image is obtained according to the first observation matrix and the first clipping matrix. The rotation angle of the camera is obtained based on the first near-clipping plane position information and the second near-clipping plane position information.

[0025] In this way, the movement distance and the rotation angle of the camera are obtained based on the camera position, the clipping matrix, and the observation matrix between the two adjacent images. Then, the motion state of the target object is determined based on the movement distance and the rotation angle.

[0026] In a possible implementation, the first frame rate is obtained based on a corresponding relationship between the picture change rate and the frame rate when the frame rate determination condition is used to indicate the picture change rate.

[0027] Based on this possible implementation, the first frame rate is determined from the frame rate range based on the picture change rate. In this way, the reason for adjusting the frame rate in the view scene can be covered, the frame rate can be adjusted in time, the accuracy of the adjusted frame rate is ensured, and the smoothness of the interface display is ensured while reducing the power consumption of the electronic device.

[0028] In a possible implementation, the first similarity between the first image and the second image, and the second similarities between the plurality of historical images are obtained before the first frame rate is determined from the frame rate range according to the frame rate determination condition. The second image is a previous frame image of the first image. The historical images are the rendered images. The picture change rate between the first image and the historical images is obtained according to the first similarity and the plurality of second similarities.

[0029] Based on this possible implementation, when the picture change rate is determined, the first similarity between the first image and the second image, and the second similarities between the plurality of historical images are obtained. The picture change rate between the first image and the historical images is obtained according to the first similarity and the plurality of second similarities. In this way, the reliability of the picture change rate is improved based on the difference degrees between the plurality of adjacent frame images, and the reliability of the first frame rate is ensured.

[0030] In a possible implementation, the displaying the first image of the real-time rendering based on the first frame rate is specifically implemented as follows: obtaining an image display instruction of the first image; and executing the image display instruction according to a first target display time indicated by the first frame rate, so as to display the first image of the real-time rendering.

[0031] In this way, the frame rate of the image is adjusted by controlling the display time. Dynamic adjustment of the frame rate is achieved.

[0032] In a possible implementation, the view scene corresponding to the first image is determined according to the rendering data, and the determination is specifically implemented as follows: reading a scene feature in the rendering data; and determining the view scene corresponding to the first image based on the scene feature.

[0033] In this way, the view scene corresponding to the first image can be quickly identified through the scene feature in the rendering data.

[0034] In a second aspect, an embodiment of the present application provides a frame rate adjustment method applied to a game scene. The method obtains rendering instructions of multiple images of a game application of real-time rendering in sequence in a running process of the game application. The rendering instruction carries rendering data of the corresponding image. The game scene corresponding to a first image in the multiple images is determined according to the rendering data. The first image and associated images after the first image are displayed in sequence based on a first frame rate matched with the game scene. The first image and the associated images displayed in sequence can correspond to the same game scene. The game scene is used to indicate a virtual environment corresponding to a display interface of the game application. Optionally, the game scene includes different virtual game scenes, man-machine practice scenes, novice guide scenes, game replay scenes, game lobby scenes, setting interface scenes or login scenes in the game application.

[0035] Based on the second aspect, the game scene is identified through the rendering data carried by the rendering instruction, the first frame rate is determined through the game scene, and then the first image and the associated images after the first image are displayed in sequence according to the first frame rate. In this way, when the game scene changes, the frame rate of the view display can be dynamically adjusted, and the power consumption of the electronic device running the application can be reduced by displaying at a dynamic frame rate. Moreover, the first frame rate is determined based on the game scene, and is not affected by the similarity between adjacent two frames in the game application, so the applicability is high.

[0036] In a possible implementation, the first frame rate matched with the game scene is obtained, and the obtaining is specifically implemented as follows: obtaining a frame rate range matched with the game scene; determining the first frame rate from the frame rate range according to a frame rate determination condition; the frame rate determination condition includes at least one of a touch area of a touch operation, a motion parameter of a camera in the game application and a picture change rate; the motion parameter is a change amount obtained with the camera in the game application as a reference; and the picture change rate is used to indicate the picture similarity between the first image and a historical image that has been rendered.

[0037] In a possible implementation, the frame rate determination condition comprises a touch area of the touch operation, and the touch area comprises a first area and a second area. The first area comprises an operation control area, and the second area comprises a skill release area or a perspective area of a target object.

[0038] In a case where the touch area of the touch operation is the first area, the first frame rate is related to a number of historical touch operations triggered in the first area. In a case where the touch area of the touch operation is the second area, the first frame rate is a maximum frame rate in the frame rate range.

[0039] In a possible implementation, in a case where the touch area of the touch operation is the first area, and the number of historical touch operations triggered in the first area is greater than a first threshold, a target frame rate that matches the number of historical touch operations is determined from the frame rate range as the first frame rate based on a corresponding relationship between the number and the frame rate.

[0040] In a possible implementation, in a case where the touch area of the touch operation is the first area, and the number of historical touch operations triggered in the first area is not greater than the first threshold, the first frame rate is determined from the frame rate range according to a motion parameter of a camera in the application and / or a picture change rate between the first image and a historical image that has been rendered.

[0041] In a possible implementation, in a case where the touch area of the touch operation is the second area, after the touch operation ends, a second frame rate is determined from the frame rate range based on at least one of a number of historical touch operations in the second area and a frequency of the historical touch operations. A third image of the plurality of images is displayed based on the second frame rate. The third image and the associated image are separated by a plurality of images. The second frame rate is less than the first frame rate.

[0042] In a possible implementation, in a case where the frame rate determination condition comprises a motion parameter of a camera in the application, the first frame rate is related to the motion parameter of the camera in the application.

[0043] In a possible implementation, the first frame rate is determined from the frame rate range according to the frame rate determination condition, and the implementation is as follows: in a case where a motion state level of a target object represented by the motion parameter is greater than or equal to a level threshold, a target frame rate that matches the motion parameter of the camera is determined from the frame rate range as the first frame rate according to a corresponding relationship between the motion parameter and the frame rate.

[0044] In a possible implementation, the first frame rate is determined from the frame rate range according to the frame rate determination condition, specifically: in a case where the motion state level of the target object represented by the motion parameter is not greater than a level threshold, the first frame rate is determined from the frame rate range according to a picture change rate between the first image and a historical image that has been rendered.

[0045] In a possible implementation, the change amount obtained with the camera in the application as a reference includes at least one of a movement amount and a rotation angle, and the corresponding motion parameter includes the movement amount of the camera and / or the rotation angle of the camera. The first camera position information, the first observation matrix, and the first clipping matrix corresponding to the first image are obtained, and the second camera position information and the second near-clipping plane position information corresponding to the second image are obtained, the second image being a previous frame image of the first image. The movement amount of the camera is obtained according to the first camera position information and the second camera position information. The first near-clipping plane position information corresponding to the first image is obtained according to the first observation matrix and the first clipping matrix. The rotation angle of the camera is obtained based on the first near-clipping plane position information and the second near-clipping plane position information.

[0046] In a possible implementation, in a case where the frame rate determination condition includes the picture change rate, the first frame rate is obtained based on a corresponding relationship between the picture change rate and the frame rate.

[0047] In a possible implementation, before the first frame rate is determined from the frame rate range according to the frame rate determination condition, a first similarity between the first image and a second image and second similarities between a plurality of historical images are obtained, the second image being a previous frame image of the first image, and the historical images being images that have been rendered. The picture change rate between the first image and the historical images is obtained according to the first similarity and the plurality of second similarities.

[0048] In a possible implementation, the first image is displayed based on the first frame rate, specifically: an image display instruction of the first image is obtained, and the image display instruction is executed to display the first image according to a first display time indicated by the first frame rate.

[0049] In a possible implementation, the game scene corresponding to the first image is determined according to the rendering data, specifically: a scene feature in the rendering data is read. The game scene corresponding to the first image is determined based on the scene feature.

[0050] The beneficial effects that can be achieved by any of the design solutions of the second aspect can refer to the beneficial effects that can be achieved by the first aspect and any of the implementation manners thereof, which will not be repeated here.

[0051] In a third aspect, an electronic device is provided, including a memory and one or more processors; the memory is coupled to the processors; the memory stores computer program codes including computer instructions, which, when executed by the processors, cause the electronic device to perform the frame rate adjustment method according to the first aspect and any possible implementation thereof. Or cause the electronic device to perform the frame rate adjustment method according to the second aspect and any possible implementation thereof.

[0052] In a fourth aspect, a computer-readable storage medium is provided, including computer instructions, which, when executed on an electronic device, cause the electronic device to perform the frame rate adjustment method according to the first aspect and any possible implementation thereof, or cause the electronic device to perform the frame rate adjustment method according to the second aspect and any possible implementation thereof.

[0053] In a fifth aspect, a computer program product is provided, which, when executed on an electronic device, causes the electronic device to perform the frame rate method according to the first aspect and any possible implementation thereof, or causes the electronic device to perform the frame rate method according to the second aspect and any possible implementation thereof.

[0054] The beneficial effects achieved by any design scheme of the third aspect to the fifth aspect above can refer to the beneficial effects achieved by the first aspect and any possible implementation thereof, or refer to the beneficial effects achieved by the second aspect and any possible implementation thereof, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0055] FIG. 1 is a schematic diagram of a near clipping plane;

[0056] FIG. 2 is a schematic diagram of dynamically adjusting frame rate based on a game scene according to an embodiment of the present application;

[0057] FIG. 3 is a schematic diagram of an electronic device according to an embodiment of the present application;

[0058] FIG. 4 is a schematic diagram of a system architecture of an electronic device according to an embodiment of the present application;

[0059] FIG. 5 is a schematic diagram of a flow of a frame rate adjustment method according to an embodiment of the present application;

[0060] FIG. 6 is a schematic diagram of a flow of game scene identification according to an embodiment of the present application;

[0061] FIG. 7 is a schematic diagram of region division in a game interface according to an embodiment of the present application;

[0062] FIG. 8 is a schematic diagram of a flow of obtaining a target frame rate based on a touch region according to an embodiment of the present application;

[0063] FIG. 9 is a schematic diagram of a region division in a game interface according to an embodiment of the present application;

[0064] FIG. 10 is a schematic diagram of a game interface under different region division manners according to an embodiment of the present application;

[0065] FIG. 11 is a schematic diagram of a flow of determining a frame change rate according to an embodiment of the present application;

[0066] FIG. 12 is another schematic diagram of a flow of a frame rate adjustment method according to an embodiment of the present application;

[0067] FIG. 13 is a schematic diagram of a structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0068] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the description of the present application, unless otherwise specified, “ / ” represents an “or” relationship between the objects before and after the “ / ”, for example, A / B can represent A or B; “and / or” in the present application is only a description of the relationship between the objects, which means that there can be three relationships, for example, A and / or B, which means that there are three cases of A alone, A and B together, and B alone, where A and B can be singular or plural. In addition, in the description of the present application, unless otherwise specified, “multiple” means two or more than two. “At least one of the following (one)” or similar expressions means any combination of these items, including any combination of single item (one) or multiple items (one). For example, at least one of a, b, or c, can represent a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple. In addition, in order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, the same items or similar items with basically the same functions and effects are distinguished by using “first”, “second”, etc. The skilled in the art can understand that “first”, “second”, etc. do not limit the quantity and execution order, and “first”, “second”, etc. also do not necessarily mean different. At the same time, in the embodiments of the present application, the words “exemplary” or “for example” are used to represent as an example, illustration or description. Any embodiment or design scheme described as “exemplary” or “for example” in the embodiments of the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the words “exemplary” or “for example” are intended to present the relevant concepts in a specific manner, for understanding.

[0069] In addition, the service scenarios described in the embodiments of the present application are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. It can be known by those skilled in the art that, with the appearance of new service scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0070] For the convenience of understanding, the technical terms proposed in the embodiments of the present application are introduced as follows.

[0071] Graphics processing unit (GPU): a type of special hardware in a computer specially used for processing graphics. The advantage of GPU is that it can process multiple similar tasks in parallel, for example, when rendering an image, multiple pixels will be rendered at the same time, and GPU can accelerate this process.

[0072] Driver: a type of program that can enable the communication between the computer operating system and the underlying hardware. It enables the operating system or the developer to utilize the characteristics of the hardware.

[0073] Game engine: a game making tool that fully integrates and utilizes the underlying driver program to enable game developers to quickly make games.

[0074] Graphics instruction data stream (or image instruction stream): contains one or more drawing instructions. GPU obtains the display data of the image by running the drawing instructions in the image instruction data stream, so that the display can display the image based on the display data.

[0075] Draw instruction: an instruction for drawing a draw target in an image. For example, a draw call of an open graphics library (OpenGL), i.e., a call command of a bottom-layer graphics drawing interface by a central processing unit (CPU). Optionally, the draw target can be represented by data stored in a memory. Correspondingly, a set of draw targets generated according to the image instruction stream can constitute display data of a corresponding graphics frame. For example, assuming that an image includes a person A and a person B, the person A and the person B are draw targets. An image instruction stream of the image can include one or more draw instructions for generating the person A and one or more draw instructions for generating the person B. Correspondingly, a GPU can obtain display data of the image by running the draw instructions. In OpenGL, the draw instruction is also referred to as a rendering instruction, and the draw target is also referred to as a rendering target. In this application, OpenGL will be taken as an example to introduce an implementation method, but this application is not limited to OpenGL, and can also be applied to other types of graphics libraries, for example, Vulkan. The draw instruction carries rendering data. The rendering data is used to generate a draw target.

[0076] The rendering data includes a model label, a texture label, a number of draw calls, camera position information, and a view and projection (VP) matrix.

[0077] Camera: the rendering process is a process of simulating a camera recording in a real world. The camera is a rendering term, and the camera in rendering is similar to the camera in the real world, which refers to an eye for viewing a scene. In simple terms, the camera is an object for recording scene information, and a rendered frame is formed by projecting a scene viewed by the camera. In this embodiment of this application, the camera can refer to a view angle for viewing a game scene. The camera position information is used to indicate coordinates of the camera in the game scene.

[0078] The VP matrix includes a view matrix and a projection matrix.

[0079] View matrix: also referred to as a view matrix, which is a conversion matrix from a world space to a camera space. The view matrix is used to convert world coordinates into view coordinates. The view coordinates refer to coordinates viewed from the perspective of a camera or a viewer. When a camera is defined, a position of the camera in the world space, a direction of viewing, a vector pointing to a right side of the camera, and a vector pointing to an upper side of the camera are needed. Actually, a coordinate system with three unit axes perpendicular to each other and with the camera position information as an origin is created.

[0080] Projection matrix (or called clipping matrix): is the conversion matrix from camera space to clip space. After processing the coordinates to the view space, the coordinates in the view space need to be projected into the clip space to get the clip coordinates. The clip coordinates are used to determine which vertices in the range of -1.0 to 1.0 will appear on the screen. Specifically: using the clip coordinates, it can be determined whether the vertex is in the visible range, if it is in the visible range, it is rendered, if it is not in the range, the vertex is discarded. Then the clip coordinates need to be converted to screen coordinates, this process is called view port transform. The view port transform converts the coordinates in the range of -1.0 to 1.0 to the coordinate range defined by the view port transform function. The view port transform function can be the glViewport function. The final converted coordinates will be sent to the rasterizer, which will convert them into fragments.

[0081] Near plane: the clipping plane of the viewing frustum of the clip space closest to the camera position. As shown in FIG. 1, the camera is point A, within the viewing frustum formed by the camera, the first plane is the near clipping plane, and the second plane is the far clipping plane. The range formed by the first plane and the second plane is the visible range of the camera.

[0082] As can be seen from FIG. 1, the near clipping plane and the far clipping plane constitute the visible range of the camera.

[0083] Rendering can be divided into real-time rendering and offline rendering.

[0084] Real-time rendering: refers to rendering the required image through real-time operation. For example, the essence of the game screen seen is the result of displaying a plurality of continuous rendering frames without interruption. Each rendering frame is obtained through complex calculation by a computer processor and a graphics processor.

[0085] Rendering frame: an image rendered by a graphics processor, also known as an image frame. A plurality of rendering frames played in succession can form a dynamic effect.

[0086] Frame rate: the number of frames displayed per second, with the unit of frames per second (FPS). A frame is the smallest unit of a single image in a video animation, and one frame is one still image. Continuous frames form an animation. A high frame rate can obtain smoother and more realistic animation. The more frames per second, the smoother the motion displayed.

[0087] Frame rate includes output frame rate and display frame rate. Output frame rate refers to the frame rate at which an interface or application outputs to a display screen through a graphics card. Display frame rate refers to the frame rate at which an interface or application is actually displayed on a display screen.

[0088] Display time: can refer to the time stamp of the image displayed on the display screen or display device. In the embodiments of the present application, the display time can be obtained according to the target frame rate. For example, the number of frames to be displayed in a unit of time is obtained according to the target frame rate, and then the time node of displaying each frame of image is obtained, and the display time of each frame of image is obtained according to the time node and the world clock. For example, taking 60FPS as the frame rate, that is, 60 frames of images are displayed in one second, and at the current time of 12:30:01, 60 frames of images are displayed between 12:30:01 and 12:30:02, then the time stamp of the first frame of image is 12:30:01.016 seconds, and the time stamp of the 60th frame of image is 12:30:02.

[0089] Screen refresh rate: in real-time rendering, the rendering frame generated by rendering is finally sent to the display buffer by the graphics processor, and the screen finally takes the rendering frame from the display buffer for display, and the screen takes a new rendering frame from the rendering buffer every time it is refreshed. The number of times the screen is refreshed per second is called the screen refresh rate. The higher the screen refresh rate, the higher the frame rate supported by the screen. The final display effect depends on the minimum value of the screen refresh rate and the frame rate.

[0090] Power consumption: used to measure the efficiency of the power consumption of the calculation process, the unit is milliampere (mA). Under the premise that the battery power of the electronic device is certain, the higher the running power consumption of the electronic device, the faster the power consumption, and the shorter the use time.

[0091] Pixel Buffer Object (PBO): a technology used to save rendering frames. In the embodiments of the present application, it is used to save the similarity between multiple consecutive rendering frames.

[0092] Frames Buffer Object (FBO): a technology used to save rendering frames. In the embodiments of the present application, it is used to save two consecutive rendering frames, thereby facilitating the calculation of the similarity between the rendering frames.

[0093] With the popularity of high refresh rate screen electronic devices, the frame rate of application also increases. Game application is one of the applications with the highest demand for CPU, GPU and double data rate synchronous dynamic random access memory (DDR) of electronic devices. When running at high frame rate for a long time, it will cause the power consumption of electronic devices to increase and occupy more memory, and then cause the electronic devices to heat up seriously and affect the endurance of the electronic devices. In order to ensure the safety of users and avoid users being scalded by high temperature, the electronic device chip and operating system will limit the frequency and frame of the electronic device, and reduce the running power consumption of the chip and the electronic device. The frequency limiting and frame limiting operation on the electronic device will make the game frame rate halve or more, thereby affecting the game experience of the player.

[0094] At present, there are still problems of serious heating and high power consumption during game running, which affect the user experience.

[0095] Therefore, in order to dynamically adjust the frame rate in the application and reduce the power consumption, the embodiment of the present application provides a frame rate adjustment method. The method identifies the view scene through the rendering data carried by the rendering instruction, determines the first frame rate through the view scene, and then displays the image based on the first frame rate. In this way, when the view scene changes, the frame rate in the application can be dynamically adjusted, and the electronic device can display at a dynamic frame rate, thereby reducing the power consumption. Moreover, the first frame rate is determined based on the view scene, and is not affected by the similarity between adjacent two frames in the application, so the applicability is high.

[0096] The frame rate adjustment method provided by the embodiment of the present application can be applied to an electronic device. When an application running in the electronic device needs to perform image rendering, the frame rate adjustment method provided by the embodiment of the present application can be executed in the rendering process to adjust the display time of the rendered image, thereby reducing the power consumption of the electronic device.

[0097] The application includes game application, video playing application, image display type application, virtual reality (VR) application and the like. That is, the frame rate adjustment method provided by the embodiment of the present application can provide frame rate dynamic adjustment service for various applications with image display function.

[0098] For example, in the case of the application being a game application, the view scene is a game scene. The game scene is used to distinguish different virtual environments in which the player is located during the running of the game application. The game scene includes but is not limited to a game scene, a man-machine practice scene, a novice guide scene, a game replay scene, a game hall scene, a setting interface scene or a login scene, etc. The embodiment of the present application does not limit the specific game scene.

[0099] For example, in the case of the application being a video playing application, the view scene is a video playing scene. The video playing scene is used to distinguish video playing modes. The video playing scene includes, but is not limited to, live broadcast, non-live broadcast, 1 times speed playing, 0.5 times speed playing, 2 times speed playing, 3 times speed playing, and the like.

[0100] For example, in the case of the application being an image display type application, the view scene is an image display scene. The image display scene is used to indicate an image type. The image type includes a static image and a dynamic image. Accordingly, the image display scene includes a static image display scene and a dynamic image display scene.

[0101] For example, in the case of the application being a VR application, the view scene is a VR scene. The VR scene is used to indicate different virtual environments in which a user is located during running of the VR application, such as a natural environment, a traffic environment, and the like.

[0102] Next, the frame rate adjustment method provided by the embodiments of the present application is described below by taking a game application as an example. It can be understood that the implementation of the frame rate adjustment method in a video playing application, an image display type application, and a VR application can refer to the implementation of the frame rate adjustment method in a game application.

[0103] For example, in the case of the application being a video playing application, the view scene is a video playing scene. The video playing scene is used to distinguish video playing modes. The video playing scene includes, but is not limited to, live broadcast, non-live broadcast, 1 times speed playing, 0.5 times speed playing, 2 times speed playing, 3 times speed playing, and the like. For example, in the case of the application being a video playing application, the view scene is a video playing scene. The video playing scene is used to distinguish video playing modes. The video playing scene includes, but is not limited to, live broadcast, non-live broadcast, 1 times speed playing, 0.5 times speed playing, 2 times speed playing, 3 times speed playing, and the like. For example, in the case of the application being a video playing application, the view scene is a video playing scene. The video playing scene is used to distinguish video playing modes. The video playing scene includes, but is not limited to, live broadcast, non-live broadcast, 1 times speed playing, 0.5 times speed playing, 2 times speed playing, 3 times speed playing, and the like. For example, in the case of the application being a video playing application, the view scene is a video playing scene. The video playing scene is used to distinguish video playing modes. The video playing scene includes, but is not limited to, live broadcast, non-live broadcast, 1 times speed playing, 0.5 times speed playing, 2 times speed playing, 3 times speed playing, and the like. For example, in the case of the application being a video playing application, the view scene is a video playing scene. The video playing scene is used to distinguish video playing modes. The video playing scene includes, but is not limited to, live broadcast, non-live broadcast, 1 times speed playing, 0.5 times speed playing, 2 times speed playing, 3 times speed playing, and the like. For example, in the case of the application being a video playing application, the view scene is a video playing scene. The video playing scene is used to distinguish video playing modes. The video playing scene includes, but is not limited to, live broadcast, non-live broadcast, 1 times speed playing, 0.5 times speed playing, 2 times speed playing, 3 times speed playing, and the like. For example, in the case of the application being a video playing application, the view scene is a video playing scene. The video playing scene is used to distinguish video playing modes. The video playing scene includes, but is not limited to, live broadcast, non-live broadcast, 1 times speed playing, 0.5 times speed playing, 2 times speed playing, 3 times speed playing, and the like. For example, in the case of the application being a video playing application, the view scene is a video playing scene. The video playing scene is used to distinguish video playing modes. The video playing scene includes, but is not limited to, live broadcast, non-live broadcast, 1 times speed playing, 0.5 times speed playing, 2 times speed playing, 3 times speed playing, and the like. For example, in the case of the application being a video playing application, the view scene is a video playing scene. The video playing scene is used to distinguish video playing modes. The video playing scene includes, but is not limited to, live broadcast, non-live broadcast, 1 times speed playing, 0.5 times speed playing, 2 times speed playing, 3 times speed playing, and the like. For example, in the case of the application being a video playing application, the view scene is a video playing scene. The video playing scene is used to distinguish video playing modes. The video playing scene includes, but is not limited to, live broadcast, non-live broadcast, 1 times speed playing, 0.5 times speed playing, 2 times speed playing, 3 times speed playing, and the like. For example, in the case of the application being a video playing application, the view scene is a video playing scene. The video playing scene is used to distinguish video playing modes. The video playing scene includes, but is not limited to, live broadcast, non-live broadcast, 1 times speed playing, 0.5 times speed playing, 2 times speed playing, 3 times speed playing, and the like. For example, in the case of the application being a video playing application, the view scene is a video playing scene. The video playing scene is used to distinguish video playing modes. The video playing scene includes, but is not limited to, live broadcast, non-live broadcast, 1 times speed playing, 0.5 times speed playing, 2 times speed playing, 3 times speed playing, and the like. For example, in the case of the application being a video playing application, the view scene is a video playing scene. The video playing scene is used to distinguish video playing modes. The video playing scene includes, but is not limited to, live broadcast, non-live broadcast, 1 times speed playing, 0.5 times speed playing, 2 times speed playing, 3 times speed playing, and the like. For example, in the case of the application being a video playing application, the view scene is a video playing scene. The video playing scene is used to distinguish video playing modes. The video playing scene includes, but is not limited to, live broadcast, non-live broadcast, 1 times speed playing, 0.5 times speed playing, 2 times speed playing, 3 times speed playing, and the like. For example, in the case of the application being a video playing application, the view scene is a video playing scene. The video playing scene is used to distinguish video playing modes. The video playing scene includes, but is not limited to, live broadcast, non-live broadcast, 1 times speed playing, 0.5 times speed playing, 2 times speed playing, 3 times speed playing, and the like. For example, in the case of the application being a video playing application, the view scene is a video playing scene. The video playing scene is used to distinguish video playing modes. The video playing scene includes, but is not limited to, live broadcast, non-live broadcast, 1 times speed playing, 0.5 times speed playing, 2 times speed playing, 3 times speed playing, and the like. For example, in the case of the application being a video playing application, the view scene is a video playing scene. The video playing scene is used to distinguish video playing modes. The video playing scene includes, but is not limited to, live broadcast, non-live broadcast, 1 times speed playing, 0.5 times speed playing, 2 times speed playing, 3 times speed playing, and the like. For example, in the case of the application being a video playing application, the view scene is a video playing scene. The video playing scene is used to distinguish video playing modes. The video playing scene includes, but is not limited to, live broadcast, non-live broadcast, 1 times speed playing, 0.5 times speed playing, 2 times speed playing, 3 times speed playing, and the like. For example, in the case of the application being a video playing application, the view scene is a video playing scene. The video playing scene is used to distinguish video playing modes. The video playing scene includes, but is not limited to, live broadcast, non-live broadcast, 1 times speed playing, 0.5 times speed playing, 2 times speed playing, 3 times speed playing, and the like. For example, in the case of the application being a video playing application

[0104] The electronic device can be a laptop computer, a desktop computer, a mobile phone, a smartphone, a tablet computer, a multimedia player, an e-book reader, a smart in-vehicle device, a smart home appliance, an artificial intelligence device, a wearable device, an Internet of Things device, or a virtual reality / augmented reality / mixed reality device. Among them, the mobile phone can be a foldable screen mobile phone, or can also be a non-foldable screen mobile phone.

[0105] For example, the electronic device is a mobile phone, Fig. 3 shows a structural schematic diagram of the electronic device.

[0106] Among them, the electronic device 100 can include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a loudspeaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. Among them, the sensor module 180 can include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0107] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can include more or fewer components than shown, or combine certain components, or split certain components, or different component arrangements. The components shown can be implemented in hardware, software, or a combination of software and hardware.

[0108] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a GPU, an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices or integrated in one or more processors.

[0109] The controller can generate operation control signals according to the instruction operation code and the timing signal, complete the control of fetching and executing instructions.

[0110] The processor 110 can also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can save instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instructions or data again, it can directly call from the above-mentioned memory. Avoiding repeated access, reducing the waiting time of the processor 110, thus improving the efficiency of the system.

[0111] In some embodiments, the processor 110 can include one or more interfaces. The interface can include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0112] It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a structural limitation on the electronic device. In some other embodiments of the present application, the electronic device can also use different interface connection modes or a combination of multiple interface connection modes in the above embodiments.

[0113] The electronic device can realize the display function through the GPU, the display screen 194, and the application processor, etc. The GPU is a microprocessor for image processing, connected with the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs that execute program instructions to generate or change display information.

[0114] The electronic device can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor, etc.

[0115] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, files such as videos and music are saved to the external memory card.

[0116] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various function applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. For example, the frame rate adjustment method of the embodiments of the present application can be executed.

[0117] The software system of the electronic device 100 can adopt a layered structure, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. For example, the software system of the electronic device 100 can adopt a layered architecture including an operating system (OS), an operating system or and the like. The embodiments of the present application take the layered architecture of the system as an example to exemplarily illustrate the software structure of the electronic device 100.

[0118] As shown in FIG. 4, FIG. 4 is a system architecture schematic diagram of the electronic device 100 provided by the embodiments of the present application. The system architecture of the electronic device 100 includes an application layer 01, a graphics application programming interface (API) layer 02, a framework layer 03, a kernel layer 04, and a chip layer 05.

[0119] Among them, the application layer 01 can run multiple applications such as game applications, video applications, instant messaging applications, and photographing applications. The graphics API layer 02 runs a driver capable of drawing graphics such as OpenGL and Drawing Application Program Interface (Vulkan). The framework layer 03 is used to execute the frame rate adjustment method provided by the embodiments of the present application. The kernel layer 04 includes a system kernel and related drivers for driving hardware chips. The chip layer 05 includes hardware chips such as CPU and GPU.

[0120] Taking a game application as an example, for example, a Multiplayer Online Battel Arena (MOBA) game application, which can also be a virtual reality or augmented reality game application. As shown in FIG. 4, the framework layer 03 includes an instruction interception module 031, an identification module 032, a frame rate decision module 033, and a frame rate control module 034. When the game application is running in the electronic device 100, the instruction interception module 031 is used to intercept the graphics API calling instruction, and cache the rendering instruction stream and the associated data. The identification module 032 is used to identify the game scene according to the rendering data carried in the rendering instruction stream, identify the game scene, and output the game scene. The frame rate decision module 033 is used to determine the target frame rate and the frame rate change rate according to the game scene. The frame rate control module 034 is used to adjust the current frame rate according to the target frame rate and the frame rate change rate to obtain the display time of the next frame image.

[0121] The frame rate adjustment method provided by the embodiments of the present application will be described in detail below in conjunction with a specific flowchart. The main part of the frame rate adjustment method can be considered as the function of the framework layer 03 in FIG. 4. As shown in FIG. 5, the frame rate adjustment method can include the following steps S210 to S240.

[0122] Step S210, sequentially obtaining rendering instructions of multiple images.

[0123] In the process of running an application program that needs to continuously render images in the electronic device, the electronic device can obtain a rendering instruction stream initiated by the application program, which is used to instruct to render multiple images in real time. The rendering instruction stream includes multiple rendering instructions, and each rendering instruction corresponds to an image. Exemplarily, the application program can be, for example, a game application program, a video playing application, an image display type application, or a virtual reality application program, etc. which needs to obtain images through rendering. The first image instructed to be rendered by the rendering instruction is used to be displayed on the display screen of the electronic device to constitute a continuous picture together with other images.

[0124] In a possible implementation, taking the system architecture of the electronic device provided in FIG. 4 as an example, the rendering instruction stream can be intercepted by the framework layer in the electronic device when the electronic device performs a rendering task. In the process of running an application program in the electronic device, the application program initiates a rendering instruction stream to instruct the hardware in the electronic device to perform a rendering operation. The framework layer in the electronic device can intercept the rendering instruction in the rendering instruction stream before the rendering instruction reaches the hardware in the electronic device that performs the rendering operation.

[0125] In the embodiment of the present application, the rendering instruction carries rendering data. The hardware in the electronic device can perform a rendering operation according to the rendering data. Wherein, the description of the rendering data can refer to the introduction of the rendering data above, which will not be repeated here.

[0126] In step S220, a first image in the plurality of images is determined to correspond to a game scene of the game application according to the rendering data.

[0127] Wherein, the first image can be the first image in the plurality of images, or the first image can be any image in the plurality of images. Or the first image can be the image corresponding to the rendering instruction currently intercepted by the electronic device.

[0128] In the embodiment of the present application, the description of the game scene can refer to the introduction of the game scene above, which will not be repeated here.

[0129] Wherein, the game scene, the man-machine practice scene, the novice guide scene, and the game replay scene are scenes with high frame rate requirements, or scenes with heavy loads, or other any scenes that are easy to cause the game interface to be stuck. Therefore, for the game scene, the man-machine practice scene, the novice guide scene, and the game replay scene, the frame rate can be adjusted to reduce power consumption or improve visual effect. And the game lobby scene, the setting interface scene, and the login scene, which are scenes with low frame rate requirements, can display images at a frame rate lower than that of the game scene, the man-machine practice scene, the novice guide scene, or the game replay scene, so as to reduce the load.

[0130] In a possible implementation, the game scene corresponding to the first image can be determined according to the state identifier carried by the rendering data.

[0131] Wherein, the state identifier can include a game scene label, a game player state, a game title, a picture, and the like.

[0132] For example, taking the game player state as an example, the game player state is used to indicate the state of the player in the game, which includes but is not limited to the player online, the player offline, the player team matching, the player game, the player practice, etc. For example, when the game player state is the player game, the game scene is the game scene. Embodiments of the present application can determine the game player state by obtaining relevant data through functions or interfaces in the program.

[0133] For another example, taking the game scene label as an example, the game scene label can be a specific label of certain objects. By obtaining the string corresponding to the specific label of certain objects drawn in the rendering data, and searching and matching the preset string corresponding to the game scene, the game scene corresponding to the preset string matched with the string corresponding to the specific label is determined as the game scene corresponding to the first image.

[0134] For another example, taking the game title as an example, the game title is used to indicate the name of the game scene. The string corresponding to the game title is obtained from the rendering data, and the string is identified to obtain the game scene corresponding to the string.

[0135] For another example, taking the image as an example, the image to be rendered is obtained from the rendering data, and the player behavior recognition and the object recognition in the image are performed to obtain the game scene.

[0136] Step S230, obtaining a first frame rate matched with the game scene.

[0137] The first frame rate is the frame rate required by the image in the game scene.

[0138] In the first possible implementation, different game scenes can correspond to different frame rates. A corresponding relationship between the game scene and the frame rate can be established in advance, and based on the corresponding relationship between the game scene and the frame rate, the frame rate corresponding to the game scene is determined as the first frame rate.

[0139] The corresponding relationship between the game scene and the frame rate is used to indicate the mapping relationship between the game scene and the corresponding frame rate.

[0140] In an example, frame rate requirements of the same game scene in different game applications can be different. For example, a Multiplayer Online Role-Playing Game (MMORPG) type game application or a MOBA type game application displays skill release special effects in a game scene through animation, and accordingly has a higher frame rate requirement. For a puzzle type game application or a brain training type game application, there is no game scene, or the skill release special effects in the game scene are mainly displayed in two-dimensional maps, and accordingly the puzzle type game application or the brain training type game application has a lower frame rate requirement when displaying images. Therefore, the corresponding relationship between the game scene and the frame rate corresponding to different game applications can be different. When the first frame rate is obtained, the game application triggering the rendering instruction can be determined, and the corresponding relationship between the game scene and the frame rate corresponding to the game application is obtained. Based on the corresponding relationship between the game scene and the frame rate corresponding to the game application, the first frame rate matching the game scene is obtained. Of course, the corresponding relationship between the game scene and the frame rate corresponding to different game applications can also be the same.

[0141] In a second possible implementation, a plurality of different levels of frame rates can be pre-set, such as 120HZ, 90HZ, 60HZ, etc. The power consumption generated when the game scene is displayed at each frame rate and the visual effect brought by the power consumption are simulated. The frame rate with a visual effect meeting the visual effect requirement of the game scene and low power consumption is determined as the first frame rate. For example, when the game scene is displayed at 120HZ and 90HZ, both can meet the visual effect requirement of the game scene, and when the power consumption at 90HZ is lower than that at 120HZ, 90HZ is determined as the first frame rate.

[0142] In step S240, the first image and the associated image after the first image are displayed in sequence based on the first frame rate.

[0143] In the embodiments of the application, the associated image corresponds to the game scene. For example, taking the game scene shown in (b) of FIG. 2 as an example, when the first image is image 3 in (b) of FIG. 2, the associated image is image 4 and image 5 in (b) of FIG. 2.

[0144] In a possible implementation, frame rate adjustment can be performed according to the first frame rate, and the first image and the associated image after the first image are displayed in sequence based on the adjusted frame rate.

[0145] In the embodiments of the application, when the current frame rate is less than the first frame rate, the frame rate adjustment can be to increase the frame rate. For example, the frame rate can be increased by increasing the screen refresh rate or increasing the display frequency.

[0146] When the current frame rate is greater than the first frame rate, the frame rate adjustment can be to reduce the frame rate. For example, dropping frames and / or reducing the screen refresh rate. Dropping frames or reducing the screen refresh rate can reduce the frame rate in the game, achieving the purpose of reducing power consumption. When reducing the screen refresh rate, it can be achieved by multiplying the original screen refresh rate by a coefficient less than 1, or reducing the original screen refresh rate by a fixed value. Subsequently, frame images can be drawn according to the adjusted frame rate to reduce power consumption.

[0147] Based on the embodiments provided in FIG. 5, the rendering data carried by the rendering instruction is used to identify the game scene, the first frame rate is determined based on the game scene, and then the current frame rate is adjusted to the first frame rate. In this way, when the game scene changes, the frame rate in the game can be dynamically adjusted, and the electronic device displays at a dynamic frame rate, which can reduce the power consumption of the electronic device running the game application. Moreover, the first frame rate is determined based on the game scene, and is not affected by the similarity between adjacent two frames in the game application, so the adaptability is high.

[0148] In the embodiments of the present application, taking the system architecture provided in FIG. 4 as an example, when the electronic device performs a rendering task, the application layer 01 in the electronic device triggers a rendering instruction of multiple images through the graphics API layer 02, forming a rendering instruction stream. The graphics API layer 02 in the electronic device triggers the rendering instruction stream to the framework layer 03, and the framework layer 03 in the electronic device intercepts each rendering instruction in the rendering instruction stream, and identifies whether the rendering data carried by the rendering instruction contains a scene feature. In the case where the rendering data carried by the rendering instruction contains a scene feature, S220 is executed. In the case where the rendering data carried by the rendering instruction does not contain a scene feature, the next rendering instruction is continuously intercepted.

[0149] The rendering instruction stream is a set of instructions indicating the graphics processor to render the game scene in the game, and the rendering data in the rendering instruction stream can include a scene feature. The scene feature can be a distinguishing identifier for identifying different game scenes. That is, different game scenes correspond to different scene features.

[0150] Based on this, in the implementation of S220 determining the game scene corresponding to the first image according to the rendering data, in addition to the implementation of determining the game scene through the state identifier, the game scene corresponding to the first image can also be determined according to the scene feature carried by the rendering data.

[0151] For example, as shown in FIG. 6, in image rendering, for a first image of multiple images, the scene feature in the rendering instruction is intercepted (S221), the scene feature in the rendering instruction is matched with a plurality of preset scene features corresponding to a plurality of preset game scenes (S222), and the preset game scene matched with the scene feature in the rendering instruction is determined as the game scene (S223). The rendering instruction is released (S224).

[0152] For example, different game applications include different game scenes. For example, for a single-player game application or a puzzle game application, no battle scene is included. Therefore, before identifying the game scene corresponding to the first image, the game application triggering the rendering instruction can be determined, and a plurality of game scenes included in the game application and preset scene features corresponding to each game scene can be obtained. By comparing the scene features in the rendering instruction with the preset scene features corresponding to each game scene included in the game application, the game scene is determined.

[0153] For example, based on the probability prediction of the scene features carried in the rendering data, the prediction probability of the scene features carried in the rendering data for each game scene is obtained, and the game scene with the maximum prediction probability is determined as the game scene corresponding to the first image.

[0154] In the embodiments of the present application, the scene features include but are not limited to model labels, texture labels, and draw call quantities.

[0155] In a possible implementation, the scene features can be obtained through offline data analysis and statistics by a graphics analysis software, and the different game scenes are preset for feature processing in the electronic device, so as to be read by the rendering instruction stream.

[0156] In another possible implementation, the electronic device can read the scene features by obtaining the corresponding scene feature fields or scene feature functions in the game application.

[0157] In the embodiments of the present application, the first frame rate can be determined according to the game scene in S230. Alternatively, each game scene corresponds to a frame rate range, and a frame rate range matching the game scene is determined from a plurality of frame rate ranges corresponding to the game scenes, and the first frame rate is determined from the frame rate range.

[0158] For example, the frame rate range is determined according to the game scene, and the first frame rate is determined from the frame rate range.

[0159] In the first possible implementation, the maximum frame rate, the minimum frame rate, or the intermediate frame rate in the frame rate range can be determined as the first frame rate. For example, when the frame rate range corresponding to the game scene is [90HZ, 120HZ], 90HZ, 120HZ, or 100HZ can be determined as the first frame rate.

[0160] In a second possible implementation, in a case that the rendering instruction is triggered by a triggering event, since the game interface view includes an operation control region and a skill release region, as shown in FIG. 7, where region 1 in FIG. 7 is the operation control region. In region 1, there are displayed skill 1, skill 2, skill 3, skill 4, skill 5, skill 6, and skill 7 controls, and a direction control. Region 2 is the skill release region. Region 2 includes a plurality of objects. The frame rate requirements of the operation control region and the skill release region are different. For example, the skill release region may need to display skill special effect animations, which usually need to be displayed at a high frame rate to improve the visual effect. For the operation control region, it is usually displayed in the form of a map, and the frame rate requirement is not high. Or, when the target object is in motion, or when the target object is in a stationary state and other objects in the game scene are in motion, for example, when it rains in the game scene, or when other objects in the game scene are in a game, if displayed at a low frame rate, it may cause frame drops or game interface lag, but if displayed at a high frame rate, it may also cause power consumption to increase. Therefore, in order to improve the visual effect of the game interface while reducing power consumption, in the implementation of determining the first frame rate from the frame rate range, the first frame rate can be determined from the frame rate range according to at least one of a touch region of the triggering event, a motion parameter of a camera in the game application, and a picture change rate.

[0161] In the game application, the motion parameter of the camera is a change amount obtained with reference to the camera in the game application. The change amount includes at least one of a movement amount and a rotation angle. Correspondingly, the motion parameter includes the movement amount of the camera and / or the rotation angle of the camera.

[0162] In the embodiments of the present application, the motion parameter of the camera in the game application is used to indicate the motion state of the target object in the game application.

[0163] In the game application, the motion parameter of the camera is a change amount obtained with reference to the camera in the game application. The change amount includes at least one of a movement amount and a rotation angle. Correspondingly, the motion parameter includes the movement amount of the camera and / or the rotation angle of the camera.

[0164] In the game application, the motion parameter of the camera is a change amount obtained with reference to the camera in the game application. The change amount includes at least one of a movement amount and a rotation angle. Correspondingly, the motion parameter includes the movement amount of the camera and / or the rotation angle of the camera.

[0165] For example, a frame rate determination condition can be set to determine the first frame rate from the frame rate range according to the frame rate determination condition. The frame rate determination condition is used to indicate a strategy for determining the frame rate. For example, the frame rate determination condition can indicate at least one of a touch area of the touch operation, a motion parameter of the camera in the game application, and a picture change rate.

[0166] For example, the frame rate determination condition is used to indicate the touch area of the touch operation, and the manner of obtaining the first frame rate is introduced.

[0167] The touch area is used to indicate the area in the view window where the touch operation occurs.

[0168] In the embodiments of the present application, the touch area includes a first area and a second area. The first area includes an operation control area, and the second area includes a skill release area or a view angle area of a target object. For example, as shown in FIG. 7, area 1 is the first area, and area 2 is the second area. The skill release area and the view angle area of the target object are both required to display animation at a higher frame rate. Therefore, based on the touch area of the touch operation, the first frame rate is obtained from the frame rate range, which can include: in the case of the second area, the maximum frame rate in the frame rate range is used as a reference to obtain a higher frame rate as the first frame rate, so as to obtain a better visual effect. In the case of the first area, the minimum frame rate in the frame rate range is used as a reference to obtain a lower frame rate as the first frame rate to display the image. Understandably, in the case of the second area, the frame rate difference between the first frame rate and the maximum frame rate in the frame rate range is less than the frame rate difference threshold. In the case of the first area, the frame rate difference between the first frame rate and the minimum frame rate in the frame rate range is less than the frame rate difference threshold. For example, taking the frame rate range [90HZ, 120HZ] as an example, in the case of the second area, 120HZ, 119HZ or 110HZ can be used as the first frame rate. In the case of the first area, 90HZ, 87HZ or 80HZ can be used as the first frame rate.

[0169] In a possible implementation, the frequency of the historical touch operations of the touch area can affect the number of triggering of the rendering instruction of the game application. In a case where the frequency of the historical touch operations occurring in the touch area is high or the number of the historical touch operations is large, the game interface needs to frequently switch views, and if displayed at a low frame rate, the game interface can be stuck, affecting the visual effect. In a case where the frequency of the historical touch operations occurring in the touch area is not high or the number of the historical touch operations is small, if displayed at a high frame rate, the power consumption of the electronic device is increased. Therefore, in the implementation of obtaining the first frame rate from the frame rate range based on the touch area, the first frame rate can also be obtained in combination with the frequency of the historical touch operations and the number of the historical touch operations in the touch area.

[0170] As shown in FIG. 8, FIG. 8 is a flowchart of obtaining a target frame rate based on a touch area according to an embodiment of the present application. The flowchart of obtaining the target frame rate based on the touch area includes steps S231A-S233A.

[0171] In step S231A, the electronic device displays a game interface in a view window.

[0172] For example, the view window indicates a screen display area of the electronic device. As shown in FIG. 9, FIG. 9 is a schematic view of a view window according to an embodiment of the present application. The game interface is displayed in the view window. The game interface includes a game area, a control display area, and a message display area. The player can input a touch operation by clicking the game area or the control display area in the game interface. For example, the player clicks an object in the game area to lock a skill release object. For another example, the player clicks a skill control in the control display area to release a skill.

[0173] In the embodiment of the present application, taking the system architecture of the electronic device shown in FIG. 4 as an example, when the electronic device runs the game application, the framework layer 03 in the electronic device monitors whether a touch operation occurs in the view window.

[0174] In a possible implementation, taking the system architecture of the electronic device shown in FIG. 4 as an example, when the electronic device runs the game application, the application layer 01 in the electronic device can obtain a click operation of the player on the operation control displayed in the game interface or a click operation on any area in the game interface. The graphic API layer 02 in the electronic device transmits the touch operation information to the framework layer 03 in the electronic device. The touch operation information includes the number and position coordinate information of the touch operation. The position coordinate information is used to indicate the position of the touch operation in the game interface in the view window.

[0175] In the embodiments of the present application, taking the system architecture of the electronic device provided in FIG. 4 as an example, when the electronic device runs the game application, the framework layer 03 in the electronic device can determine whether the touch operation occurs in the view window by whether the touch operation information is received. When the framework layer 03 in the electronic device receives the trigger touch operation information, it is determined that the touch operation occurs in the view window.

[0176] In the embodiments of the present application, when it is determined that the touch operation occurs in the view window, the touch area of the touch operation in the view window is determined.

[0177] In the embodiments of the present application, the touch area can be determined based on the position coordinate information of the touch operation.

[0178] For example, the coordinate range of the first area and the second area in the view window can be obtained according to the size of the view window and the division manner of the touch area in the game application. The position coordinate information of the touch operation is compared with the coordinate range of the first area and the second area in the view window respectively, and the area whose coordinate range includes the position coordinate information of the touch operation is determined as the touch area of the touch operation in the view window.

[0179] The division manner of the touch area includes but is not limited to left-right division manner, up-down division manner. For example, as shown in FIG. 10, (a) of FIG. 10 is the touch area divided in the left-right division manner, wherein the left area 1 is the first area and the right area 2 is the second area. As shown in (b) of FIG. 10, the touch area is divided in the up-down division manner, wherein the area 1 close to the lower frame of the view window is the first area and the area 2 far away from the lower frame of the view window is the second area.

[0180] For example, taking (b) of FIG. 10 as an example, when the position coordinate information of the touch operation is in the range of the area 1, the touch area of the touch operation in the view window is the first area. When the position coordinate information of the touch operation is in the range of the area 2, the touch area of the touch operation in the view window is the second area.

[0181] Step S232A, in the case where it is monitored that the touch operation occurs in the first area, the first frame rate is determined from the frame rate range based on the number of historical touch operations triggered in the first area.

[0182] The number of historical touch operations can be the number of touch operations triggered by the player in the first area in a past period of time. The application does not limit the past period of time. For example, the number of touch operations triggered by the player in the first area in a period of time from the starting time of the game application to the current time. Or, for example, the number of touch operations triggered by the player in the first area in the past one minute or the past ten minutes. Or, for example, the number of touch operations triggered by the player in the first area in a period of time from when the game scene of the game application is switched to the current game scene to the current time. The current game scene is the same as the game scene, or the current game scene is different from the game scene.

[0183] In the first possible implementation, the number of historical touch operations can also be the number of touch operations triggered by the player in the first area in a unit of time. The unit of time can be one second, one minute, etc. The application does not limit this.

[0184] In the first possible implementation, the number of historical touch operations triggered in the first area can be used to query the correspondence between the preset number and the frame rate, and the first frame rate matching the number of historical touch operations triggered in the first area can be obtained from the frame rate range.

[0185] In the first possible implementation, the correspondence between the number and the frame rate is used to indicate the mapping relationship between the number range of historical touch operations and the corresponding frame rate.

[0186] In an example, obtaining the first frame rate matching the number of historical touch operations triggered in the first area from the frame rate range includes: determining the target number range in which the number of historical touch operations triggered in the first area is located from the correspondence between the number and the frame rate, and determining the frame rate corresponding to the target number range as the first frame rate. Or, the frame rate matching the frame rate corresponding to the target number range in the frame rate range is determined as the first frame rate. For example, when the frame rate corresponding to the target number range is 90HZ and the frame rate range is [100HZ, 120HZ], 100HZ is determined as the first frame rate.

[0187] In the second possible implementation, when the touch operation in the first area is not frequent, the frame rate can be reduced to reduce the power consumption of the electronic device. Therefore, in the implementation of determining the first frame rate from the frame rate range based on the number of historical touch operations triggered in the first area, whether the touch operation in the first area is frequent can be determined based on the number of historical touch operations triggered in the first area. When the touch operation in the first area is frequent, the first frame rate is determined according to the correspondence between the number and the frame rate. When the touch operation in the first area is not frequent, the minimum frame rate in the frame rate range can be determined as the first frame rate.

[0188] In an example, the number of historical touch operations triggered in the first region can be compared with a preset first threshold. When the number of historical touch operations triggered in the first region is greater than the first threshold, it is determined that the touch operations in the first region are frequent. When the number of historical touch operations triggered in the first region is not greater than the first threshold, it is determined that the touch operations in the first region are not frequent.

[0189] In step S233A, when it is monitored that a touch operation occurs in the second region, the maximum frame rate in the frame rate range is determined as the first frame rate.

[0190] In the embodiments of the present application, when a touch operation occurs in the second region, in order to improve the visual effect of the game interface, the frame rate is increased to the maximum frame rate in the frame rate range to meet the requirement of the second region on the frame rate.

[0191] In a possible implementation, after the touch operation ends, in the case that the frequency of the touch operation triggered in the second region is low, if the electronic device displays for a long time at the maximum frame rate in the frame rate range, the power consumption of the electronic device will be increased. Therefore, in order to reduce the power consumption of the electronic device, after it is monitored that the touch operation ends, the frame rate can be adjusted in time according to the frequency of the historical touch operation triggered in the second region, and the electronic device displays images at the adjusted frame rate, which can reduce the power consumption of the electronic device when running the game application.

[0192] In an example, taking the system architecture of the electronic device provided in FIG. 4 as an example, when the electronic device runs the game application, the application layer 01 in the electronic device monitors that the touch operation ends, and the instruction sent by the application layer 01 to the kernel layer 04 in the electronic device carries field information indicating the end of the operation. The framework layer 03 in the electronic device can determine whether the touch operation ends by intercepting the instruction sent by the application layer 01 to the kernel layer 04 and detecting whether the instruction carries the field information indicating the end of the operation. The recognition manner of the end of the touch operation is not limited in the embodiments of the present application. For example, when it is monitored that the position where the touch operation occurs performs a lifting operation and no new touch operation is received within a preset time, it is determined that the touch operation ends.

[0193] In an example, after it is monitored that the touch operation ends, the second frame rate is determined from the frame rate range based on the frequency of the historical touch operation in the second region. The second frame rate is less than the first frame rate. The third image is displayed based on the second frame rate. The third image is an image whose display time is later than the display time of the first image. For example, the third image can be a plurality of continuous images after the first image, that is, the third image is separated from the associated image by a plurality of images. In this way, after the touch operation ends, the frame rate can be adjusted in time according to the frequency of the historical touch operation in the second region, so that the power consumption of the electronic device when running the game application is reduced by adjusting the frame rate in time.

[0194] In some embodiments, a correspondence between the frequency and the frame rate can be established in advance. The correspondence between the frequency and the frame rate is used to indicate a mapping relationship between a frequency range of the historical touch operation and a corresponding frame rate. In determining the second frame rate from the frame rate range based on the frequency of the historical touch operation in the second region, the frequency range in which the frequency of the historical touch operation in the second region is located can be obtained based on the correspondence between the frequency and the frame rate, and the frame rate corresponding to the target frequency range in the correspondence between the frequency and the frame rate is determined as the first frame rate.

[0195] In some other embodiments, determining the second frame rate from the frame rate range based on the frequency of the historical touch operation in the second region includes: obtaining the number of historical touch operations in the second region, and in a case where the number of historical touch operations in the second region is greater than a second threshold, obtaining the first frame rate corresponding to the frequency of the historical touch operation in the second region based on the correspondence between the frequency and the frame rate.

[0196] The second threshold is less than the first threshold, or the second threshold is greater than the first threshold. The embodiments of the present application do not limit this.

[0197] In a case where the number of historical touch operations in the second region is not greater than the second threshold, a lower frame rate is determined as the first frame rate with reference to the minimum frame rate in the frame rate range.

[0198] In the above embodiments of the present application, in a case where the number of historical touch operations triggered in the first region is not greater than the first threshold, or the number of historical touch operations in the second region is not greater than the second threshold, a lower frame rate can be determined as the first frame rate with reference to the minimum frame rate in the frame rate range.

[0199] In another implementation, in a case where the number of historical touch operations triggered in the first region is not greater than the first threshold, or the number of historical touch operations in the second region is not greater than the second threshold, the first frame rate can be determined from the frame rate range according to the motion parameter of the camera in the game application, and / or the frame change rate between the first image and the rendered historical image. In this way, the motion parameter of the camera and / or the frame change rate between the first image and the rendered historical image obtain the first frame rate, which guarantees the rationality of the first frame rate, so that the game interface display is more smooth. Thus, the visual effect of the game interface display can be improved, and the power consumption of the electronic device can be reduced.

[0200] Next, the determination of the first frame rate will be introduced taking the motion parameter of the camera in the game application as an example.

[0201] First, the determination method of the motion parameter of the camera will be introduced.

[0202] In a first possible implementation, the motion parameter of the camera in the game application can be obtained through the camera position information of adjacent frame images and an observation matrix.

[0203] The observation coordinate system is a coordinate system with the camera as the origin, which is established for observing objects at different distances and angles. An observation matrix corresponding to the observation coordinate system can be obtained through a rendering instruction stream. The observation matrix can be used to transform world coordinates to observation coordinates relative to the position and direction of the camera. The observation matrix includes the position in the world space, the direction vector of the camera, a vector pointing to the right of it, and a vector pointing to the top of it. The observation matrix creates a matrix through three mutually perpendicular axes and the position of the camera as the origin coordinate, which efficiently transforms all world coordinates to the camera space.

[0204] The expression form of the observation matrix is shown in formula (1).

[0205] wherein (R x ,R y ,R z ) is a right vector. (U x ,U y ,U z ) is an up vector. (D x ,D y ,D z ) is a direction vector of the camera. (P x ,P y ,P z ) is position information of the camera.

[0206] In an example, a first observation matrix corresponding to a first image can be read from an observation matrix field carried by a rendering instruction stream, and a second observation matrix of a second image can be obtained. A rotation angle of the camera is obtained according to the first observation matrix and the second observation matrix. The second image is a previous frame image of the first image.

[0207] For example, the rotation angle of the camera is obtained according to the direction vector (D x ,D y ,D z ) in the first observation matrix and the direction vector (D x ,D y ,D z ) in the second observation matrix according to the following formula (2).

[0208] wherein θ is the rotation angle of the camera. d N-1 is the direction vector in the second observation matrix. d N is the direction vector in the first observation matrix.

[0209] In an example, the first camera position information corresponding to the first image and the second camera position information of the second image can be obtained from the camera position field carried by the rendering instruction stream. According to the first camera position information and the second camera position information, the movement amount of the camera can be obtained.

[0210] In the formula (2), the movement amount can be the movement distance of the camera. For example, according to the first camera position information and the second camera position information, the movement distance of the camera can be obtained by the following formula (3).

[0211] In the formula (2), P N-1 is the second camera position information of the second image. P N is the first camera position information corresponding to the first image.

[0212] In the formula (2), the movement amount can be the movement speed of the camera. For example, the movement speed of the camera can be obtained by the movement distance between the first camera position information and the second camera position information and the time difference between the first image and the second image.

[0213] In the second possible implementation, the motion parameter of the camera in the game application can be obtained by the camera position information of the adjacent frame images and the view-cropping matrix.

[0214] In the formula (4), the expression form of the view-cropping matrix is shown in the following formula (4).

[0215] In an example, the near-cropping plane information of the view angle of the camera can be obtained by the view-cropping matrix. According to the first near-cropping plane information corresponding to the first image and the second near-cropping plane information corresponding to the second image, the rotation angle of the camera can be obtained.

[0216] In the formula (5), the first near-cropping plane information corresponding to the first image is shown in the following formula (5) taking the first view-cropping matrix corresponding to the first image as an example. 31 41 32 42 33 43 (5)

[0217] In the implementation of obtaining the cosine value of the rotation angle of the camera according to the first near-cropping plane information corresponding to the first image and the second near-cropping plane information corresponding to the second image, the cosine value of the rotation angle of the camera can be obtained by the following formula (6).

[0218] ​​​​​Wherein, (b1, b2, b3) is the second near-cropping plane information corresponding to the second image.

[0219] Then, the way of obtaining the first frame rate based on the motion parameter of the camera in the game application is introduced.

[0220] In the first possible implementation, after obtaining the motion parameter of the camera, the motion parameter and the pre-set corresponding relationship between the motion parameter and the frame rate are obtained to obtain the first frame rate.

[0221] For example, when the motion parameter includes the movement amount of the camera, the corresponding relationship between the motion parameter and the frame rate is used to indicate the mapping relationship between the movement amount range of the camera and the corresponding frame rate. The process of determining the first frame rate can include: comparing the movement amount of the camera with the corresponding relationship between the motion parameter and the frame rate to obtain the target movement amount range in which the movement amount of the camera is located. The frame rate corresponding to the target movement amount range in the corresponding relationship between the motion parameter and the frame rate is determined as the first frame rate.

[0222] For example, when the motion parameter includes the rotation angle of the camera, the corresponding relationship between the motion parameter and the frame rate is used to indicate the mapping relationship between the rotation angle range of the camera and the corresponding frame rate. The process of determining the first frame rate includes: similar to the movement amount of the camera, the frame rate corresponding to the target rotation angle range in which the rotation angle of the camera is located in the corresponding relationship between the motion parameter and the frame rate is determined as the first frame rate.

[0223] For example, when the motion parameter includes the movement amount and the rotation angle of the camera, the corresponding relationship between the motion parameter and the frame rate is used to indicate the mapping relationship between the frame rate and the corresponding movement amount range of the camera and the rotation angle range of the camera. The process of determining the first frame rate includes: similar to the movement amount of the camera, the frame rate corresponding to the rotation angle range in which the rotation angle of the camera is contained and the movement amount range of the camera in which the movement amount of the camera is contained in the corresponding relationship between the motion parameter and the frame rate is determined as the first frame rate.

[0224] In the second possible implementation, after obtaining the motion parameter of the camera, the motion state level of the target object can be determined according to the motion parameter of the camera, and the first frame rate matched with the motion state level of the target object is determined from the frame rate range based on the motion state level of the target object and the corresponding relationship between the motion state level and the frame rate.

[0225] The corresponding relationship between the motion state level and the frame rate is used to indicate a mapping relationship between the motion state level of the target object and the corresponding frame rate. For example, the motion state level includes stillness, slight motion, moderate motion, and fast motion. The corresponding frame rate of each of stillness, slight motion, moderate motion, and fast motion increases. For another example, the motion state level includes a first motion level, a second motion level, a third motion level, and a fourth motion level. The movement amount or the rotation angle corresponding to each of the first motion level, the second motion level, the third motion level, and the fourth motion level increases in turn. Correspondingly, the frame rate corresponding to each of the first motion level, the second motion level, the third motion level, and the fourth motion level increases.

[0226] For example, when the motion parameter includes the movement amount of the camera, the motion state level of the target object can be obtained according to the corresponding relationship between the movement amount and the motion state level. The corresponding relationship between the movement amount and the motion state level is used to indicate a corresponding relationship between a movement amount range and a corresponding motion state level. For example, when the movement amount is the movement speed, if the movement speed is less than a movement speed threshold, the motion state level is determined to be stillness or the first motion level. The specific value of the movement speed threshold is not limited in the embodiments of the present application.

[0227] For another example, when the motion parameter includes the rotation angle, the motion state level of the target object can be obtained according to the corresponding relationship between the angle and the motion state level. The corresponding relationship between the angle and the motion state level is used to indicate a corresponding relationship between a rotation angle range of the camera and a corresponding motion state level.

[0228] For another example, when the motion parameter includes the movement amount and the rotation angle of the camera, the motion state level of the target object can be obtained according to the mapping data between the motion parameter and the motion state level. The mapping data between the motion parameter and the motion state level includes a plurality of motion state levels and the movement amount range and the rotation angle range corresponding to each motion state level. Alternatively, the prediction probability of the target object in each motion state level can be predicted according to the movement amount and the rotation angle of the camera. The motion state level with the maximum prediction probability is determined to be the motion state level of the target object.

[0229] In a third possible implementation, after obtaining the motion parameter of the camera, when the motion state level of the target object is low, for example, the motion state level of the target object is a static state, or a light motion state level, or a first motion level or a second motion level, a lower frame rate can be taken as the first frame rate with reference to the minimum frame rate in the frame rate range, so as to reduce the power consumption of the electronic device. Therefore, in the implementation of obtaining the first frame rate based on the motion parameter of the camera in the game application, the first possible implementation includes: determining the motion state of the target object according to the motion parameter of the camera in the game application, and in a case where the motion state level of the target object is greater than or equal to a level threshold, obtaining the first frame rate according to the correspondence between the motion parameter and the frame rate. In a case where the motion state level of the target object is not greater than or equal to the level threshold, a lower frame rate is taken as the first frame rate with reference to the minimum frame rate in the frame rate range.

[0230] The second possible implementation includes: in a case where the motion state level of the target object is not greater than or equal to the level threshold, determining the first frame rate from the frame rate range according to the screen change rate between the first image and the rendered historical image. In this way, whether other objects are in motion is identified according to the screen change rate in the game scene, and a more reliable first frame rate is obtained. The reason for adjusting the frame rate in the game scene can be covered, the frame rate can be adjusted in time, and the accuracy of the adjusted frame rate can be ensured, so that the smoothness of the game interface display can be improved, and the power consumption of the electronic device running the game application can be reduced.

[0231] Next, the frame rate determination condition is used to indicate the screen change rate, and the manner of obtaining the first frame rate is introduced.

[0232] First, the determination manner of the screen change rate is introduced.

[0233] In the first possible implementation, the screen change rate can be obtained through the image change amount between the first image and the second image. For example, the image change amount is determined as the screen change rate.

[0234] In an example, the image change amount can be obtained by calculating the distance between the first image and the second image rendered in the previous frame. For example, the Euclidean distance, Mahalanobis distance, etc. between the first image and the second image rendered in the previous frame is calculated,

[0235] In yet another example, the image change amount can be obtained by calculating the difference degree between the first image and the second image rendered in the previous frame.

[0236] For example, the difference value between the first image and the second image rendered in the previous frame at the same spatial position is calculated through a convolution kernel, the difference values obtained by each convolution kernel are averaged, and the difference degree between the first image and the second image rendered in the previous frame is obtained.

[0237] The size of the convolution kernel can be 7*7, which is not limited in the embodiments of the present application.

[0238] In the second possible implementation, in the implementation of determining the picture change rate, a first similarity between the first image and the second image can be obtained, and a plurality of second similarities between a plurality of historical images can be obtained. According to the first similarity and the plurality of second similarities, a picture change rate between the first image and the historical image is obtained. In this way, the reliability of the picture change rate is improved through the difference between a plurality of adjacent frame images, and the reliability of the first frame rate is further ensured.

[0239] In an example, the plurality of second similarities between the plurality of historical images can be obtained directly from the PBO. For example, the electronic device calculates, for each image to be displayed, a similarity between the image and a previous frame image of the image, and writes the similarity and the frame identifier of the image into the PBO. When the first frame rate needs to be determined, the first similarity between the first image and the second image of the previous frame is calculated, and the plurality of second similarities between the plurality of historical images stored in the PBO are read.

[0240] The first similarity between the first image and the second image of the previous frame can be calculated by using the convolution kernel.

[0241] For example, taking the first image as the Nth image as an example, as shown in FIG. 11, the electronic device inputs the Nth image and the (N-1)th image into the convolution network. The similarity of the Nth image is calculated. The similarity of the Nth image is stored in the PBO. The similarity of the Nth image, the similarity of the (N-1)th image, the similarity of the (N-2)th image, the similarity of the (N-3)th image, and the similarity of the (N-4)th image are read from the PBO. Based on the similarity of the Nth image, the similarity of the (N-1)th image, the similarity of the (N-2)th image, the similarity of the (N-3)th image, and the similarity of the (N-4)th image, the picture change rate is calculated.

[0242] In an example, in the implementation of calculating the picture change rate between the first image and the historical image, the maximum similarity, the average similarity, or the median, or the mode of the first similarity and the plurality of second similarities can be determined as the picture change rate. For example, the maximum similarity, the average similarity, or the median, or the mode of the similarity of the Nth image, the similarity of the (N-1)th image, the similarity of the (N-2)th image, the similarity of the (N-3)th image, and the similarity of the (N-4)th image is determined as the picture change rate.

[0243] In yet another example, in the implementation of calculating the picture change rate between the first image and the historical images, the first similarity and the plurality of second similarities can be used to obtain the similarity change between the historical images. The picture change rate is obtained according to the similarity change between the historical images.

[0244] The similarity change is used to indicate the picture continuity between the images.

[0245] For example, the similarity sequence can be obtained based on the first similarity and the plurality of second similarities. The similarity sequence is subjected to forward difference processing to obtain a similarity difference sequence. The similarity difference sequence is used to represent the similarity change. It can be understood that the difference in the similarity difference sequence is increasing, representing that the similarity is increasing. Or the difference in the similarity difference sequence is constant, or the difference is all less than a preset difference threshold, representing that the similarity does not change. Or the difference in the similarity difference sequence is decreasing, representing that the similarity is decreasing.

[0246] Correspondingly, in the case of increasing similarity, the picture continuity increases. In the case of decreasing similarity, the picture continuity decreases. In the case of no change in similarity, the picture continuity does not change. The picture continuity can refer to the high similarity of a plurality of adjacent frame images.

[0247] In the embodiments of the present application, when the similarity change between the first image and the historical images is used to obtain the picture change rate, the picture change rate can be obtained based on the similarity change.

[0248] In the embodiments of the present application, after the picture change rate is determined, the first frame rate matched with the picture change rate between the first image and the rendered historical images can be obtained based on the corresponding relationship between the picture change rate and the frame rate.

[0249] In the embodiments of the present application, the frame rate determination condition can indicate a plurality of the touch area of the touch operation, the motion parameter of the camera in the game application, and the picture change rate.

[0250] For example, the frame rate determination condition is used to indicate the touch area of the touch operation and the picture change rate, and the acquisition manner of the first frame rate is introduced.

[0251] In a first possible implementation, in the case that the touch operation occurs in the view window, and the frame rate determination condition is used to indicate the touch area of the touch operation, the acquisition manner of the first frame rate is to obtain the first frame rate from the frame rate range. In the case that the touch operation does not occur in the view window, and the frame rate determination condition is used to indicate the picture change rate, the acquisition manner of the first frame rate is to obtain the first frame rate from the frame rate range. The embodiments of the present application do not perform redundant description here.

[0252] In a second possible implementation, in the case that the touch operation occurs in the first region of the view window, when the number of historical touch operations triggered in the first region is greater than a first threshold, the first frame rate is determined according to the correspondence between the number and the frame rate. When the number of historical touch operations triggered in the first region is not greater than the first threshold, the first frame rate is obtained from the frame rate range according to the manner of obtaining the first frame rate in the case that the frame rate determination condition is used to indicate the picture change rate. Details are not described herein.

[0253] In a third possible implementation, in the case that the touch operation occurs in the second region of the view window, the maximum frame rate in the frame rate range is determined as the first frame rate. After the touch operation ends, the second frame rate is obtained from the frame rate range according to the manner of obtaining the second frame rate in the case that the frame rate determination condition is used to indicate the picture change rate, or the manner of determining the second frame rate from the frame rate range according to the frequency of historical touch operations in the second region. Details are not described herein.

[0254] For example, the manner of obtaining the first frame rate is described by taking the case that the frame rate determination condition is used to indicate the motion parameter of the camera and the picture change rate as an example.

[0255] In a possible implementation, in the case that the motion state level of the target object represented by the motion parameter of the camera is greater than or equal to a level threshold, the first frame rate is obtained according to the correspondence between the motion parameter and the frame rate. In the case that the motion state level of the target object represented by the motion parameter of the camera is not greater than the level threshold, the first frame rate is obtained from the frame rate range according to the manner of obtaining the first frame rate in the case that the frame rate determination condition is used to indicate the picture change rate. Details are not described herein.

[0256] For example, the manner of obtaining the first frame rate is described by taking the case that the frame rate determination condition is used to indicate the touch region of the touch operation, the motion parameter of the camera in the game application, and the picture change rate as an example.

[0257] In a first possible implementation, in the case that the touch operation occurs in the view window, the first frame rate is obtained from the frame rate range according to the manner of obtaining the first frame rate in the case that the frame rate determination condition is used to indicate the touch region of the touch operation. In the case that the touch operation does not occur in the view window, the motion parameter of the camera is obtained. In the case that the motion state level of the target object represented by the motion parameter of the camera is greater than or equal to a level threshold, the first frame rate is obtained according to the correspondence between the motion parameter and the frame rate. In the case that the motion state level of the target object represented by the motion parameter of the camera is not greater than the level threshold, the first frame rate is obtained from the frame rate range according to the manner of obtaining the first frame rate in the case that the frame rate determination condition is used to indicate the picture change rate. Details are not described herein.

[0258] In a second possible implementation, in a case that the touch operation occurs in the first region in the view window and the number of the historical touch operations triggered in the first region is greater than the first threshold, the first frame rate is determined according to the correspondence between the number and the frame rate. In a case that the touch operation occurs in the first region in the view window and the number of the historical touch operations triggered in the first region is not greater than the first threshold, the motion parameter of the camera is acquired. In a case that the motion state level of the target object represented by the motion parameter of the camera is greater than or equal to the level threshold, the first frame rate is acquired according to the correspondence between the motion parameter and the frame rate. In a case that the motion state level of the target object represented by the motion parameter of the camera is not greater than the level threshold, the first frame rate is acquired from the frame rate range according to the acquisition manner of the first frame rate in a case that the frame rate determination condition is used to indicate the picture change rate. Details are not described herein.

[0259] In the embodiment of the application, after the first frame rate is determined, the first image and the associated image after the first image are displayed in sequence based on the first frame rate.

[0260] In a first possible implementation, the first target display time of the first image and the second target display time of the associated image after the first image can be determined according to the first frame rate. The first image and the associated image after the first image are displayed in sequence according to the first target display time and the second target display time. The first target display time is earlier than the second target display time.

[0261] In an example, the first target display time of the first image can be obtained according to the first frame rate and the mapping relationship between the frame rate and the display time.

[0262] The mapping relationship between the frame rate and the display time is used to indicate the correspondence between the frame rate and the corresponding display time.

[0263] In a first example, displaying the first image according to the first target display time includes: executing a waiting instruction before executing the image display operation. When the pause duration satisfies the duration threshold, the image display is executed. The waiting instruction is used to instruct the electronic device to execute the image display after the pause duration threshold. The duration threshold is determined according to the first target display time. For example, when the first target display time is greater than the current display time, the duration threshold is increased. When the first target display time is greater than the current display time, the duration threshold is reduced.

[0264] In a second possible implementation, in the implementation of determining the first frame rate, a first frame rate change rate is obtained, and the associated image after the first image is displayed in sequence based on the first frame rate and the first frame rate change rate. In this way, the problem of great change in the display effect of the game interface and the impact on the human visual effect caused by the great frame rate difference between the current frame rate and the first frame rate is avoided, and the visual effect of the game interface is ensured.

[0265] For example, a first target display time is obtained based on the first frame rate and the first frame rate change rate. The first image is displayed according to the first target display time. A second target display time is obtained according to the display frame rate corresponding to the first image and the first frame rate change rate. The associated image after the first image is displayed according to the second target display.

[0266] In an example, obtaining the first target display time based on the first frame rate and the first frame rate change rate includes: obtaining the display frame rate of the first image according to the first frame rate and the first frame rate change rate. The first target display time of the first image is obtained based on the display frame rate of the first image and the mapping relationship between the frame rate and the display time.

[0267] In an example, obtaining the second target display time according to the display frame rate corresponding to the first image and the first frame rate change rate includes: obtaining the display frame rate of the associated image after the first image according to the display frame rate of the first image and the first frame rate change rate. The second target display time is obtained based on the display frame rate of the associated image and the mapping relationship between the frame rate and the display time. It should be noted that, in the case that the frame rate difference between the display frame rate of the first image and the first frame rate is less than a preset frame rate difference threshold, the display frame rate of the associated image is the display frame rate of the first image, or the display frame rate of the associated image is the first frame rate. In the case that the frame rate difference between the display frame rate of the associated image and the first frame rate is less than the preset frame rate difference threshold, the display frame rate of the image after the associated image is the display frame rate of the associated image, or the display frame rate of the image after the associated image is the first frame rate.

[0268] Next, the determination manner of the first frame rate change rate is introduced.

[0269] In a first possible implementation, the first frame rate change rate can be obtained according to the frame rate difference between the first frame rate and the current frame rate. For example, the first frame rate change rate is obtained through the mapping relationship between the frame rate difference and the frame rate change rate. The mapping relationship between the frame rate difference and the frame rate change rate is used to indicate the mapping relationship between the frame rate difference range and the corresponding frame rate change rate.

[0270] In a second possible implementation, the first frame rate can be obtained according to the game scene. Alternatively, the first frame rate can be obtained according to at least one of the touch area of the trigger event, the motion parameter of the camera in the game application, and the picture change rate, and the game scene. Therefore, when determining the first frame rate change rate, the game scene can be obtained. Alternatively, the first frame rate change rate can be obtained according to at least one of the touch area of the trigger event, the motion parameter of the camera in the game application, and the picture change rate, and the game scene.

[0271] In a first example, when the first frame rate is determined according to the game scene, the first frame rate change rate corresponding to the game scene can be obtained according to the corresponding relationship between the game scene and the frame rate change rate. The corresponding relationship between the game scene and the frame rate change rate is used to indicate the corresponding relationship between the game scene and the corresponding frame rate change rate.

[0272] In a second example, when the first frame rate is determined according to the game scene and the touch area, when the touch area of the trigger operation is the second area, the difference between the first frame rate and the current frame rate is determined as the first frame rate change rate. When the touch area of the trigger operation is the first area, the first frame rate change rate is determined based on the number of historical touch operations triggered in the first area.

[0273] When the touch area of the trigger operation is the second area, the second frame rate change rate is determined according to the frequency of the historical touch operation in the second area when the touch operation ends. Alternatively, the second frame rate change rate is obtained according to the frame rate difference between the first frame rate and the second frame rate.

[0274] In a third example, when the first frame rate is determined according to the game scene and the motion parameter of the camera, the first frame rate change rate is determined according to the motion parameter. For example, the first frame rate change rate is obtained through the corresponding relationship between the motion parameter and the frame rate change rate.

[0275] In a third example, when the first frame rate is determined according to the game scene and the picture change rate, the first frame rate change rate is determined according to the picture change rate. For example, the first frame rate change rate is obtained through the corresponding relationship between the picture change rate and the frame rate change rate.

[0276] For example, as shown in FIG. 12, FIG. 12 is another flowchart of the frame rate adjustment method provided by the embodiments of the present application. The frame rate adjustment method shown includes steps S121 to S124.

[0277] In step S121, information of a game scene is obtained.

[0278] The information of the game scene includes the touch area of the touch operation, the rendering data, the motion parameter of the camera, the image to be displayed, and the historical image that has been rendered, etc.

[0279] In step S122, information processing of the game scene is performed to obtain a frame rate decision factor.

[0280] The information processing of the game scene includes at least one of touch operation frequency identification, target object motion state identification, and picture change rate identification, and game scene identification.

[0281] The frame rate decision factor includes at least one of the frequency of the touch operation and the touch area, the motion state level of the target object, and the picture change rate, and the game scene.

[0282] In step S123, frame rate decision is performed according to the frame rate decision factor to obtain a first frame rate and a first frame rate change rate.

[0283] In the embodiments of the present application, the first frame rate and the first frame rate change rate can be determined according to the frame rate decision factor, by referring to the above-mentioned first frame rate determination method and the first frame rate change rate determination method. The embodiments of the present application will not be described here.

[0284] In step S124, image display is performed according to the first frame rate and the first frame rate change rate.

[0285] In the embodiments of the present application, the first image and the associated image after the first image in the plurality of images can be displayed in sequence according to the first frame rate and the first frame rate change rate, by referring to the above-mentioned step S240. The embodiments of the present application will not be described here.

[0286] Based on the embodiments provided in FIG. 12, in the frame rate adjustment, the target frame rate and the target frame rate change rate are determined through a plurality of frame rate decision factors, which improves the reliability of the target frame rate. Image display is performed through the target frame rate and the target frame rate change rate. The frame rate in the game can be dynamically adjusted, and the power consumption of the electronic device when running the game application can be reduced. Moreover, compared with the way of adjusting the frame rate by the similarity between the previous and subsequent frames in the related art, the embodiments of the present application determine the target frame rate based on a plurality of frame rate decision factors, which is not affected by the similarity between the adjacent two frames in the game application, and has high applicability.

[0287] The above mainly takes the game application as an example, and the implementation of the frame rate adjustment method provided in the embodiments of the present application is introduced. It can be understood that when the application is a video playing application, an image display type application, or a VR application, the implementation of the frame rate adjustment method in the game application can be referred to.

[0288] For example, in the case of the application being a video playing application, by identifying a video playing scene, a frame rate range corresponding to the video playing scene is obtained, and a first frame rate is obtained from the frame rate range according to at least one of a touch operation input by the user in the view window, an image quality of playing, and a picture change rate. The image quality of playing is used to indicate an image resolution, such as 480P, 960P, 1080P, 4K, and the like.

[0289] For another example, in the case of the application being an image display type application, by identifying an image display scene, a frame rate range corresponding to the image display scene is obtained, and a first frame rate is obtained from the frame rate range according to at least one of a touch operation input by the user based on an image view, a motion state of a target object in the image, and a picture change rate.

[0290] For another example, in the case of the application being a VR application, by identifying a VR scene, a frame rate range corresponding to the VR scene is obtained, and a first frame rate is obtained from the frame rate range according to at least one of an input operation of the user, a motion parameter of a camera in a virtual environment, and a picture change rate.

[0291] The above describes the scheme provided by the embodiments of the present application mainly from the perspective of the method. To implement the above functions, the corresponding hardware structure and / or software module for executing each function are included. Those skilled in the art should easily realize that, in combination with the method steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is implemented in hardware or computer software driven hardware depends on the specific application and design constraints of the technical solution. The skilled person can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of the present application.

[0292] It can be understood that the above only takes the method embodiments as examples to describe the frame rate adjustment method, and the above embodiments are not intended to limit the frame rate adjustment method. In other embodiments, multiple embodiments of the present application or part of the contents of multiple embodiments can be combined, and the combined scheme can be implemented. Optionally, some operations in the flow of each method embodiment are combined, and / or the order of some operations is changed. Moreover, the execution order between the steps of each flow is only exemplary and does not constitute a limitation on the execution order between the steps. Other execution orders between the steps can also be used. The execution order is not intended to indicate the only order in which the operations can be performed. Those skilled in the art will think of various ways to reorder the operations described in the embodiments of the present application. In addition, it should be pointed out that the process details involved in the embodiments of the present application are also applicable in a similar manner to other embodiments, or different embodiments can be combined for use.

[0293] In addition, some steps in the method embodiments can be replaced by other possible steps. Alternatively, some steps in the method embodiments can be optional and can be deleted in some use scenarios. Alternatively, other possible steps can be added to the method embodiments.

[0294] In addition, each method embodiment can be implemented independently or in combination.

[0295] It can be understood that, in order to realize the above functions, the foregoing electronic device such as a mobile phone comprises a hardware and / or software module corresponding to each function. The algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in the form of hardware or a combination of hardware and computer software. Whether a certain function is realized in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to realize the described functions in combination with the embodiments for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0296] The present embodiment can divide the functional modules of the electronic device such as a mobile phone according to the above method examples. For example, each functional module can be divided according to each function, or two or more functions can be integrated in one processing module. The integrated module can be realized in the form of hardware. It should be noted that the division of modules in the present embodiment is illustrative and is only a logical functional division. Actual implementation can have another division manner.

[0297] As shown in FIG. 13, FIG. 13 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. The electronic device shown can include one or more processors 1301, a memory 1302, and a communication interface 1303.

[0298] The memory 1302, the communication interface 1303, and the processor 1301 are coupled. For example, the memory 1302, the communication interface 1303, and the processor 1301 can be coupled together through a bus 1304.

[0299] The communication interface 1303 is configured to perform data transmission with other devices. The memory 1302 stores computer program code. The computer program code includes computer instructions, which, when executed by the processor 1301, cause the electronic device to perform the page display method in the embodiments of the present application.

[0300] The processor 1301 can be a processor or a controller, for example, a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It can implement or execute the various exemplary logical blocks, modules, and circuits described in connection with the present disclosure. The processor can also be a combination of implementing computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.

[0301] The bus 1304 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus 1304 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in FIG. 13, but it does not mean that there is only one bus or only one type of bus.

[0302] The embodiments of the present application also provide a computer readable storage medium, which includes computer instructions, when the computer instructions are run on an electronic device, the electronic device executes the related method steps in the above method embodiments.

[0303] The embodiments of the present application also provide a computer program product, when the computer program product is run on a computer or an electronic device, the computer or the electronic device executes the related method steps in the above method embodiments.

[0304] The electronic device, the computer readable storage medium, or the computer program product provided by the present application are all used to execute the corresponding method provided above, so the beneficial effects they can achieve can refer to the beneficial effects in the corresponding method provided above, which will not be repeated here.

[0305] Through the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional modules is taken as an example for illustration, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0306] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other manners. For example, the division of the apparatus embodiments is merely an example, and the division of the units or components can be different, for example, multiple units or components can be combined or integrated into another unit, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electrical, mechanical or other forms.

[0307] The units described as separate components may or may not be physically separate, and the components shown as units may be one physical unit or multiple physical units, i.e., may be located in one place or distributed in multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.

[0308] In addition, each functional unit in the various embodiments of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0309] If the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product in essence or the part that contributes or the whole or part of the technical solutions can be embodied in the form of a software product stored in a storage medium, including a plurality of instructions for causing an apparatus (which can be a single chip, a chip, etc.) or a processor to perform all or part of the steps of the various embodiments of the method of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0310] The above is merely a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any changes or replacements within the technical scope disclosed in the present application should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A frame rate adjustment method, characterized in that, The method includes: Obtain the rendering instruction for the first image to be rendered in real time; the rendering instruction carries rendering data. The view scene corresponding to the first image is determined based on the rendering data; Obtain the first frame rate that matches the view scene; The first image is displayed in real time based on the first frame rate.

2. The method according to claim 1, characterized in that, The step of obtaining the first frame rate that matches the view scene includes: Obtain the frame rate range that matches the view scene; The first frame rate is determined from the frame rate range according to the frame rate determination conditions; the frame rate determination conditions include at least one of the touch area of ​​the touch operation, the motion parameters of the camera in the application, and the image change rate; the motion parameters are the amount of change obtained with the camera in the application as a reference; the image change rate is used to indicate the image similarity between the first image and the rendered historical images.

3. The method according to claim 2, characterized in that, When the frame rate determination condition includes a touch area for touch operation, the touch area includes a first area and a second area; the first area includes an operation control area; and the second area includes a view area of ​​the target object. When the touch area of ​​the touch operation is the first area, the first frame rate is related to the number of historical touch operations triggered in the first area; When the touch area of ​​the touch operation is the second area, the first frame rate is the maximum frame rate in the frame rate range.

4. The method according to claim 3, characterized in that, When the touch area for the touch operation is the first area, the method further includes: If the number of historical touch operations triggered in the first region is greater than a first threshold, a target frame rate that matches the number of historical touch operations is determined from the frame rate range as the first frame rate based on the correspondence between the number and the frame rate.

5. The method according to claim 3 or 4, characterized in that, When the touch area for the touch operation is the first area, the method further includes: If the number of historical touch operations triggered in the first region is not greater than a first threshold, the first frame rate is determined from the frame rate range based on the camera's motion parameters in the application and / or the rate of change of the image between the first image and the rendered historical image.

6. The method according to any one of claims 3 to 5, characterized in that, When the touch area for the touch operation is the second area, the method further includes: After the touch operation ends, a second frame rate is determined from the frame rate range based on at least one of the number of historical touch operations in the second area and the frequency of the historical touch operations; A third image is displayed based on the second frame rate; the third image is an image whose display time is later than that of the first image.

7. The method according to any one of claims 2 to 6, characterized in that, When the frame rate determination conditions include the motion parameters of the camera in the application, the first frame rate is related to the motion parameters of the camera in the application.

8. The method according to claim 7, characterized in that, Determining the first frame rate from the frame rate range based on the frame rate determination conditions includes: If the motion state level of the target object represented by the motion parameters is greater than the level threshold, a target frame rate that matches the motion parameters of the camera is determined from the frame rate range as the first frame rate based on the correspondence between motion parameters and frame rate.

9. The method according to claim 7 or 8, characterized in that, Determining the first frame rate from the frame rate range based on the frame rate determination conditions includes: If the motion state level of the target object represented by the motion parameters is not greater than the level threshold, the first frame rate is determined from the frame rate range based on the rate of change of the first image and the rendered historical images.

10. The method according to any one of claims 7 to 9, characterized in that, The change obtained with reference to the camera in the application includes at least one of movement and rotation angle; the motion parameter includes the movement of the camera and / or the rotation angle of the camera. Before determining the first frame rate from the frame rate range based on the frame rate determination conditions, the method further includes: Acquire the first camera position information, the first observation matrix, and the first cropping matrix corresponding to the first image; and the second camera position information and the second near-crop plane position information corresponding to the second image; the second image is the previous frame of the first image; The amount of movement of the camera is obtained based on the position information of the first camera and the position information of the second camera; Based on the first observation matrix and the first cropping matrix, the position information of the first near cropping plane corresponding to the first image is obtained; The rotation angle of the camera is obtained based on the position information of the first and second near-cut surfaces.

11. The method according to any one of claims 2 to 10, characterized in that, When the frame rate determination condition includes the screen change rate, the first frame rate is obtained based on the correspondence between the screen change rate and the frame rate.

12. The method according to claim 11, characterized in that, Before determining the first frame rate from the frame rate range based on the frame rate determination conditions, the method further includes: Obtain a first similarity between the first image and the second image, and a second similarity between multiple historical images; the second image is the previous frame of the first image; the historical images are rendered images. Based on the first similarity and multiple second similarities, the image change rate between the first image and the historical images is obtained.

13. The method according to any one of claims 1 to 12, characterized in that, The first image rendered in real time based on the first frame rate includes: Obtain the image display command for the first image; The image display instruction is executed according to the first display time indicated by the first frame rate to display the first image rendered in real time.

14. The method according to any one of claims 1 to 13, characterized in that, Determining the view scene corresponding to the first image based on the rendering data includes: Read the scene features from the rendered data; Based on the scene features, the view scene corresponding to the first image is determined.

15. A frame rate adjustment method applied to game scenarios, characterized in that, The method includes: Rendering instructions for multiple images are obtained sequentially; the multiple images are images from a game application rendered in real time, and the rendering instructions carry the rendering data of the corresponding images. Based on the rendering data, a first image among the multiple images is determined to correspond to the game scene of the game application; the game scene is used to indicate the virtual environment corresponding to the display interface of the game application; Based on a first frame rate that matches the game scene, the first image and the associated image following the first image are displayed sequentially; the associated image and the first image correspond to the same game scene.

16. The method according to claim 15, characterized in that, After determining that the first image among the multiple images corresponds to the game scene of the game application based on the rendering data, the method further includes: Obtain the frame rate range that matches the game scene; The first frame rate is determined from the frame rate range according to the frame rate determination conditions; the frame rate determination conditions include at least one of the touch area of ​​the touch operation, the motion parameters of the camera in the game application, and the screen change rate; the motion parameters are the amount of change obtained with reference to the camera in the game application; the screen change rate is used to indicate the screen similarity between the first image and the rendered historical images.

17. The method according to claim 16, characterized in that, When the frame rate determination condition includes a touch area for touch operation, the touch area includes a first area and a second area; the first area includes an operation control area; the second area includes a skill release area or a view area of ​​the target object. When the touch area of ​​the touch operation is the first area, the first frame rate is related to the number of historical touch operations triggered in the first area; When the touch area of ​​the touch operation is the second area, the first frame rate is the maximum frame rate in the frame rate range.

18. The method according to claim 17, characterized in that, When the touch area for the touch operation is the first area, the method further includes: If the number of historical touch operations triggered in the first region is greater than a first threshold, a target frame rate that matches the number of historical touch operations is determined from the frame rate range as the first frame rate based on the correspondence between the number and the frame rate.

19. The method according to claim 17 or 18, characterized in that, When the touch area for the touch operation is the first area, the method further includes: If the number of historical touch operations triggered in the first region is not greater than a first threshold, the first frame rate is determined from the frame rate range based on the camera's motion parameters in the application and / or the rate of change of the image between the first image and the rendered historical image.

20. The method according to any one of claims 17 to 19, characterized in that, When the touch area for the touch operation is the second area, the method further includes: After the touch operation ends, a second frame rate is determined from the frame rate range based on at least one of the number of historical touch operations in the second area and the frequency of the historical touch operations; The third image is displayed among multiple images based on the second frame rate; the second frame rate is less than the first frame rate, and multiple images are spaced apart between the third image and the associated image.

21. An electronic device, characterized in that, include: A memory and a processor, the processor being configured to store a computer program and to execute the computer program to perform the frame rate adjustment method as claimed in any one of claims 1 to 14, or to perform the frame rate adjustment method as claimed in any one of claims 15 to 20.

22. A computer-readable storage medium, characterized in that, The method includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the frame rate adjustment method as described in any one of claims 1 to 14, or cause the electronic device to perform the frame rate adjustment method as described in any one of claims 15 to 20.

23. A computer program product, characterized in that, When the computer program product is run on an electronic device, it causes the electronic device to perform the frame rate adjustment method as described in any one of claims 1 to 14, or causes the electronic device to perform the frame rate adjustment method as described in any one of claims 15 to 20.

Citation Information

Patent Citations

  • Game scene processing method and device, electronic equipment and storage medium

    CN109685726A

  • Method and device for generating scene image and storage medium

    CN114452645A

  • Processing method and device for reducing power consumption of terminal, terminal and readable storage medium

    CN114740965A

  • Data processing method and related device

    CN116091292A

  • Frame rate adjusting method in game and related device

    CN116095221A

Cited By

  • Gaze point area display method and system

    CN122085532A