Interface updating method and device, electronic equipment, storage medium and product
By establishing a node mapping relationship between the view set and the rendering set, the rendering link is directly determined to update the interface, which solves the problem of computing resources and power consumption of electronic devices when updating the display interface, and achieves more efficient interface updates.
Patent Information
- Application Number
- CN202410431152.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-10
- Publication Date
- 2025-10-17
AI Technical Summary
When electronic devices update their display interfaces, they need to process a large number of complex rendering operations, resulting in excessive consumption of computing resources and power.
By establishing a node mapping relationship between the view set and the rendering set, the view link to be updated and its corresponding rendering link are determined, and the drawing information is directly obtained from the rendering link for update, avoiding traversing the entire rendering set.
This reduces the time complexity of updating rendering node information, shortens interface update time, and reduces computing resources and power consumption.
Smart Images

Figure CN120803574A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of electronic technology, and in particular, to an interface updating method and device, an electronic device, a storage medium and a product. BACKGROUND
[0002] With the development of electronic technology, the complexity of the interface displayed on the electronic device and the refresh rate of the interface are also increasing, which leads to the electronic device needing to generate more and more complex interfaces in a unit of time, which occupies a large amount of computing resources in the electronic device, and also consumes a large amount of power. SUMMARY
[0003] To overcome the problems in the related art, the present disclosure provides an interface updating method and device, an electronic device, a storage medium and a product, which can reduce the time complexity of determining the first rendering node whose drawing information is updated from the rendering set, and thus can shorten the update time of the display interface, and reduce the consumption of computing resources and power of the electronic device in the process of updating the display interface.
[0004] According to a first aspect of an embodiment of the present disclosure, an interface updating method is provided, and the method comprises:
[0005] In a case where it is determined that the display interface meets an update condition, a first view to be updated and a first view link corresponding to the first view are determined from a view set of the display interface;
[0006] A first rendering link corresponding to the first view link is determined from a rendering set of the display interface based on a node mapping relationship, wherein the node mapping relationship is used to represent a corresponding relationship between a view link in the view set and a rendering link in the rendering set;
[0007] A first rendering node corresponding to the first view is determined from the first rendering link, wherein a rendering link comprises at least one rendering node, and a rendering node is used to store drawing information of a view corresponding to the rendering node;
[0008] The first view is updated to a second view based on first drawing information stored in the first rendering link;
[0009] The display interface is updated based on the second view.
[0010] In some embodiments, the first rendering link corresponding to the first view link is determined from the rendering set of the display interface based on the node mapping relationship, comprising:
[0011] All rendering nodes corresponding to the views on the first view link in the rendering set are determined based on the node mapping relationship;
[0012] mark, based on the first preset identifier, all view nodes corresponding to views on the first view link in the rendering set;
[0013] determine, based on the view nodes marked by the first preset identifier in the rendering set, the first rendering link corresponding to the first view link.
[0014] In some embodiments, the method further comprises:
[0015] updating second drawing information stored in the first rendering node to the first drawing information, wherein the second drawing information is drawing information for drawing the first view.
[0016] In some embodiments, the marking, based on the first preset identifier, all view nodes corresponding to views on the first view link in the rendering set comprises:
[0017] determining whether the first rendering node has a child rendering node;
[0018] in a case where the first rendering node has the child rendering node, determining whether second drawing information stored in the child rendering node is updated to the first drawing information;
[0019] in a case where it is determined that the second drawing information in the child rendering node is updated to the first drawing information, marking the child rendering node by the first preset identifier.
[0020] In some embodiments, the second drawing information comprises drawing content and rendering attributes; and the marking, in a case where it is determined that the second drawing information in the child rendering node is updated to the first drawing information, the child rendering node by the first preset identifier comprises:
[0021] in a case where it is determined that the drawing content and / or rendering attributes of the second drawing information in the child rendering node are updated, marking the child rendering node by the first preset identifier.
[0022] In some embodiments, the updating, based on the first drawing information stored in the first rendering node, the first view to a second view comprises:
[0023] determining, based on the first preset identifier, a child rendering node storing the first drawing information;
[0024] updating, based on the first drawing information stored in the first rendering node and the child rendering node, the first view to the second view.
[0025] In some embodiments, the determining, from the view set of the display interface, the first view to be updated and the first view link corresponding to the first view comprises:
[0026] The first view is determined from the view set of the display interface.
[0027] The first view and a second preset identifier of a view associated with the first view in the view set are updated, wherein the view associated with the first view includes a direct parent node view and / or an indirect parent node view of the first view.
[0028] The first view link corresponding to the first view is determined based on the updated second preset identifier.
[0029] According to a second aspect of the embodiments of the present disclosure, an interface updating apparatus is provided, which comprises:
[0030] A first determining module configured to, in a case where it is determined that a display interface meets an updating condition, determine, from a view set of the interface, a first view to be updated and a first view link corresponding to the first view;
[0031] A second determining module configured to determine, based on a node mapping relationship, a first rendering link corresponding to the first view link from a rendering set of the display interface, wherein the node mapping relationship is used to represent a corresponding relationship between a view link in the view set and a rendering link in the rendering set;
[0032] A third determining module configured to determine, from the first rendering link, a first rendering node corresponding to the first view, wherein a rendering link comprises at least one rendering node, and a rendering node is used to store drawing information of a view corresponding to the rendering node;
[0033] A first updating module configured to update the first view to a second view based on first drawing information stored in the first rendering node;
[0034] A second updating module configured to update the display interface based on the second view.
[0035] In some embodiments, the second determining module comprises:
[0036] A first determining unit configured to determine, based on the node mapping relationship, all rendering nodes corresponding to all views on the first view link in the rendering set;
[0037] A marking unit configured to mark, based on a first preset identifier, all rendering nodes corresponding to all views on the first view link in the rendering set;
[0038] The second determining unit is configured to determine the first rendering link corresponding to the first view link based on the rendering node in the rendering set that is marked by the first preset identifier.
[0039] In some embodiments, the apparatus further includes:
[0040] The third updating module is configured to update second drawing information stored in the first rendering node to the first drawing information, where the second drawing information is drawing information for drawing the first view.
[0041] In some embodiments, the marking unit is configured to:
[0042] determine whether the first rendering node has a child rendering node;
[0043] in a case where the first rendering node has the child rendering node, determine whether the second drawing information stored in the child rendering node is updated to the first drawing information;
[0044] in a case where it is determined that the second drawing information in the child rendering node is updated to the first drawing information, mark the child rendering node by the first preset identifier.
[0045] In some embodiments, the second drawing information includes drawing content and rendering attributes; and the marking unit is configured to:
[0046] in a case where it is determined that the drawing content and / or the rendering attributes of the second drawing information in the child rendering node are updated, mark the child rendering node by the first preset identifier.
[0047] In some embodiments, the first updating module is configured to:
[0048] determine, based on the first preset identifier, a child rendering node in which the first drawing information is stored;
[0049] update the first view to the second view based on the first drawing information stored in the first rendering node and the child rendering node.
[0050] In some embodiments, the first determining module is configured to:
[0051] determine the first view from a view set of the display interface;
[0052] update a second preset identifier of the first view and a view associated with the first view in the view set, where the view associated with the first view includes a direct parent node view and / or an indirect parent node view of the first view;
[0053] determine a first view link corresponding to the first view based on the updated second preset identifier.
[0054] According to a third aspect of the embodiments of the present disclosure, an electronic device is provided, comprising:
[0055] a processor;
[0056] a memory for storing computer programs or instructions;
[0057] The processor executes the computer programs or instructions to implement the steps of the method according to any one of the preceding aspects.
[0058] According to a fourth aspect of the embodiments of the present disclosure, a non-transitory computer readable storage medium is provided, which stores computer programs or instructions, and when the computer programs or instructions in the storage medium are executed by a processor, the steps of the method according to any one of the preceding aspects are implemented.
[0059] According to a fifth aspect of the embodiments of the present disclosure, a computer program product is provided, comprising computer programs or instructions, and when the computer programs or instructions are executed by a processor, the steps of the method according to any one of the preceding aspects are implemented.
[0060] The technical solutions provided by the embodiments of the present disclosure can include the following beneficial effects:
[0061] In the embodiments of the present disclosure, since there is a node mapping relationship between each view link in the view set and the rendering link in the rendering set, after the electronic device determines the first view link of the first view in the view set, it can determine the first rendering link corresponding to the first view link from the rendering set based on the node mapping relationship. Since the first view link has the first view to be updated, the first rendering link corresponding to the first view link must have the first rendering node corresponding to the first view. Based on this, the electronic device can determine the first rendering node whose drawing information is updated from the first rendering link, and obtain the first drawing information stored in the first rendering node, without having to determine the first rendering node whose drawing information is updated from the rendering set by traversing the entire rendering set. This can reduce the time complexity of determining the first rendering node whose drawing information is updated from the rendering set, and thus can shorten the update time of the display interface and reduce the consumption of computing resources and power of the electronic device during the process of updating the display interface.
[0062] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS
[0063] The accompanying drawings, which are incorporated herein and constitute part of the specification, illustrate embodiments consistent with the present disclosure and, together with the description, further serve to explain the principles of the present disclosure.
[0064] Figure 1 is a structural diagram of a view tree according to an example embodiment.
[0065] Figure 2 is a structural diagram of a rendering tree according to an example embodiment.
[0066] Figure 3 is a flow diagram of an interface updating method according to an example embodiment.
[0067] Figure 4 is a structural diagram of a rendering tree according to another example embodiment.
[0068] Figure 5 is a structural diagram of a view tree according to another example embodiment.
[0069] Figure 6 is a structural diagram of a rendering tree according to yet another example embodiment.
[0070] Figure 7 is a flow diagram of an interface updating method according to another example embodiment.
[0071] Figure 8 is a power consumption diagram of updating an interface according to an example embodiment.
[0072] Figure 9 is a power consumption diagram of updating an interface according to another example embodiment.
[0073] Figure 10 is a block diagram of an interface updating apparatus according to an example embodiment.
[0074] Figure 11 is a structural block diagram of an electronic device according to an example embodiment. DETAILED DESCRIPTION
[0075] The example embodiments will be described in detail herein with reference to the attached drawings. The description of the example embodiments is intended to apply to various embodiments and the example embodiments are not intended to limit the scope of the disclosure. Rather, the example embodiments are intended to explain the principles of the present disclosure and the practical application of the principles to enable one of ordinary skill in the art to use the example embodiments in a variety of applications and with various modifications as are suited to the particular use contemplated.
[0076] In some embodiments, reference is made toFigure 1 and Figure 2 , Figure 1 is a structural schematic diagram of a view tree according to an example embodiment; Figure 2 is a structural schematic diagram of a rendering tree according to an example embodiment. In which, Figure 1 The view tree in the electronic device includes a plurality of views (View) with different levels, and the application interface currently displayed by the electronic device is composed of the views included in the view tree; Figure 2 The rendering tree shown includes a plurality of rendering nodes (RenderNode), and each rendering node stores the drawing information of the corresponding view in the view tree. Based on this, the rendering thread (RenderThred) in the electronic device can draw each view in the view tree based on the drawing information stored in each rendering node in the rendering tree, and generate an application interface that can be displayed on the electronic device based on each view in the view tree.
[0077] Based on this, when the electronic device determines that the currently displayed application interface meets the update condition, the interface (User Interface, UI) thread in the electronic device can determine the third view to be updated in the view tree, and update the drawing information stored in the second rendering node corresponding to the third view in the rendering tree. For example, when the third view to be updated in the view tree is view 12 as shown in the view tree, Figure 1 The corresponding third rendering node of view 12 in the rendering tree is rendering node 22. Therefore, the UI thread can update the drawing information stored in rendering node 22 to obtain the updated rendering tree. Then, the UI thread can synchronize the updated rendering tree to the rendering thread. Accordingly, the rendering thread can traverse the updated rendering tree to determine the rendering node 22 in which the drawing information stored in the rendering tree is updated, then obtain the updated drawing information from the rendering node 22, and draw the updated application interface based on the updated drawing information.
[0078] From the above introduction, it can be known that the update process of the drawing information stored in the rendering tree is executed by the UI thread, and the process of drawing the updated application interface based on the updated drawing information is executed by the rendering thread. Therefore, the rendering thread needs to traverse the entire rendering tree to find the rendering node 22 in which the drawing information is updated, and draw the updated application interface based on the drawing information stored in the rendering node 22 in which the drawing information is updated. This process not only takes a long time, but also increases the consumption of the computing resources and power of the electronic device.
[0079] To solve the above problem, the present disclosure provides an interface update method. Referring to Figure 3 , Figure 3 is a flowchart of an interface update method according to an example embodiment. In the following,Figure 3 The interface updating method provided by the embodiments of the present disclosure is introduced.
[0080] In step 301, in a case where it is determined that the display interface meets the updating condition, a first view to be updated and a first view link corresponding to the first view are determined from a view set of the display interface.
[0081] It can be understood that the electronic device stores a view set used to generate a display interface of the electronic device, and all views in the view set constitute the display interface of the electronic device. Based on this, the electronic device can first determine the first view to be updated from the view set used to generate the display interface in a case where it is determined that the current display interface meets the updating condition. Then, the electronic device can determine the first view link corresponding to the first view in the view set.
[0082] In some embodiments, the interface updating method provided by the embodiments of the present disclosure can be executed by an electronic device. The electronic device can include a terminal device. The terminal device can include a mobile terminal and a fixed terminal. The mobile terminal can include a smartphone, a tablet computer, a notebook computer, a digital camera, a wearable electronic device, and the like. The fixed terminal can include a desktop computer and an all-in-one computer, and the like. Hereinafter, the interface updating method provided by the embodiments of the present disclosure will be described by taking the electronic device as an example.
[0083] In some embodiments, the display interface described above can be any interface that can be displayed by the electronic device, and the embodiments of the present disclosure do not limit this.
[0084] For example, the display interface described above can be a hierarchical interface of an application program. For example, the display interface can be a main interface of an application program.
[0085] In some embodiments, the first view can be one view or multiple views in the view set, and the embodiments of the present disclosure do not limit this.
[0086] For example, in a case where the view set is a view tree, the first view can be one or more leaf node views on the view tree, and the first view can also be one or more views on the same link on the view tree.
[0087] In some embodiments, determining that the display interface of the electronic device meets the updating condition includes at least one of the following:
[0088] Determining that the display interface meets the updating condition when detecting a triggering operation on the display interface;
[0089] Determining that the display interface meets the updating condition when determining that display content on the display interface reaches a preset updating time.
[0090] Exemplarily, the electronic device determines that the display interface meets the update condition when detecting a triggering operation of a user on any control key or any icon on the display interface.
[0091] Exemplarily, the display interface meets the update condition when the display content of the preset region on the display interface reaches the update time.
[0092] In some embodiments, step 301 comprises:
[0093] When the display interface meets the update condition, the electronic device determines a target region to be updated in the display interface;
[0094] The electronic device determines a view associated with the target region in the view set as the first view.
[0095] Exemplarily, when the display interface of the electronic device is an advertisement interface and the display content in the target region on the advertisement interface is updated every preset time interval, the electronic device can determine a view associated with the target region in the view set when the display content in the target region reaches the preset time interval, and determine the view associated with the target region in the view set as the first view. The view associated with the target region in the view set can be understood as a view used to directly or indirectly generate the target region.
[0096] Exemplarily, when the display interface of the electronic device is a home interface of the electronic device, if the electronic device detects a triggering operation of a user on any application icon on the home interface, the electronic device can determine a view corresponding to the application icon triggered by the user in the view set, and determine the view corresponding to the application icon triggered by the user in the view set as the first view to be updated.
[0097] In some embodiments, the step of determining the first view to be updated from the view set of the display interface can be performed by a UI thread in the electronic device.
[0098] In some embodiments, the view set of the display interface can be a set composed of a plurality of views having a preset association relationship.
[0099] Exemplarily, the preset association relationship can be a parent-child relationship and / or a sibling relationship. For example, the view set corresponding to the display interface can be a view tree.
[0100] In some embodiments, when the view set is a view tree, after determining the first view to be updated from the view tree, the electronic device can further determine a direct parent node view of the first view in the view tree, and then determine a direct parent node view of the direct parent node view of the first view, until a root node view in the view tree is found. Based on this, the electronic device determines a link between the root node view and the first view in the view tree as the first view link.
[0101] For example, referring to Figure 1 When the first view is view 121, the electronic device can find from the view tree that the direct parent node view of view 121 is view 12, the direct parent node view of view 12 is view 11, and the direct parent node view of view 11 is view 1. Figure 1 Therefore, the electronic device can determine the link between view 1 and view 121 as the first view link. Figure 1
[0102] In step 302, based on the node mapping relationship, the first rendering link corresponding to the first view link is determined from the rendering set of the display interface.
[0103] The node mapping relationship is used to represent the correspondence between the view link in the view set and the rendering link in the rendering set.
[0104] It can be understood that the electronic device also stores the rendering set of the display interface, and the drawing information of each view in the view set is stored in the preset storage space corresponding to each rendering node in the rendering set. Wherein, each view in the view set is drawn by the drawing information stored in the corresponding rendering node in the rendering set. In addition, the electronic device also stores the node mapping relationship between each view in the view set and each rendering node in the rendering set. Therefore, the electronic device can determine the rendering nodes corresponding to all views on the first view link in the rendering set based on the node mapping relationship, and determine the first rendering link based on the rendering nodes corresponding to all views on the first view link in the rendering set. That is, the first rendering link corresponding to the first view link is obtained.
[0105] In some embodiments, the drawing information stored in each rendering node in the rendering set includes but is not limited to the drawing content and rendering attribute of the view corresponding to the rendering node in the view set. Wherein, the drawing content can be a display list. The drawing content is used to indicate the shape of the view corresponding to the rendering node. For example, the drawing content is used to indicate whether the view corresponding to the rendering node is a circle, a square, a line or a point; the rendering attribute is used to indicate the display position, transparency and size of the view corresponding to the rendering node on the display screen and other attribute information.
[0106] In some embodiments, the rendering node corresponding to a view in the view set in the rendering set can be one or more, and the embodiments of the present disclosure do not limit this.
[0107] In some embodiments, when the view set is a view tree, the rendering set is a rendering tree corresponding to the view tree.
[0108] For example, when the view set is the view tree shown in FIG. 1, the rendering set can be the rendering tree shown in FIG. 2. Figure 1 For example, when the view set is the view tree shown in FIG. 1, the rendering set can be the rendering tree shown in FIG. 2.Figure 2 The render tree shown. Figure 1 The view 121 in the view tree shown is drawn according to the rendering information stored in the corresponding rendering node 221 in the rendering tree, and the view 112 is drawn according to the rendering information stored in the corresponding rendering node 212 in the rendering tree.
[0109] In some embodiments, when the view set is a view tree, the electronic device can start from the root node view and find the rendering node corresponding to the root node view from the rendering set based on the node mapping relationship. Afterwards, the electronic device can determine the direct child node view of the root node view on the first view link, which is referred to as the first child node view for the convenience of explanation. Afterwards, the electronic device can determine the rendering node corresponding to the first child node view in the rendering set through the node mapping relationship. Afterwards, the electronic device can determine the direct child node view of the first child node view, which is referred to as the second child node view for the convenience of explanation. The electronic device can also determine the rendering node corresponding to the second child node view in the rendering set. Repeat the above process until the first view located on the first view link is traversed and the first rendering node corresponding to the first view is determined from the rendering set. Based on this, the electronic device can determine the first rendering link of the first rendering node in the rendering set based on the rendering nodes traversed in the rendering set.
[0110] For example, refer to Figure 5 and Figure 6 , Figure 5 is a schematic diagram showing the structure of a view tree according to another exemplary embodiment; Figure 6 1 is a schematic diagram of a rendering tree structure according to another exemplary embodiment. In the case where the first view to be updated is view 121, the electronic device can determine that the views on the first view link where view 121 is located include view 121, view 12, and view 121. Figure 1 Based on this, electronic devices can Figure 1 First, determine the view through the node mapping relationship Figure 1 exist Figure 6 The corresponding rendering node in the rendering tree shown is rendering node 2, and view 12 is in Figure 6 The corresponding rendering node in the view tree shown is rendering node 22, and view 121 is in Figure 6 The corresponding rendering node in the view tree shown is rendering node 221. Afterwards, the electronic device can determine that the rendering nodes traversed in the rendering set are rendering node 2, rendering node 21, and rendering node 211. Therefore, it can be determined that the first rendering link where rendering node 211 is located is Figure 6 The link is shown by the dotted line.
[0111] In some embodiments, the UI thread in the electronic device may further monitor the vertical synchronization signal (Vsync) after determining the first view link where the first view is located from the view tree. After monitoring the vertical synchronization signal, the UI thread may execute the step of determining the first rendering link corresponding to the first view link from the rendering set based on all views and node mapping relationships on the first view link.
[0112] In step 303, a first rendering node corresponding to the first view is determined from the first rendering link.
[0113] The rendering link includes at least one rendering node, and the rendering node is used to store drawing information of the view corresponding to the rendering node.
[0114] It is understandable that since the first view is located on the first view chain, and the views on the first view chain correspond one-to-one to the rendering nodes in the first rendering chain, the first rendering node corresponding to the first view must also be located on the first rendering chain. Based on this, after determining the first rendering chain, the electronic device can determine the first rendering node corresponding to the first view from the first rendering chain.
[0115] In some embodiments, the step of determining the first rendering node corresponding to the first view from the first rendering chain may be performed by a rendering thread.
[0116] Exemplarily, when the render set is a render tree, the rendering thread may start from the root render node and search for the first render node corresponding to the first view from the first rendering link.
[0117] For example, in a render set of Figure 6 The rendering tree shown, and the first rendering chain is Figure 6 When viewing the link shown by the dotted line in FIG, the rendering thread may start from the root rendering node and search for the first rendering node corresponding to the first view along the first rendering link shown by the dotted line.
[0118] In some embodiments, when the electronic device determines the first rendering link corresponding to the first rendering node corresponding to the first view in the rendering set based on the first view link corresponding to the first view in the view set, when the electronic device traverses to the first rendering node in the rendering set, the electronic device may further update the second rendering information stored in the first rendering node to the first rendering information. The second rendering information is the rendering information used to render the first view.
[0119] In some embodiments, after determining the first rendering node corresponding to the first view from the rendering set, the electronic device can further determine whether the first rendering node has a sub-rendering node; in the case that the first rendering node has a sub-rendering node, determine whether the first drawing information stored in the sub-rendering node needs to be updated; in the case that the drawing information stored in the sub-rendering node needs to be updated, update the second drawing information in the sub-rendering node to the first drawing information.
[0120] In step 304, the first view is updated to the second view based on the first drawing information stored in the first rendering node
[0121] It can be understood that, since the electronic device determines the first view in the view set as the view to be updated, the first rendering node corresponding to the first view is determined from the rendering set based on the node mapping relationship, and the second drawing information stored in the first rendering node is updated to the first drawing information. Therefore, after determining the first rendering node corresponding to the first view from the first rendering chain, the electronic device can obtain the first drawing information from the first rendering node, and draw the second view according to the first drawing information.
[0122] In some embodiments, the process of obtaining the first drawing information from the first rendering node and drawing the second view based on the first drawing information can be performed by a rendering thread.
[0123] In step 305, the display interface is updated based on the second view.
[0124] In some embodiments, when the electronic device draws the second view based on the first drawing information, the first view on the display interface can be updated to the second view, and thus an updated display interface can be obtained.
[0125] Exemplarily, in the following, a specific embodiment will be used to illustrate the interface updating method provided above. When the display interface of the electronic device is a video playing interface, if the user needs to pause the currently played video, the user will click a first preset icon on the video playing interface for controlling the video pause playing. At this time, the first preset icon displayed on the video playing interface needs to be updated to a second preset icon indicating the pause playing. Therefore, after detecting the click operation of the user on the first preset icon, the electronic device can determine a first view associated with the first preset icon from the view set corresponding to the video playing interface. Then, the electronic device can determine that the first view associated with the first preset icon is the first view link in the view set.
[0126] After determining the first view link corresponding to the first view associated with the first preset icon in the view set, the electronic device can find the rendering node corresponding to each view on the first view link in the rendering set from the root node view, and when the first rendering node corresponding to the first view in the rendering set is found, the electronic device can also update the second drawing information stored in the first rendering node to the first drawing information. In addition, the electronic device can also determine the first rendering link according to the rendering node corresponding to each view on the first view link in the rendering set. Based on this, when drawing the updated display interface, the electronic device can find the first rendering node with the first drawing information from the first rendering link, obtain the first drawing information from the first rendering node, draw the second preset icon based on the first drawing information, and generate the updated video playing interface based on the second preset icon. That is, the video playing interface with the second preset icon indicating pausing playing is generated.
[0127] It should be noted that in some cases, the process of updating the second drawing information of the first rendering node corresponding to the first view to the first drawing information is performed by the UI thread. And the process of obtaining the first drawing information from the first rendering node and generating the second view based on the first drawing information is performed by the rendering thread. Therefore, when the UI thread synchronizes the rendering tree in which the second drawing information is updated to the first drawing information to the rendering thread, the rendering thread does not know which rendering nodes in the rendering set store the first drawing information. Therefore, in the related art, the rendering thread needs to traverse the entire rendering set to find the first rendering node storing the first drawing information from the rendering set, so as to obtain the first drawing information from the first rendering node and draw the second view based on the first drawing information. This not only prolongs the required time length of generating a frame of interface, but also increases the consumption of computing resources and power in the electronic device.
[0128] In the embodiments of the present disclosure, since there is a node mapping relationship between each view in the view set and the rendering link in the rendering set, after determining the first view link of the first view in the view set, the electronic device can determine the second rendering link corresponding to the first view link from the rendering set based on the node mapping relationship. Since the first view in the first view link needs to be updated, the first rendering node corresponding to the first view must exist in the first rendering link corresponding to the first view link. Based on this, the electronic device can determine the first rendering node with updated rendering information from the first rendering link, and obtain the first rendering information from the first rendering node. That is, the electronic device can directly determine the first rendering node with updated rendering information from the rendering set based on the first rendering link, and obtain the first rendering information stored in the first rendering node, without having to determine the first rendering node with updated rendering information from the rendering set by traversing the entire rendering set, which can reduce the time complexity of determining the first rendering node with updated rendering information from the rendering set, and in turn can shorten the update time of the display interface and reduce the calculation resources and power consumption of the electronic device in the process of updating the display interface.
[0129] In some embodiments, step 302 comprises:
[0130] determining, based on the node mapping relationship, rendering nodes corresponding to all views on the first view link in the rendering set;
[0131] based on the first preset identifier, marking the rendering nodes corresponding to all views on the first view link in the rendering set;
[0132] based on the rendering nodes in the rendering set marked by the first preset identifier, determining a first rendering link corresponding to the first view link.
[0133] It can be understood that after determining all views on the first view link, the electronic device can also determine the rendering nodes corresponding to each view on the first view link in the rendering set based on the node mapping relationship, and mark the rendering nodes corresponding to all views on the first view link in the rendering set by the first preset identifier. Based on this, the rendering nodes on the first rendering link will all be marked by the first preset identifier, and therefore the electronic device can determine the first rendering link in which the first rendering node is located based on the first preset identifier.
[0134] In some embodiments, the first preset identifier can be any identifier information capable of identifying the rendering nodes in the rendering set, and the embodiments of the present disclosure do not limit this.
[0135] For example, the first preset identifier can be a character segment with a preset length.
[0136] In some embodiments, in the case that the view set is a view tree, the electronic device can, after determining all the views on the first view link, start from the root node view, find the rendering node corresponding to the root node view from the rendering set based on the node mapping relationship, and mark the rendering node corresponding to the root node view by the first preset identifier. Then, the electronic device can determine the first child node view of the root node view on the first view link, and determine the rendering node corresponding to the first child node view in the rendering set based on the node mapping relationship, and mark the rendering node corresponding to the first child node view in the rendering set by the first preset identifier. Then, the electronic device can also determine the direct child node view of the first child node view on the first view link, that is, determine the second child node view, and mark the rendering node corresponding to the second child node view in the rendering set by the first preset identifier. Repeat the above process until the first rendering node corresponding to the first view is determined from the rendering set and marked by the first preset identifier. Based on this, the electronic device can determine the first rendering link corresponding to the first view link from the rendering set based on the first preset identifier in the rendering set.
[0137] Exemplarily, referring to Figure 5 and Figure 6 , when the electronic device determines that the first view link of the view 121 to be updated in the view tree is the link shown by the dashed line in Figure 5 , the electronic device can start from the view Figure 1 , determine the view Figure 1 corresponding rendering node 2 in the rendering tree shown in Figure 6 based on the node mapping relationship, and mark the rendering node 2 by the first preset identifier. Then, the electronic device can determine that the child node view of the view Figure 1 on the first view link is the view 12, at this time, the electronic device can determine the rendering node corresponding to the view 12 in the rendering tree shown in Figure 6 is the rendering node 22 from the rendering tree based on the node mapping relationship, and mark the rendering node 22 by the first preset identifier. The electronic device can also determine that the child node view of the view 22 on the first view link is the view 121, and determine the rendering node 221 corresponding to the view 121 in the rendering tree shown in Figure 6 based on the node mapping relationship, and mark the rendering node 221 by the first preset identifier. Based on this, all the rendering nodes corresponding to the views on the first view link in the rendering tree have been marked by the first preset identifier, therefore, the electronic device can determine the first rendering link corresponding to the first view link from the rendering set by the first preset identifier.
[0138] In the embodiments of the present disclosure, after determining the rendering nodes corresponding to all the views on the first view link where the first view is located, the rendering nodes corresponding to all the views on the first view link are marked by the first preset identifier. Based on this, the electronic device can directly determine the first rendering link corresponding to the first view link from the rendering set based on the first preset identifier, and find the first rendering node from the first rendering link, without traversing all the rendering nodes in the rendering set to find the first rendering node where the first drawing information is updated, which can not only shorten the time required for updating an interface, but also reduce the occupation of the computing resources of the electronic device and the consumption of the power during the interface updating process.
[0139] In some embodiments, the method further includes:
[0140] updating the second drawing information stored in the first rendering node as the first drawing information, wherein the second drawing information is drawing information for drawing the first view.
[0141] It can be understood that, since the first view in the view set corresponds to the first rendering node in the rendering set, the first view in the view set is drawn based on the second drawing information stored in the first rendering node in the rendering set. Based on this, when the first view is determined to be the view to be updated, the UI thread can also update the second drawing information in the first rendering node corresponding to the first view as the first drawing information, for the rendering thread to draw the updated first view based on the first drawing information in the subsequent steps, i.e., to draw the second view.
[0142] In some embodiments, the electronic device can update the second drawing information stored in the first rendering node as the first drawing information during the process of determining the rendering nodes corresponding to all the views on the first view link based on the node mapping relationship.
[0143] In some embodiments, the process of updating the second drawing information as the first drawing information can be performed by the UI thread.
[0144] For example, the UI thread can obtain the first drawing information corresponding to the detected user operation based on the detected user operation, and update the second drawing information stored in the first rendering node as the first drawing information.
[0145] In some embodiments, based on the first preset identifier, marking the rendering nodes corresponding to all the views on the first view link includes:
[0146] determining whether the first rendering node has a child rendering node;
[0147] In a case where the first rendering node exists sub-rendering nodes, it is determined whether the second drawing information stored in the sub-rendering nodes is updated to the first drawing information;
[0148] In a case where it is determined that the second drawing information stored in the sub-rendering nodes is updated to the first drawing information, the sub-rendering nodes are marked by the first preset identifier.
[0149] It can be understood that, if one view in the view set has multiple rendering nodes in the rendering set, one of the multiple rendering nodes is a parent rendering node and at least one is a sub-rendering node. Therefore, when the electronic device marks the rendering node corresponding to the first view by the first preset identifier, it can also be determined whether the first rendering node exists sub-rendering nodes, and in a case where the first rendering node exists sub-rendering nodes and the second drawing information originally stored in the sub-rendering nodes is updated to the first drawing information, the sub-rendering node with the first drawing information is marked by the first preset identifier.
[0150] In some embodiments, the sub-rendering nodes of the first rendering node can include direct sub-rendering nodes and indirect sub-rendering nodes. The direct sub-rendering nodes can be sub-rendering nodes having a direct link relationship with the first rendering node, and the indirect sub-rendering nodes are sub-rendering nodes having an indirect link relationship with the first rendering node.
[0151] In some embodiments, in a case where the first rendering node exists multiple sub-rendering nodes, the electronic device can in turn determine whether the second drawing information originally stored in each of the multiple sub-rendering nodes is updated to the first drawing information, and in a case where it is determined that the second drawing information stored in at least one sub-rendering node is updated to the first drawing information, the first rendering node and the sub-rendering node with the first drawing information are marked by the first preset identifier.
[0152] For example, referring to Figure 4 , it is assumed that the first view to be updated corresponds to the rendering node 221 in the rendering tree shown in Figure 4 . Since the rendering node 221 exists sub-rendering nodes 2211 and 2212, the electronic device can in turn determine whether the second drawing information originally stored in the sub-rendering nodes 2211 and 2212 is updated to the first drawing information. In a case where it is determined that the second drawing information stored in the sub-rendering node 2211 is updated to the first drawing information, and the second drawing information stored in the sub-rendering node 2212 is not updated to the first drawing information, the rendering node 221 and the sub-rendering node 2211 can be marked by the first preset identifier.
[0153] In some embodiments, in a case where it is determined that the second drawing information stored in the sub-rendering node is updated to the first drawing information, the sub-rendering node is marked by the first preset identifier, including:
[0154] In a case where it is determined that the drawing content and / or the rendering attribute stored in the sub-rendering node is updated, the sub-rendering node is marked by the first preset identifier.
[0155] It can be understood that the drawing information stored in the sub-rendering node at least includes the drawing content and the rendering attribute, and the electronic device determines that the second drawing information stored in the sub-rendering node is updated to the first drawing information in a case where it is determined that the rendering node corresponding to the first view exists the sub-rendering node, and the rendering attribute and / or the drawing content of the second drawing information stored in the sub-rendering node of the rendering node is updated, at this time, the electronic device can mark the sub-rendering node by the first preset identifier.
[0156] In some embodiments, the drawing content stored in the sub-rendering node can be a display list. The drawing content is used to indicate the shape of at least part of the region in the first view corresponding to the sub-rendering node. For example, the drawing content is used to indicate whether at least part of the region in the first view corresponding to the sub-rendering node is a circle, a square, a line, or a point; and the rendering attribute is used to indicate the position, transparency, and size of at least part of the region in the first view corresponding to the sub-rendering node on the display screen and other attribute information.
[0157] In the embodiments of the present disclosure, in a case where it is determined that the first rendering node exists the sub-rendering node, and the second drawing information originally stored in the sub-rendering node is updated to the first drawing information, the sub-rendering node in which the drawing information is updated is marked by the first preset identifier. Based on this, the electronic device can know which sub-rendering node has the second drawing information updated to the first drawing information through the first preset identifier, and obtain the first drawing information from the sub-rendering node with the first preset identifier, thereby improving the efficiency of obtaining the first drawing information.
[0158] In some embodiments, the updating the first view to the second view based on the first drawing information stored in the first rendering node includes:
[0159] determining the sub-rendering node in which the first drawing information is stored based on the first preset identifier;
[0160] updating the first view to the second view based on the first drawing information stored in the first rendering node and the sub-rendering node.
[0161] It can be understood that, since the electronic device determines that the second drawing information originally stored in the sub-rendering node of the first rendering node has been updated to the first drawing information, the sub-rendering node with the first drawing information is marked by the first preset identifier. Therefore, the electronic device can also draw the second view according to the first drawing information stored in the first rendering node and the first drawing information stored in the sub-rendering node of the first rendering node when drawing the second view.
[0162] In some embodiments, the electronic device can update the second drawing information in the sub-rendering node of the first rendering node to the first drawing information when updating the second drawing information originally stored in the first rendering node to the first drawing information.
[0163] In some embodiments, from the view set of the display interface, the first view to be updated and the first view link corresponding to the first view are determined, including:
[0164] From the view set of the display interface, the first view is determined;
[0165] The second preset identifier of the first view and the view associated with the first view in the view set is updated, wherein the view associated with the first view includes the direct parent node view and / or the indirect parent node view of the first view;
[0166] Based on the updated second preset identifier, the first view link of the first view in the view set is determined.
[0167] It can be understood that, since each view in the view set has a second preset identifier, after determining the first view to be updated, the electronic device can also determine the direct parent node view of the first view from the view set and update the second preset identifier of the direct parent node view of the first view. Then, the electronic device can also determine the direct parent node view of the direct parent node view of the first view from the view set, that is, determine the indirect parent node view of the first view, and update the second preset identifier of the indirect parent node view of the first view, until the update of the second preset identifier of all views associated with the first view is completed. Based on this, the electronic device can determine the first view link based on the second preset identifier.
[0168] The direct parent node view of the first view can be a parent node view having a direct link relationship with the first view. The indirect parent node view of the first view can be a parent node view having an indirect link relationship with the first view.
[0169] In some embodiments, the first view to be updated can be determined from the view set based on the detected trigger operation on the display interface.
[0170] Exemplarily, the electronic device can determine a display area of the display interface triggered by the triggering operation based on the detected triggering operation on the display interface, and determine a view corresponding to the display area triggered by the triggering operation in the first view set as the first view.
[0171] Exemplarily, when the display interface of the electronic device is a music playing interface, if the electronic device detects a triggering operation of a first control key on the music playing interface by the user, the view related to the display of the first control key in the view set can be determined as the first view.
[0172] In some embodiments, in the case where the view set is a view tree, after the first view is determined, the electronic device can update the second preset identifier of the first view, and sequentially update the second preset identifier of the view traversed in the direction from the first view to the root node view until the update of the second preset identifier of the root node view is completed. Based on this, the electronic device can determine the first view link of the first view in the view set based on the updated second preset identifier in the view set.
[0173] Exemplarily, referring to Figure 5 , if the electronic device determines that the view 121 in the view tree shown in Figure 5 is the first view, the second preset identifier on the view 121 can be updated. Since the direct parent node view of the view 121 is the view 12, after the second preset identifier on the view 121 is updated, the electronic device can continue to update the second preset identifier on the view 12. Similarly, since the parent node view of the view 12 is the view Figure 1 , after the second preset identifier on the view 12 is updated, the electronic device can continue to update the second preset identifier on the view Figure 1 . Based on this, the electronic device can determine the first view link of the view 121 in the view tree (the link shown by the dashed line in Figure 5 ) according to the view whose second preset identifier is updated in the view tree.
[0174] In some embodiments, updating the second preset identifier of the view associated with the first view in the view set comprises at least one of:
[0175] deleting the second preset identifier of the view associated with the first view in the view set;
[0176] or;
[0177] updating the second preset identifier of the view associated with the first view in the view set to a third preset identifier.
[0178] In some embodiments, the second preset identifier and the third preset identifier can each be any identification information capable of identifying the view in the view set, and the embodiments of the present disclosure do not limit this.
[0179] refer to Figure 7 , Figure 7 1 is a flow chart of an interface updating method according to another exemplary embodiment. Hereinafter, the interface updating method provided by the above embodiment will be further introduced by taking the view set as a view tree and the render set as a render tree as an example.
[0180] In step 701, when the display interface meets the update condition, the first view to be updated in the view tree of the display interface is determined.
[0181] For example, the first view to be updated in the view tree may be Figure 1 View 121 in.
[0182] In step 702, traverse from the first view toward the root node view, and delete the second preset identifiers of all traversed views.
[0183] The second preset identifier may be an identifier indicating that the view is an available view.
[0184] In step 703, a vertical synchronization signal is requested.
[0185] Exemplarily, when the display interface is an application interface, the application program requests a vertical synchronization signal from the display system.
[0186] In step 704, after monitoring the vertical synchronization signal, the UI thread starts from the root node view of the view tree and sequentially searches for the rendering node corresponding to each view whose second preset identifier is deleted in the rendering tree.
[0187] For example, refer to Figure 5 , UI thread from view Figure 1 Initially, a rendering node corresponding to each view on the first view link is searched along the dotted line in the rendering tree.
[0188] In step 705 , the rendering node corresponding to each view whose second preset identifier is deleted is marked with the first preset identifier, and the second drawing information stored in the first rendering node corresponding to the first view is updated to the first drawing information.
[0189] For example, refer to Figure 1 and Figure 2 , due to visual Figure 1 In the render tree, view 12 corresponds to render node 2, view 12 corresponds to render node 22, and view 121 corresponds to render node 221. Therefore, the UI thread can sequentially mark render node 2, render node 22, and render node 221 with the first preset identifier, and update the second drawing information stored in render node 221 to the first drawing information.
[0190] In step 706 , the rendering tree having the first preset identifier and in which the second rendering information stored in the first rendering node is updated to the first rendering information is synchronized to the rendering thread.
[0191] In step 707 , the rendering thread determines a first rendering node from the rendering tree based on the first preset identifier.
[0192] In step 708 , the rendering thread obtains first drawing information from the first rendering node.
[0193] In step 709 , a second view is rendered based on the first rendering information.
[0194] In step 710 , the display interface is updated based on the second view.
[0195] refer to Figure 8 , Figure 8 is a power consumption diagram of an update interface according to an exemplary embodiment; Figure 8 The interface updating method provided by the embodiment of the present disclosure is shown in FIG. Figure 8 Method 2) and the interface update method in the related art ( Figure 8 Method 1) in which the power consumption of the electronic device is updated when the application interface of the first application and the second application is updated. Figure 8 It can be seen that by using the interface update method provided in the embodiment of the present disclosure to update the interface of the first application, the power consumption of the entire machine can be reduced by about 2.4%. By using the interface update method provided in the embodiment of the present disclosure to update the interface of the second application, the power consumption of the entire machine can be reduced by about 2.63%.
[0196] refer to Figure 9 , Figure 9 is a power consumption diagram of an update interface according to another exemplary embodiment; Figure 9 The interface updating method provided by the embodiment of the present disclosure is shown in FIG. Figure 9 Method 2) and the interface update method in the related art ( Figure 9 The number of instructions of the central processing unit (CPU) executed by the rendering thread when updating the application interface of 12 applications in method 1) is as follows. Figure 9 It can be seen that the interface update method provided by the embodiment of the present disclosure is used to update Figure 9 By updating the interfaces of the 12 applications shown in FIG, the number of instructions of the central processing unit (CPU) executed by the rendering thread can be reduced by about 15%.
[0197] refer to Figure 10 ,Figure 10 is a block diagram of an interface updating apparatus according to an exemplary embodiment. As shown, the interface updating apparatus 1000 includes: Figure 10
[0198] A first determining module 1001, configured to determine a first view to be updated and a first view link corresponding to the first view from a view set of a display interface, in a case where it is determined that the display interface meets an updating condition;
[0199] A second determining module 1002, configured to determine a first rendering link corresponding to the first view link from a rendering set of the display interface based on a node mapping relationship, wherein the node mapping relationship is used to represent a corresponding relationship between a view link in the view set and a rendering link in the rendering set;
[0200] A third determining module 1003, configured to determine a first rendering node corresponding to the first view from the first rendering link, wherein the rendering link includes at least one rendering node, and the rendering node is used to store drawing information of a view corresponding to the rendering node;
[0201] A first updating module 1004, configured to update the first view to a second view based on first drawing information stored in the first rendering node;
[0202] A second updating module 1005, configured to update the display interface based on the second view.
[0203] In some embodiments, the second determining module 1002 includes:
[0204] A first determining unit, configured to determine all rendering nodes corresponding to all views on the first view link in the rendering set based on the node mapping relationship;
[0205] A marking unit, configured to mark all rendering nodes corresponding to all views on the first view link in the rendering set based on a first preset identifier;
[0206] A second determining unit, configured to determine the first rendering link corresponding to the first view link based on the rendering nodes marked by the first preset identifier in the rendering set.
[0207] In some embodiments, the apparatus further includes:
[0208] A third updating module, configured to update second drawing information stored in the first rendering node to first drawing information, wherein the second drawing information is drawing information used to draw the first view.
[0209] In some embodiments, the marking unit is configured to:
[0210] determine whether the first rendering node has a sub-rendering node;
[0211] In a case where the first rendering node has a child rendering node, determining whether the second rendering information stored in the child rendering node is updated to the first rendering information;
[0212] When it is determined that the second rendering information in the sub-rendering node is updated to the first rendering information, the sub-rendering node is marked with a first preset identifier.
[0213] In some embodiments, the second drawing information includes drawing content and rendering attributes; the marking unit is configured to:
[0214] When it is determined that the rendering content and / or rendering attributes of the second rendering information in the sub-rendering node are updated, the sub-rendering node is marked with a first preset identifier.
[0215] In some embodiments, the first update module is configured to:
[0216] Determining, based on the first preset identifier, a child rendering node storing the first rendering information;
[0217] Based on the first drawing information stored in the first rendering node and the child rendering node, the first view is updated to the second view.
[0218] In some embodiments, the first determining module 1001 is configured to:
[0219] Determining a first view from a view set of the display interface;
[0220] Updating the first view and second preset identifiers of views associated with the first view in the view set, wherein the views associated with the first view include direct parent node views and / or indirect parent node views of the first view;
[0221] Based on the updated second preset identifier, a first view link corresponding to the first view is determined.
[0222] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0223] Figure 11 1 is a block diagram of an electronic device 1100 according to an exemplary embodiment. For example, the electronic device 1100 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0224] Reference Figure 11The electronic device 1100 can include one or more of the following components: a processing component 1102, a memory 1104, a power component 1106, a multimedia component 1108, an audio component 1110, an input / output (I / O) interface 1112, a sensor component 1114, and a communication component 1116.
[0225] The processing component 1102 generally controls the overall operation of the electronic device 1100 such as the operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1102 can include one or more processors 1120 to execute instructions to complete all or a part of steps of the methods described above. In addition, the processing component 1102 can include one or more modules to facilitate interaction between the processing component 1102 and other components. For example, the processing component 1102 can include a multimedia module to facilitate the interaction between the multimedia component 1108 and the processing component 1102.
[0226] The memory 1104 is configured to store various types of data to support operations of the electronic device 1100. Examples of these data include at least one of instructions for any application or method operating on the electronic device 1100, contact data, phonebook data, messages, pictures, and videos. The memory 1104 can be implemented by any type of volatile or nonvolatile memory, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disc, or optical disc.
[0227] The power component 1106 supplies power for various components of the electronic device 1100. The power component 1106 can include at least one of a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 1100.
[0228] The multimedia component 1108 includes a screen providing an output interface between the electronic device 1100 and a user. In some embodiments, the screen can include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense a touch, a slide and a gesture on the touch panel. The touch sensor can not only sense a boundary of a touching or a sliding action, but also detect duration and pressure related to the touching or sliding action. In some embodiments, the multimedia component 1108 includes a front camera and / or a rear camera. When the electronic device 1100 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.
[0229] The audio component 1110 is configured to output and / or input an audio signal. For example, the audio component 1110 includes a microphone (MIC) configured to receive an external audio signal when the electronic device 1100 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 1104 or transmitted via the communication component 1116. In some embodiments, the audio component 1110 also includes a speaker for outputting an audio signal.
[0230] The I / O interface 1112 provides an interface between the processing component 1102 and peripheral interface modules, which can be a keypad, a click wheel, and a button, etc. The buttons can include, but are not limited to, a home button, a volume button, a start button, and a lock button.
[0231] The sensor component 1114 includes one or more sensors for providing various state assessments for the electronic device 1100. For example, the sensor component 1114 can detect an open / closed position of the electronic device 1100, relative positioning of components, such as a display and a keypad of the electronic device 1100, a change in position of the electronic device 1100 or a component of the electronic device 1100, presence or absence of user contact with the electronic device 1100, orientation or acceleration / deceleration / g-force and temperature changes of the electronic device 1100. The sensor component 1114 can include a proximity sensor configured to detect presence of a nearby object without any physical touch. The sensor component 1114 can further include a light sensor, such as a complementary metal oxide semiconductor (CMOS) or charge coupled device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor component 1114 can further include at least one of an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, and a temperature sensor, among others.
[0232] The communication component 1116 is configured to facilitate wired or wireless communication between the electronic device 1100 and other devices. The electronic device 1100 can access a wireless network based on a communication standard, such as Wi-Fi, 4G, 5G, or a combination thereof. In an example embodiment, the communication component 1116 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In an example embodiment, the communication component 1116 can further include a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra-WideBand (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0233] In exemplary embodiments, the electronic device 1100 can be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic elements.
[0234] In exemplary embodiments, a non-transitory computer-readable storage medium including instructions, such as a memory 1104 including executable instructions or a computer program, is also provided, which can be executed by the processor 920 of the electronic device 900 to complete the above-described method. For example, the non-transitory computer-readable storage medium can be a 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, etc.
[0235] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to perform any one of the interface updating methods according to the embodiments of the present disclosure. For example, the method includes:
[0236] In a case where it is determined that the display interface meets the updating condition, a first view to be updated and a first view link corresponding to the first view are determined from a view set of the display interface;
[0237] Based on a node mapping relationship, a first rendering link corresponding to the first view link is determined from a rendering set of the display interface; wherein the node mapping relationship is used to represent a corresponding relationship between a view link in the view set and a rendering link in the rendering set;
[0238] From the first rendering link, a first rendering node corresponding to the first view is determined, wherein the first rendering link includes at least one rendering node, and the rendering node is used to store drawing information of a view corresponding to the rendering node;
[0239] Based on the first drawing information stored by the first rendering node, the first view is updated to a second view;
[0240] Based on the second view, the display interface is updated.
[0241] The computer program product includes a computer program or executable instructions stored in a computer readable storage medium. A processor of a computer device reads the computer program or executable instructions from the computer readable storage medium, and executes the computer program or executable instructions, so that the computer device executes any one of the interface updating methods provided in the embodiments of the present disclosure.
[0242] Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure following the general principles thereof and including such departures from the present disclosure as come within known use or custom in the art to which the present disclosure pertains. The specification and examples are to be regarded as illustrative only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0243] It should be understood that the present disclosure is not limited to the precise structures as herein described and illustrated in the drawings, and that various modifications and changes can be made without departing from its scope. The scope of the present disclosure is limited only by the claims that follow.
Claims
1. An interface updating method, characterized in that: The method comprises: When it is determined that the display interface meets the update condition, determining a first view to be updated and a first view link corresponding to the first view from the view set of the display interface; Determining, from the rendering set of the display interface, a first rendering link corresponding to the first view link based on a node mapping relationship; wherein the node mapping relationship is used to represent a correspondence between view links in the view set and rendering links in the rendering set; Determining a first rendering node corresponding to the first view from the first rendering chain, wherein the rendering chain includes at least one rendering node, and the rendering node is used to store drawing information of the view corresponding to the rendering node; updating the first view to a second view based on first drawing information stored in the first rendering node; Based on the second view, the display interface is updated.
2. The method according to claim 1, characterized in that The determining, based on the node mapping relationship, a first rendering link corresponding to the first view link from the rendering set of the display interface includes: Determining, based on the node mapping relationship, rendering nodes corresponding to all views on the first view link in the rendering set; Based on a first preset identifier, marking the rendering nodes corresponding to all views on the first view link in the rendering set; The first rendering link corresponding to the first view link is determined based on the rendering nodes in the rendering set marked by the first preset identifier.
3. The method according to claim 1 or 2, characterized in that The method further comprises: The second rendering information stored in the first rendering node is updated to the first rendering information, wherein the second rendering information is rendering information used to render the first view.
4. The method according to claim 3, characterized in that The step of marking, based on the first preset identifier, rendering nodes corresponding to all views on the first view link in the rendering set includes: Determining whether the first rendering node has a child rendering node; In a case where the first rendering node has the child rendering node, determining whether the second rendering information stored in the child rendering node is updated to the first rendering information; When it is determined that the second rendering information in the sub-rendering node is updated to the first rendering information, the sub-rendering node is marked with the first preset identifier.
5. The method according to claim 4, characterized in that The second rendering information includes rendering content and rendering attributes; and when it is determined that the second rendering information in the sub-rendering node is updated to the first rendering information, marking the sub-rendering node with the first preset identifier includes: When it is determined that the rendering content and / or rendering attributes of the second rendering information in the sub-rendering node are updated, the sub-rendering node is marked with the first preset identifier.
6. The method according to claim 4 or 5, characterized in that The updating of the first view to a second view based on the first drawing information stored in the first rendering node includes: Determining, based on the first preset identifier, a child rendering node storing the first rendering information; The first view is updated to the second view based on the first drawing information stored in the first rendering node and the child rendering node.
7. The method according to claim 1, characterized in that The determining, from the view set of the display interface, a first view to be updated and a first view link corresponding to the first view includes: Determining the first view from a view set of the display interface; updating the first view and second preset identifiers of views associated with the first view in the view set, wherein the views associated with the first view include direct parent node views and / or indirect parent node views of the first view; The first view link corresponding to the first view is determined based on the updated second preset identifier.
8. An interface updating device, characterized in that: The device comprises: a first determining module configured to, when determining that the display interface meets the update condition, determine a first view to be updated and a first view link corresponding to the first view from the view set of the display interface; a second determining module configured to determine, from a rendering set of the display interface, a first rendering link corresponding to the first view link based on a node mapping relationship, wherein the node mapping relationship is used to represent a correspondence between view links in the view set and rendering links in the rendering set; a third determining module configured to determine a first rendering node corresponding to the first view from the first rendering chain, wherein the rendering chain includes at least one rendering node, and the rendering node is used to store drawing information of the view corresponding to the rendering node; a first updating module configured to update the first view to a second view based on first drawing information stored in the first rendering node; The second updating module is configured to update the display interface based on the second view.
9. An electronic device, characterized in that: include: processor; memory for storing computer programs or instructions; The processor executes the computer program or instructions to implement the steps of the method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing a computer program or instruction, characterized in that: When the computer program or instructions in the storage medium are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method for image rendering and related device
CN116089056A
Interface generation method and electronic equipment
CN116166255A
User interface display method and related device
CN117667277A
Compact display of hierarchical structure on user interface
US20170060348A1
View display method and apparatus, electronic device, and storage medium
WO2023245374A1