Page preloading method and device, computer equipment and storage medium

By presetting the mapping relationship between routing jump information and preload requests in the page, page preloading is realized, solving the problem of a long time for new pages to open, improving user experience and reducing development costs.

CN119719528APending Publication Date: 2025-03-28BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311268235.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-27
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The existing technology is difficult to implement page preloading, resulting in a long time to open new pages and affecting user experience.

Method used

By presetting the routing jump information corresponding to each page element and the mapping relationship between the routing jump information and the preload request, when the user triggers the target page element, the target routing jump information is directly obtained and the corresponding target preload request is determined, thereby realizing the triggering of the preload request.

Benefits of technology

There is no need to intrude into business code logic, and it can be decoupled from business code, reducing code development costs, improving page opening speed, and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119719528A_ABST
    Figure CN119719528A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses a page preloading method and device, computer equipment and a storage medium. The method comprises the following steps: acquiring a plurality of page elements corresponding to a current page, routing jump information corresponding to each page element and a mapping relationship between the routing jump information and a preloading request; when it is detected that a target page element is triggered on the current page, determining target routing jump information corresponding to the target page element; the target page element is any page element in the current page; determining a target preloading request corresponding to the target page element based on the mapping relationship and the target routing jump information; and when the target preloading request is successful, loading page content corresponding to the target page element. By implementing the technical scheme of the invention, non-invasive preloading triggering is realized, the preloading request matched with the page element can be determined only by determining the routing jump information corresponding to the page element, and the code development cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a page preloading method, device, computer equipment and storage medium. Background Art

[0002] At present, the process of users opening a new page in an application (APP) is mainly through the process of users clicking on a certain entrance of the current page to jump to the new page, requesting network data, displaying content, and users can consume and browse. However, due to the existence of network latency, the time to open a new page may be long. How to implement page preloading to shorten the time to open a new page needs to be solved urgently. Summary of the invention

[0003] In view of this, the present disclosure provides a page preloading method, apparatus, computer device and storage medium to solve the problem that page preloading is difficult to implement.

[0004] In a first aspect, the present disclosure provides a page preloading method, comprising: obtaining multiple page elements corresponding to a current page, route jump information corresponding to each page element, and a mapping relationship between the route jump information and a preloading request; when it is detected that a target page element is triggered on the current page, determining the target route jump information corresponding to the target page element; the target page element is any page element in the current page; based on the mapping relationship and the target route jump information, determining a target preloading request corresponding to the target page element; when the target preloading request is successful, loading the page content corresponding to the target page element.

[0005] The page preloading method provided by the present disclosure pre-sets the routing jump information corresponding to each page element and the mapping relationship between the routing jump information and the preloading request. When detecting that the user triggers the target page element on the current page, the target routing jump information corresponding to the target page element can be directly obtained, and the corresponding target preloading request is determined according to the target routing jump information. Thus, the triggering of the preloading request is realized through the configuration of the routing jump, which does not need to invade the business code logic and can be decoupled from the business code. Moreover, it is only necessary to clarify the routing jump information corresponding to the page element to determine the preloading request that matches it, reducing the code development cost.

[0006] In a second aspect, the present disclosure provides a page preloading device, comprising: an acquisition module, used to acquire multiple page elements corresponding to the current page, route jump information corresponding to each page element, and a mapping relationship between the route jump information and the preloading request; a route jump module, used to determine the target route jump information corresponding to the target page element when it is detected that the target page element is triggered on the current page, and the target page element is any page element in the current page; a preloading module, used to determine the target preloading request corresponding to the target page element based on the mapping relationship and the target route jump information; a page loading module, used to load the page content corresponding to the target page element when the target preloading request is successful.

[0007] In a third aspect, the present disclosure provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the page preloading method of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0008] In a fourth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the page preloading method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0010] Figure 1 is a flow chart of a method for preloading a page according to an embodiment of the present disclosure;

[0011] Figure 2 is a schematic diagram of page elements of a current page according to an embodiment of the present disclosure;

[0012] Figure 3 is a flowchart of another method for preloading a page according to an embodiment of the present disclosure;

[0013] Figure 4 is a flowchart of another page preloading method according to an embodiment of the present disclosure;

[0014] Figure 5 is a structural block diagram of a page preloading device according to an embodiment of the present disclosure;

[0015] Figure 6 It is a schematic diagram of the hardware structure of the computer device of the embodiment of the present disclosure. DETAILED DESCRIPTION

[0016] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0017] The process of a user opening a new page in an application (APP) is mainly a process in which the user clicks on an entrance on the current page to jump to the new page, request network data, display content, and the user can consume and browse.

[0018] In order to provide users with a better product experience and reduce the waiting time for users, it is expected that the content can be displayed more quickly for users to browse and consume after users open a new page. However, the process from triggering a network request to successfully returning data is the server interface latency, which is affected by the device network environment and the internal processing logic of the server. From the client's perspective, this time is usually fixed in a specific environment and is unlikely to be shortened.

[0019] Therefore, due to the existence of network latency, it may take a long time for a new page to open. In order to reduce the waiting time of users, the mainstream approach is to consider sending network requests in advance and start the request before clicking to enter the details page. Although the network latency is not reduced, the latency perceived by users is shortened. However, this method requires the modification of existing code logic, which is highly invasive, and the network requests for jumping pages and within pages may involve cross-module communication. Therefore, its implementation requires the maintenance of a set of network request reuse logic, resulting in high development costs for sending network requests in advance. Due to the impact of development costs and code invasiveness, the optimization idea of ​​sending requests in advance to achieve page preloading is difficult to implement.

[0020] Based on this, the disclosed technical solution realizes the triggering of preload request through the configuration of route jump, which does not need to invade the business code logic and can be decoupled from the business code. Moreover, it is only necessary to clarify the route jump information corresponding to the page element to determine the preload request matching it, reducing the code development cost.

[0021] According to an embodiment of the present disclosure, an embodiment of a method for preloading a page is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0022] In this embodiment, a method for preloading a page is provided, which can be used in computer devices, such as computers, mobile phones, etc. Figure 1 is a flow chart of a method for preloading a page according to an embodiment of the present disclosure, such as Figure 1 As shown, the process includes the following steps:

[0023] Step S101, obtaining multiple page elements corresponding to the current page, routing jump information corresponding to each page element, and a mapping relationship between the routing jump information and the preloading request.

[0024] The current page is the first-level page displayed by the application. There are multiple page elements displayed on the current page, such as Figure 2 The page element is an element displayed in the current page for loading the secondary page. Triggering any page element can enter the corresponding secondary page from the primary page.

[0025] The route jump information is used to characterize the path selection and forwarding process from the current page to the secondary page corresponding to the page element. The route jump information includes the network request path from the primary page to the secondary page and the request parameters.

[0026] Specifically, jumping from the current page to the secondary page is achieved through a router. The router is a device responsible for routing jumps. After the data packet corresponding to the page element enters the router, the router can check the target address in the data packet and send the data packet to the next hop interface according to a pre-set routing table to achieve page jump.

[0027] The preloading request is to request and load the parameters required for the secondary page in advance. There is a corresponding mapping relationship between the routing jump information and the preloading request. Specifically, the mapping relationship can be one network request path corresponding to multiple preloading requests, or one preloading request corresponding to multiple network request paths.

[0028] The corresponding mapping relationship between the route jump information and the preload request is pre-configured by the R&D personnel according to actual needs. When the page element in the current page is triggered, in order to realize the preload of the secondary page corresponding to the page element, the mapping relationship between the route jump information and the preload request can be called here.

[0029] Step S102, when it is detected that a target page element is triggered on the current page, the target route jump information corresponding to the target page element is determined, wherein the target page element is any page element in the current page.

[0030] The user can click on any page element in the current page according to his browsing needs. According to the distribution position of each page element in the current page and the user's click position, the target page element triggered by the user can be determined from multiple page elements in the current page.

[0031] The target route jump information indicates the route jump path from the route interface corresponding to the current page to the route interface corresponding to the target page element. As described above, each page element corresponds to corresponding route jump information. Therefore, when it is detected that the target page element is triggered by the current page, the target route jump information corresponding to the target page element can be determined from the route jump information corresponding to each page element obtained.

[0032] Step S103: determining a target preloading request corresponding to a target page element based on the mapping relationship and the target route jump information.

[0033] The target preloading request is one preloading request or multiple preloading requests corresponding to the target routing jump information. Since there is a mapping relationship between routing jump information and preloading requests, after determining the target routing jump information, the target preloading request corresponding to the target routing jump information can be determined in combination with the mapping relationship. Here, the preloading of the target page element is realized by calling the routing jump information, which can decouple the preloading of the target page element from its business code, so that the preloading will not invade the business code of the target page element, thereby realizing the non-invasive preloading of the target page element.

[0034] Step S104: when the target preloading request is successful, the page content corresponding to the target page element is loaded.

[0035] Only when the target preloading request is successful, can the computer device obtain the preloading resources required for the target page element according to the target preloading request, so as to load the secondary page corresponding to the target page element according to the preloading resources. Therefore, after determining the target preloading request, it is possible to detect whether the target preloading request is successful. When the target preloading request is successful, the preloading resources required for the target page element are obtained, the preloading resources are rendered, and the page content corresponding to the target page element is generated and displayed. Otherwise, only a network request corresponding to the target page element can be generated, and the loading resources required for the target page element are loaded by means of a network request to complete the generation and display of the page content.

[0036] The page preloading method provided in this embodiment pre-sets the routing jump information corresponding to each page element and the mapping relationship between the routing jump information and the preloading request. When detecting that the user triggers the target page element on the current page, the target routing jump information corresponding to the target page element can be directly obtained, and the corresponding target preloading request is determined according to the target routing jump information. Thus, the triggering of the preloading request is realized through the configuration of the routing jump, which does not need to invade the business code logic and can be decoupled from the business code. Moreover, it is only necessary to clarify the routing jump information corresponding to the page element to determine the preloading request that matches it, reducing the code development cost.

[0037] In this embodiment, a page preloading method is provided, which can be used in computer devices such as mobile phones, tablet computers, etc. Figure 3 is a flow chart of a method for preloading a page according to an embodiment of the present disclosure, such as Figure 3 As shown, the process includes the following steps:

[0038] Step S201, obtain multiple page elements corresponding to the current page, route jump information corresponding to each page element, and the mapping relationship between the route jump information and the preload request. For detailed description, please refer to the relevant description corresponding to the above embodiment, which will not be repeated here.

[0039] Step S202, when it is detected that the target page element is triggered on the current page, the target route jump information corresponding to the target page element is determined. The target page element is any page element in the current page. For detailed description, please refer to the relevant description corresponding to the above embodiment, which will not be repeated here.

[0040] Step S203: determining a target preloading request corresponding to a target page element based on the mapping relationship and the target route jump information.

[0041] Specifically, the above step S203 may include:

[0042] Step S2031, detecting whether the preloading of the target page element belongs to the preloading service.

[0043] Preloaded resources will be placed on a specific server, namely the preload host. The preload service is a service that uses the preload host to execute preload requests to obtain preloaded resources. The preloading of the target page element is automatically triggered based on the route jump. When the preloading of the target page element is executed, it is detected whether it belongs to the preload service. When the preloading of the target page element belongs to the preload service, step S2032 is executed, otherwise, it means that there is no need to preload the host, and the target activity for the target page element is directly started on the current host to trigger the data loading request for the page element.

[0044] Step S2032: when the preloading of the target page element belongs to the preloading service, a target preloading request corresponding to the target routing jump information is determined based on the mapping relationship.

[0045] When the preloading of the target page element belongs to the preloading service, it means that the preloading of the target page element requires the preloading host. At this time, the preloading logic of the target page element can be triggered by the preloading host.

[0046] Specifically, the target application is internally integrated with a page routing jump toolkit, which encapsulates the capabilities of a routing interceptor. When preloading the target page element, the mapping relationship between the routing jump information and the preloading request can be determined through the page routing jump function integrated in the target application, and then the target preloading request corresponding to the target routing jump information can be determined in combination with the mapping relationship, and the automatic triggering of the target preloading request can be realized through the routing interceptor.

[0047] Step S204: when the target preloading request is successful, the page content corresponding to the target page element is loaded.

[0048] Specifically, the above step S204 may include:

[0049] Step S2041: starting a target activity corresponding to a target page element based on a target preloading request.

[0050] The target activity is used to switch and interact between the current page and the secondary page corresponding to the target page element. When the target preload request is triggered by the routing interceptor, the target activity for the target page element can be started according to the target preload request, that is, a new activity is started to switch between the current page and the secondary page.

[0051] Step S2042: triggering a data loading request for a target page element based on the operation cycle corresponding to the target activity.

[0052] The operation cycle of the target activity is the life cycle of the target activity. Specifically, in the life cycle of the target activity, it will go through a series of states and callback methods, including: the onCreate() method called when the target activity is created to perform initialization settings, such as loading layouts, initializing variables, etc.; the onStart() method called when the page is displayed, so that the target activity can generate a visible interface; the onResume() method called when it is in the running state to achieve interactive operations with the user; the onPause() method called to save data or release resources; the onStop() method called to perform cleanup work, such as stopping animations or releasing resources; the onRestart() method called when returning from an invisible state to a visible state, so that the target activity restarts from a stopped state; the onDestroy() method called before destroying the target activity to release all resources, such as closing database connections, stopping services, etc.

[0053] Under normal operation, the life cycle of the target activity is in the following order: onCreate()->onStart()->onResume()->onPause()->onStop()->onDestroy(). It should be noted that in actual development, developers can reasonably handle each life cycle according to actual needs and business logic.

[0054] Combined with the operation cycle of the target activity, the various operation stages of the target activity can be determined. At different stages of the target activity, the corresponding life cycle method can be automatically called to determine the current state of the target activity, so that the target activity can trigger a data loading request at an appropriate time.

[0055] Step S2043, obtaining page loading data corresponding to the target page element based on the data loading request, rendering the page loading data, and generating page content.

[0056] After the data loading request is triggered, the preloaded resource of the target page element can be obtained according to the data loading request. The preloaded resource is the page loading data corresponding to the target page element. The page content corresponding to the target page element can be generated by rendering the page loading data.

[0057] In some optional implementations, the above step S2043 may include:

[0058] Step a1, detecting whether there is preload cache data corresponding to the data loading request.

[0059] Step a2: when there is preload cache data corresponding to the data loading request, load the preload cache data.

[0060] Step a3, generating page content based on preloaded cache data.

[0061] The preloaded cache data is the cache data that has been preloaded before. When acquiring page load data based on a data load request, it can be detected whether there is corresponding preloaded cache data for the data load request, that is, whether the target page element has been preloaded before.

[0062] When there is preloaded cache data corresponding to the data loading request, the preloaded cache data can be directly obtained, and the page is rendered according to the preloaded cache data to generate corresponding page content. Otherwise, steps b1-b3 are executed.

[0063] In the above implementation, by detecting whether there is corresponding preload cache data for the current data loading request, when there is corresponding preload cache data, the preload cache data can be directly called, thereby avoiding repeated loading of page data, saving data loading time, and reducing user waiting delay.

[0064] Step b1: When there is no preload cache data corresponding to the data loading request, it is detected whether there is a reusable preload request corresponding to the data loading request.

[0065] Step b2: when there is a reusable preloading request, the page loading data corresponding to the target page element is loaded through the reusable preloading request.

[0066] Step b3, generating page content based on the page loading data.

[0067] A reusable preloading request is a data request that is consistent with the content requested to be preloaded by the current data loading request. When there is no preloading cache data corresponding to the data loading request, it means that the page loading data corresponding to the target page element has not been preloaded. At this time, it is possible to further detect whether there is a reusable preloading request corresponding to the data loading request in the currently executed preloading request. If there is a reusable preloading request, you can wait for the reusable preloading request to preload the page loading data corresponding to the target page element. That is, the page loading data corresponding to the target page element is loaded through the reusable preloading request, and the page is rendered according to the page loading data to generate the corresponding page content. When there is no reusable preloading request, a network request is triggered, and the page loading data corresponding to the target page element is obtained through the network request.

[0068] In the above implementation, by detecting whether there is a corresponding reusable preloading request for the current data loading request, when there is a corresponding reusable preloading request, it is sufficient to wait for the page loading data returned by the reusable preloading request, thereby avoiding repeated initiation of preloading requests and saving page data loading time.

[0069] The page preloading method provided in this embodiment, when detecting that the preloading of the target page element belongs to the preloading service, starts the preloading logic corresponding to the preloading service, and then combines the mapping relationship between the route jump information and the preloading request to determine the target preloading request corresponding to the target route jump information, so as to ensure the accuracy of the preloading request corresponding to the target page element. In combination with the target preloading request, the target activity corresponding to the target page element is started, so as to trigger the data loading request at an appropriate time in combination with the operation cycle of the target activity, thereby realizing the automatic triggering of the preloading request while ensuring the smooth execution of the page loading service, further ensuring the decoupling of the preloading logic and the service code, and realizing non-intrusive preloading.

[0070] In this embodiment, a page preloading method is provided, which can be used in computer devices such as mobile phones, tablet computers, etc. Figure 4 is a flow chart of a method for preloading a page according to an embodiment of the present disclosure, such as Figure 4 As shown, the process includes the following steps:

[0071] Step S301, obtaining multiple page elements corresponding to the current page, routing jump information corresponding to each page element, and a mapping relationship between the routing jump information and the preloading request.

[0072] Specifically, the route jump information corresponding to each page element is obtained in the above step S301, including:

[0073] Step S3011, in response to a loading configuration operation for each page element, determining a request parameter corresponding to each page element based on the loading configuration operation.

[0074] For each page element, the developer can pre-set the corresponding request parameters in the routing conversion toolkit integrated in the target application. Accordingly, the routing conversion toolkit can respond to the loading configuration operation of the developer for each element in the page and generate the request parameters corresponding to each page element according to the loading configuration operation.

[0075] Step S3012, in response to the configuration operation of the request path for each page element, determining the routing jump information based on the configuration operation, and the routing jump information matches the request parameters.

[0076] The request path is the route jump path required for the page element to jump. The developer can pre-set the request path of each page element in the route conversion toolkit integrated in the target application. Accordingly, the route conversion toolkit can respond to the configuration operation of the developer for the request path of the element in the page, generate corresponding route jump information according to the configuration operation, and match the route jump information corresponding to the page element with the request parameter, so that when the page element is subsequently triggered, the request parameter corresponding to the page element and the matching route jump information can be determined, so that the preload request for the target page element can be triggered in combination with the request parameter and the matching route jump information.

[0077] Specifically, the mapping relationship between the route jump information and the preload request obtained in the above step S301 includes:

[0078] Step S3013, in response to the preloading configuration operation of constructing the preloading configuration according to the request parameters, determining the preloading configuration information corresponding to the request parameters based on the configuration operation.

[0079] Combined with the request parameters of the page element, a preload object for the page element can be constructed so that the preload request can be triggered when the page element is triggered later. Specifically, the preload object corresponding to the request parameter configuration page element can be configured here, and the preload object can be used as a route jump parameter by calling the corresponding input method, so that the preload request can be triggered according to the preload configuration information retrieved when the route jumps.

[0080] Step S3014: in response to the mapping configuration operation on the preloading configuration information and the routing jump information, a mapping relationship between the routing jump information and the preloading configuration information is generated based on the mapping configuration operation.

[0081] The developers can build a mapping relationship between the preloaded configuration information and the route jump information based on the preset matching rules, where the preset matching rules are matching rules pre-set by the developers according to actual needs, that is, the request path and request parameters are matched.

[0082] Accordingly, the routing conversion toolkit can respond to the mapping configuration operation of the developer on the preload configuration information and the routing jump information to generate a corresponding mapping relationship according to the mapping configuration operation. Thus, in combination with the mapping relationship between the routing jump information and the preload configuration information, the corresponding preload request can be triggered according to the routing jump information corresponding to the page element.

[0083] Step S302, when it is detected that the target page element is triggered on the current page, the target route jump information corresponding to the target page element is determined. The target page element is any page element in the current page. For detailed description, please refer to the relevant description corresponding to the above embodiment, which will not be repeated here.

[0084] Step S303: Determine the target preloading request corresponding to the target page element based on the mapping relationship and the target route jump information. For detailed description, please refer to the relevant description of the above embodiment, which will not be repeated here.

[0085] Step S304: when the target preloading request succeeds, the page content corresponding to the target page element is loaded. For detailed description, please refer to the relevant description of the above embodiment, which will not be repeated here.

[0086] The page preloading method provided in this embodiment configures the request parameters and request paths of the page elements to realize the initialization of preloading, which is convenient for flexibly adjusting the preloading request corresponding to the page elements according to the actual usage scenario, and improves the applicable scenarios of the preloading request. By constructing preloading configuration information for the request parameters and pre-configuring the mapping relationship between the preloading configuration information and the route jump information, it is convenient to automatically trigger the preloading of the page elements when executing the route jump.

[0087] In this embodiment, a page preloading device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated hereafter. As used below, the term "module" may be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0088] This embodiment provides a page preloading device, such as Figure 5 As shown, including:

[0089] The acquisition module 401 is used to acquire multiple page elements corresponding to the current page, the routing jump information corresponding to each page element, and the mapping relationship between the routing jump information and the preloading request.

[0090] The route jump module 402 is used to determine the target route jump information corresponding to the target page element when it is detected that the target page element is triggered on the current page. The target page element is any page element in the current page.

[0091] The preloading module 403 is used to determine the target preloading request corresponding to the target page element based on the mapping relationship and the target route jump information.

[0092] The page loading module 404 is used to load the page content corresponding to the target page element when the target preloading request is successful.

[0093] In some optional implementations, the preloading module 403 may include:

[0094] The detection unit is used to detect whether the preloading of the target page element belongs to the preloading service.

[0095] The preloading determination unit is used to determine the target preloading request corresponding to the target routing jump information based on the mapping relationship when the preloading of the target page element belongs to the preloading service.

[0096] In some optional implementations, the page loading module 404 may include:

[0097] The target activity starting unit is used to start the target activity corresponding to the target page element based on the target preloading request.

[0098] The data loading trigger unit is used to trigger a data loading request for a target page element based on an operation cycle corresponding to a target activity.

[0099] The page generation unit is used to obtain page loading data corresponding to the target page element based on the data loading request, render the page loading data, and generate page content.

[0100] In some optional implementations, the page generation unit may include:

[0101] The cache data detection subunit is used to detect whether there is pre-loaded cache data corresponding to the data loading request.

[0102] The cache data loading subunit is used to load the preloaded cache data when there is preloaded cache data corresponding to the data loading request.

[0103] The first page generating subunit is used to generate page content based on the preloaded cache data.

[0104] In some optional implementations, the page generation unit may further include:

[0105] The multiplexing detection subunit is used to detect whether there is a reusable preloading request corresponding to the data loading request when there is no preloading cache data corresponding to the data loading request.

[0106] The data loading subunit is used to load the page loading data corresponding to the target page element through the reusable preloading request when there is a reusable preloading request.

[0107] The second page generating subunit is used to generate page content based on the page loading data.

[0108] In some optional implementations, the acquisition module 401 may include:

[0109] The request parameter configuration unit is used to respond to the loading configuration operation for each page element and determine the request parameter corresponding to each page element based on the loading configuration operation.

[0110] The request path configuration unit is used to respond to the configuration operation of the request path for each page element, determine the route jump information based on the configuration operation, and the route jump information matches the request parameter.

[0111] In some optional implementations, the acquisition module 401 may further include:

[0112] The preloading configuration unit is used to respond to the preloading configuration operation constructed according to the request parameters and determine the preloading configuration information corresponding to the request parameters based on the configuration operation.

[0113] The mapping relationship configuration unit is used to generate a mapping relationship between the routing jump information and the preloading configuration information based on the mapping configuration operation in response to the mapping configuration operation on the preloading configuration information and the routing jump information.

[0114] The page preloading device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC circuit, a processor and a memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0115] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0116] The page preloading device provided in this embodiment pre-sets the routing jump information corresponding to each page element and the mapping relationship between the routing jump information and the preloading request. When detecting that the user triggers the target page element on the current page, the target routing jump information corresponding to the target page element can be directly obtained, and the corresponding target preloading request is determined according to the target routing jump information. Thus, the triggering of the preloading request is realized through the configuration of the routing jump, which does not need to invade the business code logic and can be decoupled from the business code. Moreover, it is only necessary to clarify the routing jump information corresponding to the page element to determine the preloading request that matches it, reducing the code development cost.

[0117] The present disclosure also provides a computer device having the above Figure 5 The page shown is preloaded by the device.

[0118] See also Figure 6 , Figure 6 is a schematic diagram of a computer device provided by an optional embodiment of the present disclosure, such as Figure 6As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.

[0119] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0120] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0121] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0122] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0123] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 6 The example of connecting through bus is taken in the following.

[0124] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.

[0125] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0126] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0127] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for preloading a page, characterized in that: include: Obtain multiple page elements corresponding to the current page, route jump information corresponding to each page element, and a mapping relationship between the route jump information and the preload request; When it is detected that a target page element is triggered on the current page, target route jump information corresponding to the target page element is determined; The target page element is any page element in the current page; Based on the mapping relationship and the target route jump information, determine the target preloading request corresponding to the target page element; When the target preloading request is successful, the page content corresponding to the target page element is loaded.

2. The method according to claim 1, characterized in that: The determining, based on the mapping relationship and the target route jump information, a target preloading request corresponding to the target page element includes: Detecting whether the preloading of the target page element belongs to a preloading service; When the preloading of the target page element belongs to the preloading service, the target preloading request corresponding to the target routing jump information is determined based on the mapping relationship.

3. The method according to claim 1 or 2, characterized in that: When the target preloading request is successful, loading the page content corresponding to the target page element includes: Starting a target activity corresponding to the target page element based on the target preloading request; Based on the operation cycle corresponding to the target activity, triggering a data loading request for the target page element; The page loading data corresponding to the target page element is obtained based on the data loading request, and the page loading data is rendered to generate the page content.

4. The method according to claim 3, characterized in that The acquiring the page loading data corresponding to the target page element based on the data loading request, rendering the page loading data, and generating the page content includes: Detecting whether there is preload cache data corresponding to the data loading request; When the preload cache data corresponding to the data loading request exists, loading the preload cache data; The page content is generated based on the preloaded cache data.

5. The method according to claim 4, characterized in that Also includes: When the preload cache data corresponding to the data loading request does not exist, detecting whether there is a reusable preload request corresponding to the data loading request; When the reusable preloading request exists, loading the page loading data corresponding to the target page element through the reusable preloading request; Based on the page loading data, the page content is generated.

6. The method according to claim 1, characterized in that Get the route jump information corresponding to each page element, including: In response to a loading configuration operation for each of the page elements, determining a request parameter corresponding to each of the page elements based on the loading configuration operation; In response to a configuration operation for a request path of each page element, the routing jump information is determined based on the configuration operation, and the routing jump information matches the request parameter.

7. The method according to claim 6, characterized in that Acquiring a mapping relationship between the routing jump information and the preloading request, including: In response to constructing a preload configuration operation according to the request parameters, determining preload configuration information corresponding to the request parameters based on the configuration operation; In response to a mapping configuration operation for the preloading configuration information and the routing jump information, a mapping relationship between the routing jump information and the preloading configuration information is generated based on the mapping configuration operation.

8. A page preloading device, characterized in that: include: An acquisition module, used to acquire multiple page elements corresponding to the current page, route jump information corresponding to each page element, and a mapping relationship between the route jump information and the preload request; A routing jump module, for determining target routing jump information corresponding to the target page element when it is detected that the target page element is triggered on the current page, wherein the target page element is any page element on the current page; A preloading module, configured to determine a target preloading request corresponding to the target page element based on the mapping relationship and the target route jump information; The page loading module is used to load the page content corresponding to the target page element when the target preloading request is successful.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the page preloading method according to any one of claims 1 to 7 by executing the computer instructions.

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 computer to execute the page preloading method according to any one of claims 1 to 7.