Page loading method, device, storage medium, equipment and system
By receiving component library loading information and dynamically loading components into the cache according to a strategy, the problems of large page size and low efficiency during page loading are solved, achieving the effect of fast loading of target pages.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2026-03-10
AI Technical Summary
In existing technologies, the large number of components during webpage loading leads to excessively large application sizes, occupying terminal memory space, and resulting in long loading times and low loading efficiency.
By receiving component library loading information, components are dynamically loaded and stored in the cache according to the loading strategy and address information. The strategy for loading the component library can be flexibly selected to quickly obtain the target component to load the target page.
It reduces the loading of unnecessary components, lowers network resource consumption and cache space usage, and improves page loading speed and efficiency.
Smart Images

Figure CN121636834A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of component loading, and in particular to a page loading method, device, storage medium, equipment and system. BACKGROUND
[0002] With the development of computer technology, the function supported by a webpage is becoming more and more powerful, and the components used by the webpage are various. When loading a webpage, all the components and resources used by the webpage are usually pre-packed into an application, which may cause the application to be too large, occupy a large memory space of a terminal, and consume more loading time, thereby reducing the page loading efficiency. SUMMARY
[0003] The embodiments of the present application provide a page loading method, device, storage medium, equipment and system, which can improve the page loading efficiency.
[0004] In a first aspect, the embodiments of the present application provide a page loading method, including the following steps:
[0005] receiving component library loading information; wherein the component library loading information includes address information and a loading strategy of at least one component library; the loading strategy is used to indicate loading all components, part of components or no component of the component library;
[0006] determining a component library to be loaded according to the loading strategy in the component library loading information, and loading components of the component library to be loaded and storing the components into a cache area according to the address information of the component library in the component library loading information;
[0007] in response to a page loading instruction of a target page issued by a terminal, obtaining a target component corresponding to the target page from the cache area;
[0008] sending the target component to the terminal issuing the page loading instruction, so that the terminal loads the target page according to the target component.
[0009] Optionally, the page loading instruction includes a component identifier of a target component; obtaining the target component corresponding to the target page from the cache area includes:
[0010] searching for the target component corresponding to the component identifier from the cache area;
[0011] when the cache area does not exist the target component corresponding to the component identifier, obtaining address information of the target component;
[0012] loading the target component according to the address information of the target component.
[0013] In the embodiment of the present application, the target component is quickly obtained from the cache area according to the component identifier of the target component. When the target component does not exist in the cache area, the address information of the target component is obtained, and the target component is loaded according to the address information of the target component, thereby meeting the use demand of the user for different components and improving the loading efficiency of the target page.
[0014] Optionally, the target component is a visible component of the target page; the target page further comprises a hidden component; the hidden component is invisible in the target page; and the method further comprises:
[0015] In response to a loading instruction of the hidden component, the hidden component is obtained and loaded in the target page.
[0016] In the embodiment of the present application, the target component is loaded in the target page, and in response to a loading instruction of the hidden component, the hidden component is loaded in the target page, thereby reducing the loading time of the target page, reducing the occupation of network resources, and improving the loading speed of the target page.
[0017] Optionally, the hidden component is obtained by:
[0018] According to the component identifier of the hidden component, the hidden component corresponding to the component identifier is searched from the cache area;
[0019] When the cache area does not exist the hidden component corresponding to the component identifier, the address information of the hidden component is obtained;
[0020] According to the address information of the hidden component, the hidden component is obtained.
[0021] In the embodiment of the present application, the component in the cache area is searched according to the component identifier of the hidden component. When the hidden component exists in the cache area, the target component corresponding to the target page is quickly obtained from the cache area, the loading time of the target component is reduced, and the loading speed of the target page is improved. When the hidden component does not exist in the cache area, the address information of the hidden component is obtained, and the hidden component is loaded according to the address information of the hidden component, thereby meeting the demand of the user for loading the hidden component.
[0022] Optionally, the loading instruction of the hidden component is generated according to a hidden component loading event triggered by the user on the target page.
[0023] In the embodiment of the present application, when the user triggers the hidden component loading event on the target page, it is determined that the user has the demand for using the hidden component, and then the loading instruction of the hidden component is generated, and the delayed loading of the hidden component is realized according to the loading instruction, thereby meeting the use demand of the user for the hidden component and improving the loading speed of the target page.
[0024] Optionally, the loading strategy of the component library is determined according to a type of the component library.
[0025] The type of the component library includes a basic component library related to a basic function of a page, a business component library related to a business function of the page, and a non-essential component library irrelevant to the page; when the type of the component library is the basic component library, the loading strategy is to load all components of the component library; when the type of the component library is the business component library, the loading strategy is to load specified components of the component library; and when the type of the component library is the non-essential component library, the loading strategy is not to load components of the component library.
[0026] In the embodiments of the present application, the loading strategy of loading all components of the component library is adopted for the basic component library related to the basic function common to the page, thereby improving the loading efficiency of the page; the loading strategy of loading specified components of the component library is adopted for the business component library related to the business function of the page, and the strategy of not loading components of the component library is adopted for the non-essential component library irrelevant to the page, thereby reducing the loading of non-essential components, reducing the loading time and loading traffic, and improving the loading efficiency of the components of the component library.
[0027] In a second aspect, the embodiments of the present application provide a page loading device, and the device comprises:
[0028] a loading information receiving module, configured to receive component library loading information; wherein the component library loading information comprises address information and a loading strategy of at least one component library; the loading strategy is used to indicate loading all components, part of components, or no loading of the component library;
[0029] a component loading module, configured to determine a component library to be loaded according to the loading strategy in the component library loading information, and load components of the component library to be loaded according to the address information of the component library in the component library loading information and store the components in a cache area;
[0030] a target component obtaining module, configured to obtain target components corresponding to a target page from the cache area in response to a page loading instruction of the target page issued by a terminal;
[0031] a page loading module, configured to send the target components to the terminal issuing the page loading instruction, so that the terminal loads the target page according to the target components.
[0032] In a third aspect, the embodiments of the present application provide a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the page loading method according to any one of the above embodiments.
[0033] In a fourth aspect, an embodiment of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable by the processor;
[0034] The processor implements the steps of the page loading method according to any one of the preceding embodiments when executing the computer program.
[0035] In a fifth aspect, an embodiment of the present application provides a page loading system, comprising the computer device and the terminal according to the preceding embodiments, and the computer device and the terminal are communicatively connected;
[0036] The terminal is configured to send a page loading instruction for a target page, receive the target component sent by the computer device, and load the target page according to the target component.
[0037] In the embodiment of the present application, the loading strategy is used to select all components, part of components, or no component in the component library, so that whether the components in the component library need to be loaded, all or part of the components in the component library need to be loaded, is flexibly selected according to different application requirements, thereby meeting the use requirements of different application scenarios. At the same time, the loading of unnecessary components can be reduced, the network resource occupation and the space occupation of the cache area can be reduced, the loading time of the target component can be reduced, the loading efficiency of the component can be improved, the loaded component is stored in the cache area, when the page loading instruction for the target page is received, the target component corresponding to the target page is quickly obtained from the cache area, the loading time of the target component is reduced, and the speed and efficiency of the terminal loading the target page are improved.
[0038] For better understanding and implementation, the present application is described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS
[0039] Figure 1 A flowchart of a page loading method according to an embodiment of the present application;
[0040] Figure 2 A flowchart of step S130 according to an embodiment of the present application;
[0041] Figure 3 A structural schematic diagram of a page loading device according to an embodiment of the present application;
[0042] Figure 4 A structural schematic diagram of a computer device according to an embodiment of the present application;
[0043] Figure 5 A structural schematic diagram of a page loading system according to an embodiment of the present application. DETAILED DESCRIPTION
[0044] For the purposes of the present application, the term "a" or "an" shall mean "one or more" of the referenced constituent.
[0045] It should be noted that the described embodiments are merely a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present application.
[0046] The terms used in the present application are merely for the purpose of describing particular embodiments, and are not intended to limit the present application. The singular forms "a", "an" and "the" used in the present application and the appended claims are intended to include plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to any or all possible combinations of one or more associated listed items.
[0047] The following description refers to the accompanying drawings. Unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements. The implementations described in the following example embodiments are not meant to represent all implementations consistent with the present application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the present application as detailed in the appended claims. In the description of the present application, it should be understood that the terms "first", "second", "third", etc. are used only to distinguish similar objects, and do not necessarily have to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0048] In addition, in the description of the present application, "several" means two or more, unless otherwise specified. "And / or" describes the corresponding relationship between the associated objects, indicating that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. The character " / " generally represents that the associated objects before and after are in an "or" relationship.
[0049] The page loading method of the embodiments of the present application can be used to implement loading of an application page. Before loading a page, all components and resources required by the page usually need to be prepared. In a traditional page loading manner, all components in a component library used by the page are packaged into a page application in advance to facilitate timely use of corresponding components when loading the page. For a page with complex functions, due to the large variety of components used by the page, the application size is prone to be too large to occupy memory space. Moreover, when loading the page, all components may not be used, and a large amount of time is spent on obtaining the required application, which is prone to cause long page loading time and low loading efficiency. If a single component is loaded, when the content of the page is uncertain, the component cannot be loaded as needed according to the configured page content, and the loading of necessary components is prone to be missed, which affects the loading efficiency of the page.
[0050] Therefore, in view of the above problems, the embodiments of the present application provide a page loading method. Different loading strategies are configured for each component library, and the dynamic loading of components of each different component library is implemented according to the loading strategy and the address information of the component library, and the components are stored in a cache area, thereby reducing the loading of unnecessary components, reducing the space occupation of the cache area, and after receiving a page loading instruction for a target page, the target component corresponding to the target page is quickly obtained from the cache area, the target page is loaded according to the target component, and the loading efficiency of the target page is improved.
[0051] Please refer to Figure 1 The page loading method provided by the embodiments of the present application specifically includes the following steps.
[0052] S110: receiving component library loading information; wherein the component library loading information includes address information and a loading strategy of at least one component library; the loading strategy is used to indicate loading all components, part of components or no component of the component library;
[0053] The component library loading information is used to determine at least one component library to be loaded and the loading information of the components in the component library. The component library loading information can include the name, address information and loading strategy of the component library and the like.
[0054] The address information of the component library can include the URL address of the component library.
[0055] The loading strategy can include loading all components, loading part of components or not loading components, and the loading strategies of each component library can be the same or different. In the embodiments of the present application, the loading strategies of each component library are different.
[0056] Specifically, when the loading strategy is to load partial components, the loading strategy can include component identifiers of the partial components that need to be loaded; the component identifiers are used to determine the specified components in the component library that need to be loaded, and the component identifiers can be names, IDs or other information that can be used to determine the components that need to be loaded.
[0057] S120: determining a component library that needs to be loaded according to the loading strategy in the component library loading information, and loading components of the component library that needs to be loaded according to address information of the component library in the component library loading information and storing the components in a cache area;
[0058] The component library that needs to be loaded can refer to a component library whose all components and partial components are loaded according to the loading strategy.
[0059] After determining the component library that needs to be loaded, components of the component library are loaded according to address information of the component library and stored in a cache area.
[0060] The cache area can be an area that is set by a user in advance for storing loaded components.
[0061] S130: obtaining a target component corresponding to a target page from the cache area in response to a page loading instruction for the target page issued by a terminal.
[0062] The page loading instruction can include component information of the target component that needs to be used by the target page; in the embodiment of the application, the component information can be a component identifier of the target component.
[0063] The target component can be obtained from the cache area according to the component information.
[0064] S140: sending the target component to the terminal that issues the page loading instruction, so that the terminal loads the target page according to the target component.
[0065] After obtaining the target component, the terminal can render the target component according to rendering information of the target component, display the rendered component in a corresponding area of the target page, and thus load the target page. The rendering information is used to determine a display mode and a display effect of the target component in the target page, and can be set according to display content of the target page and a device that displays the target page.
[0066] In this embodiment, a loading strategy is used to select whether to load all, some, or none of the components in the component library. This allows for flexible selection of whether to load components from the component library, or to load all or some of the components, based on different application requirements. This satisfies the usage needs of different application scenarios. At the same time, it can reduce the loading of unnecessary components, reduce network resource consumption and cache space consumption, reduce the loading time of target components, and improve component loading efficiency. By storing the loaded components in the cache, when a page loading instruction for the target page is received, the target component corresponding to the target page can be quickly retrieved from the cache, reducing the loading time of the target component and improving the speed and efficiency of the terminal loading the target page.
[0067] In step S110, the component library loading information is used to determine the loading strategy for each component library. The loading strategy for each component library can be specifically set according to the different roles of the component library on the page.
[0068] In one embodiment, the component library includes a basic component library related to the basic functions of the page, a business component library related to the business functions of the page, and a non-essential component library unrelated to the page. When the component library is a basic component library, the loading strategy is to load all components of the component library. When the component library is a business component library, the loading strategy is to load specified components of the component library. When the component library is a non-essential component library, the loading strategy is to not load any components of the component library.
[0069] The basic component library includes basic functional components for the page, which can include common page functional components such as containers, images, and text.
[0070] Since the components in the basic component library are usually used on the page, a loading strategy of loading all components in the basic functional component library can be adopted to improve the page loading efficiency.
[0071] The business component library includes business function components, which may include data chart components, map components, and other components that correspond to a specific business function of the page.
[0072] Since business function components are usually quite large, and because they are related to business functions, they are not used simultaneously, a loading strategy of loading specific components of the component library can be adopted. The specified components can be the business function components that correspond to the business functions that the target page needs to implement, thereby reducing the loading of unnecessary components, reducing loading time and loading traffic, and improving the loading efficiency of the component library components.
[0073] The non-essential component library includes non-essential components, which can be components that are unrelated to the current target page or will not be used by the target page. For non-essential component libraries, a loading strategy of not loading components can be adopted. For component libraries with a loading strategy of not loading components, lazy loading can be performed on the components that need to be used when they are needed, thereby reducing component loading time, reducing network resource consumption, and improving component loading efficiency.
[0074] In this embodiment, a loading strategy of loading all components of the basic component library that is related to the basic functions common to the page is adopted, thereby improving the page loading efficiency; a loading strategy of loading specified components of the business component library that is related to the business functions of the page is adopted; and a strategy of not loading components of the component library that is not related to the page is adopted, thereby reducing the loading of unnecessary components, reducing loading time and loading traffic, and improving the loading efficiency of the component library components.
[0075] In step S120, when storing components in the cache, a component identifier can be set for the stored component, so as to facilitate the quick retrieval of the corresponding component from the cache based on the component identifier and improve the component retrieval efficiency.
[0076] In step S130, the page loading instruction includes the component identifier of the target component used by the target page;
[0077] Please see Figure 2 In one embodiment, retrieving the target component corresponding to the target page from the cache includes:
[0078] S131: Locate the target component corresponding to the component identifier from the cache area;
[0079] The cache contains multiple pre-loaded components, and the components stored in the cache can be components from different component libraries.
[0080] S132: When the target component corresponding to the component identifier does not exist in the cache, obtain the address information of the target component;
[0081] The address information of the target component is used to determine the address of the target component, so that the target component can be loaded online based on the address of the target component.
[0082] The address information of the target component may include the address information of the component library corresponding to the target component, as well as component information such as the name, identifier, and location of the target component in the component library.
[0083] S133: Load the target component according to the address information of the target component.
[0084] In this embodiment, the target component is quickly retrieved from the cache based on its component identifier. When the target component is not present in the cache, its address information is obtained, and the target component is loaded accordingly. This satisfies the user's needs for different components and improves the loading efficiency of the target page.
[0085] In one embodiment, the target component is a visible component of the target page; the target page further includes a hidden component; the hidden component is not visible on the target page; the method further includes:
[0086] In response to a load instruction for a hidden component, the hidden component is retrieved and loaded on the target page;
[0087] The target component can be the component used when the target page is initially loaded, and the visible component can be the component that the user can see with their eyes.
[0088] Hidden components can be components that cannot be seen by the user on the target page, and can be components that are not used when the target page is initially loaded.
[0089] The loading command is a command issued by the user when they need to use the hidden component. After receiving the loading command for the hidden component, the hidden component is loaded into the target page, making the hidden component visible on the target page.
[0090] In this embodiment, visible target components are loaded from the target page, while hidden components that are not visible on the target page are loaded in response to the loading instruction for the hidden components. This reduces the target page loading time, decreases the occupation of network resources, and improves the target page loading speed.
[0091] Hidden components are invisible on the target page because they are not located within the currently visible viewport of the user. The viewport refers to the area that the user actually sees. The viewport can be used to display all or part of the target page. When the viewport displays a portion of the target page, the user can switch between displaying different areas of the target page by swiping or scrolling.
[0092] The loading instruction listens to the user's actions on the target page and determines whether to generate a loading instruction for the hidden component based on those actions.
[0093] Specifically, in one embodiment, the loading instruction for the hidden component is generated based on a hidden component loading event triggered by the user on the target page.
[0094] The hidden component loading event can be generated based on the user's actions on the target page. The hidden component loading event can indicate that the current user has a need to use the hidden component.
[0095] For example, a hidden component loading event could be triggered by the user to display the hidden component control, or the user could scroll or move the cursor to bring a hidden component that was not visible on the initial target page into the user's visible area.
[0096] In this embodiment, when a user triggers a hidden component loading event on the target page and it is determined that the user has a need to use the hidden component, a loading instruction for the hidden component is generated. Then, the hidden component is loaded with a delay according to the loading instruction, so as to meet the user's need to use the hidden component and improve the loading speed of the target page.
[0097] In the above embodiments, the hidden component can be a component in the cache or a component not in the cache. Specifically, in one embodiment, obtaining the hidden component includes:
[0098] Based on the component identifier of the hidden component, search for the hidden component corresponding to the component identifier in the cache.
[0099] When the cache does not contain the hidden component corresponding to the component identifier, obtain the address information of the hidden component;
[0100] The hidden component is obtained based on its address information.
[0101] The address information of the hidden component is used to determine the address of the hidden component, and then the hidden component can be obtained based on the address of the hidden component.
[0102] The address information of a hidden component can include the address of the component library where the hidden component is located, the name and identifier of the hidden component, and the location of the hidden component in the component library.
[0103] In this embodiment, the component in the cache is found based on the component identifier of the hidden component. When the hidden component exists in the cache, the target component corresponding to the target page is quickly obtained from the cache, reducing the loading time of the target component and improving the loading speed of the target page. When the hidden component does not exist in the cache, the address information of the hidden component is obtained and the hidden component is loaded based on the address information of the hidden component, thereby meeting the user's need to load the hidden component.
[0104] like Figure 3 As shown in the figure, this application embodiment also provides a page loading device, the device comprising:
[0105] The loading information receiving module 110 is used to receive component library loading information; wherein, the component library loading information includes address information and loading strategy of at least one component library; the loading strategy is used to indicate loading all components, some components, or no components of the component library;
[0106] The component loading module 120 is used to determine the component library to be loaded according to the loading strategy in the component library loading information, and to load the components of the component library to be loaded and store them in the cache according to the address information of the component library in the component library loading information.
[0107] The target component acquisition module 130 is used to acquire the target component corresponding to the target page from the cache in response to the page loading instruction for the target page issued by the terminal.
[0108] The page loading module 140 is used to send the target component to the terminal that issued the page loading instruction, so that the terminal loads the target page according to the target component.
[0109] Optionally, the page loading instruction includes the component identifier of the target component; the target component acquisition module 130 includes:
[0110] The first component lookup unit is used to look up the target component corresponding to the component identifier from the cache area;
[0111] The first address information acquisition unit is used to acquire the address information of the target component when the target component corresponding to the component identifier does not exist in the cache area;
[0112] The first component loading unit is used to load the target component according to the address information of the target component.
[0113] Optionally, the target component is a visible component of the target page; the target page further includes a hidden component; the hidden component is not visible on the target page; the device further includes:
[0114] A hidden component loading module is used to retrieve the hidden component and load it on the target page in response to a loading instruction for the hidden component.
[0115] Optionally, the hidden component loading module includes:
[0116] The first component lookup unit is used to look up the hidden component corresponding to the component identifier from the cache area based on the component identifier of the hidden component;
[0117] The second address information acquisition unit is used to acquire the address information of the hidden component when the hidden component corresponding to the component identifier does not exist in the cache area.
[0118] The second component loading unit is used to obtain the hidden component based on the address information of the hidden component.
[0119] Optionally, the loading instruction for the hidden component is generated based on the user triggering a hidden component loading event on the target page.
[0120] Optionally, the loading strategy of the component library is determined according to the type of the component library;
[0121] The component library types include basic component libraries related to the page's basic functions, business component libraries related to the page's business functions, and non-essential component libraries unrelated to the page. When the component library type is a basic component library, the loading strategy is to load all components of the component library; when the component library type is a business component library, the loading strategy is to load specified components of the component library; when the component library type is a non-essential component library, the loading strategy is to not load any components of the component library.
[0122] It should be noted that the page loading device provided in the above embodiments is only illustrated by the division of the above functional modules when executing the page loading method. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the page loading device provided in the above embodiments and the page loading method in the above embodiments belong to the same concept, and its implementation process can be found in the method embodiments, which will not be repeated here.
[0123] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the page loading method as described in any of the preceding claims.
[0124] The embodiments of this application may take the form of a computer program product implemented on one or more storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing program code. Computer-readable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information may be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to: phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0125] like Figure 4 As shown, this application embodiment also provides a computer device 200, including a memory 210, a processor 220, and a computer program stored in the memory 210 and executable by the processor 220;
[0126] When the processor 220 executes the computer program, it implements the steps of the page loading method as described in any of the above.
[0127] The memory 210 includes read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.
[0128] The processor 220 is the control unit of the computer device 200. It connects to various components of the computer device 200 via various interfaces and lines. By running or executing programs or modules stored in the memory 210, and by calling data stored in the memory 210, it performs various functions of the computer device 200 and processes data. For example, when the processor 220 executes a computer program stored in the memory 210, it implements all or part of the steps of the page loading method described in this application embodiment; or it implements all or part of the functions of the page loading device. The processor 220 can be composed of integrated circuits, such as a single packaged integrated circuit, or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips.
[0129] Please see Figure 5 This application provides a page loading system 300, including a computer device 200 and a terminal 310 as described above, wherein the computer device 200 and the terminal 310 are communicatively connected.
[0130] Terminal 310 is used to issue a page loading instruction for the target page, receive the target component sent by the computer device, and load the target page according to the target component.
[0131] Terminal 310 can be a mobile phone, laptop computer, interactive whiteboard or other terminal device.
[0132] The terminal 310 in this embodiment may have a target application installed, and the target page may be an application interface of the target application. The target page in this embodiment may integrate multiple business function components.
[0133] The target application in this application embodiment can be a large-scale integrated management application that integrates multiple business functions, such as a digital integrated management platform for teaching management. This application embodiment can realize the fast loading of the target page of the target application and improve the user's access experience of the target page.
[0134] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0135] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A page loading method, characterized by, The method comprises the following steps: receiving component library loading information; wherein the component library loading information comprises address information and loading strategy of at least one component library; the loading strategy is used to indicate loading all components, part of components or no component of the component library; determining a component library to be loaded according to the loading strategy in the component library loading information, loading components of the component library to be loaded and storing into a cache area according to the address information of the component library in the component library loading information; obtaining a target component corresponding to a target page from the cache area in response to a page loading instruction of the target page issued by a terminal; sending the target component to the terminal issuing the page loading instruction, so that the terminal loads the target page according to the target component.
2. The page loading method of claim 1, wherein, The page loading instruction comprises a component identifier of the target component; obtaining the target component corresponding to the target page from the cache area comprises: searching for the target component corresponding to the component identifier from the cache area; when the cache area does not exist the target component corresponding to the component identifier, obtaining address information of the target component; loading the target component according to the address information of the target component.
3. The page loading method of claim 1, wherein, The target component is a visual component of the target page; the target page further comprises a hidden component; The hidden component is invisible in the target page; the method further comprises: obtaining the hidden component and loading the hidden component in the target page in response to a loading instruction of the hidden component.
4. The page loading method of claim 3, wherein, Obtaining the hidden component comprises: searching for the hidden component corresponding to the component identifier from the cache area according to the component identifier of the hidden component; when the cache area does not exist the hidden component corresponding to the component identifier, obtaining address information of the hidden component; obtaining the hidden component according to the address information of the hidden component.
5. The page loading method of claim 3, wherein, The loading instruction of the hidden component is generated according to a hidden component loading event triggered by a user on the target page.
6. The page loading method of claim 1, wherein, The loading strategy of the component library is determined according to a type of the component library; The type of the component library comprises a basic component library related to a basic function of a page, a business component library related to a business function of the page and a non-essential component library irrelevant to the page; when the type of the component library is the basic component library, the loading strategy is loading all components of the component library; when the type of the component library is the business component library, the loading strategy is loading specified components of the component library; when the type of the component library is the non-essential component library, the loading strategy is not loading components of the component library.
7. A page loading apparatus characterized by comprising: The device comprises: a loading information receiving module, configured to receive component library loading information; wherein the component library loading information comprises address information and loading strategy of at least one component library; the loading strategy is used to indicate loading all components, part of components or no component of the component library; a component loading module, configured to determine a component library to be loaded according to the loading strategy in the component library loading information, load components of the component library to be loaded and store into a cache area according to the address information of the component library in the component library loading information; The target component obtaining module is configured to obtain a target component corresponding to the target page from the cache area in response to a page loading instruction for the target page issued by a terminal. The page loading module is configured to send the target component to the terminal issuing the page loading instruction, so that the terminal loads the target page according to the target component.
8. A computer readable storage medium having stored thereon a computer program, characterized in that: The computer program, when executed by a processor, implements the steps of the page loading method according to any one of claims 1-6.
9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable by the processor. The processor implements the steps of the page loading method according to any one of claims 1-6 when executing the computer program.
10. A page loading system, comprising the computer device according to claim 9 and a terminal, wherein the computer device and the terminal are communicatively connected. The terminal is configured to issue a page loading instruction for a target page, receive a target component sent by the computer device, and load a target page according to the target component.
Citation Information
Patent Citations
Application loading method, server and terminal
CN107168730A
Functional component loading method and apparatus, computer device, and readable storage medium
CN109189492A
Application program starting method and device, electronic equipment and storage medium
CN112612531A
Method and device for acquiring combined component and storage medium
CN113722015A
Cache preloading
US10009439B1