Page loading method, device, server, apparatus, system, medium and product
By rendering only a portion of the page components, especially those in the initial area, and using placeholder elements, the problem of slow page loading speed was solved, improving loading speed and reliability and ensuring a better initial browsing experience for users.
Patent Information
- Application Number
- CN202510645075.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-19
- Publication Date
- 2026-11-20
AI Technical Summary
Users experience slow page loading speeds, which negatively impacts their browsing experience.
Only render a portion of the components on the page, especially those in the initial area, and use placeholder elements in subsequent displays to avoid affecting the user's initial browsing experience.
It improves page loading speed and reliability, ensuring users can quickly see the content they need during initial browsing, reducing component rendering time and avoiding unnecessary waiting.
Smart Images

Figure CN123138531A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of Internet technology, and in particular to a page loading method, apparatus, server, device, system, medium and product. Background Technology
[0002] With the development of internet technology, users can access different pages through electronic devices to obtain the information they need. However, slow page loading speeds are a common problem during this process. Summary of the Invention
[0003] To overcome the problems existing in related technologies, this disclosure provides a page loading method, apparatus, server, device, system, medium, and product.
[0004] According to a first aspect of the present disclosure, a page loading method is provided, the page loading method comprising:
[0005] In response to access requests sent by electronic devices, obtain component information for multiple components in the page to be loaded;
[0006] Based on the component information of the plurality of components, a plurality of first components among the plurality of components are rendered to obtain first rendering information, wherein at least a portion of the first components are located in the starting area of the page;
[0007] The first rendering information and the component information of the second component are sent to the electronic device, wherein the second component is a component other than the plurality of first components among the plurality of components.
[0008] In this embodiment, by rendering only some components on the page instead of all components, the time required for component rendering is reduced, thereby improving page loading speed. Simultaneously, by rendering the first component located in the initial area, the initial browsing experience of the page is not affected, thus improving the reliability of page loading.
[0009] In some embodiments of this disclosure, the component information includes positioning information; the step of rendering multiple first components among the multiple components based on the component information of the multiple components to obtain first rendering information includes:
[0010] Based on the positioning information of the plurality of components, determine the positioning method of each component;
[0011] Based on the positioning method of the plurality of components, the plurality of first components are determined from the plurality of components;
[0012] Based on the component information of the plurality of first components, the plurality of first components are rendered to obtain the first rendering information.
[0013] In this embodiment, by combining the positioning method to select the first component, the first component is avoided from affecting the page loading speed and the loaded page from affecting the user's browsing, thereby improving the reliability of page loading.
[0014] In some embodiments of this disclosure, the component information further includes size information; determining the plurality of first components from the plurality of components according to the positioning method of the plurality of components includes:
[0015] Based on the size information of the plurality of components, determine the component height of a plurality of third components whose positioning method is a first method, wherein the first method depends on the document flow;
[0016] The target height of the plurality of third components is determined based on the height of each of the aforementioned components;
[0017] Based on the target height, at least a portion of the first component is determined from the plurality of third components.
[0018] In this embodiment, by combining the component height of the third component to select at least a portion of the first component, the rendering of components that the user cannot view at the beginning is avoided, thus taking up extra time and improving the page loading speed.
[0019] In some embodiments of this disclosure, determining at least a portion of the first component from the plurality of third components based on the target height includes:
[0020] If the target height is greater than the preset height, each of the third components located within the preset height is taken as at least part of the first component according to the setting order of the plurality of third components, where the preset height is related to the starting area;
[0021] When the target height is less than or equal to the preset height, the plurality of third components are used as at least a portion of the first component.
[0022] In this embodiment, by combining the target height occupied by all third components to select at least a portion of the first components, there is no need to render components that the user cannot view at the beginning, thereby reducing the time required for component rendering and improving the page loading speed.
[0023] In some embodiments of this disclosure, before rendering a plurality of first components among the plurality of components based on the component information of the plurality of components to obtain first rendering information, the page loading method further includes:
[0024] The preset height is determined based on the screen size of the electronic device and the page type.
[0025] In this embodiment, the preset height is determined by combining the screen size and page type, which avoids affecting the user's page browsing due to the inability of components to render, thereby improving the reliability of page loading.
[0026] In some embodiments of this disclosure, determining the plurality of first components from the plurality of components according to the positioning method of the plurality of components includes:
[0027] The fourth components whose positioning method is the second method among the multiple components are taken as another part of the first component, and the second method is removed from the document flow.
[0028] In this embodiment, by directly using the fourth component as the first component, there is no need for high-level judgment, thereby reducing the complexity of page loading.
[0029] In some embodiments of this disclosure, after determining the target height of the plurality of third components based on the height of each of the components, the page loading method further includes:
[0030] If the target height is greater than the preset height, the third component located outside the preset height is used as at least part of the second component according to the setting order of the plurality of third components, and the preset height is related to the starting area.
[0031] In this embodiment, by using a third component other than the preset height as the second component, there is no need to render components that the user cannot see at the beginning, thereby improving the page loading speed.
[0032] In some embodiments of this disclosure, the component information includes identification information; the step of rendering multiple first components among the multiple components based on the component information of the multiple components to obtain first rendering information includes:
[0033] Based on the identification information of the plurality of components, determine the plurality of first components located in the starting region;
[0034] Based on the component information of the plurality of first components, the plurality of first components are rendered to obtain the first rendering information.
[0035] In this embodiment, the first component is selected by combining the identification information, eliminating the need to distinguish the positioning method, thereby improving the page loading speed.
[0036] In some embodiments of this disclosure, before sending the first rendering information and the component information of the second component to the electronic device, the page loading method further includes:
[0037] Based on the component information of the second component, a target label for placeholders is generated;
[0038] Sending the first rendering information and the component information of the second component to the electronic device includes:
[0039] The first rendering information and the target label are sent to the electronic device.
[0040] In this embodiment, by transmitting the generated target tag, the component information of the second component is prevented from being corrupted during transmission, thereby improving the reliability of page loading.
[0041] According to a second aspect of the present disclosure, a page loading method is provided, the page loading method comprising:
[0042] In response to the instruction to load the page, an access request is sent to the cloud server;
[0043] In response to the first rendering information and the component information of the second component sent by the cloud server, according to the first rendering information, a plurality of first components are displayed, at least some of the first components are located in the starting area of the page, and the second component is a component other than the plurality of first components among the plurality of components;
[0044] Place placement elements according to the component information of the second component.
[0045] In this embodiment, by displaying the first component located in the starting area, the user's initial browsing of the page is avoided, thereby improving the reliability of page loading. Simultaneously, by placing placeholder elements in appropriate positions, the display of the second component is prevented from subsequently affecting it, further enhancing the reliability of page loading.
[0046] In some embodiments of this disclosure, displaying multiple first components based on the first rendering information includes:
[0047] The first rendering information is parsed to obtain the first display information;
[0048] Based on the first display information, the plurality of first components are displayed.
[0049] In this embodiment, multiple first components are displayed after processing the first rendering information, thus avoiding the first components being unable to be displayed on the page, thereby improving the reliability of page loading.
[0050] In some embodiments of this disclosure, the component information includes positioning information; placing a placeholder element according to the component information of the second component includes:
[0051] Based on the positioning information of the second component, the placeholder element is placed in the corresponding area of the page.
[0052] In this embodiment, by combining location information to place placeholder elements, the position of the second component is not occupied and thus the second component cannot be displayed, thereby improving the reliability of page loading.
[0053] In some embodiments of this disclosure, the number of the second components is multiple; after placing placeholder elements according to the component information of the second components, the page loading method further includes:
[0054] In response to page scrolling, determine the visible area of the page;
[0055] Based on the visible area and the component information of the second component, the corresponding second component is rendered to obtain second rendering information;
[0056] Based on the second rendering information, the corresponding second component is displayed in the area where the placeholder element is located.
[0057] In this embodiment, the second component is rendered by combining the visible area, which avoids the second component from consuming additional rendering time and thus improves the reliability of page loading.
[0058] In some embodiments of this disclosure, rendering the corresponding second component based on the visible area and the component information of the second component to obtain second rendering information includes:
[0059] In response to the visible area containing at least a portion of the second component, the corresponding second component is rendered according to the component information of the second component contained in the visible area to obtain the second rendering information.
[0060] In this embodiment, by rendering and displaying the second component contained in the visible area, the user's browsing of the page is avoided, thereby improving the reliability of page loading.
[0061] In some embodiments of this disclosure, rendering the corresponding second component based on the visible area and the component information of the second component to obtain second rendering information includes:
[0062] In response to the fact that the distance between the visible area and at least a portion of the second component is less than a preset distance, the corresponding second component is rendered based on the component information of the second component whose distance from the visible area is less than the preset distance, thereby obtaining the second rendering information.
[0063] In this embodiment, by rendering the second component that is about to be viewed, the user's browsing of the page is avoided, thereby improving the reliability of page loading.
[0064] According to a third aspect of the present disclosure, a page loading apparatus is provided, the page loading apparatus comprising:
[0065] The acquisition module is configured to acquire component information of multiple components in a page to be loaded in response to an access request sent by an electronic device.
[0066] A rendering module is configured to render a plurality of first components among the plurality of components based on the component information of the plurality of components to obtain first rendering information, wherein at least a portion of the first components are located in the starting area of the page.
[0067] A first sending module is configured to send the first rendering information and the component information of the second component to the electronic device, wherein the second component is a component other than the plurality of first components.
[0068] In some embodiments of this disclosure, the component information includes positioning information; the rendering module is configured to:
[0069] Based on the positioning information of the plurality of components, determine the positioning method of each component;
[0070] Based on the positioning method of the plurality of components, the plurality of first components are determined from the plurality of components;
[0071] Based on the component information of the plurality of first components, the plurality of first components are rendered to obtain the first rendering information.
[0072] In some embodiments of this disclosure, the page loading device further includes:
[0073] A generation module, configured to generate a target label for placeholders based on the component information of the second component;
[0074] The first sending module is configured to:
[0075] The first rendering information and the target label are sent to the electronic device.
[0076] According to a fourth aspect of the present disclosure, a page loading apparatus is provided, the page loading apparatus comprising:
[0077] The second sending module is configured to send an access request to the cloud server in response to an instruction to load a page.
[0078] The display module is configured to respond to first rendering information and component information of a second component sent by the cloud server, and to display a plurality of first components according to the first rendering information, wherein at least some of the first components are located in the starting area of the page, and the second component is a component other than the plurality of first components among the plurality of components;
[0079] A placement module, configured to place placeholder elements according to the component information of the second component.
[0080] In some embodiments of this disclosure, the display module is configured to:
[0081] The first rendering information is parsed to obtain the first display information;
[0082] Based on the first display information, the plurality of first components are displayed.
[0083] In some embodiments of this disclosure, the page loading device further includes:
[0084] A first determining module is configured to determine the visible area of the page in response to scrolling of the page.
[0085] The second rendering module is configured to render the second component based on the visible area and the component information of the second component to obtain second rendering information.
[0086] The display module is configured to:
[0087] Based on the second rendering information, the second component is displayed in the area where the placeholder element is located.
[0088] According to a fifth aspect of the present disclosure, a cloud server is provided, the cloud server comprising:
[0089] processor;
[0090] Memory used to store the processor's executable instructions;
[0091] The processor is configured to execute the page loading method described above.
[0092] According to a sixth aspect of the present disclosure, an electronic device is provided, the electronic device comprising:
[0093] processor;
[0094] Memory used to store the processor's executable instructions;
[0095] The processor is configured to execute the page loading method described above.
[0096] According to a seventh aspect of the present disclosure, a page loading system is provided, the page loading system including a cloud server and an electronic device; the cloud server is configured to:
[0097] In response to the access request sent by the electronic device, obtain component information of multiple components in the page to be loaded;
[0098] Based on the component information of the plurality of components, a plurality of first components among the plurality of components are rendered to obtain first rendering information, wherein at least a portion of the first components are located in the starting area of the page;
[0099] The first rendering information and the component information of the second component are sent to the electronic device, wherein the second component is a component other than the plurality of first components among the plurality of components;
[0100] The electronic device is configured to:
[0101] In response to the instruction to load the page, the access request is sent to the cloud server;
[0102] In response to the first rendering information and the component information of the second component sent by the cloud server, the plurality of first components are displayed according to the first rendering information;
[0103] Place placement elements according to the component information of the second component.
[0104] In some embodiments of this disclosure, the component information includes location information; the cloud server is configured to:
[0105] Based on the positioning information of the plurality of components, determine the positioning method of each component;
[0106] Based on the positioning method of the plurality of components, the plurality of first components are determined from the plurality of components;
[0107] Based on the component information of the plurality of first components, the plurality of first components are rendered to obtain the first rendering information.
[0108] In some embodiments of this disclosure, the electronic device is configured to:
[0109] The first rendering information is parsed to obtain the first display information;
[0110] Based on the first display information, the plurality of first components are displayed.
[0111] According to an eighth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, which, when instructions in the storage medium are executed by a processor of a terminal, enables the terminal to perform the page loading method as described above.
[0112] According to a ninth aspect of the present disclosure, a computer program product is provided, including a computer program or instructions that, when executed by a processor, implement the page loading method as described above.
[0113] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:
[0114] In response to an access request from an electronic device, page loading is required, and component information for multiple components on the page to be loaded is obtained. Based on this component information, the first component located in the initial area of the page is rendered, yielding first rendering information. This first rendering information, along with the component information of the second component, is sent to the electronic device, causing it to display the corresponding first component in the initial area of the page, and subsequently, the second component. By rendering only a portion of the components on the page, rather than all of them, the time required for component rendering is reduced, thus improving page loading speed. Furthermore, by rendering the first component in the initial area, the user's initial browsing experience is avoided, thereby improving the reliability of page loading.
[0115] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0116] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0117] Figure 1 This is a flowchart illustrating a page loading method according to an exemplary embodiment;
[0118] Figure 2 This is a flowchart illustrating a page loading method according to another exemplary embodiment;
[0119] Figure 3 This is a flowchart illustrating a page loading method according to another exemplary embodiment;
[0120] Figure 4 This is a flowchart illustrating a page loading method according to another exemplary embodiment;
[0121] Figure 5 This is a flowchart illustrating a page loading method according to another exemplary embodiment;
[0122] Figure 6 This is a flowchart illustrating a page loading method according to another exemplary embodiment;
[0123] Figure 7 This is a flowchart illustrating a page loading method according to another exemplary embodiment;
[0124] Figure 8 This is a flowchart illustrating a page loading method according to another exemplary embodiment;
[0125] Figure 9 This is a flowchart illustrating a page loading method according to another exemplary embodiment;
[0126] Figure 10 This is a block diagram illustrating a page loading apparatus according to an exemplary embodiment;
[0127] Figure 11 This is a block diagram of a page loading apparatus according to another exemplary embodiment;
[0128] Figure 12 This is a block diagram of an electronic device according to an exemplary embodiment.
[0129] In the picture:
[0130] 100 - Acquisition module; 150 - Rendering module; 200 - First sending module; 250 - Second sending module; 300 - Display module; 350 - Placement module; 400 - Electronic device; 402 - Processing component; 404 - Memory; 406 - Power supply component; 408 - Multimedia component; 410 - Audio component; 412 - Input / output interface; 414 - Sensor component; 416 - Communication component; 420 - Processor. Detailed Implementation
[0131] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims. It should also be understood that the term “and / or” as used in this disclosure refers to any or all possible combinations including one or more of the associated listed items.
[0132] With the development of internet technology, users can access different pages through electronic devices to obtain the information they need. For example, after a user opens a browser on an electronic device and enters the address they want to access, the browser displays the corresponding page. Similarly, when a user opens a video application on an electronic device, the video application displays the corresponding page. Upon receiving an access request from an electronic device, the cloud server renders all components of the page and sends the rendered information to the electronic device. For instance, if a page contains multiple components such as text, images, and advertisements, all of these components need to be rendered to obtain the rendered information. After parsing the rendered information, the electronic device displays all the page's components. However, during the user's page access process, the significant time required to load all page components results in slow page loading speeds.
[0133] This disclosure provides a page loading method, which can be applied to cloud servers, such as... Figure 1 As shown, the method includes:
[0134] S100: In response to an access request sent by an electronic device, obtain component information of multiple components in the page to be loaded.
[0135] S200. Based on the component information of multiple components, render multiple first components among the multiple components to obtain first rendering information, wherein at least some of the first components are located in the starting area of the page.
[0136] S300: Send the first rendering information and the component information of the second component to the electronic device, wherein the second component is a component other than the multiple first components among the multiple components.
[0137] In this embodiment, in response to an access request sent by an electronic device, page loading is required, and component information of multiple components in the page to be loaded is obtained. Based on the component information, the first component located in the initial area of the page is rendered to obtain first rendering information. The first rendering information and the component information of the second component are sent to the electronic device, causing the electronic device to display the corresponding first component in the initial area of the page, and subsequently display the second component. By rendering only some components in the page instead of all components, the time required for component rendering is reduced, thereby improving the page loading speed. At the same time, by rendering the first component located in the initial area, the user's initial browsing of the page is avoided, thereby improving the reliability of page loading.
[0138] For example, multiple first components may include all the components in the starting area, or they may include only some of the components in the starting area. The starting area of the page is related to the screen size of the electronic device. The starting area can be the relevant area of the page displayed on the screen of the electronic device when the page starts loading, and the height of the starting area can be the initial screen height of the electronic device.
[0139] For example, before obtaining component information of multiple components in the page to be loaded in step S100 in response to an access request sent by an electronic device, the page needs to be edited using an editor. During the page editing process, the positioning method of each component can be defined, such as a first method and a second method. The first method depends on the document flow, while the second method is independent of the document flow. Simultaneously, components using the first method are constrained to occupy a full line. After the page editing is complete, all components on the page are traversed. For each component, attribute configuration information and size information are obtained from the editor's configuration as component information. The attribute configuration information includes, but is not limited to, component configuration information and positioning information, and the size information includes, but is not limited to, the component's width, height, border, and padding. Component configuration information can be, for example, a link to an image. After obtaining the component information, the component information can be organized into a structured object array and sent to a cloud server for storage. During the process of rendering multiple first components based on the component information of multiple components to obtain first rendering information, the structured object data can be combined.
[0140] In one embodiment, the component information includes location information. For example... Figure 2 As shown, in step S200, rendering multiple first components among multiple components based on the component information of multiple components to obtain the first rendering information can be determined in the following way:
[0141] S210. Determine the positioning method of each component based on the positioning information of multiple components.
[0142] S220. Based on the positioning method of multiple components, determine multiple first components from multiple components.
[0143] S230. Based on the component information of multiple first components, render multiple first components to obtain first rendering information.
[0144] In this embodiment, since the positioning method of a component depends on the document flow, which affects the component's position and rendering, the positioning method of each component is determined based on the positioning information of multiple components. Based on the positioning methods of multiple components, multiple first components are determined from among the multiple components to obtain the components that need to be rendered. Based on the component information of the multiple first components, the multiple first components are rendered to obtain first rendering information. By combining the positioning method to select the first components, the impact of the first components on page loading speed and the impact of the loaded page on the user's browsing experience are avoided, thereby improving the reliability of page loading.
[0145] In one embodiment, the component information also includes size information. For example... Figure 3 As shown, in step S220, determining multiple first components from multiple components based on their positioning methods can be achieved in the following way:
[0146] S221. Based on the size information of multiple components, determine the component height of multiple third components whose positioning method is the first method, where the first method depends on the document flow.
[0147] S222. Determine the target height of multiple third components based on the height of each component.
[0148] S223. Based on the target height, determine at least a portion of the first component from among multiple third components.
[0149] In this embodiment, since the third component positioned using the first method requires more rendering time, the component heights of the third components positioned using the first method are determined based on the size information of multiple components. Based on the heights of each component, a target height for the multiple third components is determined to obtain the height at which all third components are displayed. Since the target height determines the user's browsing experience of the third components, at least a portion of the first components are selected from the multiple third components based on the target height. By combining the component heights of the third components to select at least a portion of the first components, rendering components that the user cannot initially view is avoided, thus saving extra time and improving page loading speed.
[0150] For example, the first method could be a streaming positioning method, etc.
[0151] For example, in step S222, determining the target height of multiple third components based on the height of each component can be achieved by recursively accumulating the component heights of the multiple third components, taking into account their spacing and overlap. For instance, component A has a height of 50 pixels, component B has a height of 60 pixels, and component C has a height of 40 pixels. Component A and component B are spaced 8 pixels apart and overlap by 15 pixels. The total target height occupied by components A, B, and C is 143 pixels.
[0152] In one embodiment, the determination of at least a portion of the first components from a plurality of third components based on the target height in step S223 is performed in the following manner:
[0153] If the target height is greater than the preset height, each third component located within the preset height is used as at least part of the first component according to the setting order of multiple third components. The preset height is related to the starting area.
[0154] When the target height is less than or equal to the preset height, multiple third components are used as at least part of the first component.
[0155] In this embodiment, when the target height is greater than the preset height, there are third components located outside the starting area that do not need to be rendered, and each third component located within the preset height is considered as at least a portion of the first components. When the target height is less than or equal to the preset height, multiple third components are located in the starting area and need to be rendered, and these multiple third components are considered as at least a portion of the first components. By combining the target height occupied by all third components to select at least a portion of the first components, components that the user cannot initially view are not rendered, thus reducing the time required for component rendering and improving page loading speed.
[0156] For example, the preset height can be equal to or less than the height of the starting area. If a third component is partially within the preset height and partially outside the preset height, then the third component is considered as at least a part of the first component.
[0157] In one embodiment, before rendering multiple first components among the multiple components based on component information in step S200 to obtain first rendering information, the page loading method further includes:
[0158] Determine the preset height based on the screen size of the electronic device and the page type.
[0159] In this embodiment, since the screen size of the electronic device affects the number of components that can be viewed, the screen size is used as the basis for determining the preset height. Since different page types affect the number of components that can be effectively displayed, the page type is used as the basis for determining the preset height. By combining screen size and page type to determine the preset height, the inability of components to render avoids affecting the user's page browsing experience, thereby improving the reliability of page loading.
[0160] For example, with a fixed screen size, the preset height can be the same or different depending on the page type. For instance, the preset height can be 600 pixels for a news page and 450 pixels for a product page.
[0161] In one embodiment, the determination of multiple first components from multiple components based on the positioning method of multiple components in step S220 can also be achieved in the following manner:
[0162] Multiple fourth components with the second positioning method are treated as another part of the first component, and the second method is removed from the document flow.
[0163] In this embodiment, since the fourth component with the second positioning method requires less rendering time, multiple fourth components with the second positioning method are used as another set of first components. By directly using the fourth components as the first components, there is no need to perform height determination, thereby reducing the complexity of page loading.
[0164] For example, the second method can be an absolute positioning method, a fixed positioning method, etc.
[0165] It is understandable that, in addition to using multiple fourth components with the second positioning method as another part of the first components, it is also possible to use the positioning information of the fourth components to use the fourth components located in the starting area as another part of the first components, and the fourth components located outside the starting area as at least part of the second components, without any limitation here.
[0166] In one embodiment, after determining the target height of multiple third components based on the height of each component in step S222, the page loading method further includes:
[0167] If the target height is greater than the preset height, the third component located outside the preset height is used as at least part of the second component according to the setting order of multiple third components. The preset height is related to the starting area.
[0168] In this embodiment, when the target height is greater than the preset height, a third component located outside the starting area does not need to be rendered. This third component outside the preset height is used as at least a part of the second component. By using the third component outside the preset height as the second component, components that the user cannot view at the beginning do not need to be rendered, thereby improving the page loading speed.
[0169] For example, in step S230, rendering multiple first components based on component information of multiple first components to obtain first rendering information can be performed by rendering multiple first components based on component configuration information, positioning information, and size information of multiple first components to obtain first rendering information.
[0170] In one embodiment, the component information includes identification information, positioning information, and size information. For example... Figure 4As shown, in step S200, rendering multiple first components based on the component information of multiple components to obtain the first rendering information can also be determined in the following way:
[0171] S240. Based on the identification information of multiple components, determine multiple first components located in the starting region among the multiple components.
[0172] S250. Based on the component information of multiple first components, render multiple first components to obtain first rendering information.
[0173] In this embodiment, since the identification information can distinguish the area where each component is located, multiple first components located in the starting area are determined based on the identification information of multiple components. The multiple first components are then rendered based on their component information to obtain first rendering information. By combining the identification information to select the first components, there is no need to distinguish the positioning method, thereby improving page loading speed.
[0174] For example, the identification information is used to distinguish the region where the component is located. For instance, when the identification information is 1, the component is located in the first region. When the identification information is 2, the component is located in the second region.
[0175] In one embodiment, before sending the first rendering information and the component information of the second component to the electronic device in step S300, the page loading method further includes:
[0176] Based on the component information of the second component, generate target labels for placeholders.
[0177] The step S300 of sending the first rendering information and the component information of the second component to the electronic device is determined in the following way:
[0178] Send the first rendering information and target label to the electronic device.
[0179] In this embodiment, since the second component has a lot of component information that is difficult to transmit directly, a placeholder target tag is generated based on the component information of the second component. The first rendering information and the target tag are sent to the electronic device, causing the electronic device to display the first component, and subsequently display the second component. By transmitting the generated target tag, the component information of the second component is prevented from being corrupted during transmission, thereby improving the reliability of page loading.
[0180] This disclosure provides a page loading method, which can be applied to cloud servers, such as... Figure 5 As shown, the method includes:
[0181] S400: In response to an access request sent by an electronic device, obtain component information of multiple components in the page to be loaded.
[0182] S410. Determine the preset height based on the screen size of the electronic device and the page type.
[0183] S420. Determine the positioning method for each component based on the positioning information of multiple components.
[0184] S430. Based on the size information of multiple components, determine the component height of multiple third components whose positioning method is the first method among the multiple components.
[0185] S440. Determine the target height of multiple third components based on the height of each component.
[0186] S450. When the target height is greater than the preset height, each third component located within the preset height is used as a partial first component according to the setting order of multiple third components.
[0187] S460. When the target height is less than or equal to the preset height, multiple third components are used as part of the first component.
[0188] S470. According to the setting order of multiple third components, the third component located outside the preset height is used as the second component.
[0189] S480, Take the fourth components with the second positioning method among the multiple components as another part of the first component.
[0190] S490. Based on the component information of multiple first components, render multiple first components to obtain first rendering information.
[0191] S500: Generate a target label for placeholders based on the component information of the second component.
[0192] S510: Send the first rendering information and target label to the electronic device.
[0193] In this embodiment, in response to an access request sent by an electronic device, page loading is required to obtain component information of multiple components in the page to be loaded. Since the screen size of the electronic device and the page type affect the number of components displayed, a preset height is determined based on these factors. Because components with different positioning methods consume different rendering times, the positioning method of each component is determined based on the positioning information of multiple components. Based on the size information of multiple components, the component heights of multiple third components with the first positioning method are determined to obtain the component height of the third component that consumes the most rendering time. Based on the heights of each component, the target height of the multiple third components is determined to obtain the height shared by the multiple third components. If the target height is greater than the preset height, the third components located within the preset height are designated as part of the first components, according to their setting order. If the target height is less than or equal to the preset height, the multiple third components are designated as part of the first components, and the third components located outside the preset height are designated as second components, according to their setting order. Because the fourth component using the second positioning method consumes less rendering time, multiple fourth components using the second positioning method are treated as another set of first components. Based on the component information of these first components, they are rendered to obtain first rendering information. Based on the component information of the second components, placeholder target tags are generated, and the first rendering information and target tags are sent to the electronic device. By rendering only a portion of the components on the page instead of all of them, the time required for component rendering is reduced, thereby improving page loading speed. Simultaneously, by rendering the first components located in the initial area, the initial browsing experience of the page is avoided, thus improving the reliability of page loading.
[0194] This disclosure provides a page loading method, which can be applied, for example, to electronic devices, such as... Figure 6 As shown, the method includes:
[0195] S600, in response to the instruction to load the page, sends an access request to the cloud server.
[0196] S700, responding to the first rendering information and the component information of the second component sent by the cloud server, displays multiple first components according to the first rendering information, at least some of the first components are located in the starting area of the page, and the second component is the component other than the multiple first components among the multiple components.
[0197] S800. Place placeholder elements according to the component information of the second component.
[0198] In this embodiment, in response to the instruction to load the page, a page loading process is required, and an access request is sent to the cloud server. In response to the first rendering information and the component information of the second component sent by the cloud server, multiple first components are displayed based on the first rendering information. Placement elements are placed based on the component information of the second component to avoid affecting the page layout. By displaying the first components located in the initial area, the user's initial browsing of the page is avoided, thereby improving the reliability of page loading. Simultaneously, by placing placement elements in appropriate positions, the subsequent display of the second components is avoided, further improving the reliability of page loading.
[0199] For example, the instruction to load a page in step S600 may be generated in response to a user's operation of an electronic device, such as in response to a user opening an application.
[0200] In one embodiment, such as Figure 7 As shown, in step S700, displaying multiple first components based on the first rendering information is determined in the following way:
[0201] S710. The first rendering information is parsed to obtain the first display information.
[0202] S720. Based on the first display information, display multiple first components.
[0203] In this embodiment, since the first rendering information sent by the cloud server cannot be directly displayed, the first rendering information is parsed to obtain first display information for component display. Based on the first display information, multiple first components are displayed to achieve page loading. By processing the first rendering information and then displaying multiple first components, the reliability of page loading is improved, preventing first components from failing to display on the page.
[0204] For example, the first display information can be represented in the form of a string.
[0205] In one embodiment, the component information includes positioning information. The placement of the placeholder element in step S800, based on the component information of the second component, is determined as follows:
[0206] Based on the positioning information of the second component, place placeholder elements in the corresponding area of the page.
[0207] In this embodiment, since the location information determines the position of the second component, a placeholder element is placed in the corresponding area of the page based on the location information of the second component. By placing placeholder elements in conjunction with the location information, the position of the second component is not occupied, thus preventing the second component from being displayed and improving the reliability of page loading.
[0208] In one embodiment, such as Figure 8As shown, after placing placeholder elements according to the component information of the second component in step S800, the page loading method further includes:
[0209] S900: In response to page scrolling, determine the visible area of the page.
[0210] S910. Based on the visible area and the component information of the second component, render the corresponding second component to obtain the second rendering information.
[0211] S920. Based on the second rendering information, display the corresponding second component in the area where the placeholder element is located.
[0212] In this embodiment, in response to page scrolling, the user needs to browse the portion outside the initial area to determine the visible area of the page. Based on the visible area and the component information of the second component, the corresponding second component is rendered to obtain second rendering information. According to the second rendering information, the corresponding second component is displayed in the area where the placeholder element is located, replacing the placeholder element with the actual second component. By combining the visible area to render the second component, the extra rendering time of the second component is avoided, thereby improving the reliability of page loading.
[0213] For example, the response to page scrolling in step S900 can be a user swiping the screen or issuing a voice command to the electronic device. The electronic device can be equipped with a listening mechanism that uses scroll events, visible area calculation functions, and component visibility monitoring technology to listen to placeholder elements to determine the relationship between the visible area and the second component.
[0214] In one embodiment, the second rendering information obtained in step S910, which involves rendering the corresponding second component based on the visible area and the component information of the second component, can be determined in the following way:
[0215] In response to the visible area containing at least a portion of the second component, the corresponding second component is rendered based on the component information of the second component contained in the visible area to obtain second rendering information.
[0216] In this embodiment, in response to the visible area containing at least a portion of the second component, if the user browses to a portion of the second component that is not displayed, the second component needs to be rendered. Based on the component information of the second component contained in the visible area, the corresponding second component is rendered to obtain second rendering information. By rendering and displaying the second component contained in the visible area, interference with the user's page browsing is avoided, thereby improving the reliability of page loading.
[0217] In one embodiment, the second rendering information obtained by rendering the corresponding second component based on the visible area and the component information of the second component in step S910 can also be determined in the following way:
[0218] In response to the fact that the distance between the visible area and at least a portion of the second component is less than a preset distance, the corresponding second component is rendered based on the component information of the second component whose distance from the visible area is less than the preset distance, thereby obtaining second rendering information.
[0219] In this embodiment, in response to the fact that the distance between the visible area and at least a portion of the second component is less than a preset distance, indicating that the user is about to browse a portion of the undisplayed second component, the second component needs to be rendered. Based on the component information of the second component whose distance from the visible area is less than the preset distance, the corresponding second component is rendered to obtain second rendering information. By rendering and displaying the second component that is about to be browsed, the user's browsing experience is avoided, thereby improving the reliability of page loading.
[0220] For example, in step S920, displaying the corresponding second component in the area where the placeholder element is located based on the second rendering information can be achieved by parsing the second rendering information to obtain second display information. The corresponding second component is then displayed in the area where the placeholder element is located based on the second display information. Alternatively, the corresponding second component can be displayed directly in the area where the placeholder element is located based on the second rendering information without parsing.
[0221] This disclosure provides a page loading method, which can be applied, for example, to electronic devices, such as... Figure 9 As shown, the method includes:
[0222] S1000, in response to the instruction to load the page, sends an access request to the cloud server.
[0223] S1010: In response to the first rendering information and the component information of the second component sent by the cloud server, the first rendering information is parsed to obtain the first display information.
[0224] S1020. Based on the first display information, display multiple first components.
[0225] S1030. Based on the positioning information of the second component, place placeholder elements in the corresponding area of the page.
[0226] S1040. In response to page scrolling, determine the visible area of the page.
[0227] S1050, In response to the visible area containing at least a portion of the second component, render the corresponding second component according to the component information of the second component contained in the visible area to obtain second rendering information.
[0228] S1060. Based on the second rendering information, display the corresponding second component in the area where the placeholder element is located.
[0229] In this embodiment, in response to the instruction to load the page, the page needs to be loaded, and an access request is sent to the cloud server. In response to the first rendering information and the component information of the second component sent by the cloud server, the first rendering information is parsed to obtain first display information. Based on the first display information, multiple first components are displayed, allowing the user to browse the initial area of the page in a timely manner. Based on the positioning information of the second component, placeholder elements are placed in the corresponding area of the page to prevent the corresponding area from being occupied. In response to page scrolling, the visible area of the page changes, and the visible area of the page is determined. In response to the visible area containing at least part of the second component, the user browses to the position of the second component. Based on the component information of the second component contained in the visible area, the corresponding second component is rendered to obtain second rendering information. Based on the second rendering information, the corresponding second component is displayed in the area where the placeholder element is located, allowing the user to browse the second component. By displaying the first component located in the initial area, the user's initial browsing of the page is avoided, thereby improving the reliability of page loading. Simultaneously, by placing placeholder elements in appropriate positions, the subsequent display of the second component is avoided, further improving the reliability of page loading.
[0230] In one exemplary embodiment, a page loading apparatus is provided, for example, applicable to a cloud server, for implementing the method described above. (Reference) Figure 10 As shown, the page loading device may include an acquisition module 100, a rendering module 150, and a first sending module 200. During the implementation of the above method,
[0231] The acquisition module 100 is configured to acquire component information of multiple components in a page to be loaded in response to an access request sent by an electronic device.
[0232] Rendering module 150 is configured to render multiple first components among multiple components based on component information of multiple components to obtain first rendering information, wherein at least some of the first components are located in the starting area of the page.
[0233] The first sending module 200 is configured to send first rendering information and component information of a second component to an electronic device, wherein the second component is a component other than the multiple first components among a plurality of components.
[0234] In one exemplary embodiment, a page loading apparatus is provided, wherein a rendering module 150 is configured to:
[0235] Based on the location information of multiple components, determine the location method for each component.
[0236] Based on the positioning method of multiple components, multiple first components are determined from the multiple components.
[0237] Based on the component information of multiple first components, render the multiple first components to obtain the first rendering information.
[0238] In one exemplary embodiment, a page loading apparatus is provided, wherein a rendering module 150 is configured to:
[0239] Based on the size information of multiple components, determine the component height of multiple third components whose positioning method is the first method, where the first method depends on the document flow.
[0240] Based on the height of each component, determine the target height of multiple third components.
[0241] Based on the target height, at least a portion of the first component is determined from multiple third components.
[0242] In one exemplary embodiment, a page loading apparatus is provided, wherein a rendering module 150 is configured to:
[0243] If the target height is greater than the preset height, each third component located within the preset height is used as at least part of the first component according to the setting order of multiple third components. The preset height is related to the starting area.
[0244] When the target height is less than or equal to the preset height, multiple third components are used as at least part of the first component.
[0245] In one exemplary embodiment, a page loading apparatus is provided, the apparatus further comprising:
[0246] The first determining module is configured to determine a preset height based on the screen size of the electronic device and the page type of the page.
[0247] In one exemplary embodiment, a page loading apparatus is provided, wherein a rendering module 150 is configured to:
[0248] Multiple fourth components with the second positioning method are treated as another part of the first component, and the second method is removed from the document flow.
[0249] In one exemplary embodiment, a page loading apparatus is provided, wherein a first determining module is configured to:
[0250] If the target height is greater than the preset height, the third component located outside the preset height is used as at least part of the second component according to the setting order of multiple third components. The preset height is related to the starting area.
[0251] In one exemplary embodiment, a page loading apparatus is provided, wherein a rendering module 150 is configured to:
[0252] Based on the identification information of multiple components, identify multiple first components located in the starting region.
[0253] Based on the component information of multiple first components, render the multiple first components to obtain the first rendering information.
[0254] In one exemplary embodiment, a page loading apparatus is provided, the apparatus further comprising:
[0255] The generation module is configured to generate target labels for placeholders based on the component information of the second component.
[0256] In one exemplary embodiment, a page loading apparatus is provided, wherein a first sending module 200 is configured to:
[0257] Send the first rendering information and target label to the electronic device.
[0258] In one exemplary embodiment, a page loading apparatus is provided, for example, applicable to an electronic device, for implementing the method described above. (Reference) Figure 11 As shown, the page loading device may include a second sending module 250, a display module 300, and a placement module 350. During the implementation of the above method,
[0259] The second sending module 250 is configured to send an access request to the cloud server in response to a page loading instruction.
[0260] Display module 300 is configured to respond to first rendering information and component information of second components sent by a cloud server. According to the first rendering information, multiple first components are displayed, at least some of which are located in the starting area of the page. The second component is the component other than the multiple first components among the multiple components.
[0261] Placement module 350 is configured to place placeholder elements based on the component information of the second component.
[0262] In one exemplary embodiment, a page loading apparatus is provided, wherein a display module 300 is configured to:
[0263] The first rendering information is parsed to obtain the first display information.
[0264] Based on the first display information, multiple first components are displayed.
[0265] In one exemplary embodiment, a page loading apparatus is provided, wherein a placement module 350 is configured to:
[0266] Based on the positioning information of the second component, place placeholder elements in the corresponding area of the page.
[0267] In one exemplary embodiment, a page loading apparatus is provided, the apparatus further comprising:
[0268] The second determining module is configured to determine the visible area of the page in response to page scrolling.
[0269] In one exemplary embodiment, a page loading apparatus is provided, wherein a display module 300 is configured to:
[0270] Based on the visible area and the component information of the second component, the corresponding second component is rendered to obtain the second rendering information.
[0271] Based on the second rendering information, the corresponding second component is displayed in the area where the placeholder element is located.
[0272] In one exemplary embodiment, a page loading apparatus is provided, wherein a display module 300 is configured to:
[0273] In response to the visible area containing at least a portion of the second component, the corresponding second component is rendered based on the component information of the second component contained in the visible area to obtain second rendering information.
[0274] In one exemplary embodiment, a page loading apparatus is provided, wherein a display module 300 is configured to:
[0275] In response to the fact that the distance between the visible area and at least a portion of the second component is less than a preset distance, the corresponding second component is rendered based on the component information of the second component whose distance from the visible area is less than the preset distance, thereby obtaining second rendering information.
[0276] In one exemplary embodiment, a cloud server is provided, including a processor and a memory for storing processor-executable instructions. The processor is configured to perform the page loading method described above.
[0277] In one exemplary embodiment, an electronic device is provided, such as a mobile phone, a laptop computer, a tablet computer, and a wearable device.
[0278] refer to Figure 12As shown, the electronic device 400 may include one or more of the following components: processing component 402, memory 404, power supply component 406, multimedia component 408, audio component 410, input / output (I / O) interface 412, sensor component 414, and communication component 416.
[0279] Processing component 402 typically controls the overall operation of electronic device 400, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 402 may include one or more processors 420 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 402 may include one or more modules to facilitate interaction between processing component 402 and other components. For example, processing component 402 may include a multimedia module to facilitate interaction between multimedia component 408 and processing component 402.
[0280] Memory 404 is configured to store various types of data to support the operation of electronic device 400. Examples of this data include instructions for any application or method operating on electronic device 400, contact data, phonebook data, messages, pictures, videos, etc. Memory 404 can be implemented by any type of volatile or non-volatile storage terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0281] Power supply component 406 provides power to various components of electronic device 400. Power supply component 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 400.
[0282] Multimedia component 408 includes a screen that provides an output interface between electronic device 400 and user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 408 includes a front-facing camera module and / or a rear-facing camera module. When electronic device 400 is in an operating mode, such as shooting mode or video mode, the front-facing camera module and / or rear-facing camera module may receive external multimedia data. Each front-facing camera module and rear-facing camera module may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0283] Audio component 410 is configured to output and / or input audio signals. For example, audio component 410 includes a microphone (MIC) configured to receive external audio signals when electronic device 400 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 404 or transmitted via communication component 416. In some embodiments, audio component 410 also includes a speaker for outputting audio signals.
[0284] I / O interface 412 provides an interface between processing component 402 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0285] Sensor assembly 414 includes one or more sensors for providing state assessments of various aspects of electronic device 400. For example, sensor assembly 414 may detect the on / off state of electronic device 400, the relative positioning of components such as the display and keypad of electronic device 400, changes in position of electronic device 400 or a component of electronic device 400, the presence or absence of user contact with electronic device 400, orientation or acceleration / deceleration of electronic device 400, and temperature changes of electronic device 400. Sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 414 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 414 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.
[0286] Communication component 416 is configured to facilitate wired or wireless communication between electronic device 400 and other terminals. Electronic device 400 can access wireless networks based on communication standards, such as WiFi, 2G, 3G, 4G, 5G, or combinations thereof. In one exemplary embodiment, communication component 416 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 416 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0287] In an exemplary embodiment, the electronic device 400 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing terminals (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods shown in the above embodiments or combinations thereof.
[0288] In one exemplary embodiment, a page loading system is provided, comprising a cloud server and an electronic device. The cloud server is configured to:
[0289] In response to an access request sent by an electronic device, obtain component information of multiple components in the page to be loaded.
[0290] Based on the component information of multiple components, multiple first components among the multiple components are rendered to obtain first rendering information, wherein at least some of the first components are located in the starting area of the page.
[0291] The first rendering information and the component information of the second component are sent to the electronic device. The second component is a component other than the multiple first components among the multiple components.
[0292] The electronic device is configured to be used for:
[0293] In response to the instruction to load the page, an access request is sent to the cloud server.
[0294] In response to the first rendering information and the component information of the second component sent by the cloud server, multiple first components are displayed based on the first rendering information.
[0295] Place placeholder elements based on the component information of the second component.
[0296] In one exemplary embodiment, the cloud server is configured to:
[0297] Based on the location information of multiple components, determine the location method for each component.
[0298] Based on the positioning method of multiple components, multiple first components are determined from the multiple components.
[0299] Based on the component information of multiple first components, render the multiple first components to obtain the first rendering information.
[0300] In one exemplary embodiment, the cloud server is configured to:
[0301] Based on the size information of multiple components, determine the component height of multiple third components whose positioning method is the first method, where the first method depends on the document flow.
[0302] Based on the height of each component, determine the target height of multiple third components.
[0303] Based on the target height, at least a portion of the first component is determined from multiple third components.
[0304] In one exemplary embodiment, the cloud server is configured to:
[0305] If the target height is greater than the preset height, each third component located within the preset height is used as at least part of the first component according to the setting order of multiple third components. The preset height is related to the starting area.
[0306] When the target height is less than or equal to the preset height, multiple third components are used as at least part of the first component.
[0307] In one exemplary embodiment, the cloud server is configured to:
[0308] Determine the preset height based on the screen size of the electronic device and the page type.
[0309] In one exemplary embodiment, the cloud server is configured to:
[0310] Multiple fourth components with the second positioning method are treated as another part of the first component, and the second method is removed from the document flow.
[0311] In one exemplary embodiment, the cloud server is configured to:
[0312] If the target height is greater than the preset height, the third component located outside the preset height is used as at least part of the second component according to the setting order of multiple third components. The preset height is related to the starting area.
[0313] In one exemplary embodiment, the cloud server is configured to:
[0314] Based on the identification information of multiple components, identify multiple first components located in the starting region.
[0315] Based on the component information of multiple first components, render the multiple first components to obtain the first rendering information.
[0316] In one exemplary embodiment, the cloud server is configured to:
[0317] Based on the component information of the second component, generate target labels for placeholders.
[0318] Send the first rendering information and target label to the electronic device.
[0319] In one exemplary embodiment, the electronic device is configured to:
[0320] The first rendering information is parsed to obtain the first display information.
[0321] Based on the first display information, multiple first components are displayed.
[0322] In one exemplary embodiment, the electronic device is configured to:
[0323] Based on the positioning information of the second component, place placeholder elements in the corresponding area of the page.
[0324] In one exemplary embodiment, the electronic device is configured to:
[0325] Determine the visible area of the page in response to page scrolling.
[0326] Based on the visible area and the component information of the second component, the corresponding second component is rendered to obtain the second rendering information.
[0327] Based on the second rendering information, the corresponding second component is displayed in the area where the placeholder element is located.
[0328] In one exemplary embodiment, the electronic device is configured to:
[0329] In response to the visible area containing at least a portion of the second component, the corresponding second component is rendered based on the component information of the second component contained in the visible area to obtain second rendering information.
[0330] In one exemplary embodiment, the electronic device is configured to:
[0331] In response to the fact that the distance between the visible area and at least a portion of the second component is less than a preset distance, the corresponding second component is rendered based on the component information of the second component whose distance from the visible area is less than the preset distance, thereby obtaining second rendering information.
[0332] In one exemplary embodiment, a non-transitory computer-readable storage medium including instructions is provided, such as a memory 404 including instructions, which can be executed by a processor 420 of an electronic device 400 to perform the methods shown in the embodiments or combinations thereof. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage terminal, etc. When the instructions in the storage medium are executed by the processor of the terminal, the terminal is able to perform the methods shown in the embodiments or combinations thereof.
[0333] In one exemplary embodiment, a computer program product is provided, including a computer program or instructions that, when executed by a processor, implement the page loading method as described above.
[0334] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
[0335] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0336] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0337] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0338] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A page loading method, characterized in that, The page loading method includes: In response to access requests sent by electronic devices, obtain component information for multiple components in the page to be loaded; Based on the component information of the plurality of components, a plurality of first components among the plurality of components are rendered to obtain first rendering information, wherein at least a portion of the first components are located in the starting area of the page; The first rendering information and the component information of the second component are sent to the electronic device, wherein the second component is a component other than the plurality of first components among the plurality of components.
2. The page loading method according to claim 1, characterized in that, The component information includes positioning information; the step of rendering multiple first components among the multiple components based on the component information of the multiple components to obtain first rendering information includes: Based on the positioning information of the plurality of components, determine the positioning method of each component; Based on the positioning method of the plurality of components, the plurality of first components are determined from the plurality of components; Based on the component information of the plurality of first components, the plurality of first components are rendered to obtain the first rendering information.
3. The page loading method according to claim 2, characterized in that, The component information also includes size information; determining the plurality of first components from the plurality of components according to the positioning method of the plurality of components includes: Based on the size information of the plurality of components, determine the component height of a plurality of third components whose positioning method is a first method, wherein the first method depends on the document flow; The target height of the plurality of third components is determined based on the height of each of the aforementioned components; Based on the target height, at least a portion of the first component is determined from the plurality of third components.
4. The page loading method according to claim 3, characterized in that, The step of determining at least a portion of the first component from the plurality of third components based on the target height includes: If the target height is greater than the preset height, each of the third components located within the preset height is taken as at least part of the first component according to the setting order of the plurality of third components, where the preset height is related to the starting area; When the target height is less than or equal to the preset height, the plurality of third components are used as at least a portion of the first component.
5. The page loading method according to claim 4, characterized in that, Before rendering multiple first components among the multiple components based on the component information of the multiple components to obtain first rendering information, the page loading method further includes: The preset height is determined based on the screen size of the electronic device and the page type.
6. The page loading method according to claim 2, characterized in that, The step of determining the plurality of first components from the plurality of components according to the positioning method of the plurality of components includes: The fourth components whose positioning method is the second method among the multiple components are taken as another part of the first component, and the second method is removed from the document flow.
7. The page loading method according to claim 3, characterized in that, After determining the target height of the plurality of third components based on the height of each of the aforementioned components, the page loading method further includes: If the target height is greater than the preset height, the third component located outside the preset height is used as at least part of the second component according to the setting order of the plurality of third components, and the preset height is related to the starting area.
8. The page loading method according to claim 1, characterized in that, The component information includes identification information; the step of rendering multiple first components among the multiple components based on the component information of the multiple components to obtain first rendering information includes: Based on the identification information of the plurality of components, determine the plurality of first components located in the starting region; Based on the component information of the plurality of first components, the plurality of first components are rendered to obtain the first rendering information.
9. The page loading method according to any one of claims 1 to 8, characterized in that, Before sending the first rendering information and the component information of the second component to the electronic device, the page loading method further includes: Based on the component information of the second component, a target label for placeholders is generated; Sending the first rendering information and the component information of the second component to the electronic device includes: The first rendering information and the target label are sent to the electronic device.
10. A page loading method, characterized in that, The page loading method includes: In response to the instruction to load the page, an access request is sent to the cloud server; In response to the first rendering information and the component information of the second component sent by the cloud server, according to the first rendering information, a plurality of first components are displayed, at least some of the first components are located in the starting area of the page, and the second component is a component other than the plurality of first components among the plurality of components; Place placement elements according to the component information of the second component.
11. The page loading method according to claim 10, characterized in that, The step of displaying multiple first components based on the first rendering information includes: The first rendering information is parsed to obtain the first display information; Based on the first display information, the plurality of first components are displayed.
12. The page loading method according to claim 10, characterized in that, The component information includes positioning information; placing placeholder elements according to the component information of the second component includes: Based on the positioning information of the second component, the placeholder element is placed in the area corresponding to the page.
13. The page loading method according to any one of claims 10 to 12, characterized in that, The number of the second components is multiple; after placing placeholder elements according to the component information of the second components, the page loading method further includes: In response to page scrolling, determine the visible area of the page; Based on the visible area and the component information of the second component, the corresponding second component is rendered to obtain second rendering information; Based on the second rendering information, the corresponding second component is displayed in the area where the placeholder element is located.
14. The page loading method according to claim 13, characterized in that, The step of rendering the corresponding second component based on the visible area and the component information of the second component to obtain second rendering information includes: In response to the visible area containing at least a portion of the second component, the corresponding second component is rendered according to the component information of the second component contained in the visible area to obtain the second rendering information.
15. The page loading method according to claim 13, characterized in that, The step of rendering the corresponding second component based on the visible area and the component information of the second component to obtain second rendering information includes: In response to the fact that the distance between the visible area and at least a portion of the second component is less than a preset distance, the corresponding second component is rendered based on the component information of the second component whose distance from the visible area is less than the preset distance, thereby obtaining the second rendering information.
16. A page loading device, characterized in that, The page loading device includes: The acquisition module is configured to acquire component information of multiple components in a page to be loaded in response to an access request sent by an electronic device. A rendering module is configured to render a plurality of first components among the plurality of components based on the component information of the plurality of components to obtain first rendering information, wherein at least a portion of the first components are located in the starting area of the page. A first sending module is configured to send the first rendering information and the component information of the second component to the electronic device, wherein the second component is a component other than the plurality of first components.
17. The page loading apparatus according to claim 16, characterized in that, The component information includes positioning information; the rendering module is configured to: Based on the positioning information of the plurality of components, determine the positioning method of each component; Based on the positioning method of the plurality of components, the plurality of first components are determined from the plurality of components; Based on the component information of the plurality of first components, the plurality of first components are rendered to obtain the first rendering information.
18. The page loading apparatus according to claim 16 or 17, characterized in that, The page loading device further includes: A generation module, configured to generate a target label for placeholders based on the component information of the second component; The first sending module is configured to: The first rendering information and the target label are sent to the electronic device.
19. A page loading device, characterized in that, The page loading device includes: The second sending module is configured to send an access request to the cloud server in response to an instruction to load a page. The display module is configured to respond to first rendering information and component information of a second component sent by the cloud server, and to display a plurality of first components according to the first rendering information, wherein at least some of the first components are located in the starting area of the page, and the second component is a component other than the plurality of first components among the plurality of components; A placement module, configured to place placeholder elements according to the component information of the second component.
20. The page loading apparatus according to claim 19, characterized in that, The display module is configured to: The first rendering information is parsed to obtain the first display information; Based on the first display information, the plurality of first components are displayed.
21. The page loading apparatus according to claim 19 or 20, characterized in that, The page loading device further includes: A first determining module is configured to determine the visible area of the page in response to scrolling of the page. The second rendering module is configured to render the second component based on the visible area and the component information of the second component to obtain second rendering information. The display module is configured to: Based on the second rendering information, the second component is displayed in the area where the placeholder element is located.
22. A cloud server, characterized in that, The cloud server includes: processor; Memory used to store the processor's executable instructions; The processor is configured to perform the page loading method as described in any one of claims 1 to 9.
23. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is configured to perform the page loading method as described in any one of claims 10 to 15.
24. A page loading system, characterized in that, The page loading system includes a cloud server and electronic devices; the cloud server is configured to: In response to the access request sent by the electronic device, obtain component information of multiple components in the page to be loaded; Based on the component information of the plurality of components, a plurality of first components among the plurality of components are rendered to obtain first rendering information, wherein at least a portion of the first components are located in the starting area of the page; The first rendering information and the component information of the second component are sent to the electronic device, wherein the second component is a component other than the plurality of first components among the plurality of components; The electronic device is configured to: In response to the instruction to load the page, the access request is sent to the cloud server; In response to the first rendering information and the component information of the second component sent by the cloud server, the plurality of first components are displayed according to the first rendering information; Place placement elements according to the component information of the second component.
25. The page loading system according to claim 24, characterized in that, The component information includes location information; the cloud server is configured to: Based on the positioning information of the plurality of components, determine the positioning method of each component; Based on the positioning method of the plurality of components, the plurality of first components are determined from the plurality of components; Based on the component information of the plurality of first components, the plurality of first components are rendered to obtain the first rendering information.
26. The page loading system according to claim 24, characterized in that, The electronic device is configured to: The first rendering information is parsed to obtain the first display information; Based on the first display information, the plurality of first components are displayed.
27. A non-transitory computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the terminal, the terminal is able to perform the page loading method as described in any one of claims 1 to 15.
28. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, the page loading method as described in any one of claims 1 to 15 is implemented.
