Page display method and device, equipment and storage medium
By obtaining and rendering the rendering properties in the view component tree, the problem of page graying in the prior art affecting user experience and high development costs is solved, and efficient and flexible page display is achieved.
Patent Information
- Application Number
- CN202410140138.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-31
- Publication Date
- 2025-08-01
AI Technical Summary
In the prior art, the page greying method affects the user experience and has high development costs, especially when application version iteration or page layout adjustment, it is necessary to re-edit the greying logic.
By detecting that page updates are obtained, the rendering properties of each view component are determined, and the page components are rendered based on these properties to achieve efficient page display.
Improve page rendering efficiency, reduce development costs, and improve page display flexibility and diversity.
Smart Images

Figure CN120407054A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technologies, and particularly to a page display method, apparatus, device, and storage medium. Background Art
[0002] Applications or web URLs sometimes have a need to grayscale a page. In the prior art, one approach is to globally grayscale the page, which affects the user experience. Another approach is partial grayscaling. In the partial grayscaling approach, grayscale logic is added to the business code. This approach has strong coupling between the grayscale logic and the business code. When the application version is iterated, the page layout is adjusted, or the grayscale range is changed, the grayscale logic needs to be re-edited, increasing the development cost. Summary of the Invention
[0003] Embodiments of the present disclosure provide a page display method, apparatus, device, and storage medium, which can improve the efficiency of page rendering.
[0004] In a first aspect, embodiments of the present disclosure provide a page display method, including:
[0005] When it is detected that the page is updated, obtaining the view component tree corresponding to the page; wherein, the view component tree includes a plurality of view components arranged in a tree structure;
[0006] Determining the rendering attributes of each view component in the view component tree;
[0007] Rendering each view component in the view component tree based on the rendering attributes to display the page.
[0008] In a second aspect, embodiments of the present disclosure further provide a page display apparatus, including:
[0009] A view component tree obtaining module, configured to obtain the view component tree corresponding to the page when it is detected that the page is updated; wherein, the view component tree includes a plurality of view components arranged in a tree structure;
[0010] A rendering attribute determining module, configured to determine the rendering attributes of each view component in the view component tree;
[0011] A rendering module, configured to render each view component in the view component tree based on the rendering attributes to display the page.
[0012] In a third aspect, embodiments of the present disclosure further provide an electronic device, where the electronic device includes:
[0013] One or more processors;
[0014] A storage device, configured to store one or more programs,
[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the page display method as described in the embodiments of the present disclosure.
[0016] In a fourth aspect, the embodiments of the present disclosure further provide a storage medium containing computer-executable instructions, and the computer-executable instructions are used to execute the page display method as described in the embodiments of the present disclosure when executed by a computer processor.
[0017] The embodiments of the present disclosure disclose a page display method, apparatus, device, and storage medium. When a page update is detected, a view component tree corresponding to the page is obtained; wherein, the view component tree includes a plurality of view components arranged in a tree structure; the rendering attributes of each view component in the view component tree are determined; and each view component in the view component tree is rendered based on the rendering attributes to display the page. The page display method provided by the embodiments of the present disclosure can improve the efficiency of page rendering by rendering the page based on the rendering attributes of each view component in the page. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In combination with the accompanying drawings and with reference to the following specific embodiments, the above and other features, advantages, and aspects of the embodiments of the present disclosure will become more apparent. Throughout the accompanying drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic and the original elements and elements are not necessarily drawn to scale.
[0019] Figure 1 is a flowchart of a page display method provided by the embodiments of the present disclosure;
[0020] Figure 2 is a structural schematic diagram of a view component tree provided by the embodiments of the present disclosure;
[0021] Figure 3 is an exemplary diagram for determining the rendering attributes of view components provided by the embodiments of the present disclosure;
[0022] Figure 4 is a structural schematic diagram of a page display apparatus provided by the embodiments of the present disclosure;
[0023] Figure 5 is a structural schematic diagram of an electronic device provided by the embodiments of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0024] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.
[0025] It should be understood that the various steps recited in the method embodiments of the present disclosure can be executed in a different order and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this regard.
[0026] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0027] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order of functions executed by these devices, modules or units or their interdependent relationships.
[0028] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly specified in the context, it should be understood as "one or more".
[0029] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only for illustrative purposes and are not used to limit the scope of these messages or information.
[0030] It can be understood that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, usage scopes, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0031] For example, in response to receiving an active request from the user, a prompt message is sent to the user to clearly prompt the user that the operation requested by the user will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, an application program, a server, or a storage medium that executes the operation of the technical solution of the present disclosure according to the prompt message.
[0032] As an optional but non-limiting implementation manner, in response to receiving an active request from a user, the manner of sending a prompt message to the user may be, for example, in the form of a pop-up window, and the prompt message may be presented in text in the pop-up window. In addition, the pop-up window may also carry selection controls for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0033] It can be understood that the above notification and the process of obtaining user authorization are only illustrative and do not constitute a limitation on the implementation manner of the present disclosure. Other manners that comply with relevant laws and regulations can also be applied to the implementation manner of the present disclosure.
[0034] It can be understood that the data involved in the present technical solution (including but not limited to the data itself, the acquisition or use of the data) should comply with the requirements of the corresponding laws, regulations and related provisions.
[0035] Figure 1 FIG. is a schematic flowchart of a page display method provided by an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to the situation of rendering a page. The method may be executed by a page display device, and the device may be implemented in the form of software and / or hardware. Optionally, it is implemented by an electronic device, and the electronic device may be a mobile terminal, a PC terminal or a server, etc.
[0036] As Figure 1 shown, the method includes:
[0037] S110, when a page update is detected, obtain the view component tree corresponding to the page.
[0038] Among them, the view component tree includes a plurality of view components arranged in a tree structure, that is, the view component tree includes a plurality of nodes sorted in a tree structure, including a root node, intermediate nodes and leaf nodes, and each node corresponds to a view component. The view component tree may be pre-created and can be extracted from the rendering script corresponding to the page, and it includes the hierarchical relationship and position relationship between the view components in the page, etc.
[0039] Among them, the manner of page update may include: the user opens a new page or the user triggers a set operation in the current page, so that a new component pops up or a component is closed in the page.
[0040] In this embodiment, when a page update is detected, the view component tree of the page is extracted from the rendering script corresponding to the updated page.
[0041] S120, determine the rendering attributes of each view component in the view component tree.
[0042] Among them, the rendering attributes may include attributes related to rendering such as color, texture, saturation, transparency, etc. The rendering attributes of each view component may be the same or different. In one application scenario, the rendering attribute may be a color attribute, that is, each view component in the page can be rendered in different colors.
[0043] In this embodiment, the method for determining the rendering attributes of each view component in the view component tree may be: obtaining the pre-configured rendering attributes and the view component link of the selected target view component in the view component tree, and determining the rendering attributes of each view component based on the pre-configured rendering attributes and the view component link.
[0044] Optionally, the method for determining the rendering attributes of each view component in the view component tree may be: obtaining the identifier of the first target view component and the view component link corresponding to the first target view component; determining the first target view component in the view component tree according to the identifier and / or the view component link; and determining the rendering attribute of the sub-view component tree with the first target view component as the parent node as the first rendering attribute.
[0045] Among them, the view component link is the link between the view component corresponding to the root node and the first target view component in the view component tree. The view component link may be extracted by the developer in advance from the view component tree of the page rendering script. Exemplarily, Figure 2 is a schematic structural diagram of a view component tree in this embodiment. Assuming that the first target view component is D, and the corresponding component link is: A - B - D.
[0046] The first rendering attribute may be pre-configured. In this embodiment, the first rendering attribute may be a color attribute. Specifically, the color may be gray, that is, the view component is rendered in gray. In some application scenarios, if some view components in the page need to be set to gray, the developer sets the rendering attributes of these view components to the first rendering attribute and records the identifiers and view component links of these view components.
[0047] Among them, the identifier of the first target view component may be a unique identifier or a non-unique identifier. The unique identifier can be understood as the identifier only used to mark one view component in the view components, that is, the first target view component. The non-unique identifier can be understood as the identifier that marks multiple view components at the same time, that is, in addition to marking the first target view component, it also marks other view components.
[0048] Optionally, the method for determining the first target view component in the view component tree based on the identifier and / or the view component link may be as follows: If the identifier is a unique identifier, the first target view component is determined in the view component tree according to the unique identifier; or, if the identifier is a non-unique identifier, multiple candidate view components corresponding to the identifier are determined in the view component tree; and the first target view component is determined from the multiple candidate view components based on the view component link.
[0049] Among them, if the identifier is a unique identifier, it indicates that there is only one view component in the view component tree corresponding to this identifier, and thus the first target view component can be directly determined from the view component tree according to this identifier. If the identifier is a non-unique identifier, it indicates that there are multiple view components in the view component tree corresponding to this identifier. In this case, it is necessary to determine the first target view component from the view component tree in combination with the view component link.
[0050] In this embodiment, if the identifier is a non-unique identifier, first, multiple view components corresponding to the identifier are determined in the view component tree and determined as candidate view components, and then the multiple candidate view components are filtered based on the view component link to determine the first target view component.
[0051] Optionally, the method for determining the first target view component from the multiple candidate view components based on the view component link may be as follows: Obtain the view component links of the multiple candidate view components in the view component tree respectively as the links of the candidate view components; for any one of the multiple candidate view components, determine whether the link of the candidate view component matches the view component link corresponding to the first target view component; if the link of the candidate view component matches the view component link corresponding to the first target view component, determine the candidate view component corresponding to the link of the candidate view component as the first target view component.
[0052] Among them, the matching of the link of the candidate view component and the view component link corresponding to the first target view component can be understood as: the link of the candidate view component is exactly the same as the view component link corresponding to the first target view component. In this embodiment, the process of obtaining the view component links of the multiple candidate view components in the view component tree respectively may be as follows: For each candidate view component, start from the node corresponding to the candidate view component in the view component tree and search for nodes from bottom to top until the root node is found, and connect the searched nodes in sequence starting from the root node to obtain the view component link of the candidate view component. Searching for nodes from bottom to top starting from the node corresponding to the candidate view component can be understood as: starting from the node corresponding to the candidate view component, first search for its parent node, then search for the parent node of its parent node, and so on until the root node is found.
[0053] Optionally, the method for determining the first target view component from multiple candidate view components based on the view component link can be as follows: for each candidate view component, start from the node corresponding to the candidate view component in the view component tree and search upward. For each parent node found, compare the view component corresponding to the parent node with the view components in the view component link of the view component corresponding to the first target view component. If the parent node is the same as the view component at the corresponding position in the view component link, continue to search upward. If the parent node is different from the view component at the corresponding position in the view component link, delete the candidate view component and continue to search upward for the remaining candidate view components until the root node is reached, and then determine the candidate view component as the first target view component.
[0054] Specifically, start from the node corresponding to the candidate view component in the view component tree and search upward. First, find the view component corresponding to its parent node, and then determine whether the view component is the same as the view component before the candidate view component in the view component link of the view component corresponding to the first target view component. If they are the same, continue to find the view component corresponding to the parent node of the parent node and determine whether the newly found view component is the same as the view component before the first target view component in the view component link of the view component corresponding to the first target view component. If they are different, delete the candidate view component, and so on, until the root node is reached, and then determine the candidate view component as the first target view component. In this embodiment, each time the view component corresponding to a parent node is found, it is compared with the view component link of the view component corresponding to the first target view component, which can reduce the amount of calculation.
[0055] In this embodiment, determining the rendering attribute of the sub-view component tree with the first target view component as the parent node as the first rendering attribute can be understood as: determining the rendering attributes of all view components in the sub-view component tree with the first target view component as the parent node as the first rendering attribute; determining the rendering attributes of other view components in the component tree except this sub-view component tree as the default attributes.
[0056] Exemplarily, assume that the first rendering attribute is the color attribute and is gray. After determining the first target view component in the view component tree, determine the color attribute of the sub-view component tree with the first target view component as the parent node as gray, and determine the color attributes of other view components in the component tree except this sub-view component tree as the default color.
[0057] Optionally, the way to determine the rendering attribute of the sub-view component tree with the first target view component as the parent node as the first rendering attribute can be: obtaining the view component associated with the first target view component as the associated view component; determining whether the associated view component is in the view component tree; if the associated view component is in the view component tree, determining the rendering attribute of the sub-view component tree with the first target view component as the parent node as the first rendering attribute.
[0058] Among them, the view component associated with the first target view component can be pre-set, and can also be understood as the view component on which the first target view component depends. Whether the associated view component is in the view component tree can be understood as whether the associated view component is displayed on the current page. In this embodiment, when the associated view component is in the view component tree, the rendering attribute of the sub-view component tree with the first target view component as the parent node is determined as the first rendering attribute; when the associated view component is not in the view component tree, the rendering attribute of the sub-view component tree with the first target view component as the parent node remains the default rendering attribute unchanged. That is, whether the first target view component is rendered with the first rendering attribute depends on whether its associated view component is in the view component tree, and this way can improve the diversity of page display.
[0059] Exemplarily, assume that the first rendering attribute is that the color is gray, and the default rendering attribute is that the color is the default color (any color). When the associated view component is in the view component tree, the color of the sub-view component tree with the first target view component as the parent node is determined as gray; when the associated view component is not in the view component tree, the color of the sub-view component tree with the first target view component as the parent node remains the default color unchanged.
[0060] Optionally, the way to determine the rendering attribute of each view component in the view component tree can be: obtaining the second target view component and the view component link corresponding to the second target view component; determining the rendering attribute of the view components on the view component link as the second rendering attribute.
[0061] Among them, the view component link is the link from the view component corresponding to the root node to the second target view component in the view component tree. The second rendering attribute can be different from the first rendering attribute. The second rendering attribute can be a color attribute. Specifically, this color can be the default color. Specifically, the color of the view components on the view component link corresponding to the second target view component is determined as the default color, and the color of the other view components in the view component tree except the view component link corresponding to the second target view component is determined as gray. Exemplarily, Figure 3 is an example diagram for determining the rendering attribute of a view component in this embodiment, such as Figure 3As shown in the figure, assume that G is the second target view component, and its corresponding view component link is A - B - E - G. Then, the rendering attributes of A, B, E, and G are determined as the second rendering attributes, and the color in the rendering attributes of C, D, and F is determined as gray. In this embodiment, determining the rendering attributes of the view components on the view component link corresponding to the second target view component as the second rendering attributes can make the page present a "hollowed - out" effect, that is, the display effect of the view component in the middle is different from that of the view components around it. If the rendering attribute is a color attribute, it can make the page present a color "hollowed - out" effect, thus improving the diversity of the page.
[0062] Optionally, the method for determining the rendering attributes of each view component in the view component tree can be: obtaining the index information of the third target view component; determining the third target view component in the view component tree according to the index information, and determining the rendering attributes of the sub - view component tree with the third target view component as the parent node as the third rendering attributes.
[0063] Among them, the third rendering attribute can be the same as the first rendering attribute, that is, it can be a color attribute and is gray. In this embodiment, when editing the rendering script of the page, some view components are not set with identifiers, and these view components without identifiers are marked by index information. For these view components, the third rendering attribute can be pre - configured and its index information can be obtained. After obtaining the index information, the third target view component can be directly determined in the view component tree according to this index information, and the rendering attributes of the sub - view component tree with the third target view component as the parent node are determined as the third rendering attributes.
[0064] S130, rendering each view component in the view component tree based on the rendering attributes to display the page.
[0065] Specifically, when the first rendering attribute is a color attribute and is gray, if the rendering attributes of the sub - view component tree with the first target view component as the parent node are determined as the first rendering attributes, then each view component in the sub - view component tree is rendered as gray, and the other components in the view component tree except the sub - view component tree are rendered as the default color.
[0066] Specifically, when the second rendering attribute is a color attribute and is the default color, if the rendering attributes of the view components on the view component link corresponding to the second target view component are determined as the second rendering attributes, then the view components on the view component link are rendered as the default color, and the view components in the view component diagram except this view component link are rendered as gray.
[0067] Optionally, the page can be displayed in the following way: for each view component in the page, determine the display state of the view component; if the display state of the view component is to be displayed, then display the view component; if the display state of the view component is not to be displayed, then do not display the view component.
[0068] Among them, the display states include display and non-display. The display state can also be referred to as the visible state.
[0069] Specifically, the way to determine the display state of the view component can be: obtain the first display state of the view component and the second display state of the view component corresponding to its parent node; determine the display state of the view component according to the first display state and the second display state.
[0070] In this embodiment, both the first display state and the second display state are determined by the display attribute of the view component and / or whether it is on the screen. If the display attribute of a certain view component is not to be displayed, then the first display state is not to be displayed, and if the display attribute of its parent node is not to be displayed, then the second display state is not to be displayed. If the display attribute of a certain view component is to be displayed and the view component is outside the screen, then the first display state is not to be displayed. Similarly, if the display attribute of its parent node is to be displayed and the parent node is outside the screen, then the second display state is not to be displayed. If the display attribute of a certain view component is to be displayed and the view component is inside the screen, then the first display state is to be displayed. If the display attribute of its parent node is to be displayed and the parent node is inside the screen, then the second display state is to be displayed.
[0071] If both the first display state and the second display state are to be displayed, then the display state of the view component is to be displayed.
[0072] In the technical solution of the embodiment of the present disclosure, when it is detected that the page is updated, obtain the view component tree corresponding to the page; among them, the view component tree includes a plurality of view components arranged in a tree structure; determine the rendering attributes of each view component in the view component tree; render each view component in the view component tree based on the rendering attributes to display the page. The page display method provided by the embodiment of the present disclosure can improve the page display efficiency by rendering the page based on the rendering attributes of each view component in the page.
[0073] Figure 4 The following is a schematic structural diagram of a page display device provided by an embodiment of the present disclosure, as Figure 4 shown, the device includes:
[0074] A view component tree acquisition module 410, configured to obtain a view component tree corresponding to a page when it is detected that the page is updated; among them, the view component tree includes a plurality of view components arranged in a tree structure;
[0075] A rendering attribute determination module 420, configured to determine the rendering attributes of each view component in the view component tree;
[0076] A rendering module 430, configured to render each view component in the view component tree based on the rendering attributes to display a page.
[0077] Optionally, the rendering attribute determination module 420 is further configured to:
[0078] Obtain the identifier of the first target view component and the view component link corresponding to the first target view component; wherein, the view component link is the link in the view component tree from the view component corresponding to the root node to the first target view component;
[0079] Determine the first target view component in the view component tree according to the identifier and / or the view component link;
[0080] Determine the rendering attribute of the sub-view component tree with the first target view component as the parent node as the first rendering attribute.
[0081] Optionally, the rendering attribute determination module 420 is further configured to:
[0082] If the identifier is a unique identifier, determine the first target view component in the view component tree according to the unique identifier; or,
[0083] If the identifier is a non-unique identifier, determine multiple candidate view components corresponding to the identifier in the view component tree; determine the first target view component from the multiple candidate view components based on the view component link.
[0084] Optionally, the rendering attribute determination module 420 is further configured to:
[0085] Obtain the view component links of multiple candidate view components in the view component tree respectively as the links of the candidate view components;
[0086] For any one of the multiple candidate view components, determine whether the link of the candidate view component matches the view component link corresponding to the first target view component;
[0087] If the link of the candidate view component matches the view component link corresponding to the first target view component, determine the candidate view component corresponding to the link of the candidate view component as the first target view component.
[0088] Optionally, the rendering attribute determination module 420 is further configured to:
[0089] Obtain the view components associated with the first target view component as the associated view components;
[0090] Determine whether the associated view component is in the view component tree;
[0091] If the associated view component is in the view component tree, the rendering attributes of the sub-view component tree with the first target view component as the parent node are determined as the first rendering attributes.
[0092] Optionally, the rendering attribute determination module 420 is further configured to:
[0093] Obtain a second target view component and a view component link corresponding to the second target view component; wherein, the view component link is a link in the view component tree from the view component corresponding to the root node to the second target view component;
[0094] Determine the rendering attributes of the view components on the view component link corresponding to the second target view component as the second rendering attributes.
[0095] Optionally, the rendering attribute determination module 420 is further configured to:
[0096] Obtain the index information of a third target view component;
[0097] Determine the third target view component in the view component tree according to the index information;
[0098] Determine the rendering attributes of the sub-view component tree with the third target view component as the parent node as the third rendering attributes.
[0099] Optionally, the rendering module 430 is further configured to:
[0100] For each view component in the page, determine the display state of the view component; wherein, the display state includes display and non-display;
[0101] If the display state of the view component is display, then display the view component;
[0102] If the display state of the view component is non-display, then do not display the view component.
[0103] Optionally, the rendering module 430 is further configured to:
[0104] Obtain the first display state of the view component and the second display state of the view component corresponding to its parent node; [[ID=4,2]]
[0105] Determine the display state of the view component according to the first display state and the second display state.
[0106] The page display device provided by the embodiments of the present disclosure can execute the page display method provided by any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects for executing the method.
[0107] It should be noted that the various units and modules included in the above device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of mutual distinction and do not limit the protection scope of the embodiments of the present disclosure.
[0108] Figure 5 FIG. is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. The following refers to Figure 5 , which shows a schematic structural diagram of an electronic device 500 suitable for implementing the embodiments of the present disclosure (such as Figure 5 in the terminal device or server). The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present disclosure.
[0109] As Figure 5 shown, the electronic device 500 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 501, which may perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 502 or the program loaded from the storage device 508 into the random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. The editing / output (I / O) interface 505 is also connected to the bus 504.
[0110] Generally, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 5 shows the electronic device 500 having various devices, it should be understood that it is not required to implement or have all the shown devices. More or fewer devices may be alternatively implemented or had.
[0111] In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, an embodiment of the present disclosure includes a computer program product that includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes program code for performing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by a processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0112] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are for illustrative purposes only and are not used to limit the scope of these messages or information.
[0113] The electronic device provided by the embodiment of the present disclosure and the page display method provided by the above embodiment belong to the same inventive concept. Technical details not described in detail in this embodiment can be referred to in the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0114] The embodiment of the present disclosure provides a computer storage medium, on which a computer program is stored, and when the program is executed by a processor, the page display method provided by the above embodiment is implemented.
[0115] It should be noted that the computer-readable medium described above can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, and the computer-readable signal medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0116] In some embodiments, the client and the server can communicate using any currently known or future-developed network protocol such as HTTP (HyperText Transfer Protocol), and can be interconnected with digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include local area networks ("LANs"), wide area networks ("WANs"), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.
[0117] The above computer-readable medium can be included in the above electronic device; or it can exist separately without being assembled into the electronic device.
[0118] The above computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device is caused to:
[0119] The above computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to: when a page update is detected, obtain the view component tree corresponding to the page; wherein, the view component tree includes a plurality of view components arranged in a tree structure; determine the rendering attributes of each view component in the view component tree; and render each view component in the view component tree based on the rendering attributes to display the page.
[0120] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or combinations thereof. The programming languages include, but are not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may execute entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0121] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that, in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.
[0122] The units described in the embodiments of the present disclosure may be implemented in software or in hardware. Among them, the name of the unit does not constitute a limitation on the unit itself in some cases. For example, the first acquisition unit may also be described as "the unit for acquiring at least two Internet protocol addresses".
[0123] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. By way of example, and without limitation, the types of hardware logic components that can be used include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), Systems on Chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
[0124] In the context of this disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM or Flash memory), an optical fiber, a portable Compact Disc Read Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0125] The above description is only a preferred embodiment of the present disclosure and an illustration of the technical principles applied. Those skilled in the art should understand that the scope of the disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosure concept. For example, the technical solutions formed by mutually replacing the above features with the technical features (but not limited to) having similar functions disclosed in the present disclosure.
[0126] In addition, although the operations are depicted in a particular order, this should not be construed as requiring that the operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, the various features described in the context of a single embodiment can also be implemented separately or in any suitable sub-combination in multiple embodiments.
[0127] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. On the contrary, the specific features and acts described above are merely example forms of implementing the claims.
Claims
1. A page display method, characterized in that, Including: When a page update is detected, obtain the view component tree corresponding to the page; wherein, the view component tree includes a plurality of view components arranged in a tree structure; Determine the rendering attributes of each view component in the view component tree; Render each view component in the view component tree based on the rendering attributes to display the page.
2. The method according to claim 1, wherein Determining the rendering attributes of each view component in the view component tree includes: Obtain the identifier of the first target view component and the view component link corresponding to the first target view component; wherein, the view component link is the link in the view component tree from the view component corresponding to the root node to the first target view component; Determine the first target view component in the view component tree according to the identifier and / or the view component link; Determine the rendering attribute of the sub-view component tree with the first target view component as the parent node as the first rendering attribute.
3. The method according to claim 2, wherein Determining the first target view component in the view component tree according to the identifier and / or the view component link includes: If the identifier is a unique identifier, determine the first target view component in the view component tree according to the unique identifier; or, If the identifier is a non-unique identifier, determine a plurality of candidate view components corresponding to the identifier in the view component tree; determine the first target view component from the plurality of candidate view components based on the view component link.
4. The method according to claim 3, characterized in that, Determining the first target view component from the plurality of candidate view components based on the view component link includes: Obtain the view component links of the plurality of candidate view components in the view component tree respectively as the links of the candidate view components; For any one of the plurality of candidate view components, determine whether the link of the candidate view component matches the view component link corresponding to the first target view component; If the link of the candidate view component matches the view component link corresponding to the first target view component, determine the candidate view component corresponding to the link of the candidate view component as the first target view component.
5. The method according to claim 2, characterized in that Determining the rendering attribute of the sub-view component tree with the first target view component as the parent node as the first rendering attribute includes: Obtain the view components associated with the first target view component as the associated view components; Determine whether the associated view component is in the view component tree; If the associated view component is in the view component tree, determine the rendering attribute of the sub-view component tree with the first target view component as the parent node as the first rendering attribute.
6. The method according to claim 1, wherein Determining the rendering attributes of each view component in the view component tree includes: Obtain the second target view component and the view component link corresponding to the second target view component; wherein, the view component link is the link in the view component tree from the view component corresponding to the root node to the second target view component; Determine the rendering attribute of the view components on the view component link corresponding to the second target view component as the second rendering attribute.
7. The method according to claim 1, wherein Determining the rendering attributes of each view component in the view component tree includes: Obtain the index information of the third target view component; Determine the third target view component in the view component tree according to the index information; Determine the rendering attribute of the sub-view component tree with the third target view component as the parent node as the third rendering attribute.
8. The method according to claim 1, wherein Display the page, including: For each view component in the page, determine the display state of the view component; wherein, the display state includes display and non-display; If the display state of the view component is display, then display the view component; If the display state of the view component is non-display, then do not display the view component.
9. The method according to claim 8, wherein Determining the display state of the view component includes: Obtain the first display state of the view component and the second display state of the view component corresponding to its parent node; Determine the display state of the view component according to the first display state and the second display state.
10. A page display device, characterized in that, Including: A view component tree acquisition module, configured to obtain the view component tree corresponding to the page when it detects that the page is updated; wherein, the view component tree includes a plurality of view components arranged in a tree structure; A rendering attribute determination module, configured to determine the rendering attributes of each view component in the view component tree; A rendering module, configured to render each view component in the view component tree based on the rendering attributes to display the page.
11. An electronic device, characterized in that, The electronic device includes: One or more processors; A storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the page display method according to any one of claims 1-9.
12. A storage medium containing computer-executable instructions, the computer-executable instructions being used to execute the page display method according to any one of claims 1-9 when executed by a computer processor.