Screen picture refreshing method and electronic equipment

By caching list items of list-type views off-screen in electronic devices, the problem of resource waste caused by frequent view rendering in list layout user interfaces is solved, improving rendering efficiency and user interaction smoothness.

CN121722285APending Publication Date: 2026-03-24HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

In list-based user interfaces, frequent user interactions cause a large number of views to be re-rendered, resulting in wasted processor resources and impacting rendering efficiency.

Method used

By introducing an off-screen caching mechanism in electronic devices, list items of list-type views are cached to avoid repeatedly rendering the same or the same view, and only the changing view is rendered.

Benefits of technology

It improves screen rendering efficiency, avoids lag, and ensures smooth user interface interaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121722285A_ABST
    Figure CN121722285A_ABST
Patent Text Reader

Abstract

The invention provides a screen picture refreshing method and electronic equipment. When an application program is not configured with off-screen cache related settings, electronic equipment with display capability, such as a mobile phone, a tablet personal computer and the like, can identify a user interface of the application program and determine a list type view in the user interface and one or more list items of the list type view. When a frame of screen picture is rendered, the electronic equipment can perform off-screen caching on texture data of each list item obtained by rendering by taking the list item as a unit. When the next frame of screen picture is rendered, the electronic equipment can directly acquire the corresponding texture data from the off-screen cache region for the view which needs to be continuously displayed and has unchanged content, so that the part of view does not need to be repeatedly rendered, the rendering operation is saved, and the rendering efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the terminal field, and in particular to a screen picture refreshing method and an electronic device. BACKGROUND

[0002] In a user interface adopting a list layout, a display area occupied by a list class view, i.e., a list area, is usually large. User operations usually cause view changes in the list area, thereby causing the electronic device to re-render the views in the list area. The large list area means that more views need to be re-rendered. However, in most streaming interaction scenarios, the next frame of screen picture to be displayed and the screen picture currently displayed by the electronic device include one or more list items that are the same in content but different in display position. At this time, re-rendering the views causes waste of processor resources and affects picture rendering efficiency. SUMMARY

[0003] The present application provides a screen picture refreshing method and an electronic device.

[0004] In a first aspect, the present application provides a screen picture refreshing method applied to an electronic device, and the method includes: starting a first application, loading a first interface of the first application, the first application not being set with an off-screen buffer; displaying a first screen picture of the first interface, the first screen picture including a second view, the second view being a list class view, the second view including N1 list items, N1≥1; writing the N1 list items of the second view into an off-screen buffer area for off-screen buffering; displaying a second screen picture of the first interface, the second screen picture including a third view, the third view being a list class view, the third view including N2 list items, N2≥1, the N1 list items and the N2 list items including N3 list items that are the same in content, the N3 list items being different in display position in the first screen picture and in the second screen picture; in the second screen picture, the N3 list items being from the off-screen buffer area, N4 list items in the N2 list items being obtained by the electronic device performing a rendering operation after displaying the first screen picture, the first screen picture not including the N4 list items, N2=N3+N4.

[0005] Implementing the method provided in the first aspect, in the process of rendering a screen picture, the electronic device can obtain list items of a list class view in the screen picture, and perform off-screen buffering in units of list items. In this way, when rendering a next frame of screen picture, for one or more list items that continue to be displayed, the electronic device can directly obtain cached textures of the list items from the off-screen buffer area, thereby saving rendering operations, improving rendering efficiency, and avoiding lag.

[0006] In some embodiments, the first screen picture and the second screen picture include a first view with the same content, and a display position of the first view in the first screen picture is the same as a display position of the first view in the second screen picture, and the first view in the second screen picture is from a frame buffer. The first screen picture displaying the first interface specifically includes: rendering the first screen picture of the first interface, writing the rendered first screen picture into the frame buffer, obtaining the first screen picture from the frame buffer, and displaying the first screen picture.

[0007] That is, for a view with the same content and the same display position, the electronic device can directly use the related data of the previous frame screen picture, without re-rendering or off-screen caching.

[0008] In some embodiments, loading the first interface of the first application specifically includes: determining an original view tree describing the first interface, one view node on the view tree corresponding to one view object; determining a target rendering tree according to the original view tree, one rendering node on the rendering tree including one or more rendering operations, the rendering nodes in the target rendering tree and the view nodes in the original view tree one-to-one corresponding; and using a first label to mark a target rendering node of a list class view in the target rendering tree.

[0009] In this way, the electronic device can determine at any time whether any view is a list class view according to the first label. Further, when rendering a frame of screen picture, the electronic device can determine which views need to be off-screen cached and which views can be directly obtained from the off-screen cache according to the first label, thereby avoiding repeated rendering.

[0010] In some embodiments, before displaying the first screen picture of the first interface, the method further includes: determining a first rendering tree describing the first screen picture based on the target rendering tree; traversing the first rendering tree to determine a target rendering node in the first rendering tree according to the first label, the target rendering node including a second rendering node, the second rendering node corresponding to a second view; determining N1 child nodes of the second rendering node, and using a third label to mark the N1 child nodes; and writing N1 list items of the second view into an off-screen cache area for off-screen caching, specifically including: based on the third label, after obtaining a first list item corresponding to a first node from the rendering operation indicated by the first node after the first node is executed, writing the first list item into the off-screen cache area, the first node being one of the N1 child nodes, and the first list item being one of the N1 list items.

[0011] In some embodiments, when traversing the first rendering tree, the method further includes: executing the rendering operation indicated by the first rendering tree to obtain the first screen picture.

[0012] In some embodiments, before displaying the second screen picture of the first interface, the method further includes: determining a second rendering tree describing the second screen picture based on the target rendering tree, the second rendering tree including N3 same child nodes as the first rendering tree; performing a rendering operation indicated by the second rendering tree to obtain the second screen picture; and wherein the third node corresponding list item is obtained from the off-screen buffer area when performing the rendering operation indicated by the third node, the third node being one of the N3 child nodes.

[0013] In some embodiments, the method further includes: traversing the second rendering tree to determine a target rendering node in the second rendering tree according to the first label, the target rendering node in the second rendering tree including a third rendering node; determining N2 child nodes of the third rendering node, and marking the N2 child nodes with a third label; and after performing a rendering operation indicated by the second node to obtain a second list item corresponding to the second node, writing the second list item into the off-screen buffer area based on the third label to perform off-screen caching, the second node being one of the N2 child nodes, and the second list item being one of the N2 list items.

[0014] In some embodiments, the electronic device adopts an Android system architecture, and the view object corresponding to the list class view includes one or more of the following: a ListView class, a RecyclerView class, a derivative class of the ListView and the RecyclerView.

[0015] In a second aspect, the present application provides an electronic device, including one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are configured to store a computer program, and when the one or more processors execute the computer program, the electronic device performs the method described in the first aspect and any possible implementation manner of the first aspect.

[0016] In a third aspect, the present application provides a chip system applied to an electronic device, the chip system including one or more processors, and the processor is configured to invoke a computer instruction to make the electronic device perform the method described in the first aspect and any possible implementation manner of the first aspect.

[0017] In a fourth aspect, the present application provides a computer readable storage medium including a computer program, and when the computer program runs on an electronic device, the electronic device performs the method described in the first aspect and any possible implementation manner of the first aspect.

[0018] In a fifth aspect, the present application provides a computer program product including instructions, and when the computer program product runs on an electronic device, the electronic device performs the method described in the first aspect and any possible implementation manner of the first aspect.

[0019] It can be understood that the electronic device provided in the second aspect, the chip system provided in the third aspect, the computer storage medium provided in the fourth aspect, and the computer program product provided in the fifth aspect are all used to execute the method provided in the present application. Therefore, the beneficial effects achieved thereby can refer to the beneficial effects in the corresponding method, which will not be described here again. BRIEF DESCRIPTION OF DRAWINGS

[0020] Figure 1 is a frame of WeChat interface 10 provided by an embodiment of the present application;

[0021] Figure 2 is a set of screen picture refreshing schematic diagrams provided by an embodiment of the present application;

[0022] Figure 3 is a flowchart of a screen picture refreshing method provided by an embodiment of the present application;

[0023] Figure 4A is a view structure schematic diagram of WeChat interface 10 provided by an embodiment of the present application;

[0024] Figure 4B is a tree view structure schematic diagram of WeChat interface 10 provided by an embodiment of the present application;

[0025] Figure 5 is an Android system architecture schematic diagram provided by an embodiment of the present application;

[0026] Figure 6 is a system interaction flowchart provided by an embodiment of the present application;

[0027] Figure 7 is a flowchart of recursively setting Tag3 of a target node and child nodes thereof provided by an embodiment of the present application;

[0028] Figures 8A-8B is a schematic diagram of recursively setting Tag3 of a target node and child nodes thereof provided by an embodiment of the present application;

[0029] Figure 9 is a structure schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0030] The terms used in the following embodiments of the present application are only for the purpose of describing the specific embodiments, and are not intended to be limiting to the present application.

[0031] A user interface (UI) is a medium interface for interaction and information exchange between an application or an operating system and a user. It realizes the conversion between the internal form of information and the form that can be accepted by the user. Commonly, the user interface is in the form of a graphic user interface (GUI). The GUI refers to a user interface related to computer operation displayed in a graphical manner.

[0032] A GUI is generally composed of multiple views. The views include a basic view (View) and a view group (ViewGroup). The basic view is a control that can be independently displayed, such as a text control (TextView), an edit box (EditText), a button (Button), a scrollbar, a picture, and the like. The view group is a container that stores the basic view. The view group can include one or more basic views. The view group can also nest view groups. The view group can display the basic view and / or the nested view group in a specific layout manner.

[0033] A GUI is generally rendered on an electronic device through a page and a layout description file written in a specific computer language such as extensible markup language (XML), and finally presented on the screen of the electronic device as image content recognizable by the user.

[0034] The views in the user interface of most applications are arranged in a list layout. The views under the list layout are referred to as list class views. The list class view includes one or more list items (Item View). Based on the nesting relationship of the view group, one list item in the list class view can also be a list class view, and further, the list item can include one or more child list items, and so on.

[0035] The UI containing the list class view can hide some list items and display other list items according to the sliding operation of the user.

[0036] Taking the instant messaging application WeChat as an example, Figure 1 is a frame of WeChat interface 10 provided by an embodiment of the present application. As shown in Figure 1As shown, the WeChat interface 10 includes a top menu bar 101, a bottom menu bar 102, a search bar 103, and multiple conversation items: conversation item 104, conversation item 105, conversation item 106, conversation item 107, and conversation item 108. The search bar 103 and the multiple conversation items are arranged in a list format in the area 110 between the top menu bar 101 and the bottom menu bar 102. Therefore, the view group shown in area 110, including the search bar 103 and the multiple conversation items, is a list view. The search bar 103 is a list item, and any conversation item (e.g., a conversation item) is also a list item.

[0037] The WeChat interface 10 can also include more list items. Based on the size of area 110, these additional list items are not currently displayed. The electronic device can detect user swipe gestures. After detecting a swipe gesture, the electronic device can hide one or more currently displayed list items and simultaneously display one or more currently hidden list items.

[0038] refer to Figure 2 ,like Figure 2 As shown in Figure (a), after displaying one frame of the WeChat interface 10, the electronic device can detect the user's swipe-up action. Figure 2 As shown in Figure (b), in response to the above operation, the electronic device can stop displaying (i.e. hide) the search bar 103, display the session item 109, and the session items 104, 105, 106, 107, and 108 following the search bar 103 will move upward as a whole.

[0039] Understandably, depending on the swipe distance, hiding a list item can be either completely hidden or partially hidden. Completely hiding means no content of that list item is displayed on the screen, while partially hiding means a portion of the list item's content remains visible.

[0040] Electronic devices (such as mobile phones and tablets) consist of a processor and a display screen. The processor parses and renders layout description files to obtain image data, while the display screen shows the image data output by the processor, thus presenting it to the user. Figure 1 The user interface shown.

[0041] After receiving a frame of image data (i.e., rendering a screen frame), the electronic device saves this image data to a frame buffer. When a new vsync signal arrives, the display can retrieve the image data from the frame buffer and display it. Simultaneously, the processor begins rendering the next screen frame. The electronic device renders the next screen frame based on the currently displayed screen and update operations. These update operations include user touch operations and automatic update operations that update view content according to preset rules (such as time updates, dynamic background updates, etc.).

[0042] In some embodiments, the electronic device renders the views in the next frame of the screen sequentially. However, in most streaming interactive scenarios, the next frame of the screen to be displayed contains one or more views with the same content and display position as the screen currently being displayed by the electronic device. In this case, re-rendering these views would waste processor resources and affect screen rendering efficiency.

[0043] Therefore, in some embodiments, the electronic device first determines the view that needs to be changed corresponding to the update operation, also known as the active view. These changes include changes in display position and / or changes in view content. Views other than the active view that do not require change are called fixed views. When rendering the next screen frame, the electronic device can reuse the image data of the fixed view already rendered in the previous screen frame, only needing to re-render the active view to obtain its image data. Then, the image data of the fixed view and the newly rendered active view are combined to obtain the next screen frame.

[0044] For example, in Figure 2 During the screen refresh process shown, the active views that require changes in display position and / or content corresponding to the swipe-up operation include: search bar 103, conversation item 104, conversation item 105, conversation item 106, conversation item 107, and conversation item 108 (i.e., the list-type views in area 110). The remaining top menu bar 101 and bottom menu bar 102 are fixed views. At this time, when rendering the next frame of the screen shown in Figure (b), the electronic device can reuse the image data of the already rendered top menu bar 101 and bottom menu bar 102 from the previous frame of the screen, and only needs to re-render conversation items 104, 105, 106, 107, 108, and 109.

[0045] In this way, electronic devices can save rendering operations, improve rendering efficiency, thereby improving screen refresh rate, avoiding lag, and ensuring smooth UI interaction.

[0046] The area containing the active view whose display position and / or content need to be changed is also called the dirty area, such as area 110.Figure 2 As shown, in the user interface including the list type view, the display area occupied by the list type view is often large. At this time, during the screen refreshing process, the electronic device still needs to render a large number of active views, which affects the rendering efficiency.

[0047] In some embodiments, the layout description file of the application program can include off-screen buffer related settings, that is, off-screen buffer is performed on one or more views in the screen picture. Based on the above off-screen buffer related settings, during the rendering of a frame of screen picture, the electronic device can perform off-screen buffer on one or more views in the screen picture, that is, write the directly displayable image data (also referred to as texture data) corresponding to the one or more views into the off-screen buffer area. The texture data in the off-screen buffer area is also referred to as off-screen texture. When rendering the next frame of screen picture, for the views that need to be continued to be displayed, the electronic device can directly obtain the corresponding texture data from the off-screen buffer area, so that it is not necessary to repeatedly render this part of the view, saving the rendering operation, which is conducive to improving the rendering efficiency, improving the screen picture refreshing efficiency, and avoiding lag.

[0048] However, the layout description file of some application programs does not include off-screen buffer related settings. At this time, the electronic device does not perform off-screen buffer on one or more views in the screen picture, but continues to mechanically render one by one the active view and all sub-views included in the active view that need to change the display position and / or content, which affects the rendering efficiency.

[0049] In view of this, the present application provides a screen picture refreshing method. The method can be applied to electronic devices such as mobile phones and tablet computers that have display capability and provide display services.

[0050] Implementing the above method, when the application program is not configured with off-screen buffer related settings, the electronic device can also identify the user interface of the application program and perform off-screen buffer on the views in the user interface. Based on the inheritance ability of the fixed view in the previous frame of screen picture, preferably, the electronic device only needs to perform off-screen buffer on the active view. When rendering the next frame of screen picture, for the views that need to be continued to be displayed and the content of which does not change, the electronic device can directly obtain the corresponding texture data from the off-screen buffer area, so that it is not necessary to repeatedly render this part of the view.

[0051] It can be understood that, in the off-screen buffer related settings, if the view unit / region performing the off-screen buffer operation is too small, the number of views needing to perform the off-screen buffer operation in a frame of screen picture will increase, thereby bringing greater performance overhead; on the contrary, if the view unit / region performing the off-screen buffer operation is too large, the reuse degree of the off-screen buffer view in the subsequent screen picture will sharply decrease (a slight sliding operation will cause the next frame of screen picture to no longer need the complete view, and thus the view data in the off-screen buffer area cannot be used), at this time, the electronic device still needs to re-render the view, thereby failing to achieve the effect of saving the rendering operation and improving the rendering efficiency.

[0052] Therefore, in the screen picture refreshing method provided in the embodiments of the present application, preferably, the electronic device can identify the list view in the user interface. After identifying the list view, the electronic device can perform off-screen buffer on the list view in units of list items in the list view, thereby avoiding the problems caused by too small or too large off-screen buffer view unit.

[0053] Figure 3 is a flowchart of a screen picture refreshing method provided in the embodiments of the present application.

[0054] S301, detecting a user operation of starting an application or opening a new interface of an application.

[0055] Taking WeChat as an example, the electronic device can detect a user operation acting on the WeChat application icon, and in response to the operation, the electronic device can start WeChat. After starting WeChat, the electronic device can display the first user interface of WeChat. Generally, the first user interface of an application is also called the main interface.

[0056] After displaying the main interface, the electronic device can detect a user operation on a certain control in the main interface, and in response to the operation, the electronic device can display a new user interface. Further, the electronic device can detect a user operation on a certain control in the new user interface, and in response to the operation, the electronic device can continue to display another new user interface.

[0057] In the above embodiments, the application operated by the user, such as WeChat, can be referred to as a first application; the target interface to be displayed in response to the user operation, such as the main interface and other interfaces, can be referred to as a first interface.

[0058] S302, rendering a first screen picture of the target interface, and using a first label to mark a list view in the first screen picture.

[0059] The target interface is the user interface that the electronic device will display corresponding to the current user action. For example, when a user action is detected on the WeChat application icon, the main WeChat interface that the electronic device will display is the target interface; when a user action is detected on a control in the WeChat main interface or another interface, the new interface that the electronic device will display is the target interface.

[0060] After executing S301, the electronic device can obtain the layout description file of the target interface. The layout description file of the target interface records all views of the target interface. Due to screen size, folded display, etc., all views of the target interface... Figure 1 Generally, not all views are displayed simultaneously. Therefore, after obtaining the layout description file of the target interface, the electronic device first needs to determine the views involved in the first screen of the target interface based on parameters such as screen size and view state, and then render these views to obtain the first screen image, which is then displayed. The first screen image of the target interface is also called the first screen image. Views not involved in the first screen image do not need to be rendered.

[0061] The layout description file of the target interface typically uses a tree data structure to record the content and position of each view in the target interface. Taking WeChat interface 10 as an example, after executing S301, the electronic device can obtain the layout description file of WeChat interface 10 as shown in Table 1:

[0062] Table 1

[0063]

[0064] Taking view group 1 as an example, view group 1 includes base view 11 and base view 12. When the electronic device performs the rendering operation corresponding to base view 11, it can obtain the text 1011 in the top menu bar 101 (see reference). Figure 4A The electronic device executes the rendering operation corresponding to the base view 12 to obtain button 1012 in the top menu bar 101. By combining the text 1011 and button 1012, the electronic device can obtain the top menu bar 101. The layout description file shown in Table 1 and Figure 4A The correspondence between the views shown is linked by the keywords in parentheses in Table 1, which will not be explained in detail here.

[0065] As is understandable, the layout content shown in Table 1 is only a part of the layout description file of WeChat interface 10. More layout content of WeChat interface 10 is not reflected in Table 1, such as more conversation items, etc., and will not be listed here.

[0066] For example, after obtaining the layout description file of the WeChat interface 10 shown in Table 1, the electronic device can determine, according to the screen size, view state, and other parameters, that the first screen frame includes view group 1, part of the sub-views of view group 2 (second view): view group 21-26 (N1 list items of the second view), and view group 3. After performing the rendering operation corresponding to the above views, the electronic device can obtain the texture data of the first screen frame (for example, the screen frame shown in FIG. a in the middle) Figure 2 Then, the electronic device can write the above texture data into the frame buffer.

[0067] When rendering each view in the first screen frame, the electronic device can identify a list-type view in the above view and mark the list-type view with the first label. In the current general Android version, the list-type view includes ListView, RecyclerView, and the derived classes of ListView and RecyclerView. When identifying ListView, RecyclerView, or the derived classes of ListView / RecyclerView, the electronic device can confirm that the above view is a list-type view and mark the view with the first label.

[0068] For example, in order to arrange view group 21-26 in a list style, view group 2 uses a ListView, RecyclerView, or a derived class view object of ListView / RecyclerView. Thus, when rendering each view in the first screen frame, the electronic device can identify that view group 2 is a ListView, RecyclerView, or a derived class view object of ListView / RecyclerView, and then determine that view group 2 is a list-type view and mark view group 2 with the first label.

[0069] S303, display the first screen frame.

[0070] When a new vsync signal arrives, the display can obtain the texture data of the first screen frame from the frame buffer, and then display the first screen frame for the user to browse.

[0071] S304, determine one or more list items of the list-type view, and perform off-screen caching in units of list items.

[0072] Based on the first label, the electronic device can determine one or more sub-views of the list-type view, i.e., one or more list items. During the rendering of the first screen frame, the electronic device can obtain the texture data of each list item, and then the electronic device can write the texture data of each list item into the off-screen buffer for off-screen caching.

[0073] Exemplarily, in the scenario that the view group 2 carries the first label, the electronic device can determine a plurality of sub-views of the view group 2 (the list class view), i.e., the view groups 21-26 (the list items). In the process of rendering the first screen picture, the electronic device can acquire the texture data of each list item, for example Figure 4B The search bar 103, the conversation item 104, the conversation item 105, the conversation item 106, the conversation item 107, and the conversation item 108 shown in the figure are written into the off-screen buffer area for off-screen caching.

[0074] S305, detecting the sliding operation.

[0075] Referring to Figure 2 In the process of displaying the first screen picture, the electronic device can detect the sliding operation. In response to the operation, the electronic device can perform S306.

[0076] S306, determining the second screen picture according to the first screen picture and the sliding operation, determining one or more list items to be continuously displayed in the second screen picture, acquiring the texture data of the list items from the off-screen buffer area, and rendering other views to obtain the second screen picture.

[0077] Referring to Figure 2 According to the first screen picture and the sliding operation, the electronic device can determine that the next frame screen picture (denoted as the second screen picture) includes the top menu bar 101 and the bottom menu bar 102 (the first view) and the conversation items 104-109 (N2 list items of the third view).

[0078] In the embodiment of the present application, at this time, the electronic device can further determine that the top menu bar 101 and the bottom menu bar 102 are fixed views, the conversation items 104-108 (N3 list items) are off-screen cached contents, and the conversation item 109 (N4 list item) is a new view to be rendered. Therefore, the electronic device can acquire the first screen picture from the frame buffer area, retain the texture data of the fixed views, i.e., the top menu bar 101 and the bottom menu bar 102, and then re-render the active views in the dirty area to save the rendering operation. In the process of re-rendering the active views in the dirty area, based on the off-screen caching operation of S304, the electronic device can sequentially acquire the texture data of the conversation items 104-108 from the off-screen buffer area. At this time, the electronic device does not need to re-render the conversation items 104-108. Therefore, for the second screen picture, the electronic device only needs to render the conversation item 109.

[0079] After rendering the session item 109, the electronic device can obtain the texture data of the session items 104-108 from the off-screen buffer area and the fixed view top menu bar 101 and bottom menu bar 102, and then obtain the second screen picture. Then, the electronic device can write the texture data of the second screen picture into the frame buffer.

[0080] S307, display the second screen picture.

[0081] After displaying the first screen picture, when a new vsync signal arrives, the display can obtain the texture data of the second screen picture from the frame buffer, and then display the second screen picture for the user to browse.

[0082] S308, determine one or more list items of the list view, and perform off-screen caching in units of list items.

[0083] Similarly, when rendering the second screen picture, the electronic device can identify the list view in the second screen picture, and mark the list view using the first label. Based on the first label, in the process of rendering the second screen picture, the electronic device can obtain one or more list items of the list view in the second screen picture, and then write the texture data of each list item into the off-screen buffer area for off-screen caching.

[0084] By analogy, in the process of rendering each frame of screen picture, the electronic device can obtain the list items of the list view in the frame of screen picture, and perform off-screen caching in units of list items. When rendering the next frame of screen picture, for one or more list items that continue to be displayed, the electronic device can directly obtain the texture data of the list items from the off-screen buffer area.

[0085] In this way, the electronic device can greatly save the rendering operation in the screen picture refreshing process, improve the rendering efficiency, and then improve the screen picture refreshing efficiency, avoid lag, and ensure the smoothness of UI interaction.

[0086] Based on the tree-type data structure, the layout description file of the target interface is also called the view tree of the target interface. One node on the view tree corresponds to one view group or one basic view. The electronic device can traverse the view tree in depth, render each basic view of the target interface in turn, and arrange and combine according to the upper parent node to obtain the screen picture to be displayed.

[0087] Reference Figure 4B The layout description file of the WeChat interface 10 can also be obtained by Figure 4BThe view tree shown is used to represent this. Among them, nodes 11 to 12 correspond to the basic views 11 to 12 shown in Table 1, node 1 corresponds to view group 1 shown in Table 1, nodes 211 to 213 correspond to the basic views 211 to 213 shown in Table 1, node 21 corresponds to view group 21 shown in Table 1, node 2 corresponds to view group 2 shown in Table 1, and so on. They will not be explained one by one here.

[0088] By performing a depth-first traversal of the view tree, the electronic device first renders the base views 11-12, thus obtaining view group 1 (i.e., the top menu bar 101). Then, the electronic device can continue to render the base views 211-213, thus obtaining view group 21 (i.e., the search bar 103). And so on, the electronic device can obtain the first screen image.

[0089] During the depth-first traversal of the view tree, the electronic device can identify each node in the view tree and determine whether the node is a list-type view node, that is, whether the view corresponding to the node is a list-type view. When a node (e.g., node 2, i.e., view group 2) is a ListView, RecyclerView, or a derived class of ListView / RecyclerView, the electronic device can confirm that the node is a list-type view node and then mark the node with the first label. Figure 4B In this context, nodes are represented by black. The node marked with the first label is the target node. The view corresponding to the target node is a list-like view. Then, by continuing the depth-first traversal, the electronic device can determine the child nodes of the target node, such as child nodes 21 to 26 of node 2. The view corresponding to child nodes 21 to 26 is a list item of the list-like view.

[0090] Electronic devices can adopt layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application uses the layered Android system architecture as an example to illustrate the specific process of an electronic device implementing the screen refresh method provided in this application.

[0091] Figure 5 This is a schematic diagram of an Android system architecture provided in an embodiment of this application. Figure 5 As shown, the Android system architecture includes the application layer (APP), application framework layer (FMK), native layer, hardware abstraction layer (HAL), kernel layer, and hardware layer. The layers communicate with each other through software interfaces.

[0092] The application program layer (APP) includes a series of application packages, such as system applications: camera, gallery, clock, call, etc., and third-party applications: WeChat, Taobao, etc.

[0093] The application framework layer (FMK) includes some pre-defined functions, which provide application programming interfaces (APIs) and programming frameworks for the applications in the application program layer, such as an activity manager service (AMS), a window manager service (WMS), a UI framework, an input system, a view system (View / ViewGroup, etc.), control detection, a graphics-related interface (Graphics), etc. The control detection is used to identify whether a view is a list-type view.

[0094] The native layer (Native) includes some native services and some link libraries, such as GUI, EGL, Skia, SurfaceFlinger, etc. The EGL is a communication interface between OpenGL ES and a native window system, which is mainly used for: communicating with the native window system of a device, querying available types and configurations of a drawing surface, creating a drawing surface, synchronizing rendering between OpenGL ES and other graphics rendering APIs, managing rendering resources such as texture maps, etc.; Skia is used to provide rich graphics operations to achieve efficient 2D graphics processing capability and cross-platform graphics rendering; SurfaceFlinger is responsible for managing and compositing all visible content of a user interface (UI). In the embodiments of the present application, the Native also includes HWUI. The HWUI includes a JNI interface, a RenderNode, and a RenderNode attribute management module, and the HWUI functions include, but are not limited to, rendering thread management, RenderNode attribute management, rendering instruction translation, etc.

[0095] The hardware abstraction layer (HAL) includes various hardware abstraction modules of an electronic device, such as a graphics processor hardware abstraction module (GPU HAL), a display hardware abstraction module (display HAL), a hardware composer (HWC, also referred to as Composer HAL), etc., which shield the implementation details of different hardware devices upwards and interact with Linux kernel drivers downwards, to provide a unified access interface for hardware devices, thereby achieving abstraction and encapsulation of hardware.

[0096] The kernel layer (Kernel) provides underlying driving support for various hardware of the electronic device, and is responsible for process management, memory management, security permission management, and communication basis of the system and the hardware device. For example, the Kernel includes a scheduler for process management and scheduling, a KGSL for driving the high platform GPU, an ION for memory allocation and management, a DPU for driving a display processing unit (DPU), and a Direct Rendering Manager (DRM) for providing a GPU interface for managing a graphics card.

[0097] The hardware layer (Hardware) includes various hardware of the electronic device, such as a central processing unit (CPU), a GPU, a double data rate synchronous dynamic random access memory (DDR SDRAM, referred to as DDR), a DPU, a liquid crystal display (LCD), and the like.

[0098] Figure 6 is a system interaction flowchart provided by an embodiment of the present application.

[0099] S400, Activity initialization.

[0100] After detecting a user operation of opening a target interface (for example, a main interface or other interface of the application exemplified in S301), the electronic device can load the target interface. When loading the target interface, the upper-layer application (for example, WeChat) can create a new activity (Activity) corresponding to the target interface through the AMS, and initialize the Activity.

[0101] S401, View object instantiation.

[0102] In the Activity initialization process, the AMS can determine an original view tree describing the target interface according to a layout description file of the target interface. One view node on the view tree corresponds to one view object (View object). The AMS can traverse the original view tree, and instantiate the nodes (that is, the view objects) on the view tree. As shown in Figure 1 A target interface usually includes multiple views, and therefore, the original view tree of the target interface includes multiple nodes. The AMS can traverse the original view tree, and instantiate each node on the original view tree.

[0103] S402, create a RenderNode, a Native RenderNode, and set a first tag Tag1 of the Native RenderNode to false (i.e. Tag1 = false).

[0104] In the Android view system, one View object is uniquely associated with one RenderNode object. The RenderNode object includes one or more rendering operations. The electronic device performs the one or more rendering operations indicated by the RenderNode object, and obtains a view described by the View object corresponding to the RenderNode object.

[0105] After instantiating a View object, the view system can create a RenderNode object corresponding to the View object and instantiate the RenderNode. In turn, when traversing the original view tree, the electronic device can establish an original rendering tree corresponding to the original view tree. In the process of creating the RenderNode object by the view system, the view system can inform the HWUI to create a Native RenderNode through an interface provided by the Native, and set a tag Tag1 of the Native RenderNode to false (i.e. Tag1 = false). Tag1 = false indicates that the RenderNode is not a target node.

[0106] S403, query whether the current View object corresponds to a list view.

[0107] The control detection can identify the type of the current View object. When the current View object is any one of a ListView, a RecyclerView, or a derivative class of the ListView and the RecyclerView, the control detection can set the value of a second tag Tag2 of the View object to true (i.e. Tag2 = true); otherwise, the control detection module can set the value of the Tag2 of the View object to false.

[0108] The view system can query the control detection module whether the current View object is a list view. In response to the query request, the control detection module can return the Tag2 of the current View object to the view system. Further, the view system can determine whether the current View object corresponds to a list view according to the value of the received Tag2. When the received Tag2 = true, the control detection module can determine that the current View object corresponds to a list view; otherwise, when the received Tag2 = false, the control detection module can determine that the current View object is not a list view.

[0109] When Tag2=true, S404, update Tag1=true. When Tag2=false, the view system does not perform S404. The Tag1 of the RenderNode corresponding to the current View object remains false.

[0110] For example, the view system can notify the Graphics interface to update Tag1=true through the setRecyclerViewOrListViewHint() method, and the Graphics interface can set the value of Tag1 in the RenderNode Properties attribute to true through the nSetRecyclerViewOrListViewHint() method. After updating the value of Tag1 of the RenderNode of the previous View object from false to true, Tag1=true indicates that the RenderNode is the target node, i.e., the rendering node corresponding to the list view.

[0111] S405, determine the first screen picture of the target interface, and build a first rendering tree.

[0112] After the operations of S401-S404 on each view object in the layout description file of the target interface are completed, the electronic device can obtain the original view tree and the original rendering tree of the target interface as shown in Figure 4B The view system marks the nodes corresponding to the list view in the original view tree and the original rendering tree through Tag1.

[0113] Then, the view system can determine the first screen picture of the target interface according to the original view tree of the target interface and the screen size, and further build a first rendering tree matching the first screen picture. The processor executes the rendering instructions contained in the first rendering tree to obtain the texture data of the first frame screen picture, so as to display the first screen picture on the display screen.

[0114] S406, synchronize the first rendering tree to the rendering thread, and pull up the rendering process.

[0115] S407, determine the target node in the first rendering tree, and recursively set the third tag Tag3 of the target node and its child nodes.

[0116] The rendering process includes a pre-processing process prepareTreeImpl. prepareTreeImpl is used to traverse to determine the actual rendering content of the current frame. For reference Figure 7In the process of performing prepareTreeImpl on the first rendering tree, HWUI can traverse the rendering nodes of the first rendering tree in depth, and check the value of Tag1 of the rendering nodes. When Tag1 = true (i.e. the current rendering node is the target node), HWUI can set the value of Tag3 of the current rendering node to 1 (i.e. Tag3 = 1), and then continue to traverse the child nodes of the current rendering node. When the current rendering node has child nodes, HWUI updates the value of Tag3 of the descendant nodes of the above-mentioned rendering node. Specifically, among the descendant nodes, the value of Tag3 of a child node is Tag3 of the parent node-1, i.e. in the process of traversing the target node in depth, the value of Tag3 of the descendant nodes of the target node is reduced by 1 layer by layer. The default value of Tag3 is 2. The value of Tag3 of the rendering nodes other than the target node and its descendant nodes is the default value, i.e. Tag3 = 2. In this way, after the traversal ends, the rendering thread can determine the value of Tag3 of each rendering node.

[0117] For example, referring to Figure 8A After determining that node 2 (i.e. the second rendering node) is the target node according to Tag1, HWUI can set Tag3 of node 2 to 1. The descendant nodes of node 2 include: nodes 21-26 (N1 child nodes), nodes 211-213, nodes 221-224, nodes 231-233, nodes 241-244, nodes 251-253, and nodes 261-264. First, HWUI acquires the first child node 21 of node 2, and according to Tag3 of a child node = Tag3 of the parent node-1, HWUI can set Tag3 of the child node 21 to 0. Then, HWUI can continue to acquire the first child node 211 of node 21, and at this time, according to Tag3 of a child node = Tag3 of the parent node-1, HWUI can set Tag3 of the first child node 211 of node 21 to -1. In this way, as shown in Figure 8A HWUI can set Tag3 of the child nodes 21-26 of node 2 to 0, and set the value of Tag3 of each lower-level child node of the child nodes 21-26 to -1.

[0118] S408, performing a rendering operation according to the first rendering tree to obtain a first screen picture, and displaying the first screen picture.

[0119] The order of S407 and S408 is not limited in the embodiments of the present application. Preferably, in the process of traversing the first rendering tree and performing the rendering operation corresponding to each rendering node to obtain the first screen picture, HWUI can perform the marking operation shown in S408 on each rendering node in the first rendering tree.

[0120] S409, cache the view texture data of Tag3=0 offline.

[0121] Referring to Figure 8A , the RenderNode of Tag3=0 includes nodes 21-26. Referring to Table 1, the nodes 21-26 correspond to the search bar 103, the conversation item 104, the conversation item 105, the conversation item 106, the conversation item 107, and the conversation item 108, respectively. At this time, the electronic device can write the texture data of the search bar 103, the conversation item 104, the conversation item 105, the conversation item 106, the conversation item 107, and the conversation item 108 into the off-screen buffer area, respectively.

[0122] S410, Vsync signal.

[0123] S411, determine the second screen picture of the target interface, and construct the second rendering tree.

[0124] Upon arrival of the next Vsync signal, the view system can determine the next frame of screen picture to be displayed, denoted as the second screen picture, according to the previous frame of screen picture (the first screen picture) and the update operation, and further construct the second rendering tree matching the description of the second screen picture.

[0125] S412, synchronize the second rendering tree to the rendering thread.

[0126] S413, determine the target node in the second rendering tree, and recursively set the Tag3 of the target node and its child nodes. For details, refer to S407, which will not be described here.

[0127] S414, perform the rendering operation according to the second rendering tree to obtain the second screen picture, and display the second screen picture.

[0128] In the process of traversing the second rendering tree, the HWUI can obtain the Tag3 of each rendering node in the second rendering tree. In the process of performing the rendering operation, the HWUI can determine whether the corresponding texture data can be obtained from the off-screen buffer area according to whether the Tag3 is 0. After confirming that the Tag3=0, the HWUI can obtain the corresponding texture data from the off-screen buffer area, without the need to render the above-mentioned texture data through the CPU, GPU, or the like. For the child nodes of the target node with other Tag3≠0, the HWUI can render the corresponding texture data through the CPU, GPU, or the like.

[0129] Referring to Figure 8B , the HWUI can determine that the node 2 (i.e., the third rendering node) in the second rendering tree is the target node, and the target node includes the child nodes 22-27 (N2 child nodes). Among them, the second rendering tree matches the first rendering tree (refer to Figure 8AThis includes identical child nodes 22 to 26. Taking child node 22 as an example, when traversing to child node 22, HWUI can obtain the texture data corresponding to child node 22 from the off-screen cache (e.g., Figure 2 The session item 104 shown in Figure (b) can be obtained without further rendering by the processor to obtain the aforementioned texture data. Similarly, HWUI can obtain the texture data corresponding to other child nodes 22-26 from the off-screen cache (e.g., Figure 2 (Session items 105, 106, 107, and 108 are shown in Figure (b)). At this point, HWUI only needs to use the processor to draw and render the child nodes of other target nodes besides the same child nodes, such as child node 27 (i.e., session item 109), and then combine the above texture data to obtain the second screen image.

[0130] Among them, the fixed views, top menu bar 101 and bottom menu bar 102, can use the texture data of the previous screen (i.e. the first screen), without needing to obtain it from the off-screen cache or draw and render it through the processor.

[0131] S415. Cache the view texture data with Tag3=0 offline.

[0132] Understandably, when rendering the second screen, referring to S408, HWUI will cache the texture data corresponding to the child nodes of the target node in the second screen off-screen for use in the next screen frame.

[0133] refer to Figure 8B In the second render tree, the RenderNodes with Tag3=0 include nodes 22 to 27. (See reference) Figure 2 In Figure (b), nodes 22 to 27 correspond to session items 104, 105, 106, 107, 108, and 109, respectively. At this time, when S415 is executed, the electronic device can write the texture data of session items 104, 105, 106, 107, 108, and 109 into the off-screen buffer for use in the next screen display.

[0134] Similarly, in the process of rendering each screen, electronic devices can save a lot of rendering operations, improve screen refresh efficiency, avoid lag, and ensure smooth UI interaction.

[0135] Figure 9 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application.

[0136] like Figure 9As shown, the electronic device includes a processor, a memory, and a display screen. The above-mentioned components are connected through one or more groups of buses. The above-mentioned buses can be inter-integrated circuit (I2C) buses, inter-integrated circuit sound (I2S) buses, pulse code modulation (PCM) buses, mobile industry processor interfaces (MIPI), and the like.

[0137] The electronic device can include multiple processors, such as CPUs, GPUs, DPUs. In addition, the electronic device can also be provided with a modem processor, an image signal processor (ISP), a digital signal processor (DSP), a video codec, and / or a neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices, or can be integrated in one or more processors. The processor can be provided with a controller, which can generate operation control signals according to instruction operation codes and timing signals, complete the control of fetching and executing instructions.

[0138] The processor is connected to one or more memories. Among them, the one or more memories include random access memory (RAM) and non-volatile memory (NVM). The random access memory can be directly read and written by the processor, and can be used to store executable programs (such as machine instructions) of operating systems or other programs running at the moment, and can also be used to store data of users and application programs, etc. The non-volatile memory can also store executable programs and store data of users and application programs, etc., which can be loaded into the random access memory in advance for the processor to read and write directly. The processor can also be provided with a storage unit, which can be a cache storage unit, which can be used to save instructions or data that the processor has just used or repeatedly uses.

[0139] The display screen can be used to display images, videos, etc. The display screen includes a display panel. The display panel can adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode (AMOLED), a flex light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light emitting diode (QLED), etc. In some embodiments, the electronic device 100 can include 1 or N display screens, N being a positive integer greater than 1.

[0140] In the embodiments of the present application, the computer program code for implementing the screen picture refreshing method described in the embodiments of the present application can be stored in the NVM. After power-on, the electronic device can load the above computer program code into the RAM for the processor to read and write directly. The processor executes the instructions in the above computer program code to obtain screen picture texture data, and sends the above texture data to the display screen for display. At the same time, the processor executes the instructions in the above computer program code to identify the texture data of each list item in the above texture data, and saves it to the memory off-screen buffer area respectively. In this way, when drawing the next frame of screen picture, for the list items that need to be continued to be displayed, the processor can obtain the texture data corresponding to the above list items from the above off-screen buffer area, thereby saving the processor drawing rendering operation, improving the screen picture refreshing efficiency, avoiding stuttering, and ensuring the UI interaction fluency.

[0141] It can be understood that the structural schematic of the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device can further include more components, such as a communication module (for example, a 2G / 3G / 4G / 5G or the like mobile communication module, a wireless local area network (WLAN), such as a wireless fidelity (Wi-Fi) network, a bluetooth (BT), a global navigation satellite system (GNSS), a frequency modulation (FM), a near field communication (NFC), an infrared (IR) technology, and the like wireless communication module), a camera module, an audio module (including a speaker, a receiver, a microphone, an earphone interface), a key, a motor, an indicator, a subscriber identification module (SIM) card interface, and a sensor module (such as a pressure sensor, a gyroscope sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, and the like), and the like. The embodiments of the present application are not limited in this regard.

[0142] Preferably, the screen refresh method provided in the present application can be applied to electronic devices such as mobile phones and tablet computers. Without limitation, the above method can also be applied to desktop computers, laptop computers, handheld computers, notebook computers, ultra-mobile personal computers (UMPCs), netbooks, and electronic devices such as cellular phones, personal digital assistants (PDAs), augmented reality (AR) devices, virtual reality (VR) devices, artificial intelligence (AI) devices, wearable devices, in-vehicle devices, smart home devices, and / or smart city devices. The embodiments of the present application are not limited in this regard.

[0143] As used in the specification and the appended claims, the singular forms "a," "an" and "the" are intended to include both singular and plural forms, unless the context clearly indicates otherwise. It will be further understood that the terms "and / or," as used in the specification and in the claims, are used to open-endedly cover any and all possible combinations. As used throughout the specification, the term "when," depending on the context, can be interpreted to mean either "if" or "upon" or "in response to determining" or "in response to detecting." Similarly, the phrase "upon determining" or "if detecting (a stated condition or event)" can be interpreted to mean "if determining" or "in response to determining" or "upon detecting (a stated condition or event)" or "in response to detecting (a stated condition or event)," depending on the context.

[0144] In the above embodiments, all or part of the methods can be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the methods can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes one or more available media sets. The available media can be magnetic media (such as floppy disks, hard disks, magnetic tapes), optical media (such as DVDs), or semiconductor media (such as solid-state disks), etc.

[0145] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by a computer program instructing relevant hardware, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the above-mentioned embodiments. The aforementioned storage medium includes ROM or random access memory (RAM), magnetic disk or optical disk, and various media that can store program codes.

Claims

1. A screen refresh method, applied to electronic devices, characterized in that, The method includes: Launch the first application and load its first interface. The first application does not have off-screen caching enabled. The first screen displaying the first interface includes a second view, which is a list view and includes N1 list items, where N1 ≥ 1. Write the N1 list items of the second view into the off-screen cache area for off-screen caching; The second screen displays the first interface. The second screen includes a third view, which is a list view. The third view includes N2 list items, where N2 ≥ 1. The N1 list items and the N2 list items include N3 list items with the same content. The display positions of the N3 list items in the first screen are different from the display positions of the N3 list items in the second screen. In the second screen, the N3 list items come from the off-screen buffer, and the N4 list items in the N2 list items are obtained by the electronic device performing a rendering operation after displaying the first screen. The first screen does not include the N4 list items, and N2 = N3 + N4.

2. The method according to claim 1, characterized in that, The process of displaying the first screen image of the first interface specifically includes: rendering the first screen image of the first interface, writing the rendered first screen image into a frame buffer, retrieving the first screen image from the frame buffer, and displaying the first screen image.

3. The method according to claim 2, characterized in that, The first screen and the second screen include a first view with the same content, and the first view is displayed in the same position in the first screen as it is displayed in the second screen. The first view in the second screen comes from the frame buffer.

4. The method according to any one of claims 1-3, characterized in that, The first interface for loading the first application specifically includes: Determine the original view tree that describes the first interface, where one view node in the view tree corresponds to one view object; The target rendering tree is determined based on the original view tree. A rendering node on the rendering tree includes one or more rendering operations. The rendering nodes in the target rendering tree correspond one-to-one with the view nodes in the original view tree. Use the first label to mark the target rendering node of the corresponding list-type view in the target rendering tree.

5. The method according to claim 4, characterized in that, Before displaying the first screen image of the first interface, the method further includes: Based on the target rendering tree, a first rendering tree describing the first screen image is determined; Traverse the first rendering tree and determine the target rendering node in the first rendering tree based on the first label. The target rendering node includes a second rendering node, and the second rendering node corresponds to the second view. Identify the N1 child nodes of the second rendering node and label the N1 child nodes with a third label; The step of writing the N1 list items of the second view into the off-screen cache for off-screen caching specifically includes: Based on the third tag, after executing the rendering operation indicated by the first node to obtain the first list item corresponding to the first node, the first list item is written to the off-screen cache. The first node is one of the N1 child nodes, and the first list item is one of the N1 list items.

6. The method according to claim 5, characterized in that, When traversing the first rendering tree, the method further includes: performing the rendering operation indicated by the first rendering tree to obtain the first screen image.

7. The method according to claim 5, characterized in that, Before displaying the second screen of the first interface, the method further includes: Based on the target rendering tree, a second rendering tree describing the second screen image is determined, and the second rendering tree and the first rendering tree include N3 identical child nodes; The second screen image is obtained by executing the rendering operation indicated by the second rendering tree; wherein, when executing the rendering operation indicated by the third node, the list item corresponding to the third node is obtained from the off-screen cache, and the third node is one of the N3 child nodes.

8. The method according to claim 7, characterized in that, The method further includes: Traverse the second rendering tree and determine the target rendering node in the second rendering tree based on the first label. The target rendering node in the second rendering tree includes a third rendering node. Determine the N2 child nodes of the third rendering node, and label the N2 child nodes with a third label; Based on the third tag, after executing the rendering operation indicated by the second node to obtain the second list item corresponding to the second node, the second list item is written into the off-screen cache area for off-screen caching. The second node is one of the N2 child nodes, and the second list item is one of the N2 list items.

9. The method according to claim 3, characterized in that, The electronic device adopts the Android system architecture, and the view objects corresponding to list-type views include one or more of the following: ListView class, RecyclerView class, and derived classes of ListView and RecyclerView.

10. An electronic device, characterized in that, It includes one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store a computer program that, when the one or more processors execute the computer program, causes the method as described in any one of claims 1-9 to be performed.

11. A chip system applied to an electronic device, the chip system comprising one or more processors, characterized in that, The processor is used to invoke computer instructions to cause the electronic device to perform the method as described in any one of claims 1-9.

12. A computer program product containing instructions, characterized in that, When the computer program product is run on an electronic device, it causes the electronic device to perform the method as described in any one of claims 1-9.

13. A computer-readable storage medium comprising a computer program, characterized in that, When the computer program is run on an electronic device, it causes the electronic device to perform the method as described in any one of claims 1-9.