Page display method and apparatus and electronic device
By pre-rendering and changing levels, the jitter and stuttering problems caused by display and hiding conditional control elements in the page are solved, improving the user experience.
Patent Information
- Application Number
- PCT/CN2024/112363
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-08-18
- Filing Date
- 2024-08-15
- Publication Date
- 2025-02-27
AI Technical Summary
When displayed and hidden, the conditional control elements triggered by preset events in the page will cause the page to be re-layout, jitter and stutter, affecting the user experience.
By pre-rendering the hidden elements and changing their levels, we get the target pre-rendering result, and display elements based on the result after the preset event is triggered to avoid page layout changes.
It effectively avoids page jitter and stuttering, improves user experience, and ensures that elements are displayed without changing the position of other elements after the preset event is triggered.
Smart Images

Figure CN2024112363_27022025_PF_FP_ABST
Abstract
Description
Page display method, device and electronic device
[0001] This application claims priority to Chinese patent application No. 202311047734.0 filed on August 18, 2023, the entire text of which is incorporated herein by reference as a part of this application. Technical Field
[0002] The present disclosure relates to a page display method, device and electronic device. Background Art
[0003] Currently, people can read the content provided by files or perform certain operations on pages. Some pages may include conditional control elements that are displayed based on preset events. Before the preset event is triggered, the conditional control elements are hidden on the page. After the preset event is triggered, the conditional control elements are displayed on the page. As a result, the page layout needs to be re-arranged, causing page jitter.
[0004] Summary of the Invention
[0005] The present disclosure provides a page display method, device, and electronic device.
[0006] According to a first aspect, a page display method is provided, the method comprising:
[0007] Determining that a first element is hidden in a first page to be displayed, wherein the first element is displayed by triggering a preset event;
[0008] pre-rendering the first element and changing the level of the first element to obtain a target pre-rendering result;
[0009] After displaying the first page, in response to triggering of the preset event, the first element is displayed based on the target pre-rendering result.
[0010] According to a second aspect, a page display device is provided, the device comprising:
[0011] a determination module, configured to determine that a first element is hidden in a first page currently to be displayed, the first element being displayed in response to a preset event;
[0012] a pre-rendering module, configured to pre-render the first element and change the level of the first element to obtain a target pre-rendering result;
[0013] The display module is configured to display the first element based on the target pre-rendering result in response to triggering of the preset event after displaying the first page.
[0014] According to a third aspect, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of the above-mentioned first aspects is implemented.
[0015] According to a fourth aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any one of the methods described in the first aspect when executing the program. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0017] FIG1 is a schematic diagram of a page display structure according to an exemplary embodiment of the present disclosure;
[0018] FIG2 is a flow chart of a page display method according to an exemplary embodiment of the present disclosure;
[0019] FIG3 is a schematic diagram of a page display scenario according to an exemplary embodiment of the present disclosure;
[0020] FIG4 is a flow chart of another page display method according to an exemplary embodiment of the present disclosure;
[0021] FIG5 is a block diagram of a page display device according to an exemplary embodiment of the present disclosure;
[0022] FIG6 is a schematic block diagram of an electronic device provided by some embodiments of the present disclosure;
[0023] FIG7 is a schematic block diagram of another electronic device provided by some embodiments of the present disclosure;
[0024] FIG8 is a schematic diagram of a storage medium provided by some embodiments of the present disclosure. DETAILED DESCRIPTION
[0025] To help those skilled in the art better understand the technical solutions in this specification, the following will provide a clear and complete description of the technical solutions in the embodiments of this specification, in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. All other embodiments derived by those skilled in the art based on the embodiments in this specification without creative effort shall fall within the scope of protection of this specification.
[0026] In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
[0027] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms "a," "the," and "the" used in this disclosure are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0028] It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining."
[0029] With the continuous development of terminal technology, terminal devices are increasingly used in people's lives and work, providing more convenience for people's lives and work. Among them, applications that can provide people with various services have emerged. People can read the content provided by the application through the program page, or perform some operations through the program page. Some pages may include conditional control elements that are triggered by preset events. Before the preset event is triggered, the conditional control element is hidden in the page. After the preset event is triggered, the conditional control element will be displayed on the page. Since the page is easily rearranged when the conditional control element is displayed and hidden, it causes the page to jitter and freeze, making the page display effect worse.
[0030] The present disclosure provides a page display solution, which determines that a first element is hidden in a first page to be displayed, and the first element is displayed by triggering a preset event, pre-renders the first element, and changes the hierarchy of the first element to obtain a target pre-rendering result. After displaying the first page, the first element is displayed based on the target pre-rendering result in response to the triggering of the preset event. Since this embodiment pre-renders the first element that is displayed based on the triggering event and changes the hierarchy of the first element, the first element is located at a different hierarchy from other elements. Therefore, after the preset event is triggered, the page layout does not need to be changed, and the first element can be displayed without changing the positions of other elements, thereby avoiding page jitter and freezes and improving the user experience.
[0031] Referring to FIG. 1 , it is a schematic diagram showing a page display structure according to an exemplary embodiment.
[0032] As shown in Figure 1, the terminal device first obtains the page file of page Y1 to be displayed. By parsing the page file, it is determined that element S is hidden in page Y1, where element S needs to be displayed when triggered by event M. Next, a layout tree T1 for page Y1 and a layout tree T2 for page Y2 can be constructed. Page Y2 is the page to be displayed when triggered by event M, and element S needs to be displayed in page Y2.
[0033] On the one hand, page Y1 can be rendered based on layout tree T1, and based on the rendering result, page Y1 can be displayed on the display screen of the terminal device. On the other hand, page Y2 can be pre-rendered based on layout tree T2, and layout tree T1 and layout tree T2 are compared to determine node D of element S. Based on the pre-rendering result, the element level change operation is performed based on node D of element S in layout tree T2, such as increasing the level of element S, to obtain the target pre-rendering result.
[0034] Before event M is triggered, page Y1 is displayed on the display screen of the terminal device. After event M is triggered, page Y2 including element S can be displayed on the display screen of the terminal device based on the target pre-rendering result.
[0035] The present disclosure will be described in detail below with reference to specific embodiments.
[0036] Figure 2 is a flow chart illustrating a page display method according to an exemplary embodiment. This method can be applied to a terminal device. In this embodiment, for ease of understanding, an example is provided using a terminal device capable of installing third-party applications. Those skilled in the art will appreciate that the terminal device may include, but is not limited to, mobile terminal devices such as smartphones, smart wearable devices, tablet computers, laptop computers, and desktop computers. The method may include the following steps:
[0037] As shown in FIG. 2 , in step 201 , it is determined that a first element is hidden in a first page to be displayed.
[0038] In this embodiment, the first page to be displayed can be a page that currently needs to be displayed on the screen of the terminal device. The first page includes multiple elements that can be directly displayed, and hides a first element (such as a container) that needs to be displayed in response to the triggering of a preset event. For example, as shown in Figure 3, page 301 is directly displayed on the display screen of the terminal device, and page 301 includes element 302 that can be directly displayed. In addition, element 303 that needs to be triggered by event A is hidden in page 301. That is, after event A occurs, element 303 can be displayed on the display screen in response to the triggering of event A.
[0039] Specifically, first, the page data of the first page can be obtained, which includes a page code. Then, the page code can be parsed to determine whether the first page contains a hidden first element that needs to be displayed upon triggering a preset event. If the first element is not hidden in the first page, the operations of steps 202-203 can be ignored, and the first page can be directly rendered and displayed directly on the display screen of the terminal device. If it is determined that the first element is hidden in the first page, the operations of steps 202-203 are executed.
[0040] In step 202 , the first element is pre-rendered, and the level of the first element is changed to obtain a target pre-rendering result.
[0041] In this embodiment, if a first element is hidden in the first page, the first element can be pre-rendered before a preset event is triggered (i.e., before the first element needs to be displayed). Then, the level of the first element is changed, for example, the level of the first element is lowered or raised, so that the first element and other elements that can be directly displayed in the first page are located at different levels.
[0042] Specifically, first, first data for pre-rendering a second page can be obtained. The second page is a page displayed after a preset event is triggered, and the first element needs to be displayed in the second page. The first data may include second data for pre-rendering the first element and third data for pre-rendering other elements except the first element. Then, the second page can be pre-rendered using the first data. Specifically, the first element can be pre-rendered using the second data, and the other elements except the first element can be pre-rendered using the third data. After the pre-rendering is completed, the hierarchy of the first element can be changed based on the result obtained by the pre-rendering to obtain the target pre-rendering result.
[0043] In step 203 , after the first page is displayed, in response to triggering of a preset event, a first element is displayed based on the target pre-rendering result.
[0044] In this embodiment, before a preset event is triggered, the first page can be directly rendered, and the first page can be displayed on the display screen of the terminal device based on the rendering result. After the first page is displayed, the occurrence of a preset event can be monitored. After the occurrence of the preset event is monitored, the first element can be displayed according to the pre-obtained target pre-rendering result in response to the triggering of the preset event.
[0045] For this embodiment, a specific application scenario may be that a user generates a new image through an image generation APP. Before the image is generated, page a is displayed in the user interface of the APP. Only container element b and container element c are displayed in page a. The user can input a reference image into container element b, and the new image finally generated can be displayed in container element c (before the new image is generated, container element c can display a preset background color). After the new image is generated, page d is displayed in the user interface of the APP. In addition to displaying container elements b and container elements c, page d also adds container element e (i.e., a button is added) compared to page a. Among them, generating a new image is a preset trigger event. Under the trigger of generating a new image, an operation button is added to page d. Before generating a new image, container element e can be pre-rendered, and the level of container element e can be changed so that container element e is at a different level from container elements b and c. After generating a new image, the newly added operation button is displayed directly according to the result obtained by pre-rendering.
[0046] This embodiment is not limited to the above-mentioned application scenarios, and can also be applied to other scenarios. The present disclosure provides a page display method, which determines that a first element is hidden in the first page to be displayed, and the first element is displayed by the triggering of a preset event, pre-renders the first element, and changes the level of the first element to obtain a target pre-rendering result. After the first page is displayed, the first element is displayed based on the target pre-rendering result in response to the triggering of the preset event. Since this embodiment pre-renders the first element that is displayed based on the triggering event and changes the level of the first element, the first element is located at a different level from other elements. Therefore, after the preset event is triggered, there is no need to change the page layout, and the first element can be displayed without changing the positions of other elements, thereby avoiding page jitter and jamming, and improving the user experience.
[0047] FIG4 is a flow chart showing another page display method according to an exemplary embodiment. This embodiment describes a process of obtaining a target pre-rendering result, including the following steps:
[0048] As shown in FIG. 4 , in step 401 , it is determined that a first element is hidden in a first page to be displayed.
[0049] In this embodiment, the first page to be displayed may be a page that is currently required to be displayed on the screen of the terminal device. The first page includes multiple elements that can be displayed directly, and hides a first element that is required to be displayed upon triggering a preset event. Whether the first element is hidden in the first page can be determined by parsing the page code corresponding to the first page.
[0050] In step 402, a first layout tree corresponding to a first page is generated, and the first page is rendered based on the first layout tree.
[0051] In this embodiment, page file data can be obtained, and a first layout tree corresponding to the first page displayed before a preset event occurs can be constructed based on the page file data. The first layout tree includes multiple element nodes, each element node corresponds to an element to be displayed in the first page, and any element node records information such as the size, shape, and position of the element corresponding to the element node in the first page. Rendering data for rendering the first page can be obtained, the rendering data can be used to render the first page based on the first layout tree, and the first page can be displayed on the display screen of the terminal device based on the rendering result.
[0052] In step 403, a second layout tree corresponding to the second page is generated, and first data for pre-rendering the second page is obtained.
[0053] In this embodiment, a second layout tree corresponding to the second page displayed after the preset event occurs can also be constructed based on the page file data. The second layout tree also includes multiple element nodes, each element node corresponds to an element that needs to be displayed in the second page, and any element node records information such as the size, shape, and position of the element corresponding to the element node in the second page. Then, the first data for pre-rendering the second page can be obtained, wherein the first data can include second data for pre-rendering the first element and third data for pre-rendering other elements except the first element.
[0054] In step 404 , when rendering the first page, the second page is pre-rendered based on the second layout tree using the first data, and in step 405 , based on the pre-rendering result, the hierarchy of the first element is changed to obtain a target pre-rendering result.
[0055] In this embodiment, while rendering the first page, the first element can be pre-rendered using the second data based on the second layout tree, and the other elements except the first element can be pre-rendered using the third data to complete the pre-rendering of the second page. Then, based on the pre-rendering results, the hierarchy of the first element is modified to obtain the target pre-rendering result.
[0056] Specifically, the first layout tree and the second layout tree can be compared. If the second layout tree has more element nodes than the first layout tree, the element nodes in the second layout tree that are more than the first layout tree can be determined as the target nodes corresponding to the first element. For the target nodes in the second layout tree after pre-rendering, the element hierarchy change operation is performed. For example, the style attribute can be used to change the z-index attribute of the target node to change the hierarchy of the first element. The hierarchy of the first element can be increased so that the hierarchy of the first element is higher than the hierarchy of other elements, which further improves the display effect of the first element after the preset event is triggered, which helps to enhance the user experience.
[0057] It should be noted that the second data may include transition animation frame data pre-set for the first element, that is, the first element is pre-rendered using the pre-set transition animation frame data, so that after the preset event is triggered, the first element can display the transition animation effect. For example, the first page hides button n, and button n is triggered by event B. When pre-rendering button n, the button's transition animation frame data is added to button n. After event B is triggered, button n is displayed with a transition animation effect. Because this embodiment uses the pre-set transition animation frame data to pre-render the first element, the first element can have a smooth and silky animation transition effect after the preset event is triggered, further improving the user experience.
[0058] In step 406 , after the first page is displayed, in response to triggering of a preset event, the first element is displayed based on the target pre-rendering result.
[0059] It should be noted that, for the same steps as those in the embodiment of FIG. 2 , no further description will be given in the embodiment of FIG. 4 , and the relevant contents may be referred to in the embodiment of FIG. 2 .
[0060] Since this embodiment pre-renders the second page while rendering the first page, and changes the hierarchy of the first element based on the first layout tree corresponding to the first page and the second layout tree corresponding to the second page after pre-rendering, it helps to avoid page jitter and freeze after the preset event is triggered, and improves the display effect of the first element after the preset event is triggered, further enhancing the user experience.
[0061] It should be noted that although the operations of the methods of the embodiments of the present disclosure are described in a specific order in the above embodiments, this does not require or imply that these operations must be performed in this specific order, or that all of the operations shown must be performed to achieve the desired results. On the contrary, the steps depicted in the flowcharts can be performed in a different order. Additionally or alternatively, certain steps can be omitted, multiple steps can be combined into one step, and / or one step can be decomposed into multiple steps.
[0062] Corresponding to the aforementioned page display method embodiment, the present disclosure also provides an embodiment of a page display device.
[0063] As shown in FIG5 , FIG5 is a block diagram of a page display device according to an exemplary embodiment of the present disclosure. The device may include: a determination module 501 , a pre-rendering module 502 and a display module 503 .
[0064] The determining module 501 is used to determine that a first element is hidden in the first page to be displayed, and the first element is displayed by triggering a preset event.
[0065] The pre-rendering module 502 is configured to pre-render the first element and change the level of the first element to obtain a target pre-rendering result.
[0066] The display module 503 is configured to display the first element based on the target pre-rendering result in response to triggering of a preset event after displaying the first page.
[0067] In some implementations, the determination module 501 is configured to: obtain a page code corresponding to the first page, and determine that a first element is hidden in the first page by parsing the page code.
[0068] In other embodiments, the determination module 501 may include: an acquisition submodule, a pre-rendering submodule, and a modification submodule (not shown in the figure).
[0069] Among them, the acquisition submodule is used to obtain first data for pre-rendering the second page, the second page is triggered by a preset event, the first element is displayed in the second page, and the first data includes second data corresponding to the first element.
[0070] The prerendering submodule is configured to prerender the second page using the first data, wherein the first element is prerendered using the second data.
[0071] The change submodule is used to change the hierarchy of the first element based on the result obtained by pre-rendering to obtain the target pre-rendering result.
[0072] In other implementations, the second data may include transition animation frame data preset for the first element.
[0073] In some other embodiments, the pre-rendering submodule is configured to: pre-render the second page using the first data when rendering the first page.
[0074] In other embodiments, the change submodule is configured to: determine a first layout tree corresponding to the first page and a second layout tree corresponding to the second page, and determine the target node corresponding to the first element by comparing the first layout tree and the second layout tree, and after pre-rendering, perform an element level change operation on the target node in the second layout tree.
[0075] In some other implementations, the pre-rendering module 502 changing the level of the first element includes the pre-rendering module 502 raising the level of the first element.
[0076] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiment scheme of the present disclosure. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0077] Figure 6 is a schematic block diagram of an electronic device provided in some embodiments of the present disclosure. As shown in Figure 6, the electronic device 910 includes a processor 911 and a memory 912, which can be used to implement a client or server. The memory 912 is used to store computer-executable instructions (e.g., one or more computer program modules) non-transiently. The processor 911 is used to run the computer-executable instructions, which can execute one or more steps in the page display method described above when the computer-executable instructions are run by the processor 911, thereby implementing the page display method described above. The memory 912 and the processor 911 can be interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0078] For example, the processor 911 may be a central processing unit (CPU), a graphics processing unit (GPU), or other processing units with data processing capabilities and / or program execution capabilities. For example, the central processing unit (CPU) may be an X86 or ARM architecture. The processor 911 may be a general-purpose processor or a dedicated processor, and may control other components in the electronic device 910 to perform desired functions.
[0079] For example, the memory 912 may include any combination of one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), a hard disk, an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), a USB memory, a flash memory, etc. One or more computer program modules may be stored on the computer-readable storage medium, and the processor 911 may execute one or more computer program modules to implement various functions of the electronic device 910. Various applications and various data, as well as various data used and / or generated by the applications, may also be stored in the computer-readable storage medium.
[0080] It should be noted that, in the embodiment of the present disclosure, the specific functions and technical effects of the electronic device 910 can be referred to the above description of the page display method, which will not be repeated here.
[0081] Figure 7 is a schematic block diagram of another electronic device provided by some embodiments of the present disclosure. The electronic device 920 is, for example, suitable for implementing the page display method provided by the embodiment of the present disclosure. The electronic device 920 can be a terminal device, etc., which can be used to implement a client or a server. The electronic device 920 can include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), wearable electronic devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc. It should be noted that the electronic device 920 shown in Figure 7 is only an example and does not impose any restrictions on the functions and scope of use of the embodiments of the present disclosure.
[0082] As shown in FIG7 , the electronic device 920 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 921, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 922 or a program loaded from a storage device 928 into a random access memory (RAM) 923. Various programs and data required for the operation of the electronic device 920 are also stored in the RAM 923. The processing device 921, the ROM 922, and the RAM 923 are connected to each other via a bus 924. An input / output (I / O) interface 925 is also connected to the bus 924.
[0083] Typically, the following devices may be connected to the I / O interface 925: an input device 926 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 927 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 928 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 929. The communication device 929 may allow the electronic device 920 to communicate with other electronic devices wirelessly or by wire to exchange data. Although FIG. 7 shows the electronic device 920 having various devices, it should be understood that it is not required to implement or have all of the devices shown, and the electronic device 920 may alternatively implement or have more or fewer devices.
[0084] For example, according to an embodiment of the present disclosure, the above-mentioned page display method 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 above-mentioned page display method. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 929, or installed from the storage device 928, or installed from the ROM 922. When the computer program is executed by the processing device 921, the functions defined in the page display method provided in the embodiment of the present disclosure can be implemented.
[0085] Figure 8 is a schematic diagram of a storage medium provided in some embodiments of the present disclosure. For example, as shown in Figure 8, storage medium 930 may be a non-transitory computer-readable storage medium for storing non-transitory computer-executable instructions 931. When non-transitory computer-executable instructions 931 are executed by a processor, the page display method described in the embodiments of the present disclosure may be implemented. For example, when non-transitory computer-executable instructions 931 are executed by a processor, one or more steps of the page display method described above may be performed.
[0086] For example, the storage medium 930 may be applied to the above-mentioned electronic device. For example, the storage medium 930 may include a memory in the electronic device.
[0087] For example, the storage medium may include a memory card of a smart phone, a storage component of a tablet computer, a hard disk of a personal computer, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), a flash memory, or any combination of the above storage media, or other applicable storage media.
[0088] For example, the description of the storage medium 930 can refer to the description of the memory in the embodiment of the electronic device, and the repeated parts are not repeated. The specific functions and technical effects of the storage medium 930 can refer to the description of the page display method above, and are not repeated here.
[0089] It should be noted that in the context of the present disclosure, a computer-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. 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 thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that may be used by or in conjunction with an instruction execution system, apparatus, or device. 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 a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit 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.
[0090] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the claims.
[0091] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A page display method, comprising: Determining that a first element is hidden in a first page to be displayed, wherein the first element is displayed by triggering a preset event; Pre-rendering the first element and changing the level of the first element to obtain a target pre-rendering result; After displaying the first page, in response to triggering of the preset event, displaying the first element based on the target pre-rendering result.
2. The method according to claim 1, wherein: The step of determining that a first element is hidden in a first page to be displayed currently includes: Obtaining a page code corresponding to the first page; By parsing the page code, it is determined that the first element is hidden in the first page.
3. The method according to claim 1 or 2, wherein: The pre-rendering the first element and changing the level of the first element to obtain a target pre-rendering result includes: Acquire first data for pre-rendering a second page; the second page is triggered by the preset event; the first element is displayed in the second page; the first data includes second data corresponding to the first element; Pre-rendering the second page using the first data; wherein the first element is pre-rendered using the second data; Based on the result obtained by the pre-rendering, the level of the first element is changed to obtain the target pre-rendering result.
4. The method according to claim 3, wherein: The second data includes transition animation frame data preset for the first element.
5. The method according to claim 3 or 4, wherein: The pre-rendering the second page using the first data includes: pre-rendering the second page using the first data when rendering the first page.
6. The method according to any one of claims 3 to 5, wherein: The step of changing the level of the first element based on the result obtained by the pre-rendering includes: Determine a first layout tree corresponding to the first page and a second layout tree corresponding to the second page; Determine a target node corresponding to the first element by comparing the first layout tree with the second layout tree; After pre-rendering, an element level change operation is performed on the target node in the second layout tree.
7. The method according to any one of claims 1 to 6, wherein: The changing the level of the first element includes: increasing the level of the first element.
8. A page display device, comprising: A determination module is configured to determine that a first element is hidden in a first page to be displayed, and the first element is displayed by triggering a preset event; A pre-rendering module is configured to pre-render the first element and change the level of the first element to obtain a target pre-rendering result; The display module is configured to display the first element based on the target pre-rendering result in response to triggering of the preset event after displaying the first page.
9. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Web application page rendering optimization
CN104933078A
Method and device for displaying image elements
CN112052416A
Dialog box display method and device, electronic equipment and storage medium
CN114840269A
Page display method and device and electronic equipment
CN117389438A
Temporary title and menu bar
US20060277478A1
Cited By
Condition-based structured layout generation method and device, equipment and storage medium
CN120763987A
Page jump animation control method, device, electronic equipment and system
CN121166248A