Page display method and apparatus, device and storage medium
By obtaining and rendering the rendering properties of the page view component tree, the problem of high user experience and development costs in the prior art is solved, and efficient rendering and low-cost page display are achieved.
Patent Information
- Application Number
- PCT/CN2025/075295
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-01-31
- Filing Date
- 2025-01-26
- Publication Date
- 2025-08-07
AI Technical Summary
In the prior art, the page greying method will affect the user experience and have high development costs, especially when application version iteration or page layout adjustment, it is necessary to re-edit the greying logic.
By obtaining the view component tree of the page, determining the rendering properties of each view component, and rendering the view component based on these properties, to achieve local or global graying, reducing development costs and improving page display efficiency.
It realizes efficient rendering of pages when pages are updated, improves user experience and reduces development costs.
Smart Images

Figure CN2025075295_07082025_PF_FP_ABST
Abstract
Description
Page display method, device, equipment and storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to Chinese patent application No. 202410140138.5, filed on January 31, 2024, entitled “Page display method, device, apparatus and storage medium”. The entire contents of that application are incorporated herein by reference. Technical Field
[0003] The embodiments of the present disclosure relate to the field of computer technology, and in particular to a page display method, apparatus, device, and storage medium. Background Art
[0004] Sometimes an application or a web address may need to gray out a page. In the prior art, one way is to gray out the entire page, and another way is to gray out part of the page. Summary of the Invention
[0005] Embodiments of the present disclosure provide a page display method, apparatus, device, and storage medium.
[0006] In a first aspect, an embodiment of the present disclosure provides a page display method, comprising:
[0007] 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;
[0008] Determining rendering properties of each view component in the view component tree;
[0009] Render each view component in the view component tree based on the rendering attributes to display the page.
[0010] In a second aspect, an embodiment of the present disclosure further provides a page display device, comprising:
[0011] A view component tree acquisition module is used to acquire a view component tree corresponding to the page when a page update is detected; wherein the view component tree includes a plurality of view components arranged in a tree structure;
[0012] A rendering attribute determination module, used to determine the rendering attributes of each view component in the view component tree;
[0013] A rendering module is used to render each view component in the view component tree based on the rendering attributes to display the page.
[0014] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:
[0015] one or more processors;
[0016] a storage device for storing one or more programs,
[0017] 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 embodiment of the present disclosure.
[0018] In a fourth aspect, an embodiment of the present disclosure further provides a storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to execute the page display method as described in the embodiment of the present disclosure.
[0019] 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 multiple view components arranged in a tree structure; the rendering properties 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 properties to display the page. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.
[0021] FIG1 is a flow chart of a page display method provided by an embodiment of the present disclosure;
[0022] FIG2 is a schematic diagram of the structure of a view component tree provided by an embodiment of the present disclosure;
[0023] FIG3 is an example diagram of determining rendering properties of a view component provided by an embodiment of the present disclosure;
[0024] FIG4 is a schematic structural diagram of a page display device provided by an embodiment of the present disclosure;
[0025] FIG5 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0026] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying 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 described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0027] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders 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 respect.
[0028] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0029] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0030] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0031] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0032] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this 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.
[0033] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0034] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0035] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0036] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.
[0037] Applications or web sites sometimes need to gray out pages. One existing approach is to gray out the page globally, which can impact the user experience. Another approach is to gray out pages partially. This approach requires adding graying logic to the business code. This approach is tightly coupled to the business code, requiring re-editing the graying logic whenever the application version iterates, the page layout is adjusted, or the graying scope changes, increasing development costs.
[0038] Figure 1 is a flow chart of a page display method provided by an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to the situation where a page is rendered. The method can be executed by a page display device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, a PC or a server, etc.
[0039] As shown in FIG1 , the method includes:
[0040] S110, when a page update is detected, obtaining the view component tree corresponding to the page.
[0041] The view component tree includes multiple view components arranged in a tree structure. That is, the view component tree includes multiple nodes arranged 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 can be pre-created and extracted from the rendering script corresponding to the page. It contains the hierarchical and positional relationships between the view components on the page.
[0042] The page update method may include: the user opens a new page or the user triggers a setting operation in the current page, so that a new component pops up on the page or a component is closed.
[0043] 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.
[0044] S120: Determine the rendering properties of each view component in the view component tree.
[0045] Rendering attributes can include rendering-related attributes such as color, texture, saturation, and transparency. The rendering attributes of each view component can be the same or different. In one application scenario, the rendering attribute can be a color attribute, meaning that each view component in the page can be rendered in a different color.
[0046] In this embodiment, the method for determining the rendering properties of each view component in the view component tree can be: obtaining the pre-configured rendering properties and the view component link of the selected target view component in the view component tree, and determining the rendering properties of each view component based on the pre-configured rendering properties and the view component link.
[0047] Optionally, the method for determining the rendering properties of each view component in the view component tree can 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 based on the identifier and / or the view component link; and determining the rendering properties of the child view component tree with the first target view component as the parent node as the first rendering properties.
[0048] Among them, the view component link is the link from the view component corresponding to the root node to the first target view component in the view component tree. The view component link can be extracted in advance by the developer from the view component tree of the page's rendering script. For example, Figure 2 is a structural diagram of a view component tree in this embodiment. Assuming that the first target view component is D, the corresponding component link is: ABD.
[0049] The first rendering attribute can be pre-configured. In this embodiment, the first rendering attribute can be a color attribute, specifically, gray, that is, rendering the view component in gray. In some application scenarios, if some view components on a page need to be grayed out (grayed out), the developer sets the rendering attribute of these view components to the first rendering attribute and records the identifiers and view component links of these view components.
[0050] The identifier of the first target view component can be a unique identifier or a non-unique identifier. A unique identifier can be understood as the identifier being used to mark only one view component among the view components, namely, the first target view component. A non-unique identifier can be understood as the identifier marking multiple view components at the same time, namely, marking other view components in addition to the first target view component.
[0051] Optionally, the method of determining the first target view component in the view component tree based on the identifier and / or the view component link can be: if the identifier is a unique identifier, determining the first target view component in the view component tree based on the unique identifier; or, if the identifier is a non-unique identifier, determining multiple candidate view components corresponding to the identifier in the view component tree; and determining the first target view component from the multiple candidate view components based on the view component link.
[0052] Among them, if the identifier is a unique identifier, it means that there is only one view component corresponding to the identifier in the view component tree, and the first target view component can be directly determined from the view component tree based on the identifier. If the identifier is a non-unique identifier, it means that there are multiple view components corresponding to the identifier in the view component tree. In this case, it is necessary to combine the view component link to determine the first target view component from the view component tree.
[0053] In this embodiment, if the identifier is a non-unique identifier, multiple view components corresponding to the identifier are first determined in the view component tree and determined as candidate view components. Then, the multiple candidate view components are screened based on the view component link to determine the first target view component.
[0054] Optionally, the method of determining the first target view component from multiple candidate view components based on the view component link can be: obtaining the view component links of multiple candidate view components in the view component tree as the links of the candidate view components; for any one of the multiple candidate view components, judging 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, determining the candidate view component corresponding to the link of the candidate view component as the first target view component.
[0055] Among them, the link of the candidate view component matches the view component link corresponding to the first target view component, which 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 multiple candidate view components in the view component tree can be: for each candidate view component, search for nodes from the bottom up in the view component tree starting from the node corresponding to the candidate view component 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 the bottom up 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.
[0056] Optionally, the method for determining the first target view component from multiple candidate view components based on the view component link can be: for each candidate view component, search from the bottom up starting from the node corresponding to the candidate view component in the view component tree, and each time a parent node is found, compare the view component corresponding to the parent node with the view component in the view component link 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 retained candidate view components until the root node is found, and then determine the candidate view component as the first target view component.
[0057] Specifically, the search starts from the node corresponding to the candidate view component in the view component tree from bottom to top, first searching for the view component corresponding to its parent node, and then determining whether the view component is the same as the previous view component of the candidate view component in the view component link corresponding to the first target view component. If they are the same, continue searching for 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 previous view component of the first target view component in the view component link corresponding to the first target view component. If they are not the same, delete the candidate view component, and so on, until the root node is found, then the candidate view component is determined as the first target view component. In this embodiment, each time a view component corresponding to a parent node is found, it is compared with the view component link corresponding to the first target view component, which can reduce the amount of calculation.
[0058] In this embodiment, determining the rendering properties of the sub-view component tree with the first target view component as the parent node as the first rendering properties can be understood as: determining the rendering properties of each view component in the sub-view component tree with the first target view component as the parent node as the first rendering properties; and determining the rendering properties of other view components in the component tree except the sub-view component tree as the default properties.
[0059] Exemplarily, assuming that the first rendering attribute is a color attribute and is gray, after determining the first target view component in the view component tree, the color attribute of the child view component tree with the first target view component as the parent node is determined to be gray, and the color attributes of other view components in the component tree except the child view component tree are determined to be the default color.
[0060] Optionally, the rendering attribute of the child view component tree with the first target view component as the parent node may be determined as the first rendering attribute by: obtaining a view component associated with the first target view component as an 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 child view component tree with the first target view component as the parent node as the first rendering attribute.
[0061] 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 that the first target view component depends on. Whether the associated view component is in the view component tree can be understood as whether the associated view component is displayed in the current page. In this embodiment, when the associated view component is in the view component tree, the rendering attribute of the child view component tree with the first target view component as the parent node is determined to be the first rendering attribute; when the associated view component is not in the view component tree, the rendering attribute of the child view component tree with the first target view component as the parent node is kept unchanged by the default rendering attribute. 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. This method can improve the diversity of page display.
[0062] For example, assuming that the first rendering attribute is gray color, and the default rendering attribute is the default color (any color), when the associated view component is in the view component tree, the color of the child view component tree with the first target view component as the parent node will be determined to be gray; when the associated view component is not in the view component tree, the color of the child view component tree with the first target view component as the parent node will remain the default color unchanged.
[0063] Optionally, the rendering properties of each view component in the view component tree can be determined by: obtaining the second target view component and the view component link corresponding to the second target view component; and determining the rendering properties of the view component on the view component link as the second rendering properties.
[0064] A 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. The second rendering attribute can be different from the first rendering attribute. The second rendering attribute can be a color attribute, specifically, a default color. Specifically, the color of the view components in the view component link corresponding to the second target view component is determined to be the default color, and the colors of all view components in the view component tree, except for the view component link corresponding to the second target view component, are determined to be gray. For example, Figure 3 illustrates an example of determining view component rendering attributes in this embodiment. As shown in Figure 3, assuming that G is the second target view component and its corresponding view component link is ABEG, the rendering attributes of A, B, E, and G are determined to be the second rendering attributes, and the colors of the rendering attributes of C, D, and F are determined to be gray. In this embodiment, determining the rendering attributes of the view components in the view component link corresponding to the second target view component as the second rendering attribute can create a "knockout" effect on the page, that is, the display effect of the view component in the middle is different from the display effect of the surrounding view components. If the rendering attribute is a color attribute, the page can be rendered with a "knockout" color effect, thereby increasing page diversity.
[0065] Optionally, the method for determining the rendering properties 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 based on the index information, and determining the rendering properties of the child view component tree with the third target view component as the parent node as the third rendering properties.
[0066] Among them, the third rendering attribute can be the same as the first rendering attribute, that is, it can be a color attribute, and it is gray. In this embodiment, when editing the rendering script of the page, some view components are not set with an identifier, and these view components that are not set with an identifier 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 based on the index information, and the rendering attribute of the child view component tree with the third target view component as the parent node can be determined as the third rendering attribute.
[0067] S130, rendering each view component in the view component tree based on the rendering attributes to display the page.
[0068] Specifically, when the first rendering attribute is a color attribute and is gray, if the rendering attribute of the sub-view component tree with the first target view component as the parent node is determined to be the first rendering attribute, then each view component in the sub-view component tree is rendered gray, and other components in the view component tree except the sub-view component tree are rendered as the default color.
[0069] Specifically, when the second rendering attribute is a color attribute and is the default color, if the rendering attribute of the view component on the view component link corresponding to the second target view component is determined to be the second rendering attribute, the view components on the view component link are rendered as the default color, and the view components in the view component diagram except the view component link are rendered as gray.
[0070] Optionally, the method of displaying the page may be: for each view component in the page, determining the display status of the view component; if the display status of the view component is display, displaying the view component; if the display status of the view component is not display, not displaying the view component.
[0071] The display state includes display and non-display. The display state can also be called visible state.
[0072] Specifically, the display state of the view component may be determined by: obtaining the first display state of the view component and the second display state of the view component corresponding to its parent node; and determining the display state of the view component according to the first display state and the second display state.
[0073] In this embodiment, the first display state and the second display state are both determined by the display properties of the view component and / or whether it is on the screen. If the display property of a certain view component is not displayed, the first display state is not displayed, and if the display property of its parent node is not displayed, the second display state is not displayed. If the display property of a certain view component is displayed, and the view component is outside the screen, the first display state is not displayed. Similarly, if the display property of its parent node is displayed, and the parent node is outside the screen, the second display state is not displayed. If the display property of a certain view component is displayed, and the view component is on the screen, the first display state is displayed. If the display property of its parent node is displayed, and the parent node is on the screen, the second display state is displayed.
[0074] If the first display state and the second display state are both display, the display state of the view component is display.
[0075] The technical solution of the embodiment of the present disclosure, when a page update is detected, obtains a view component tree corresponding to the page; wherein the view component tree includes multiple view components arranged in a tree structure; determines the rendering properties of each view component in the view component tree; and renders each view component in the view component tree based on the rendering properties to display the page. The page display method provided by the embodiment of the present disclosure, which renders the page based on the rendering properties of each view component in the page, can improve the efficiency of page display and page rendering.
[0076] FIG4 is a schematic diagram of the structure of a page display device provided by an embodiment of the present disclosure. As shown in FIG4 , the device includes:
[0077] The view component tree acquisition module 410 is used to acquire the view component tree corresponding to the page when a page update is detected; wherein the view component tree includes multiple view components arranged in a tree structure;
[0078] Rendering attribute determination module 420, used to determine the rendering attributes of each view component in the view component tree;
[0079] The rendering module 430 is used to render each view component in the view component tree based on the rendering attributes to display the page.
[0080] Optionally, the rendering attribute determination module 420 is further configured to:
[0081] Obtaining an identifier of a first target view component and a view component link corresponding to the first target view component; wherein the view component link is a link from the view component corresponding to the root node to the first target view component in the view component tree;
[0082] Determine a first target view component in the view component tree according to the identifier and / or the view component link;
[0083] The rendering attribute of the child view component tree with the first target view component as the parent node is determined as the first rendering attribute.
[0084] Optionally, the rendering attribute determination module 420 is further configured to:
[0085] 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,
[0086] If the identifier is a non-unique identifier, multiple candidate view components corresponding to the identifier are determined in the view component tree; and a first target view component is determined from the multiple candidate view components based on the view component link.
[0087] Optionally, the rendering attribute determination module 420 is further configured to:
[0088] Obtain the view component links of multiple candidate view components in the view component tree as links of the candidate view components;
[0089] For any one of the multiple candidate view components, determining whether a link of the candidate view component matches a view component link corresponding to the first target view component;
[0090] If the link of the candidate view component matches the view component link corresponding to the first target view component, the candidate view component corresponding to the link of the candidate view component is determined as the first target view component.
[0091] Optionally, the rendering attribute determination module 420 is further configured to:
[0092] Obtaining a view component associated with the first target view component as the associated view component;
[0093] Determine whether the associated view component is in the view component tree;
[0094] If the associated view component is in the view component tree, the rendering attribute of the child view component tree with the first target view component as the parent node is determined as the first rendering attribute.
[0095] Optionally, the rendering attribute determination module 420 is further configured to:
[0096] Obtaining 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 from the view component corresponding to the root node to the second target view component in the view component tree;
[0097] The rendering attribute of the view component on the view component link corresponding to the second target view component is determined as the second rendering attribute.
[0098] Optionally, the rendering attribute determination module 420 is further configured to:
[0099] Get the index information of the third target view component;
[0100] Determine a third target view component in the view component tree according to the index information;
[0101] The rendering attribute of the child view component tree with the third target view component as the parent node is determined as the third rendering attribute.
[0102] Optionally, the rendering module 430 is further configured to:
[0103] For each view component in the page, determine the display state of the view component; wherein the display state includes display and non-display;
[0104] If the display state of the view component is display, the view component is displayed;
[0105] If the display status of the view component is hidden, the view component is not displayed.
[0106] Optionally, the rendering module 430 is further configured to:
[0107] Get the first display state of the view component and the second display state of the view component corresponding to its parent node;
[0108] A display state of the view component is determined according to the first display state and the second display state.
[0109] The page display device provided by the embodiment 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 of the execution method.
[0110] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.
[0111] FIG5 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Referring to FIG5 , a schematic diagram of the structure of an electronic device (such as a terminal device or server in FIG5 ) 500 suitable for implementing an embodiment of the present disclosure is shown below. The terminal device in the embodiment 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), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. The electronic device shown in FIG5 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.
[0112] As shown in FIG5 , the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. Various programs and data required for the operation of the electronic device 500 are also stored in the RAM 503. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An edit / output (I / O) interface 505 is also connected to the bus 504.
[0113] Typically, 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 by wire to exchange data. Although FIG5 shows the electronic device 500 with various devices, it should be understood that not all of the devices shown are required to be implemented or present. More or fewer devices may alternatively be implemented or present.
[0114] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0115] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0116] 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. For technical details not fully described in this embodiment, please refer to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0117] An embodiment of the present disclosure provides a computer storage medium having a computer program stored thereon. When the program is executed by a processor, the page display method provided by the above embodiment is implemented.
[0118] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may 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, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0119] In some embodiments, the client and server can communicate using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.
[0120] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0121] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:
[0122] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: when a page update is detected, obtains the view component tree corresponding to the page; wherein the view component tree includes multiple view components arranged in a tree structure; determines the rendering properties of each view component in the view component tree; and renders each view component in the view component tree based on the rendering properties to display the page.
[0123] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed 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 cases involving 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).
[0124] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0125] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. In some cases, the name of a unit does not limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."
[0126] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may 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.
[0127] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. 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, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, 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 foregoing.
[0128] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0129] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0130] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims
1. A page display method, comprising: 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; Determining rendering properties 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 properties of each view component in the view component tree comprises: Obtaining an identifier of a first target view component and a view component link corresponding to the first target view component; wherein the view component link is a link from the view component corresponding to the root node to the first target view component in the view component tree; Determine the first target view component in the view component tree according to the identifier and / or the view component link; The rendering attribute of the child view component tree with the first target view component as the parent node is determined 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 comprises: If the identifier is a unique identifier, determining the first target view component in the view component tree according to the unique identifier; or, If the identifier is a non-unique identifier, determining a plurality of candidate view components corresponding to the identifier in the view component tree; The first target view component is determined from the plurality of candidate view components based on the view component link.
4. The method according to claim 3, wherein determining the first target view component from the plurality of candidate view components based on the view component link comprises: Obtaining the view component links of the multiple candidate view components in the view component tree as links of the candidate view components; For any one of the multiple candidate view components, determining whether a link of the candidate view component matches a 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, the candidate view component corresponding to the link of the candidate view component is determined as the first target view component.
5. The method according to claim 2, wherein determining the rendering attribute of the child view component tree with the first target view component as a parent node as the first rendering attribute comprises: Acquire a view component associated with the first target view component as an associated view component; Determine whether the associated view component is in the view component tree; If the associated view component is in the view component tree, the rendering attribute of the child view component tree with the first target view component as the parent node is determined as the first rendering attribute.
6. The method according to claim 1, wherein determining the rendering properties of each view component in the view component tree comprises: Obtaining 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 from the view component corresponding to the root node to the second target view component in the view component tree; The rendering attribute of the view component on the view component link corresponding to the second target view component is determined as the second rendering attribute.
7. The method according to claim 1, wherein determining the rendering properties of each view component in the view component tree comprises: Get 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; The rendering attribute of the child view component tree with the third target view component as the parent node is determined as the third rendering attribute.
8. The method according to claim 1, wherein displaying the page comprises: For each view component in the page, determining a 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, display the view component; If the display status of the view component is not displayed, the view component is not displayed.
9. The method according to claim 8, wherein determining the display state of the view component comprises: Obtaining a first display state of the view component and a second display state of the view component corresponding to its parent node; A display state of the view component is determined according to the first display state and the second display state.
10. A page display device, comprising: A view component tree acquisition module is used to acquire a view component tree corresponding to the page when a page update is detected; wherein the view component tree includes a plurality of view components arranged in a tree structure; A rendering attribute determination module, used to determine the rendering attributes of each view component in the view component tree; A rendering module is used to render each view component in the view component tree based on the rendering attributes to display the page.
11. An electronic device, comprising: 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 to 9.
12. A storage medium comprising computer-executable instructions, wherein the computer-executable instructions are used to execute the page display method according to any one of claims 1 to 9 when executed by a computer processor.
Citation Information
Patent Citations
Page rendering method, server, client and system based on cobalt
CN112328930A
Page generation method and system, computer equipment and readable storage medium
CN114416056A
Method and device for processing page
CN114816382A
Page rendering method and device, electronic equipment and storage medium
CN114924815A
Method of rendering a user interface
US20130159893A1