Page loading method and device, electronic equipment and storage medium

By real-time detection of device and network performance and dynamically adjusting loading strategies and resource loading methods, the problem of difficult to improve the loading speed and stability of web pages is solved, and a faster and more stable page loading experience is achieved.

CN119025770APending Publication Date: 2024-11-26GUANGZHOU BAOLUN ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411137646.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

The prior art is difficult to effectively improve the loading speed and stability of web pages, especially under different devices and network conditions, which cannot meet the performance needs of users.

Method used

By responding to page access operations, determine the real-time device performance and network performance of the target page, and dynamically adjust the loading strategy based on this information. Use real-time loading strategies to load the target web page, including scroll viewport loading or non-viewport loading, and dynamically adjust resources. Loading method.

Benefits of technology

It improves the speed and stability of web page loading, improves user experience, and realizes automatic optimization and continuous stability of page loading strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025770A_ABST
    Figure CN119025770A_ABST
Patent Text Reader

Abstract

The invention discloses a page loading method and device, electronic equipment and a storage medium. The method comprises the following steps: in response to a page access operation, determining a target page and a target process for loading the target page; determining real-time equipment performance and real-time network performance allocated for the target process by a client where the target page is located; determining a real-time loading strategy of the target page according to the real-time equipment performance and the real-time network performance; and loading the target webpage in real time based on the real-time loading strategy to obtain the loaded target webpage. According to the technical scheme, the webpage loading speed and stability can be improved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer application technology, and in particular to a page loading method, device, electronic device and storage medium. Background Art

[0002] Currently, performance optimization of web pages is an important topic in front-end development, that is, how to ensure the loading speed and stability of web pages to improve user experience.

[0003] In the related art, targeted static web page loading strategies are usually pre-set for devices with different performance to improve the loading speed of web pages on different devices. However, due to the complexity of page content and the variability of page loading scenarios, the page loading speed and stability of the above method are difficult to meet user needs. Summary of the invention

[0004] The present invention provides a page loading method, device, electronic device and storage medium to solve the technical problems of slow loading speed and poor stability of Web pages.

[0005] According to one aspect of the present invention, a page loading method is provided, wherein the method comprises:

[0006] In response to the page access operation, determining a target page and a target process for loading the target page;

[0007] Determine the real-time device performance and real-time network performance allocated by the client where the target page is located to the target process;

[0008] Determining a real-time loading strategy for the target page according to the real-time device performance and the real-time network performance;

[0009] The target webpage is loaded in real time based on the real-time loading strategy to obtain the loaded target webpage.

[0010] According to another aspect of the present invention, a page loading device is provided, wherein the device comprises:

[0011] A process determination module, used for determining a target page and a target process for loading the target page in response to a page access operation;

[0012] A performance determination module, used to determine the real-time device performance and real-time network performance allocated by the client where the target page is located to the target process;

[0013] A strategy determination module, used to determine the real-time loading strategy of the target page according to the real-time device performance and the real-time network performance;

[0014] The page loading module is used to load the target web page in real time based on the real-time loading strategy to obtain the loaded target web page.

[0015] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:

[0016] at least one processor; and

[0017] a memory communicatively connected to the at least one processor; wherein,

[0018] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the page loading method described in any embodiment of the present invention.

[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the page loading method described in any embodiment of the present invention when executed.

[0020] The technical solution of the embodiment of the present invention determines the target page and the target process for loading the target page in response to the page access operation; determines the real-time device performance and real-time network performance allocated by the client where the target page is located to the target process; determines the real-time loading strategy of the target page according to the real-time device performance and the real-time network performance; and loads the target web page in real time based on the real-time loading strategy to obtain the loaded target web page. The present invention improves the speed and stability of web page loading and enhances the user experience.

[0021] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0023] Figure 1 is a flow chart of a page loading method provided according to Embodiment 1 of the present invention;

[0024] Figure 2is a flow chart of a page loading method provided according to Embodiment 2 of the present invention;

[0025] Figure 3 is an overall flow chart of a page loading method provided according to an embodiment of the present invention;

[0026] Figure 4 is a structural schematic diagram of a page loading device provided according to Embodiment 3 of the present invention;

[0027] Figure 5 It is a schematic diagram of the structure of an electronic device that implements the page loading method of an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] Embodiment 1

[0031] Figure 1 A flowchart of a page loading method is provided for the first embodiment of the present invention. This embodiment is applicable to the case of loading a Web page. The method can be executed by a page loading device. The page loading device can be implemented in the form of hardware and / or software. The page loading device can be configured in a computer. Figure 1 As shown, the method includes:

[0032] S110 . In response to a page access operation, determine a target page and a target process for loading the target page.

[0033] The page access operation can be understood as an operation of a user accessing the target page. In the embodiment of the present invention, the page access operation can be preset according to the scenario requirements and is not specifically limited here. Optionally, the page access operation can be a trigger operation for accessing a link to the target web page.

[0034] The target page can be understood as a target visited web page, or can be understood as a web page to be loaded. Optionally, the target page can be a Web page.

[0035] The target process can be understood as a process that executes the task of adding the target web page. In the embodiment of the present invention, the allocation of the target process is related to the system settings, which is not specifically limited here.

[0036] S120: Determine the real-time device performance and real-time network performance allocated by the client where the target page is located to the target process.

[0037] In the embodiment of the present invention, multiple processes may be run in the client, and the device performance allocated by the client to each process may be the same or different, and correspondingly, the network performance allocated by the client to each process may also be the same or different. Moreover, with the start and end of the process, or the change of the task executed in the process, the performance allocation of the client to each process may change in real time, wherein the performance allocation of the client to each process is related to the actual application scenario and system settings, and is not specifically limited here.

[0038] The real-time device performance can be understood as the real-time device performance allocated by the client to the target process. The real-time network performance can be understood as the real-time network performance allocated by the client to the target process.

[0039] Optionally, the determining the real-time device performance and real-time network performance allocated by the client where the target page is located to the target process includes:

[0040] Determine the real-time core number and real-time memory of the central processing unit and the real-time graphics card parameters of the graphics processing unit allocated by the client where the target page is located to the target process;

[0041] Determining the real-time device performance according to the real-time core number, the real-time memory, and the real-time graphics card performance, wherein the real-time device performance includes high device performance or low device performance;

[0042] Determine the real-time network bandwidth allocated by the client where the target page is located to the target process, and determine the real-time network performance according to the real-time network bandwidth, wherein the real-time network performance includes high network performance or low network performance.

[0043] The real-time core number may include a single core and / or a dual core. The real-time memory may be a parameter characterizing the allocated memory size. For example, the real-time memory may be 2GB, 3GB, or 5GB. The real-time graphics card parameter may be understood as a parameter characterizing the performance of the allocated graphics card.

[0044] Optionally, determining the real-time device performance according to the real-time core number, the real-time memory, and the real-time graphics card parameter includes:

[0045] Determine the core count threshold, memory threshold, and graphics card threshold;

[0046] The real-time device performance is determined according to the core number threshold, the memory threshold, the graphics card threshold, the real-time core number, the real-time memory, and the real-time graphics card parameter.

[0047] In the embodiment of the present invention, the core number threshold, the memory threshold or the graphics card threshold can be preset according to scene requirements, and are not specifically limited here.

[0048] The real-time network bandwidth can be understood as the allocated real-time network bandwidth. Optionally, the real-time network bandwidth can be a real-time network bandwidth parameter. Exemplarily, the real-time network bandwidth can be 1Mbps, 2Mbps or 5Mbps, etc.

[0049] Optionally, determining the real-time network performance according to the real-time network bandwidth includes:

[0050] A network bandwidth threshold is determined, and real-time network performance is determined according to the network bandwidth threshold and the real-time network bandwidth.

[0051] In the embodiment of the present invention, the network bandwidth threshold can be preset according to scenario requirements and is not specifically limited here.

[0052] Optionally, the page loading method further includes:

[0053] At least one of the real-time device information, the real-time device performance, the real-time network bandwidth, the real-time network performance, and the real-time loading strategy is displayed.

[0054] The present invention realizes the real-time display of monitored information during the page loading process, which is convenient for users to observe relevant information in real time during the page loading process and improves the user experience.

[0055] S130: Determine a real-time loading strategy for the target page according to the real-time device performance and the real-time network performance.

[0056] The real-time loading strategy can be understood as a strategy for real-time loading of the target page. Optionally, the target page may include multiple types of resources to be loaded, and the real-time loading strategy may include a resource loading method corresponding to each type of resource to be loaded and an overall page loading method of the target page.

[0057] Optionally, determining the real-time loading strategy of the target page according to the real-time device performance and the real-time network performance includes:

[0058] The real-time loading strategy of the target page is determined by a preset performance strategy mapping relationship, the real-time device performance and the real-time network performance, wherein the real-time loading strategy includes at least one of a double high loading strategy, a double low loading strategy, a first single high loading strategy and a second single high loading strategy.

[0059] The performance strategy mapping relationship can be understood as a mapping relationship between performance and strategy. In an embodiment of the present invention, the performance strategy mapping relationship can be preset according to scenario requirements and is not specifically limited here. Optionally, the high device performance and the high network performance are mapped to the dual high loading strategy; the low device performance and the low network performance are mapped to the dual low loading strategy; the high device performance and the low network performance are mapped to the first single high loading strategy; the low device performance and the high network performance are mapped to the second single high loading strategy.

[0060] The dual-high loading strategy can be understood as a webpage loading strategy corresponding to the high device performance and the high network performance. The dual-low loading strategy can be understood as a webpage loading strategy corresponding to the low device performance and the low network performance. The first single-high loading strategy can be understood as a webpage loading strategy corresponding to the high device performance and the low network performance. The second single-high loading strategy can be understood as a webpage loading strategy corresponding to the low device performance and the high network performance.

[0061] S140: Load the target webpage in real time based on the real-time loading strategy to obtain the loaded target webpage.

[0062] Optionally, the real-time loading of the target webpage based on the real-time loading strategy includes:

[0063] Based on the real-time loading strategy, the target web page is loaded in real time and the operation of determining the real-time device performance and the real-time network performance allocated by the client where the target page is located to the target process and determining the real-time loading strategy of the target page according to the real-time device performance and the real-time network performance is returned;

[0064] In the case where the real-time loading strategy changes, the real-time loading strategy is updated, and for the updated real-time loading strategy, the operation of real-time loading the target web page based on the real-time loading strategy is continued to be performed until the page loading is completed.

[0065] In an embodiment of the present invention, the real-time loading strategy for real-time loading of the target web page is updated in real time based on the real-time device performance and real-time network performance assigned by the client to the target process, that is, the present invention can detect the real-time device performance and real-time network performance assigned by the client to the target process in real time, and when the real-time loading strategy does not match the real-time performance, the real-time loading strategy is switched, and the page loading is continued based on the switched strategy, thereby realizing automatic optimization of the page loading strategy, achieving the stability of continuous page loading, and improving the user experience.

[0066] The technical solution of the embodiment of the present invention determines the target page and the target process for loading the target page in response to the page access operation; determines the real-time device performance and real-time network performance allocated by the client where the target page is located to the target process; determines the real-time loading strategy of the target page according to the real-time device performance and the real-time network performance; and loads the target web page in real time based on the real-time loading strategy to obtain the loaded target web page. The present invention improves the speed and stability of web page loading and enhances the user experience.

[0067] Embodiment 2

[0068] Figure 2 This is a flow chart of a page loading method provided in the second embodiment of the present invention. This embodiment is to refine the target web page after loading in real time based on the real-time loading strategy described in the above embodiment. Figure 2 As shown, the method includes:

[0069] S210 . In response to a page access operation, determine a target page and a target process for loading the target page.

[0070] S220: Determine the real-time device performance and real-time network performance allocated by the client where the target page is located to the target process.

[0071] S230: Determine a real-time loading strategy for the target page according to the real-time device performance and the real-time network performance.

[0072] S240: Determine a webpage loading method for the target webpage based on the real-time loading strategy, wherein the webpage loading method includes scrolling viewport loading or non-viewport loading.

[0073] The webpage loading method can be understood as the overall loading method of the page. Optionally, the webpage loading method includes scrolling viewport loading or non-viewport loading. The scrolling viewport loading can be understood as a scrolling viewport loading method, that is, first loading the resources corresponding to the scrolling viewport, and then loading other resources. The non-viewport loading can be understood as a direct overall loading method, that is, directly loading all resources in the webpage.

[0074] From the above, it can be understood that the scrolling viewport loading is suitable for situations with high device performance and / or high network performance, and the non-viewport loading is suitable for situations with low device performance and / or low network performance.

[0075] S250: Determine resources to be loaded based on the webpage loading method.

[0076] The resources to be loaded may be understood as resources to be loaded.

[0077] Optionally, determining the resource to be loaded based on the webpage loading mode includes:

[0078] In the case where the webpage loading mode is the scrolling viewport loading, in response to a page scrolling operation, determining the target display viewport, and determining the resource to be loaded based on the target display viewport;

[0079] The loading of the sub-resource based on the resource loading method to obtain the target resource includes:

[0080] For each type of the sub-resource, the sub-resource is loaded based on the resource loading method to obtain the loaded sub-resource;

[0081] Determine the resource to be loaded that has been loaded based on the sub-resource that has been loaded;

[0082] After the page scrolling operation is completed, the target resource is determined based on the resource to be loaded that has been loaded.

[0083] Optionally, determining the resource to be loaded based on the webpage loading mode includes:

[0084] When the webpage loading mode is the non-viewport loading, the resource to be loaded is determined based on the target page.

[0085] The page scrolling operation may be understood as an operation of scrolling the target page.

[0086] The target display viewport can be understood as a viewport for displaying a page. In the embodiment of the present invention, part of the resources in the target page can be displayed in real time through the target display viewport.

[0087] When the web page loading method is the scrolling viewport loading, the resources to be loaded are the resources to be loaded in the target display viewport, that is, part of the resources in the target page; when the web page loading method is the non-viewport loading, the resources to be loaded are all the resources in the target page.

[0088] S260: Determine at least one type of sub-resource included in the resource to be loaded, and determine a resource loading method corresponding to each type of the sub-resource based on the real-time loading strategy.

[0089] The sub-resource may be understood as a resource included in the resource to be loaded. Optionally, the sub-resource may include at least one of an animation resource, an image resource, a script resource or a static resource.

[0090] The resource loading method can be understood as the loading method corresponding to each type of sub-resource. Optionally, the resource loading method corresponding to the animation resource includes animation loading or animation loading prohibited, the resource loading method corresponding to the image resource includes image high-resolution loading or image low-resolution loading, the resource loading method corresponding to the script resource includes script synchronous loading or script asynchronous loading, and the resource loading method corresponding to the static resource includes compressed loading or non-compressed loading.

[0091] In the embodiment of the present invention, the real-time loading strategy is converted in real time based on the real-time device performance and the real-time network performance. Therefore, the real-time loading strategy used to determine the resource loading method corresponding to each type of sub-resource also has real-time performance.

[0092] Optionally, when the webpage loading mode is the scroll viewport loading, the loading of the sub-resource based on the resource loading mode to obtain the target resource includes:

[0093] For each type of the sub-resource, the sub-resource is loaded based on the resource loading method to obtain the loaded sub-resource;

[0094] Determine the resource to be loaded that has been loaded based on the sub-resource that has been loaded;

[0095] After the page scrolling operation is completed, the target resource is determined based on the resource to be loaded that has been loaded.

[0096] The target resource may be understood as all page resources that have been loaded.

[0097] Optionally, the web page loading method corresponding to the double-high loading strategy may be non-viewport loading, the resource loading method corresponding to the animation resources may be animation loading, the resource loading method corresponding to the image resources includes image high-resolution loading, the resource loading method corresponding to the script resources includes script synchronous loading, and the resource loading method corresponding to the static resources may be non-compressed loading.

[0098] Optionally, the web page loading method corresponding to the dual-low loading strategy may be scrolling viewport loading, the resource loading method corresponding to the animation resources may be animation forbidden loading, the resource loading method corresponding to the image resources includes image low-resolution loading, the resource loading method corresponding to the script resources includes script asynchronous loading, and the resource loading method corresponding to the static resources may be compressed loading.

[0099] Optionally, the web page loading method corresponding to the first single-height loading strategy may be scrolling viewport loading, the resource loading method corresponding to the animation resources may be animation loading, the resource loading method corresponding to the image resources includes low-resolution image loading, the resource loading method corresponding to the script resources includes asynchronous script loading, and the resource loading method corresponding to the static resources may be non-compressed loading.

[0100] Optionally, the web page loading method corresponding to the second single high loading strategy may be scrolling viewport loading, the resource loading method corresponding to the animation resources may be animation forbidden loading, the resource loading method corresponding to the image resources includes low-resolution image loading, the resource loading method corresponding to the script resources includes script asynchronous loading, and the resource loading method corresponding to the static resources may be non-compressed loading.

[0101] In the embodiment of the present invention, preloading may be used for high device performance, and lazy loading may be used for low device performance.

[0102] S270: Load the sub-resource based on the resource loading method to obtain a target resource, and determine the target webpage that has been loaded based on the target resource.

[0103] The technical solution of the embodiment of the present invention is to determine the webpage loading mode of the target webpage based on the real-time loading strategy, wherein the webpage loading mode includes scrolling viewport loading or non-viewport loading; determine the resources to be loaded based on the webpage loading mode; determine at least one type of sub-resources contained in the resources to be loaded, and determine the resource loading mode corresponding to each type of the sub-resources based on the real-time loading strategy; load the sub-resources based on the resource loading mode to obtain the target resource, and determine the target webpage that has been loaded based on the target resource. Based on actual performance conditions, through targeted real-time loading strategies, that is, using targeted webpage loading modes and resource loading modes for page loading, the loading mode is more suitable for the actual performance conditions of webpage loading, thereby improving the speed and stability of page loading and enhancing the user experience.

[0104] Figure 3 FIG. 1 is an overall flow chart of a page loading method provided according to an embodiment of the present invention. Figure 3 As shown, as an optional embodiment of the above embodiment, it is described in the form of modules included in the system architecture. Optionally, the overall process of the page loading method can be:

[0105] Optionally, the overall architecture of the page loading system may include real-time detection of device and network conditions, automatic selection of optimization strategies, dynamic loading and rendering of resources, and continuous performance monitoring and feedback modules to achieve automatic performance optimization of Web pages and improve the efficiency and stability of Web page loading.

[0106] 1. In response to the user's operation of accessing the Web page, the device and network condition detection module is started. Through the device and network condition detection module, information related to device performance and network performance is collected on the client. Specifically, the number of cores of the central processing unit is obtained through navigator.hardwareConcurrency, memory information is obtained through performance.memory, graphics card information of the graphics processor is obtained through WebGL's WEBGL_debug_renderer_info, and network bandwidth is obtained through JavaScript's NetworkInformationAPI; the information is passed to the performance and network analysis module through the Application Programming Interface (API) or local storage.

[0107] 2. Through the performance and network analysis module, the detected information is collected and analyzed and decided to obtain analysis results that characterize the performance of the device and the network. For example, if the number of cores of the central processing unit can be single-core or dual-core, and the memory does not exceed 2GB, the analysis result will be determined as a low-performance device, and if the network width does not exceed 1Mbps, the analysis result will be determined as low network performance, etc., and the analysis result will be passed to the performance optimization strategy selection module.

[0108] 3. Through the performance optimization strategy selection module, according to the analysis results, select the appropriate web page loading strategy. For example, in the case of low device performance and low network performance, a lightweight layout strategy can be selected. The web page loading method in this strategy can include animation loading prohibition, that is, removing animation effects; disabling shadow effects in CSS; scrolling viewport resource loading, that is, loading resources in the viewport before displaying and delaying the loading of resources that will be displayed after scrolling; low-resolution image loading; lazy loading of images; compressed loading of static resources; asynchronous loading of scripts, etc. In the case of high device performance and high network performance, a more complex layout strategy can be selected. The web page loading method in this strategy can include animation loading, high-definition resolution image loading, image preloading, non-compressed loading of static resources, synchronous loading of scripts, etc.

[0109] 4. Through the resource loading and rendering module, dynamically adjust the resource loading and rendering methods according to the selected web page loading strategy, and load the page in real time. For example, image loading: select lazy loading or preloading according to network performance, and dynamically adjust the resolution of the image. JavaScript execution: select synchronous or asynchronous loading of scripts according to device performance, and delay unnecessary script execution. CSS animation: adjust animation effects according to device performance and network performance, simplify complex animations and animation frames. Static resource management: select whether to enable Gzip or Brotli compression according to network performance, and dynamically adjust the cache strategy.

[0110] 5. During the page loading process, the performance monitoring and feedback module is used to detect performance indicators such as page loading time, number of resource requests, frame rate, etc. in real time. If it is detected that the page loading time is too long or the frame rate is too low, it will automatically switch to a more practical web page loading strategy to achieve page performance optimization.

[0111] The technical solution implemented in the present invention can improve the loading speed and stability of the page, and automatically and continuously optimize the page performance.

[0112] Embodiment 3

[0113] Figure 4 This is a schematic diagram of the structure of a page loading device provided by Embodiment 3 of the present invention. Figure 4As shown, the device includes: a process determination module 310 , a performance determination module 320 , a policy determination module 330 and a page loading module 340 .

[0114] Among them, the process determination module 310 is used to determine the target page and the target process for loading the target page in response to the page access operation; the performance determination module 320 is used to determine the real-time device performance and real-time network performance allocated by the client where the target page is located to the target process; the strategy determination module 330 is used to determine the real-time loading strategy of the target page according to the real-time device performance and the real-time network performance; the page loading module 340 is used to load the target web page in real time based on the real-time loading strategy to obtain the loaded target web page.

[0115] The technical solution of the embodiment of the present invention determines the target page and the target process for loading the target page in response to the page access operation; determines the real-time device performance and real-time network performance allocated by the client where the target page is located to the target process; determines the real-time loading strategy of the target page according to the real-time device performance and the real-time network performance; and loads the target web page in real time based on the real-time loading strategy to obtain the loaded target web page. The present invention improves the speed and stability of web page loading and enhances the user experience.

[0116] Optionally, the performance determination module 320 is specifically configured to:

[0117] Determine the real-time core number and real-time memory of the central processing unit and the real-time graphics card parameters of the graphics processing unit allocated by the client where the target page is located to the target process;

[0118] Determining the real-time device performance according to the real-time core number, the real-time memory, and the real-time graphics card performance, wherein the real-time device performance includes high device performance or low device performance;

[0119] Determine the real-time network bandwidth allocated by the client where the target page is located to the target process, and determine the real-time network performance according to the real-time network bandwidth, wherein the real-time network performance includes high network performance or low network performance.

[0120] Optionally, the policy determination module 330 is specifically configured to:

[0121] The real-time loading strategy of the target page is determined by a preset performance strategy mapping relationship, the real-time device performance and the real-time network performance, wherein the real-time loading strategy includes at least one of a double high loading strategy, a double low loading strategy, a first single high loading strategy and a second single high loading strategy.

[0122] Optionally, the page loading module 340 is specifically used to:

[0123] Based on the real-time loading strategy, the target web page is loaded in real time and the operation of determining the real-time device performance and the real-time network performance allocated by the client where the target page is located to the target process and determining the real-time loading strategy of the target page according to the real-time device performance and the real-time network performance is returned;

[0124] In the case where the real-time loading strategy changes, the real-time loading strategy is updated, and for the updated real-time loading strategy, the operation of real-time loading the target web page based on the real-time loading strategy is continued to be performed until the page loading is completed.

[0125] Optionally, the page loading module 340 includes: a first policy application unit, a resource determination unit, a second policy application unit and a resource loading unit;

[0126] Wherein, the first strategy application unit is used to determine the webpage loading mode of the target webpage based on the real-time loading strategy, wherein the webpage loading mode includes scrolling viewport loading or non-viewport loading;

[0127] The resource determination unit is used to determine the resource to be loaded based on the webpage loading mode;

[0128] The second strategy application unit is used to determine at least one type of sub-resource included in the resource to be loaded, and determine the resource loading mode corresponding to each type of the sub-resource based on the real-time loading strategy;

[0129] The resource loading unit is used to load the sub-resource based on the resource loading method to obtain the target resource, and determine the target webpage that has been loaded based on the target resource.

[0130] Optionally, the resource determination unit is specifically configured to:

[0131] In the case where the webpage loading mode is the scrolling viewport loading, in response to a page scrolling operation, determining the target display viewport, and determining the resource to be loaded based on the target display viewport;

[0132] The resource loading unit is specifically used for:

[0133] For each type of the sub-resource, the sub-resource is loaded based on the resource loading method to obtain the loaded sub-resource;

[0134] Determine the resource to be loaded that has been loaded based on the sub-resource that has been loaded;

[0135] After the page scrolling operation is completed, the target resource is determined based on the resource to be loaded that has been loaded.

[0136] Optionally, the resource determination unit is specifically configured to:

[0137] When the webpage loading mode is the non-viewport loading, the resource to be loaded is determined based on the target page.

[0138] Optionally, the sub-resource includes at least one of animation resources, image resources, script resources or static resources. The resource loading method corresponding to the animation resource includes animation loading or animation loading prohibited. The resource loading method corresponding to the image resource includes image high-resolution loading or image low-resolution loading. The resource loading method corresponding to the script resource includes script synchronous loading or script asynchronous loading. The resource loading method corresponding to the static resource includes compressed loading or non-compressed loading.

[0139] The page loading device provided in the embodiment of the present invention can execute the page loading method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0140] Embodiment 4

[0141] Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0142] like Figure 5As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0143] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0144] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a page loading method.

[0145] In some embodiments, the page loading method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the page loading method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the page loading method in any other appropriate manner (e.g., by means of firmware).

[0146] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0147] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0148] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0149] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0150] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0151] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0152] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0153] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A page loading method, characterized in that: include: In response to the page access operation, determining a target page and a target process for loading the target page; Determine the real-time device performance and real-time network performance allocated by the client where the target page is located to the target process; Determining a real-time loading strategy for the target page according to the real-time device performance and the real-time network performance; The target webpage is loaded in real time based on the real-time loading strategy to obtain the loaded target webpage.

2. The method according to claim 1, characterized in that The determining of the real-time device performance and real-time network performance allocated by the client where the target page is located to the target process includes: Determine the real-time core number and real-time memory of the central processing unit and the real-time graphics card parameters of the graphics processing unit allocated by the client where the target page is located to the target process; Determining the real-time device performance according to the real-time core number, the real-time memory, and the real-time graphics card performance, wherein the real-time device performance includes high device performance or low device performance; Determine the real-time network bandwidth allocated by the client where the target page is located to the target process, and determine the real-time network performance according to the real-time network bandwidth, wherein the real-time network performance includes high network performance or low network performance.

3. The method according to claim 1, characterized in that The determining the real-time loading strategy of the target page according to the real-time device performance and the real-time network performance includes: The real-time loading strategy of the target page is determined by a preset performance strategy mapping relationship, the real-time device performance and the real-time network performance, wherein the real-time loading strategy includes at least one of a double high loading strategy, a double low loading strategy, a first single high loading strategy and a second single high loading strategy.

4. The method according to claim 1, characterized in that: The real-time loading of the target webpage based on the real-time loading strategy includes: Based on the real-time loading strategy, the target web page is loaded in real time and the operation of determining the real-time device performance and the real-time network performance allocated by the client where the target page is located to the target process and determining the real-time loading strategy of the target page according to the real-time device performance and the real-time network performance is returned; In the case where the real-time loading strategy changes, the real-time loading strategy is updated, and for the updated real-time loading strategy, the operation of real-time loading the target web page based on the real-time loading strategy is continued to be performed until the page loading is completed.

5. The method according to claim 1, characterized in that The step of loading the target webpage in real time based on the real-time loading strategy to obtain the loaded target webpage includes: Determining a webpage loading mode of the target webpage based on the real-time loading strategy, wherein the webpage loading mode includes scrolling viewport loading or non-viewport loading; Determining resources to be loaded based on the webpage loading method; Determine at least one type of sub-resource included in the resource to be loaded, and determine a resource loading mode corresponding to each type of the sub-resource based on the real-time loading strategy; The sub-resource is loaded based on the resource loading method to obtain a target resource, and the target webpage that has been loaded is determined based on the target resource.

6. The method according to claim 5, characterized in that The determining of the resource to be loaded based on the webpage loading mode includes: In the case where the webpage loading mode is the scrolling viewport loading, in response to a page scrolling operation, determining the target display viewport, and determining the resource to be loaded based on the target display viewport; The loading of the sub-resource based on the resource loading method to obtain the target resource includes: For each type of the sub-resource, the sub-resource is loaded based on the resource loading method to obtain the loaded sub-resource; Determine the resource to be loaded that has been loaded based on the sub-resource that has been loaded; After the page scrolling operation is completed, the target resource is determined based on the resource to be loaded that has been loaded.

7. The method according to claim 5, characterized in that The determining of the resource to be loaded based on the webpage loading mode includes: When the webpage loading mode is the non-viewport loading, the resource to be loaded is determined based on the target page.

8. The method according to claim 5, characterized in that The sub-resources include at least one of animation resources, image resources, script resources or static resources. The resource loading method corresponding to the animation resources includes animation loading or animation loading prohibited. The resource loading method corresponding to the image resources includes image high-resolution loading or image low-resolution loading. The resource loading method corresponding to the script resources includes script synchronous loading or script asynchronous loading. The resource loading method corresponding to the static resources includes compressed loading or non-compressed loading.

9. A page loading device, characterized in that: include: A process determination module, used for determining a target page and a target process for loading the target page in response to a page access operation; A performance determination module, used to determine the real-time device performance and real-time network performance allocated by the client where the target page is located to the target process; A strategy determination module, used to determine the real-time loading strategy of the target page according to the real-time device performance and the real-time network performance; The page loading module is used to load the target web page in real time based on the real-time loading strategy to obtain the loaded target web page.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the page loading method according to any one of claims 1 to 8 when executed.