Interface rendering method and device, computer equipment and storage medium

By dividing interface elements into two categories: real-time changing and fixed, and selecting elements to be rendered according to the categories, the rendering calculation is reduced, the problem of excessive rendering time of interface elements is solved, the frame rate and fluency are improved, and the user experience is improved. .

CN118543091APending Publication Date: 2024-08-27BOOMING TECH (HANGZHOU) CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410683007.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-29
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

During the game development process, the long rendering time of interface elements resulted in a reduced frame rate, resulting in a decrease in the smoothness of the game screen and poor user experience.

Method used

By dividing the interface elements into the first type of interface elements whose display position changes in real time and the second type of interface elements whose display position is fixed, and selecting the elements to be rendered according to the categories, the target rendering data is obtained from the rendering data of the previous frame. , reduce rendering calculations and achieve frame-by-frame rendering.

Benefits of technology

The total rendering time of user interface elements is reduced, the frame rate of the target interface is increased, and the smoothness of the game screen and user experience are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118543091A
    Figure CN118543091A
Patent Text Reader

Abstract

The invention provides an interface rendering method and device, computer equipment and a storage medium, and belongs to the field of graphic rendering. The method comprises the following steps: determining at least one user interface element to be rendered from a plurality of user interface elements contained in a target interface, wherein the plurality of user interface elements comprise a first type of interface elements and a second type of interface elements; based on the at least one user interface element, obtaining target rendering data from the rendering data of the target interface in the previous frame; and rendering the target interface based on the target rendering data and the rendering data corresponding to the at least one user interface element. According to the technical scheme, the lowest requirements of different types of user interface elements on the refresh frequency can be met, framing rendering of the multiple user interface elements is achieved, the total rendering duration occupied by the user interface elements is shortened, and the frame rate of the target interface is increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of graphics rendering, and in particular to an interface rendering method, device, computer equipment and storage medium. Background Art

[0002] In the process of making games, it is usually necessary to use a large number of complex vector graphics, bitmaps, semi-transparent textures and text content to make the interface elements displayed in the game to display real-time information in the game. Among them, the interface elements include the header bar, status bar, shortcut bar, map, etc. However, during the game running, the rendering time of these interface elements is long, which increases the rendering time required to generate each frame of the game screen, resulting in a decrease in the frame rate of the target interface.

[0003] In the related art, in order to improve the frame rate of the target interface, the refresh frequency of the interface elements in the game can be reduced to reduce the rendering time of the interface elements, thereby reducing the rendering time required to generate each frame of the game screen, thereby improving the frame rate of the target interface.

[0004] However, when the above solution reduces the refresh frequency of interface elements, some interface elements that need to be frequently moved and deformed may experience freezes, jumps, and delays, thereby reducing the smoothness of the game screen and affecting the user's gaming experience. Summary of the invention

[0005] The embodiments of the present application provide an interface rendering method, apparatus, computer equipment and storage medium, which can realize frame rendering of multiple user interface elements while meeting the minimum requirements of different categories of user interface elements for refresh frequency, thereby reducing the total rendering time occupied by user interface elements and improving the frame rate of the target interface. The technical solution is as follows:

[0006] In one aspect, a method for rendering an interface is provided, the method comprising:

[0007] Determining at least one user interface element to be rendered from a plurality of user interface elements included in a target interface, wherein the plurality of user interface elements include a first category of interface elements and a second category of interface elements, wherein the first category of interface elements are user interface elements whose display positions change in real time, and the second category of interface elements are a plurality of groups of user interface elements that are not rendered simultaneously and whose display positions are fixed;

[0008] Based on the at least one user interface element, acquiring target rendering data from the rendering data of the target interface in a previous frame, the target rendering data being rendering data corresponding to user interface elements among the multiple user interface elements except for the at least one user interface element;

[0009] The target interface is rendered based on the target rendering data and the rendering data corresponding to the at least one user interface element.

[0010] On the other hand, an interface rendering device is provided, the device comprising:

[0011] A first determination module, used to determine at least one user interface element to be rendered from a plurality of user interface elements included in a target interface, wherein the plurality of user interface elements include a first category of interface elements and a second category of interface elements, wherein the first category of interface elements are user interface elements whose display positions change in real time, and the second category of interface elements are multiple groups of user interface elements that are not rendered simultaneously and whose display positions are fixed;

[0012] an acquisition module, configured to acquire target rendering data from rendering data of the target interface in a previous frame based on the at least one user interface element, wherein the target rendering data is rendering data corresponding to user interface elements among the multiple user interface elements except the at least one user interface element;

[0013] A rendering module is used to render the target interface based on the target rendering data and the rendering data corresponding to the at least one user interface element.

[0014] In some embodiments, the first determining module includes:

[0015] A first determining unit, configured to, for any user interface element, determine that the user interface element is a user interface element to be rendered if the user interface element is of the first type of interface element;

[0016] The second determination unit is used to determine whether the user interface element is a user interface element to be rendered based on the frame identifier of the target interface and the display position of the user interface element when the user interface element is the second-category interface element.

[0017] In some embodiments, the target interface includes a plurality of interface regions that are independent of each other;

[0018] The second determination unit is used to determine a target interface area from the multiple interface areas based on the frame identifier of the target interface, and the target interface area is the interface area corresponding to the frame identifier; when the display position of the user interface element is within the target interface area, determine that the user interface element is a user interface element to be rendered.

[0019] In some embodiments, the first determining module further includes:

[0020] A sorting unit, used to sort the multiple interface areas to obtain a rendering order of the multiple interface areas;

[0021] A third determining subunit, configured to determine a frame identifier corresponding to each interface area based on a rendering order of the plurality of interface areas;

[0022] The second determining unit is used to determine, based on the frame identifier, an interface area corresponding to the frame identifier among the multiple interface areas as the target interface area.

[0023] In some embodiments, the second determination unit is used to, when the frame identifier is 0, place the region identifiers of the multiple interface areas into an interface area pool; when the frame identifier is not 0 and the interface area pool is not empty, randomly extract at least one interface area corresponding to the region identifier from the interface area pool as the target interface area; when the frame identifier is not 0 and the interface area pool is empty, put the region identifiers of the multiple interface areas back into the interface area pool, and randomly extract at least one interface area corresponding to the region identifier from the interface area pool as the target interface area.

[0024] In some embodiments, the sorting unit is used to determine the rendering priority of each user interface element based on the historical triggering frequency of each user interface element in the second category of interface elements, and the rendering priority is positively correlated with the historical triggering frequency; based on the rendering priority and display position of each user interface element, the multiple interface areas are sorted to obtain the rendering order of the multiple interface areas.

[0025] In some embodiments, the sorting unit is used to determine, for any interface area, at least one user interface element included in the interface area based on the display position of each user interface element; determine a target rendering priority based on the rendering priority of the at least one user interface element, wherein the target rendering priority is the highest rendering priority of the at least one user interface element, or is the average rendering priority of the at least one user interface element; and sort the multiple interface areas from high to low based on the target rendering priorities corresponding to the multiple interface areas to obtain a rendering order for the multiple interface areas.

[0026] In some embodiments, the apparatus further comprises:

[0027] A division module, used for dividing the target interface to obtain a plurality of mutually independent interface regions;

[0028] A second determination module is configured to determine, for any interface area, user interface elements in the interface area except the first-category interface elements as a group of user interface elements in the second-category interface elements.

[0029] On the other hand, a computer device is provided, which includes a processor and a memory, wherein the memory is used to store at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the interface rendering method in the embodiment of the present application.

[0030] On the other hand, a computer-readable storage medium is provided, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to implement the interface rendering method in the embodiment of the present application.

[0031] On the other hand, a computer program product is provided, including a computer program, which is stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the interface rendering method provided in the above-mentioned various aspects or various optional implementations of various aspects.

[0032] The present application discloses an interface rendering method, which divides a target interface including multiple user interface elements into a first category of interface elements whose display positions change in real time and a second category of interface elements whose display positions are fixed and include multiple groups of user interface elements that are not rendered at the same time. The method can select at least one user interface element from the multiple user interface elements as the user interface element to be rendered in the current frame according to the category of the user interface element, that is, can specifically reduce the refresh frequency of the user interface elements, thereby achieving frame-by-frame rendering of the multiple user interface elements while meeting the minimum requirements for the refresh frequency of different categories of user interface elements, thereby reducing the total rendering time occupied by the user interface elements and improving the frame rate of the target interface. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0034] Figure 1 It is a schematic diagram of an implementation environment of an interface rendering method provided according to an embodiment of the present application;

[0035] Figure 2is a flowchart of an interface rendering method provided according to an embodiment of the present application;

[0036] Figure 3 is a flowchart of another interface rendering method provided according to an embodiment of the present application;

[0037] Figure 4 is a schematic diagram of a target interface provided according to an embodiment of the present application;

[0038] Figure 5 is a schematic diagram of an interface rendering process provided according to an embodiment of the present application;

[0039] Figure 6 is a block diagram of an interface rendering device provided according to an embodiment of the present application;

[0040] Figure 7 is a block diagram of another interface rendering device provided according to an embodiment of the present application;

[0041] Figure 8 is a schematic diagram of the structure of a terminal provided according to an embodiment of the present application;

[0042] Fig. 9 It is a structural diagram of a server provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0043] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0044] In this application, the terms "first", "second", etc. are used to distinguish identical or similar items with basically the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there any limitation on quantity and execution order.

[0045] In the present application, the term "at least one" means one or more, and the term "plurality" means two or more.

[0046] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions. For example, the rendering data and historical trigger frequencies involved in this application are obtained with full authorization.

[0047] The interface rendering method provided in the embodiment of the present application can be executed by a computer device. The following takes the computer device as an example to introduce the implementation environment of the interface rendering method provided in the embodiment of the present application. Figure 1 Schematic diagram of an implementation environment of an interface rendering method provided according to an embodiment of the present application. Figure 1 The implementation environment includes a terminal 101 and a server 102. The terminal 101 and the server 102 can be directly or indirectly connected via wired or wireless communication, which is not limited in this application.

[0048] In some embodiments, the terminal 101 is an electronic device such as a smart phone, a tablet computer, a laptop computer, a desktop computer, a game console, etc., but is not limited thereto. The terminal 101 runs an application that supports virtual scenes. The application can be a game engine for building a virtual scene and rendering instance data in the virtual scene. For example, at least one of Unreal Engine 4, Unity3D, Rage Engine, Frost Engine, etc. Optionally, the application can also be a scene editor, which is used to edit the virtual scene in the game. The virtual scene can be a game scene of any game in an open world game, a first-person shooter game, a third-person shooter game, a multiplayer online tactical competitive game, a virtual reality application, a three-dimensional map program, or a multiplayer gunfight survival game. The application is associated with the server 102, and the server 102 provides background services.

[0049] In some embodiments, server 102 is an independent physical server, or it can be a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), big data and artificial intelligence platforms.

[0050] In some embodiments, the server 102 undertakes the main computing work and the terminal 101 undertakes the secondary computing work; or, the server 102 undertakes the secondary computing work and the terminal 101 undertakes the main computing work; or, the server 102 and the terminal 101 adopt a distributed computing architecture to perform collaborative computing.

[0051] Those skilled in the art will appreciate that the number of the above terminals may be more or less. For example, the above terminal may be only one, or the above terminals may be dozens or hundreds, or more. The embodiment of the present application does not limit the number of terminals and device types.

[0052] Figure 2is a flowchart of an interface rendering method provided according to an embodiment of the present application, see Figure 2 In the present application embodiment, the method is described by taking the execution by the terminal as an example. The interface rendering method comprises the following steps:

[0053] 201. Determine at least one user interface element to be rendered from a plurality of user interface elements included in a target interface, the plurality of user interface elements comprising a first category of interface elements and a second category of interface elements, the first category of interface elements being user interface elements whose display positions change in real time, and the second category of interface elements being multiple groups of user interface elements that are not rendered simultaneously and whose display positions are fixed.

[0054] In an embodiment of the present application, the target interface may be an application interface displayed by any application in the terminal, and multiple UI (User Interface) elements are displayed. During the operation of the application, the terminal will refresh the target interface displayed in the application at a certain frame rate. Each time the target interface is refreshed, the terminal needs to render the target interface to generate a new frame of the target interface. In the process of rendering the target interface, the terminal needs to obtain the rendering data required for rendering the target interface, and then process the rendering data to generate a rendering instruction so that the terminal renders the target interface according to the rendering method indicated by the rendering instruction. Among them, when the terminal obtains the rendering data corresponding to multiple user interface elements in the target interface, it needs to perform a series of rendering calculations. Therefore, when the target interface contains more user interface elements, the total rendering time required for multiple user interface elements is longer, which leads to an increase in the rendering time required to generate each frame of the target interface, thereby reducing the frame rate of the target interface and reducing the picture smoothness of the target interface.

[0055] In order to solve the above problem, the terminal can group the multiple user interface elements contained in the target interface, that is, divide the multiple user interface elements into the first category of interface elements and the second category of interface elements. Among them, the first category of interface elements are user interface elements whose display positions change in real time, and the second category of interface elements are multiple groups of user interface elements that are not rendered at the same time and whose display positions are fixed. For the first category of interface elements, the terminal can render the first category of interface elements in real time, that is, when generating each frame of the target interface, it is necessary to perform rendering calculations to obtain rendering data corresponding to the first category of interface elements. For the second category of interface elements, when generating each frame of the target interface, the terminal can perform rendering calculations on at least one group of user interface elements in the multiple groups of user interface elements that are not rendered at the same time included in the second category of interface elements, so as to obtain rendering data corresponding to at least one group of user interface elements. Accordingly, before rendering the target interface, the terminal can determine at least one user interface element to be rendered in the current frame from the multiple user interface elements, that is, the terminal can determine the first category of interface elements and part of the second category of interface elements from the multiple user interface elements as at least one user interface element to be rendered in the current frame.

[0056] 202. Based on at least one user interface element, obtain target rendering data from rendering data of the target interface in a previous frame, where the target rendering data is rendering data corresponding to user interface elements other than at least one user interface element among the multiple user interface elements.

[0057] In the embodiment of the present application, since at least one user interface element is a user interface element to be rendered in the current frame among the multiple user interface elements included in the target interface, that is, the terminal only needs to perform rendering calculations on the at least one user interface element in the current frame to obtain rendering data corresponding to the at least one user element. Therefore, the terminal can directly obtain rendering data corresponding to other user interface elements except the at least one user interface element from the rendering data of the target interface in the previous frame, that is, the target rendering data.

[0058] 203. Render a target interface based on the target rendering data and rendering data corresponding to at least one user interface element.

[0059] In an embodiment of the present application, the terminal can obtain rendering data corresponding to multiple user interface elements included in the target interface based on the target rendering data and the rendering data corresponding to at least one user interface element, and then can generate rendering instructions by processing the rendering data corresponding to the multiple user interface elements, so that the terminal renders the multiple user interface elements included in the target interface according to the rendering method indicated by the rendering instructions.

[0060] The present application discloses an interface rendering method, which divides a target interface including multiple user interface elements into a first category of interface elements whose display positions change in real time and a second category of interface elements whose display positions are fixed and include multiple groups of user interface elements that are not rendered at the same time. The method can select at least one user interface element from the multiple user interface elements as the user interface element to be rendered in the current frame according to the category of the user interface element, that is, can specifically reduce the refresh frequency of the user interface elements, thereby achieving frame-by-frame rendering of the multiple user interface elements while meeting the minimum requirements for the refresh frequency of different categories of user interface elements, thereby reducing the total rendering time occupied by the user interface elements and improving the frame rate of the target interface.

[0061] Figure 3 is a flowchart of another interface rendering method provided according to an embodiment of the present application, see Figure 3 In the present application embodiment, the method is described by taking the execution by the terminal as an example. The interface rendering method comprises the following steps:

[0062] 301. For any user interface element among the multiple user interface elements included in the target interface, when the user interface element is a first-category interface element, determine that the user interface element is a user interface element to be rendered, and the multiple user interface elements include first-category interface elements and second-category interface elements. The first-category interface elements are user interface elements whose display positions change in real time, and the second-category interface elements are multiple groups of user interface elements that are not rendered at the same time and whose display positions are fixed.

[0063] In an embodiment of the present application, the target interface may be an application interface displayed by any application in the terminal, and the target interface displays a plurality of user interface elements. Taking the target interface as a game interface as an example, the plurality of user interface elements contained in the target interface may be a status bar, a shortcut bar, a map component, etc. During the operation of the application, the terminal refreshes the target interface displayed in the application at a certain frame rate, and each time the target interface is refreshed, the terminal needs to render the target interface to generate a new frame of the target interface. In the process of rendering the target interface, the terminal needs to obtain the rendering data required for rendering the target interface, and then process the rendering data to generate a rendering instruction so that the terminal renders the target interface according to the rendering method indicated by the rendering instruction. Among them, when the terminal obtains the rendering data corresponding to the plurality of user interface elements in the target interface, it needs to perform a series of rendering calculations. Therefore, when the target interface contains a large number of user interface elements, the total rendering time required for the plurality of user interface elements is longer, which leads to an increase in the rendering time required to generate each frame of the target interface, thereby reducing the frame rate of the target interface and reducing the picture smoothness of the target interface.

[0064] In order to solve the above problems, the terminal can group the multiple user interface elements contained in the target interface, that is, divide the multiple user interface elements into the first category of interface elements and the second category of interface elements. Among them, the first category of interface elements are user interface elements whose display positions change in real time, and the second category of interface elements are multiple groups of user interface elements that are not rendered at the same time and whose display positions are fixed. Taking the target interface as a game interface as an example, the first category of interface elements can be user interface elements whose display positions move with the movement of virtual objects in the game, or can be user interface elements whose display positions move with the change of the game perspective, and the embodiments of the present application are not limited to this. The second category of interface elements can be user interface elements for displaying object information of virtual objects controlled by players, and user interface elements for viewing virtual scenes in games, and the embodiments of the present application are not limited to this. Optionally, the first category of interface elements can also be user interface elements whose display positions change periodically.

[0065] For any user interface element among the multiple user interface elements included in the target interface, if the user interface element is a first-category user interface element, it indicates that the user interface element is a user interface element whose display position changes in real time, that is, the user interface element has a high requirement for refresh frequency. Therefore, the terminal needs to render the user interface element in real time, that is, the terminal can determine the user interface element as the user interface element to be rendered in the current frame.

[0066] In some embodiments, the terminal can divide the target interface to obtain multiple independent interface areas; then, for any interface area, the terminal can determine the user interface elements in the interface area except the first type of interface elements as a group of user interface elements in the second type of interface elements. Before dividing the target interface, the terminal can determine the display position of the second type of interface elements among the multiple user interface elements in the target interface, and then divide the target interface based on the area where the second type of user elements adjacent to the display position are located to obtain multiple interface areas. By dividing the second type of interface elements into multiple groups of user interface elements according to multiple independent interface areas, it is possible to ensure that the user interface elements in the same interface area are rendered at the same time when the multiple groups of user interface elements are rendered in frames, thereby avoiding the problem of screen flickering caused by different refresh frequencies of user interface elements in the same interface area.

[0067] For example, Figure 4 is a schematic diagram of a target interface provided according to an embodiment of the present application. Figure 4As shown, the terminal divides the target interface into area 1, area 2 and area 3. Among them, the user interface elements in the circle in the target interface are the first type of interface elements, and the user interface elements in the box are the second type of interface elements. The terminal can divide the second type of interface elements into three groups according to area 1, area 2 and area 3. The number of a group of user interface elements corresponding to area 1 is 1, the number of a group of user interface elements corresponding to area 2 is 2, and the number of a group of user interface elements corresponding to area 3 is 1.

[0068] 302. For any user interface element among the multiple user interface elements included in the target interface, if the user interface element is a second-category interface element, determine whether the user interface element is a user interface element to be rendered based on the frame identifier of the target interface and the display position of the user interface element.

[0069] In an embodiment of the present application, when the user interface element is a second-category interface element, it indicates that the user interface element is a user interface element with a fixed display position, that is, the user interface element has a low requirement for refresh frequency. Therefore, the terminal does not need to render the user interface element in real time, that is, it is not necessary to render the user interface element when generating each frame of the target interface. Accordingly, the terminal can determine whether the user interface element is a user interface element in the interface area corresponding to the frame identifier based on the frame identifier of the target interface and the display position of the user interface element, that is, determine whether the user interface element is a user interface element to be rendered in the current frame. Among them, when the user interface element is a user interface element in the interface area corresponding to the frame identifier, the terminal can determine that the user interface element is a user interface element to be rendered in the current frame. Conversely, when the user interface element is not a user interface element in the interface area corresponding to the frame identifier, the terminal can determine that the user interface element is not a user interface element to be rendered in the current frame. By executing the above steps 301-302, the terminal can select the first category of interface elements and some of the second category of interface elements from multiple user interface elements as user interface elements to be rendered in the current frame according to the category of the user interface elements, thereby achieving frame-by-frame rendering of multiple user interface elements while meeting the minimum requirements of different categories of user interface elements for refresh frequency, reducing the total rendering time occupied by the user interface elements and improving the frame rate of the target interface.

[0070] In some embodiments, the target interface includes multiple independent interface areas, and the multiple interface areas correspond one-to-one to multiple groups of user interface elements in the second type of interface elements that are not rendered at the same time, that is, each interface area includes a group of user interface elements corresponding to the interface area. Accordingly, the process of the terminal determining whether the user interface element is a user interface element to be rendered based on the frame identifier of the target interface and the display position of the user interface element includes: the terminal determines the target interface area from multiple interface areas based on the frame identifier of the target interface, and the target interface area is the interface area corresponding to the frame identifier, that is, the interface area where the second type of interface element to be rendered in the current frame is located. Therefore, when the display position of the user interface element is located in the target interface area, it indicates that the user interface element is a user interface element included in the target interface area, that is, the user interface element is a second type of interface element to be rendered in the current frame, so the terminal can determine that the user interface element is a user interface element to be rendered. On the contrary, when the display position of the user interface element is not located in the target interface area, it indicates that the user interface element is not a user interface element included in the target interface area, that is, the user interface element is not a second type of interface element to be rendered in the current frame, so the terminal can determine that the user interface element is not a user interface element to be rendered. By determining whether a user interface element is a user interface element to be rendered in the current frame based on whether the user interface element is located in the interface area corresponding to the frame identifier when the user interface element is a second-category interface element with a fixed display position, the second-category interface elements located in the interface area corresponding to the frame identifier among multiple user interface elements can be determined as part of the second-category interface elements to be rendered in the current frame, thereby achieving frame-by-frame rendering of the second-category interface elements, reducing the total rendering time occupied by the second-category interface elements, and improving the frame rate of the target interface.

[0071] In some embodiments, the terminal can determine the target interface area from multiple interface areas through the following schemes 1 and 2 respectively. Wherein, when the rendering order of multiple interface areas is fixed, the terminal executes the following scheme 1 to determine the target interface area; when the rendering order of multiple interface areas is not fixed, the terminal executes the following scheme 2 to determine the target interface area.

[0072] Solution 1: The terminal sorts multiple interface areas to obtain a rendering order of the multiple interface areas; then, the terminal determines the frame identifier corresponding to each interface area based on the rendering order of the multiple interface areas; finally, the terminal determines the interface area corresponding to the frame identifier in the multiple interface areas as the target interface area based on the frame identifier. Among them, the terminal can sort the multiple interface areas according to any sorting method to obtain the rendering order of the multiple interface areas, such as sorting from top to bottom or from left to right according to the arrangement position of the multiple interface areas; or sorting from large to small according to the area area of ​​the multiple interface areas; or sorting from many to few according to the number of user interface elements contained in the multiple interface areas. The embodiment of the present application does not limit the sorting method of the multiple interface areas. Since the rendering order of the multiple interface areas is used to reflect the rendering order of the user interface elements (second-class interface elements) contained in the multiple interface areas, the earlier the rendering order of the interface area, the second-class interface elements contained in the interface area can be rendered in advance compared with the second-class interface elements contained in other interface areas. That is, when the terminal refreshes the target interface by frame, the frame identifier corresponding to the interface area is closer. Therefore, the terminal can determine the frame identifier corresponding to each interface area in sequence based on the rendering order of the multiple interface areas, and thus can determine the interface area corresponding to the current frame identifier of the target interface from the multiple interface areas as the target interface area based on the frame identifiers corresponding to the multiple interface areas. By sorting the multiple interface areas to determine the frame identifier corresponding to each interface area, the terminal can determine, based on the current frame identifier of the target interface, the second-category interface element in the interface area corresponding to the frame identifier as the second-category interface element to be rendered in the current frame, thereby enabling orderly frame rendering of the second-category interface elements, reducing the total rendering time occupied by the second-category interface elements, and improving the frame rate of the target interface.

[0073] For example, Figure 5 is a schematic diagram of an interface rendering process provided according to an embodiment of the present application. Figure 5 As shown in (a), the number of multiple interface areas included in the target interface is 3, and the rendering order of these 3 interface areas is: area 1, area 2, area 3. Then the frame identifiers corresponding to area 1 are 1, 4, and 7, that is, when the frame identifiers of the target interface are 1, 4, and 7, the terminal can determine the second-category interface elements contained in area 1 of the target interface as the user interface elements to be rendered. The frame identifiers corresponding to area 2 are 2, 5, and 8, that is, when the frame identifiers of the target interface are 2, 5, and 8, the terminal can determine the second-category interface elements contained in area 2 of the target interface as the user interface elements to be rendered. The frame identifiers corresponding to area 3 are 3, 6, and 9, that is, when the frame identifiers of the target interface are 3, 6, and 9, the terminal can determine the second-category interface elements contained in area 3 of the target interface as the user interface elements to be rendered.

[0074] In some embodiments, the terminal can determine the rendering order of the interface area according to the historical trigger frequency of the user interface elements contained in the interface area. Accordingly, the terminal determines the rendering priority of each user interface element based on the historical trigger frequency of each user interface element in the second category of interface elements, and the rendering priority is positively correlated with the historical trigger frequency; then, the terminal sorts the multiple interface areas based on the rendering priority and display position of each user interface element to obtain the rendering order of the multiple interface areas. Among them, the historical trigger frequency is used to indicate the frequency of use of the user interface element in the past period of time. The higher the historical trigger frequency, the more frequently the user has used the user interface element in the past period of time, and the lower the historical trigger frequency, the less frequently the user has used the user interface element in the past period of time. Therefore, in order not to affect the smoothness of the picture when the user triggers the user interface element, the terminal can determine the rendering priority of each user interface element based on the historical trigger frequency of each user interface element in the second category of interface elements, that is, the terminal can give priority to rendering the user interface elements with higher historical trigger frequencies. Since each interface area includes at least one user interface element in the second category of interface elements, the terminal can determine the rendering priority corresponding to each interface area based on the rendering priority and display position of each user interface element in the second category of interface elements, and then sort the multiple interface areas to obtain the rendering order of the multiple interface areas. By determining the rendering order of multiple interface areas based on the historical trigger frequency of the second-category interface elements contained in the multiple interface areas, the terminal can give priority to rendering the second-category interface elements with higher usage frequencies, thereby reducing the refresh frequency of the second-category interface elements while avoiding affecting the smoothness of the picture when the user triggers the second-category interface elements with higher usage frequencies, thereby improving the user experience.

[0075] In some embodiments, the terminal can sort multiple interface areas according to the highest rendering priority or average rendering priority of the user interface elements contained in each interface area. Accordingly, for any interface area, the terminal determines at least one user interface element included in the interface area based on the display position of each user interface element; then, the terminal determines the target rendering priority based on the rendering priority of at least one user interface element, and the target rendering priority is the highest rendering priority of at least one user interface element, or the average rendering priority of at least one user interface element; finally, the terminal sorts the multiple interface areas from high to low based on the target rendering priorities corresponding to the multiple interface areas to obtain the rendering order of the multiple interface areas. Among them, since the number and rendering priority of the second-class interface elements included in the multiple interface areas are different, in order to reasonably sort the multiple interface areas, the terminal can determine at least one user interface element included in each interface area based on the display position of each user interface element in the second-class interface element. Since the rendering priority of at least one user interface element is high or low, the terminal can determine the highest rendering priority or average rendering priority of at least one user interface element as the rendering priority corresponding to the interface area, that is, the target rendering priority. By determining the rendering priority corresponding to each interface area based on the highest rendering priority or average rendering priority of at least one user interface element contained in each interface area, the terminal can give priority to rendering the user interface elements in the interface area with a higher rendering priority, that is, the terminal gives priority to rendering the second category of interface elements with a higher usage frequency, thereby reducing the refresh frequency of the second category of interface elements while avoiding affecting the smoothness of the picture when the user triggers the second category of interface elements with a higher usage frequency, thereby improving the user experience.

[0076] Solution 2: When the frame identifier is 0, the terminal puts the region identifiers of multiple interface areas into the interface region pool; when the frame identifier is not 0 and the interface region pool is not empty, the terminal can randomly extract at least one interface region corresponding to the region identifier from the interface region pool as the target interface region; when the frame identifier is not 0 and the interface region pool is empty, the terminal can put the region identifiers of multiple interface areas back into the interface region pool, and randomly extract at least one interface region corresponding to the region identifier from the interface region pool as the target interface region. The interface region pool is used to store the region identifiers of multiple interface regions, and after the terminal reads the region identifier of any interface region from the interface region pool, the interface region pool deletes the region identifier of the interface region. When the frame identifier is 0, it indicates that the terminal has not started to render the target interface, that is, the frame identifier does not correspond to an interface region at this time. In order to facilitate the terminal to determine the interface region corresponding to the frame identifier from multiple interface regions when the frame identifier is not 0, the terminal can put the region identifiers of multiple interface regions into the interface region pool. When the frame identifier is not 0 and the interface area pool is not empty, it indicates that the terminal can continue to read the area identifier from the interface area pool, so the terminal can randomly extract at least one area identifier from the interface area pool, and then determine the interface area corresponding to the at least one area identifier as the interface area corresponding to the frame identifier, that is, the target interface area. When the frame identifier is not 0 and the interface area pool is empty, it indicates that the terminal cannot continue to read the area identifier from the interface area pool, so the terminal needs to put the area identifiers of multiple interface areas into the interface area pool again, and then randomly extract at least one area identifier from the interface area. By using the interface area corresponding to at least one area identifier randomly extracted from the interface area pool as the interface area corresponding to the frame identifier, the terminal can determine the second-category interface element in the randomly determined interface area as the second-category interface element to be rendered in the current frame, thereby realizing the frame rendering of the second-category interface element while avoiding the terminal from frequently rendering the second-category interface element in a certain interface area, reducing the total rendering time occupied by the second-category interface element, and improving the frame rate of the target interface.

[0077] For example, the number of multiple interface areas included in the target interface is 3, and the area identifiers of these three interface areas are area 1, area 2 and area 3 respectively. When the frame identifier is 1, the area identifiers included in the interface area pool are area 1, area 2 and area 3, and the terminal can randomly extract 1 area identifier, such as extracting the interface area corresponding to area 2 as the interface area corresponding to frame identifier 1. When the frame identifier is 2, the area identifiers included in the interface area pool are area 1 and area 3. At this time, the terminal can randomly extract 1 area identifier, such as extracting the interface area corresponding to area 1 as the interface area corresponding to frame identifier 2. When the frame identifier is 3, the area identifier included in the interface area pool is area 3. At this time, the terminal can only extract area 3, that is, determine that the interface area corresponding to area 3 is the interface area corresponding to frame identifier 3. When the frame identifier is 4, the interface area pool is empty. At this time, the terminal needs to put area 1, area 2 and area 3 back into the interface area pool for random extraction by the terminal.

[0078] 303. Based on at least one user interface element to be rendered determined from multiple user interface elements, obtain target rendering data from the rendering data of the target interface in the previous frame, where the target rendering data is rendering data corresponding to the user interface elements other than at least one user interface element among the multiple user interface elements.

[0079] In the embodiment of the present application, since at least one user interface element is a user interface element to be rendered in the current frame among the multiple user interface elements contained in the target interface, that is, the terminal only needs to perform rendering calculations on the at least one user interface element in the current frame to obtain rendering data corresponding to the at least one user element. Therefore, the terminal can directly obtain rendering data corresponding to other user interface elements except at least one user interface element from the rendering data of the target interface in the previous frame, that is, the terminal can directly reuse part of the rendering data in the previous frame without performing rendering calculations on other user interface elements except at least one user interface element in the current frame to obtain corresponding rendering data, thereby further reducing the total rendering time of multiple user interface elements.

[0080] 304. Render the target interface based on the target rendering data and the rendering data corresponding to at least one user interface element.

[0081] In an embodiment of the present application, the terminal can obtain rendering data corresponding to multiple user interface elements included in the target interface based on the target rendering data and the rendering data corresponding to at least one user interface element, and then can generate rendering instructions by processing the rendering data corresponding to the multiple user interface elements, so that the terminal renders the multiple user interface elements included in the target interface according to the rendering method indicated by the rendering instructions.

[0082] In order to highlight the reduction in the rendering time of user interface elements by the interface rendering method proposed in this application, the embodiment of this application also provides a schematic diagram of the interface rendering process. Figure 5 As shown in (b), the black area in a rendering frame duration represents the rendering time occupied by the first type of interface elements in the target interface, and the three gray areas of different shades represent the rendering time occupied by the second type of interface elements contained in each of the three interface areas in the target interface. Before the multiple user interface elements are rendered in frames, the frame rate of the target screen is 60 frames per second, that is, the rendering time required to generate each frame of the target screen is 16.6ms (milliseconds). The total rendering time occupied by the second type of interface elements in the three gray areas in a rendering frame duration before framing is 3ms per frame, and each gray area requires 1ms on average. After framing, the terminal can only render the first type of interface elements and the second type of interface elements contained in the interface area represented by any gray area per frame, that is, the second type of interface elements in the three interface areas represented by the three gray areas are rendered once every three frames on average, and the other gray areas that have not been rendered can directly reuse the rendering data of the previous frame. At this time, the rendering time required to generate each frame of the target screen is reduced to 14.6ms, and the frame rate of the target interface increases to 68 frames per second.

[0083] In some embodiments, since the rendering data corresponding to at least one user interface element to be rendered includes the rendering data corresponding to the first type of interface element in the target interface and the rendering data corresponding to some of the second type of interface elements, and the target rendering data includes the rendering data corresponding to other second type of interface elements in the target interface. Therefore, before rendering the target interface based on the rendering data, the terminal can first splice the rendering data corresponding to some of the second type of interface elements in the rendering data corresponding to at least one user interface element and the target rendering data to obtain the rendering data corresponding to the second type of interface element in the target interface in the current frame. Then, since the first type of interface element is a user interface element whose display position changes in real time, the first type of interface element may move to the display position of the second type of interface element, that is, the display area of ​​the first type of interface element and the display area of ​​the second type of interface element may overlap. At this time, the terminal needs to use the GPU to mix the rendering data corresponding to the first type of interface element in the current frame and the rendering data corresponding to the second type of interface element in the current frame to obtain the rendering data corresponding to multiple user interface elements in the target interface. Optionally, the terminal can mix the rendering data corresponding to the first type of interface element in the current frame and the rendering data corresponding to the second type of interface element in the current frame by the following formula 1.

[0084] Formula 1:

[0085] T=src color*src alpha+dest color*(1-src alpha)

[0086] Among them, color represents the color of the user interface element, and alpha represents the transparency of the user interface element. srccolor represents the color of the second type of user interface element, src alpha represents the transparency of the second type of user interface element, dest color represents the color of the first type of user interface element, and T represents the mixed rendering data. By using the above formula to mix the rendering data corresponding to the first type of interface element in the current frame and the rendering data corresponding to the second type of interface element in the current frame, it can be ensured that when the first type of interface element overlaps with the second type of interface element, the rendering result obtained based on the rendering data corresponding to the second type of interface element in the current frame covers the rendering result obtained based on the rendering data corresponding to the first type of interface element in the current frame.

[0087] The present application discloses an interface rendering method, which divides a target interface including multiple user interface elements into a first category of interface elements whose display positions change in real time and a second category of interface elements whose display positions are fixed and include multiple groups of user interface elements that are not rendered at the same time. The method can select at least one user interface element from the multiple user interface elements as the user interface element to be rendered in the current frame according to the category of the user interface element, that is, can specifically reduce the refresh frequency of the user interface elements, thereby achieving frame-by-frame rendering of the multiple user interface elements while meeting the minimum requirements for the refresh frequency of different categories of user interface elements, thereby reducing the total rendering time occupied by the user interface elements and improving the frame rate of the target interface.

[0088] Figure 6 is a block diagram of an interface rendering device provided according to an embodiment of the present application. The device is used to execute the steps of the above interface rendering method. Figure 6 The interface rendering device includes: a first determining module 601, an acquiring module 602 and a rendering module 603.

[0089] A first determination module 601 is used to determine at least one user interface element to be rendered from a plurality of user interface elements included in a target interface, wherein the plurality of user interface elements include a first category of user interface elements and a second category of user interface elements, wherein the first category of user interface elements are user interface elements whose display positions change in real time, and the second category of user interface elements are multiple groups of user interface elements that are not rendered simultaneously and whose display positions are fixed;

[0090] An acquisition module 602 is used to acquire target rendering data from the rendering data of the target interface in the previous frame based on at least one user interface element, where the target rendering data is rendering data corresponding to the user interface elements other than at least one user interface element among the multiple user interface elements;

[0091] The rendering module 603 is used to render the target interface based on the target rendering data and the rendering data corresponding to at least one user interface element.

[0092] In some embodiments, Figure 7 is a block diagram of another interface rendering device provided according to an embodiment of the present application. Figure 7 As shown, the first determination module 601 includes:

[0093] A first determining unit 701 is configured to determine, for any user interface element, if the user interface element is a first-category interface element, that the user interface element is a user interface element to be rendered;

[0094] The second determination unit 702 is used to determine whether the user interface element is a user interface element to be rendered based on the frame identifier of the target interface and the display position of the user interface element when the user interface element is a second type of user interface element.

[0095] In some embodiments, the target interface includes a plurality of interface regions that are independent of each other;

[0096] The second determination unit 702 is used to determine the target interface area from multiple interface areas based on the frame identifier of the target interface, and the target interface area is the interface area corresponding to the frame identifier; when the display position of the user interface element is located in the target interface area, the user interface element is determined to be the user interface element to be rendered.

[0097] In some embodiments, see Figure 7 , the first determination module further includes:

[0098] A sorting unit 703, used to sort the multiple interface areas to obtain a rendering order of the multiple interface areas;

[0099] A third determining subunit 704 is used to determine a frame identifier corresponding to each interface area based on a rendering order of the multiple interface areas;

[0100] The second determining unit 702 is configured to determine, based on the frame identifier, an interface region corresponding to the frame identifier among the multiple interface regions as a target interface region.

[0101] In some embodiments, the second determination unit 702 is used to place the region identifiers of multiple interface areas into an interface area pool when the frame identifier is 0; randomly extract at least one interface area corresponding to a region identifier from the interface area pool as a target interface area when the frame identifier is not 0 and the interface area pool is not empty; and put the region identifiers of multiple interface areas back into the interface area pool, and randomly extract at least one interface area corresponding to a region identifier from the interface area pool as a target interface area when the frame identifier is not 0 and the interface area pool is empty.

[0102] In some embodiments, the sorting unit 703 is used to determine the rendering priority of each user interface element based on the historical triggering frequency of each user interface element in the second category of interface elements, and the rendering priority is positively correlated with the historical triggering frequency; based on the rendering priority and display position of each user interface element, multiple interface areas are sorted to obtain the rendering order of the multiple interface areas.

[0103] In some embodiments, the sorting unit 703 is used to determine, for any interface area, at least one user interface element included in the interface area based on the display position of each user interface element; determine a target rendering priority based on the rendering priority of at least one user interface element, the target rendering priority being the highest rendering priority of at least one user interface element, or being the average rendering priority of at least one user interface element; and sort the multiple interface areas from high to low based on the target rendering priorities corresponding to the multiple interface areas to obtain a rendering order for the multiple interface areas.

[0104] In some embodiments, see Figure 7 , the device further comprises:

[0105] A division module 604 is used to divide the target interface into multiple independent interface regions;

[0106] The second determining module 605 is used to determine, for any interface area, the user interface elements in the interface area except the first category of interface elements as a group of user interface elements in the second category of interface elements.

[0107] An embodiment of the present application provides an interface rendering device, which can select at least one user interface element from the multiple user interface elements as the user interface element to be rendered in the current frame according to the category of the user interface element by dividing the target interface including multiple user interface elements into a first category of interface elements whose display position changes in real time and a second category of interface elements whose display position is fixed and does not change and which includes multiple groups of user interface elements that are not rendered at the same time. That is, it can reduce the refresh frequency of the user interface elements in a targeted manner, thereby achieving frame-by-frame rendering of multiple user interface elements while meeting the minimum requirements for refresh frequency of user interface elements of different categories, thereby reducing the total rendering time occupied by the user interface elements and improving the frame rate of the target interface.

[0108] It should be noted that the interface rendering device provided in the above embodiment only uses the division of the above functional modules as an example when transmitting data. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the interface rendering device provided in the above embodiment and the interface rendering method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0109] Figure 8 800 is a schematic diagram of a terminal structure provided according to an embodiment of the present application. The terminal 800 may be a portable mobile terminal, such as a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer or a desktop computer. The terminal 800 may also be referred to as a user device, a portable terminal, a laptop terminal, a desktop terminal or other names.

[0110] Typically, the terminal 800 includes a processor 801 and a memory 802 .

[0111] The processor 801 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 801 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 801 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 801 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 801 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0112] The memory 802 may include one or more computer-readable storage media, which may be non-transitory. The memory 802 may also include a high-speed random access memory and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 802 is used to store at least one computer program, which is executed by the processor 801 to implement the interface rendering method provided in the method embodiment of the present application.

[0113] In some embodiments, the terminal 800 may further optionally include: a peripheral device interface 803 and at least one peripheral device. The processor 801, the memory 802 and the peripheral device interface 803 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 803 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 804, a display screen 805, a camera assembly 806, an audio circuit 807 and a power supply 808.

[0114] The peripheral device interface 803 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 801 and the memory 802. In some embodiments, the processor 801, the memory 802, and the peripheral device interface 803 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 801, the memory 802, and the peripheral device interface 803 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.

[0115] The radio frequency circuit 804 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 804 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 804 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. In some embodiments, the radio frequency circuit 804 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 804 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 804 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.

[0116] The display screen 805 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 805 is a touch display screen, the display screen 805 also has the ability to collect touch signals on the surface or above the surface of the display screen 805. The touch signal can be input to the processor 801 as a control signal for processing. At this time, the display screen 805 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 805 can be one, set on the front panel of the terminal 800; in other embodiments, the display screen 805 can be at least two, respectively set on different surfaces of the terminal 800 or in a folding design; in other embodiments, the display screen 805 can be a flexible display screen, set on the curved surface or folding surface of the terminal 800. Even, the display screen 805 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 805 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, organic light-emitting diode).

[0117] The camera assembly 806 is used to capture images or videos. In some embodiments, the camera assembly 806 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal, and the rear camera is disposed on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize the panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 806 may also include a flash. The flash may be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.

[0118] The audio circuit 807 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 801 for processing, or input them into the radio frequency circuit 804 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal 800. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 801 or the radio frequency circuit 804 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 807 may also include a headphone jack.

[0119] The power supply 808 is used to power various components in the terminal 800. The power supply 808 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 808 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0120] In some embodiments, the terminal 800 further includes one or more sensors 809 , including but not limited to: an acceleration sensor 810 , a gyroscope sensor 811 , a pressure sensor 812 , an optical sensor 813 , and a proximity sensor 814 .

[0121] The acceleration sensor 810 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the terminal 800. For example, the acceleration sensor 810 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 801 can control the display screen 805 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 810. The acceleration sensor 810 can also be used to collect game or user motion data.

[0122] The gyro sensor 811 can detect the body direction and rotation angle of the terminal 800, and the gyro sensor 811 can cooperate with the acceleration sensor 810 to collect the user's 3D actions on the terminal 800. The processor 801 can implement the following functions based on the data collected by the gyro sensor 811: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.

[0123] The pressure sensor 812 can be set on the side frame of the terminal 800 and / or the lower layer of the display screen 805. When the pressure sensor 812 is set on the side frame of the terminal 800, it can detect the user's holding signal of the terminal 800, and the processor 801 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 812. When the pressure sensor 812 is set on the lower layer of the display screen 805, the processor 801 controls the operability controls on the UI interface according to the user's pressure operation on the display screen 805. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.

[0124] The optical sensor 813 is used to collect the ambient light intensity. In one embodiment, the processor 801 can control the display brightness of the display screen 805 according to the ambient light intensity collected by the optical sensor 813. Specifically, when the ambient light intensity is high, the display brightness of the display screen 805 is increased; when the ambient light intensity is low, the display brightness of the display screen 805 is reduced. In another embodiment, the processor 801 can also dynamically adjust the shooting parameters of the camera component 806 according to the ambient light intensity collected by the optical sensor 813.

[0125] The proximity sensor 814, also called a distance sensor, is usually disposed on the front panel of the terminal 800. The proximity sensor 814 is used to collect the distance between the user and the front of the terminal 800. In one embodiment, when the proximity sensor 814 detects that the distance between the user and the front of the terminal 800 is gradually decreasing, the processor 801 controls the display screen 805 to switch from the screen-on state to the screen-off state; when the proximity sensor 814 detects that the distance between the user and the front of the terminal 800 is gradually increasing, the processor 801 controls the display screen 805 to switch from the screen-off state to the screen-on state.

[0126] Those skilled in the art will understand that Figure 8 The structure shown in the figure does not constitute a limitation on the terminal 800, and the terminal 800 may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.

[0127] Fig. 9It is a structural diagram of a server provided according to an embodiment of the present application. The server 900 may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 901 and one or more memories 902, wherein the memory 902 stores at least one computer program, and the at least one computer program is loaded and executed by the processor 901 to implement the interface rendering method provided by the above-mentioned various method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The server may also include other components for implementing device functions, which will not be repeated here.

[0128] The embodiment of the present application also provides a computer-readable storage medium, in which at least one computer program is stored, and the at least one computer program is loaded and executed by a processor of a computer device to implement the operation performed by the computer device in the interface rendering method of the above embodiment. For example, the computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device.

[0129] The embodiment of the present application also provides a computer program product, including a computer program, which is stored in a computer-readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the interface rendering method provided in the above various optional implementations.

[0130] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0131] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. An interface rendering method, characterized in that: The method comprises: Determining at least one user interface element to be rendered from a plurality of user interface elements included in a target interface, wherein the plurality of user interface elements include a first category of interface elements and a second category of interface elements, wherein the first category of interface elements are user interface elements whose display positions change in real time, and the second category of interface elements are a plurality of groups of user interface elements that are not rendered simultaneously and whose display positions are fixed; Based on the at least one user interface element, acquiring target rendering data from the rendering data of the target interface in a previous frame, the target rendering data being rendering data corresponding to user interface elements among the multiple user interface elements except for the at least one user interface element; The target interface is rendered based on the target rendering data and the rendering data corresponding to the at least one user interface element.

2. The method according to claim 1, characterized in that: The step of determining at least one user interface element to be rendered from a plurality of user interface elements included in the target interface includes: For any user interface element, if the user interface element is the first type of interface element, determining the user interface element as a user interface element to be rendered; In the case that the user interface element is the second-category interface element, it is determined whether the user interface element is a user interface element to be rendered based on the frame identifier of the target interface and the display position of the user interface element.

3. The method according to claim 2, characterized in that The target interface includes a plurality of interface regions that are independent of each other; The determining, based on the frame identifier of the target interface and the display position of the user interface element, whether the user interface element is a user interface element to be rendered includes: Based on the frame identifier of the target interface, determining a target interface area from the multiple interface areas, the target interface area being the interface area corresponding to the frame identifier; When the display position of the user interface element is located within the target interface area, the user interface element is determined to be a user interface element to be rendered.

4. The method according to claim 3, characterized in that: The method further comprises: Sorting the multiple interface areas to obtain a rendering order of the multiple interface areas; Determining a frame identifier corresponding to each interface area based on a rendering order of the multiple interface areas; The step of determining the target interface area from the multiple interface areas based on the frame identifier of the target interface includes: Based on the frame identifier, an interface area corresponding to the frame identifier among the multiple interface areas is determined as the target interface area.

5. The method according to claim 3, characterized in that: The step of determining the target interface area from the multiple interface areas based on the frame identifier of the target interface includes: When the frame identifier is 0, the region identifiers of the multiple interface regions are placed into an interface region pool; When the frame identifier is not 0 and the interface area pool is not empty, randomly extracting an interface area corresponding to at least one area identifier from the interface area pool as the target interface area; When the frame identifier is not 0 and the interface area pool is empty, the area identifiers of the multiple interface areas are put back into the interface area pool, and an interface area corresponding to at least one area identifier is randomly selected from the interface area pool as the target interface area.

6. The method according to claim 4, characterized in that The step of sorting the multiple interface areas to obtain a rendering order of the multiple interface areas includes: Determining a rendering priority of each user interface element based on a historical trigger frequency of each user interface element in the second category of interface elements, wherein the rendering priority is positively correlated with the historical trigger frequency; Based on the rendering priority and display position of each user interface element, the multiple interface areas are sorted to obtain a rendering order of the multiple interface areas.

7. The method according to claim 6, characterized in that The step of sorting the multiple interface areas based on the rendering priority and display position of each user interface element to obtain a rendering order of the multiple interface areas includes: For any interface area, determining at least one user interface element included in the interface area based on the display position of each user interface element; Determine a target rendering priority based on the rendering priority of the at least one user interface element, wherein the target rendering priority is a highest rendering priority of the at least one user interface element, or an average rendering priority of the at least one user interface element; Based on the target rendering priorities corresponding to the multiple interface areas, the multiple interface areas are sorted from high to low to obtain a rendering order of the multiple interface areas.

8. An interface rendering device, characterized in that: The device comprises: A first determination module, used to determine at least one user interface element to be rendered from a plurality of user interface elements included in a target interface, wherein the plurality of user interface elements include a first category of interface elements and a second category of interface elements, wherein the first category of interface elements are user interface elements whose display positions change in real time, and the second category of interface elements are multiple groups of user interface elements that are not rendered simultaneously and whose display positions are fixed; an acquisition module, configured to acquire target rendering data from rendering data of the target interface in a previous frame based on the at least one user interface element, wherein the target rendering data is rendering data corresponding to user interface elements among the multiple user interface elements except the at least one user interface element; A rendering module is used to render the target interface based on the target rendering data and the rendering data corresponding to the at least one user interface element.

9. A computer device, characterized in that: The computer device includes a processor and a memory, the memory is used to store at least one computer program, and the at least one computer program is loaded by the processor and executes the interface rendering method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store at least one computer program, and the at least one computer program is used to execute the interface rendering method described in any one of claims 1 to 7.

Citation Information

Cited By

  • Picture rendering method, vehicle, device and program product

    CN119621214A

  • Rendering method and electronic device

    WO2026061197A1