CN115061745A - Page resource preloading method and device and storage medium - Google Patents

Page resource preloading method and device and storage medium Download PDF

Info

Publication number
CN115061745A
CN115061745A CN202210669228.4A CN202210669228A CN115061745A CN 115061745 A CN115061745 A CN 115061745A CN 202210669228 A CN202210669228 A CN 202210669228A CN 115061745 A CN115061745 A CN 115061745A
Authority
CN
China
Prior art keywords
page
advertisement
application page
application
resources
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210669228.4A
Other languages
Chinese (zh)
Inventor
吴卫
黄冬平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Shareit Information Technology Co Ltd
Original Assignee
Beijing Shareit Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Shareit Information Technology Co Ltd filed Critical Beijing Shareit Information Technology Co Ltd
Priority to CN202210669228.4A priority Critical patent/CN115061745A/en
Publication of CN115061745A publication Critical patent/CN115061745A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • G06F9/44578Preparing or optimising for loading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure relates to a method, a device and a storage medium for preloading page resources, wherein the method is applied to terminal equipment and comprises the following steps: after a preloading request of a first application page sent by a page view component of terminal equipment is detected, intercepting the preloading request of the first application page; the preloading request is used for requesting a server to acquire page resources of the first application page; acquiring a page resource link of the first application page carried by the preloading request; based on the page resource link, performing preloading processing on the page resource of the first application page to obtain page cache data of the first application page; and after the loading operation aiming at the first application page is detected, displaying the first application page based on the page cache data of the first application page.

Description

Page resource preloading method and device and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for preloading page resources, and a storage medium.
Background
With the development of network technology, information such as images, animations, layouts and the like contained in application pages is extremely rich, and the display effect of the application pages is more and more appealing. However, the application pages have more and more data to be loaded in the display process, so that the time required for loading is longer and longer, the waiting time of the user is correspondingly increased, and the use experience of the user is poor.
In the related art, in order to reduce the loading duration of an application page, page resources of the application page are usually preloaded; however, more and more application pages contain advertisement resources, and the pre-loading manner may cause unreal exposure data corresponding to the advertisement resources, and false exposure or false exposure occurs, which makes it difficult to effectively monitor the exposure condition of the advertisement resources.
Disclosure of Invention
In order to overcome the problems in the related art, the present disclosure provides a method and an apparatus for preloading page resources, and a storage medium.
According to a first aspect of the embodiments of the present disclosure, a method for preloading page resources is provided, which is applied to a terminal device, and the method includes:
after a preloading request of a first application page sent by a page view component of terminal equipment is detected, intercepting the preloading request of the first application page; the preloading request is used for requesting a server to acquire page resources of the first application page;
acquiring a page resource link of the first application page carried by the preloading request;
based on the page resource link, performing preloading processing on the page resource of the first application page to obtain page cache data of the first application page;
and after the loading operation aiming at the first application page is detected, displaying the first application page based on the page cache data of the first application page.
Optionally, the page resource link includes: an advertisement resource link;
the method comprises the following steps:
determining the maximum quantity of advertisement resources allowed to be synchronously loaded by the terminal equipment;
determining the number of advertisement resources to be loaded corresponding to the first application page based on the advertisement resource link;
comparing the quantity of the advertisement resources to be loaded corresponding to the first application page with the maximum quantity;
the pre-loading the page resource of the first application page based on the page resource link to obtain the page cache data of the first application page includes:
if the number of the advertisement resources to be loaded corresponding to the first application page is larger than or equal to the maximum number, selecting a target advertisement resource from a plurality of advertisement resources to be loaded corresponding to the first application page; wherein the number of the selected target advertisement resources is equal to the maximum number;
and based on the advertisement resource link of the target advertisement resource, pre-loading the target advertisement resource of the first application page to obtain page cache data of the first application page.
Optionally, the method comprises:
if the number of the advertisement resources to be loaded corresponding to the first application page is smaller than the maximum number, determining a plurality of advertisement resources to be loaded corresponding to the first application page as first target advertisement resources;
determining a next target sub-page to be accessed from a plurality of sub-application pages corresponding to the first application page;
selecting a plurality of second target advertisement resources based on a plurality of advertisement resources to be loaded corresponding to the target sub-page; wherein a sum of the quantities of the first and second targeted advertising resources is equal to the maximum quantity;
and based on the advertisement resource link of the first target advertisement resource and the second target advertisement resource, pre-loading the first target advertisement resource and the second target advertisement resource to obtain page cache data of the first application page.
Optionally, the method comprises:
acquiring user attribute information of a user; the user attribute information at least includes: the region to which the user belongs;
acquiring historical delivery data of advertisement resources to be loaded in a region to which a user belongs;
determining loading priorities of a plurality of advertisement resources to be loaded corresponding to the first application page based on the historical delivery data;
the selecting of the target advertisement resource from the plurality of advertisement resources to be loaded corresponding to the first application page includes:
and selecting the target advertisement resource from the plurality of advertisement resources to be loaded corresponding to the first application page based on the loading priorities of the plurality of advertisement resources to be loaded corresponding to the first application page.
Optionally, the determining, based on the historical placement data, the loading priorities of the multiple advertisement resources to be loaded corresponding to the first application page includes:
acquiring advertisement conversion information of a user in a preset time period; wherein the advertisement conversion information is at least used for indicating the advertisement category to which the converted advertisement belongs;
acquiring advertisement category information to which advertisement resources to be loaded belong;
determining first priority information of different types of advertisement resources to be loaded based on the advertisement conversion information and the advertisement category information;
respectively determining second priority information of a plurality of advertisement resources to be loaded in each category based on the historical delivery data;
and determining the loading priority of a plurality of advertisement resources to be loaded corresponding to the first application page according to the first priority information and the second priority information of the advertisement resources to be loaded.
Optionally, after the loading operation for the first application page is detected, displaying the first application page based on page cache data of the first application page includes:
after the loading operation is detected, displaying the first application page based on page cache data of the first application page;
determining a next target sub-page to be accessed from a plurality of sub-application pages corresponding to the first application page;
and preloading the page resources of the target sub-page.
Optionally, the determining a next target sub-page to be accessed from a plurality of sub-application pages corresponding to the first application page includes:
acquiring historical behavior information of a user; the historical behavior information includes at least: the access time period and a historical access path corresponding to the access time period;
determining a target access time period matched with the access time of the first application page and a target access path corresponding to the target access time period based on the historical behavior information;
and predicting a next target sub-page to be accessed from a plurality of sub-application pages corresponding to the first application page based on the target access path.
Optionally, the method comprises:
detecting a jump operation aiming at a currently displayed first application page, and suspending the preloading processing of the page resource of the target sub-page;
determining a second application page indicated by the jump operation;
acquiring a page resource link of the second application page;
and loading the page resource of the second application page based on the page resource link of the second application page, and displaying the second application page.
Optionally, the method comprises:
detecting a return operation aiming at a first application page, and switching and displaying the first application page; and restoring the preloading processing of the page resources of the target sub-page.
Optionally, the method comprises:
acquiring validity period information carried by the page resource link;
determining the cache validity period of the page cache data of the first application page based on the validity period information;
after the loading operation for the first application page is detected, displaying the first application page based on the page cache data of the first application page, including:
after the loading operation aiming at the first application page is detected, determining whether page cache data of the first application page exceeds the cache validity period or not;
and if the page cache data of the first application page does not exceed the cache validity period, displaying the first application page based on the page cache data of the first application page.
Optionally, the method comprises:
if the page cache data of the first application page exceeds the cache validity period, deleting the page cache data of the first application page;
and loading the page resource of the first application page based on the page resource link, and displaying the first application page.
According to a second aspect of the embodiments of the present disclosure, there is provided a device for preloading page resources, which is applied to a terminal device, the device including:
the system comprises an interception module, a pre-loading module and a processing module, wherein the interception module is used for intercepting a pre-loading request of a first application page after detecting the pre-loading request of the first application page sent by a page view component of terminal equipment; the preloading request is used for requesting a server to acquire page resources of the first application page
The acquisition module is used for acquiring the page resource link of the first application page carried by the preloading request;
the preloading module is used for preloading page resources of the first application page based on the page resource link to obtain page cache data of the first application page;
and the display module is used for displaying the first application page based on the page cache data of the first application page after the loading operation aiming at the first application page is detected.
Optionally, the page resource link includes: an advertisement resource link;
the apparatus, comprising: a determination module to:
determining the maximum quantity of advertisement resources allowed to be synchronously loaded by the terminal equipment;
determining the number of advertisement resources to be loaded corresponding to the first application page based on the advertisement resource link;
comparing the number of the advertisement resources to be loaded corresponding to the first application page with the maximum number;
if the number of the advertisement resources to be loaded corresponding to the first application page is larger than or equal to the maximum number, selecting a target advertisement resource from a plurality of advertisement resources to be loaded corresponding to the first application page; wherein the number of the selected targeted advertising resources is equal to the maximum number;
the preload module is configured to:
and based on the advertisement resource link of the target advertisement resource, pre-loading the target advertisement resource of the first application page to obtain page cache data of the first application page.
Optionally, the determining module is configured to:
if the number of the advertisement resources to be loaded corresponding to the first application page is smaller than the maximum number, determining a plurality of advertisement resources to be loaded corresponding to the first application page as first target advertisement resources;
determining a next target sub-page to be accessed from a plurality of sub-application pages corresponding to the first application page;
selecting a plurality of second target advertisement resources based on a plurality of advertisement resources to be loaded corresponding to the target sub-page; wherein a sum of the quantities of the first and second targeted advertising resources is equal to the maximum quantity;
the preload module is configured to:
and based on the advertisement resource link of the first target advertisement resource and the second target advertisement resource, pre-loading the first target advertisement resource and the second target advertisement resource to obtain page cache data of the first application page.
Optionally, the obtaining module is configured to:
acquiring user attribute information of a user; the user attribute information at least includes: the region to which the user belongs;
acquiring historical delivery data of advertisement resources to be loaded in a region to which a user belongs;
determining loading priorities of a plurality of advertisement resources to be loaded corresponding to the first application page based on the historical delivery data;
the determining module is configured to:
and selecting the target advertisement resource from the plurality of advertisement resources to be loaded corresponding to the first application page based on the loading priorities of the plurality of advertisement resources to be loaded corresponding to the first application page.
Optionally, the obtaining module is configured to:
acquiring advertisement conversion information of a user in a preset time period; wherein the advertisement conversion information is at least used for indicating the advertisement category to which the converted advertisement belongs;
acquiring advertisement category information to which advertisement resources to be loaded belong;
determining first priority information of different types of advertisement resources to be loaded based on the advertisement conversion information and the advertisement category information;
respectively determining second priority information of a plurality of advertisement resources to be loaded in each category based on the historical delivery data;
and determining the loading priority of a plurality of advertisement resources to be loaded corresponding to the first application page according to the first priority information and the second priority information of the advertisement resources to be loaded.
Optionally, the display module is configured to:
after the loading operation is detected, displaying the first application page based on page cache data of the first application page;
determining a next target sub-page to be accessed from a plurality of sub-application pages corresponding to the first application page;
and preloading the page resources of the target sub-page.
Optionally, the determining module is configured to:
acquiring historical behavior information of a user; the historical behavior information includes at least: the access time period and a historical access path corresponding to the access time period;
determining a target access time period matched with the access time of the first application page and a target access path corresponding to the target access time period based on the historical behavior information;
and predicting a next target sub-page to be accessed from a plurality of sub-application pages corresponding to the first application page based on the target access path.
Optionally, the display module is configured to:
detecting a jump operation aiming at a currently displayed first application page, and suspending preloading processing of page resources of the target sub-page;
determining a second application page indicated by the jump operation;
acquiring a page resource link of the second application page;
and loading the page resource of the second application page based on the page resource link of the second application page, and displaying the second application page.
Optionally, the display module is configured to:
detecting a return operation aiming at a first application page, and switching and displaying the first application page;
and restoring the preloading processing of the page resources of the target sub-page.
Optionally, the display module is configured to:
acquiring validity period information carried by the page resource link;
determining the cache validity period of the page cache data of the first application page based on the validity period information;
after the loading operation aiming at the first application page is detected, determining whether page cache data of the first application page exceeds the cache validity period or not;
and if the page cache data of the first application page does not exceed the cache validity period, displaying the first application page based on the page cache data of the first application page.
Optionally, the display module is configured to:
if the page cache data of the first application page exceeds the cache validity period, deleting the page cache data of the first application page;
and loading the page resource of the first application page based on the page resource link, and displaying the first application page.
According to a third aspect of the embodiments of the present disclosure, there is provided an apparatus for preloading page resources, including
A processor;
a memory for storing executable instructions;
wherein the processor is configured to: when the executable instructions stored in the memory are executed, the steps in the method for preloading page resources according to the first aspect of the embodiment of the present disclosure are implemented.
According to a fourth aspect of embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium, wherein instructions of the storage medium, when executed by a processor of a preloading device for page resources, enable the preloading device for page resources to perform the steps of the preloading method for page resources as described in the first aspect of the embodiments of the present disclosure.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
the method comprises the steps that after a preloading request of the first application page is detected, the preloading request is intercepted; and acquiring the page resource link of the first application page, and based on the page resource link, realizing the pre-loading processing of the page resource of the first application page to obtain page cache data, so that the page resource of the first application page is not acquired through a network any more, the page resource of the application page does not need to be stored in a network server, and the false exposure of the page resource of the application page are reduced.
In addition, when the loading operation aiming at the first application page is detected, the first application page is displayed by directly utilizing the page cache data of the first application page obtained by preloading, the display speed of the page can be effectively improved, and the use experience of a user is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
Fig. 1 is a first flowchart illustrating a method for preloading page resources according to an exemplary embodiment.
Fig. 2 is a flowchart illustrating a method for preloading page resources according to an exemplary embodiment.
FIG. 3 is a flowchart illustrating a page resource preloading phase of an application page according to an exemplary embodiment.
FIG. 4 is a flowchart illustrating a page resource loading phase of an application page in accordance with an exemplary embodiment.
Fig. 5 is a schematic structural diagram illustrating an apparatus for preloading page resources according to an exemplary embodiment.
Fig. 6 is a block diagram illustrating a terminal device according to an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
An embodiment of the present disclosure provides a method for preloading a page resource, as shown in fig. 1, fig. 1 is a first flowchart illustrating a method for preloading a page resource according to an exemplary embodiment. The method is applied to the terminal equipment and comprises the following steps:
step S101, after a preloading request of a first application page sent by a page view component of a terminal device is detected, the preloading request of the first application page is intercepted; the preloading request is used for requesting a server to acquire page resources of the first application page;
step S102, acquiring a page resource link of the first application page carried by the preloading request;
step S103, based on the page resource link, performing preloading processing on the page resource of the first application page to obtain page cache data of the first application page;
step S104, after the loading operation aiming at the first application page is detected, the first application page is displayed based on the page cache data of the first application page.
The page resource preloading method disclosed by the embodiment of the disclosure can be applied to terminal equipment with network access and resource loading functions; here, the terminal device may include: smart phones, tablet computers, notebook computers, or the like.
In step S101, when a page view component in a terminal device accesses the first application page in advance, a preloading request of the first application page is sent to a server to obtain a page resource of the first application page; and after a preloading request of a first application page sent by the page view component is detected, intercepting the preloading request of the first application page.
Here, the page resource of the first application page is a network resource included in the first application page, and includes resources such as a picture, a video, an audio, an HTML (hypertext markup language) text, a Cascading Style Sheets (CSS), and a transliterated script (JavaScript, JS).
It should be noted that, the server is a device providing a data management server, the terminal device establishes a connection with the server, and after the terminal device receives an access request or a pre-access request for the application page, the page view component may send a load request or a pre-load request for the application page to the server, then receive a page resource of the application page sent by the server, and display an application page corresponding to the page resource based on the page resource.
It can be understood that, this way of obtaining via the server requires that the page resources of the application pages are stored in advance in the web server, resulting in a situation that the page resources of some application pages are exposed falsely or incorrectly. In the embodiment of the disclosure, after the preloading request of the first application page is detected, the preloading request of the first application page is intercepted, so that the page resource of the first application page is no longer acquired through a network, and the page resource of the application page does not need to be stored in a network server.
In step S102, based on the intercepted preload request of the first application page, the page resource link with the first application page carried in the preload request is obtained.
Here, the page resource link of the first application page is a network path where the page resource of the first application page is stored in the network, and the page resource of the first application page may be acquired through the page resource link of the first application page.
In step S103, based on the acquired page resource link, establishing a resource connection with the page resource, and based on the resource connection, performing a pre-loading process on the page resource of the first application page to obtain page cache data of the first application page;
here, the resource connection may be a Transmission Control Protocol (TCP) connection.
The method comprises the steps of establishing resource connection of page resources in advance through page resource links based on a first application page, loading the page resources of the first application page based on the resource connection to obtain page cache data of the first application page, and storing the page cache data of the first application page locally.
In some embodiments, the preloading request of the first application page may be stored in a local link pool, a resource connection with the page resource may be established based on the acquired page resource link of the first application page, and the resource connection may be stored.
It can be understood that, by linking based on the page resource of the first application page, the resource connection of the page resource is established in advance, and the resource connection is stored; when the first application page is subsequently accessed, the resource connection corresponding to the first application page can be obtained from the local link pool, and the page resource of the first application page is loaded based on the resource connection without obtaining the page resource of the first application page through a server.
It can be understood that the acquisition of the page resource of the first application page is realized by directly multiplexing the pre-established resource connection, the corresponding page resource can be acquired without re-establishing the resource connection, and the page access speed is improved.
In step S104, after detecting a loading operation of the user for the first application page, intercepting a loading request of the first application page sent by the page view component, and displaying the first application page based on the pre-stored page cache data of the first application page.
It is understood that, in response to the loading operation of the user for the first application page, the page view component sends a loading request of the first application page to the server to obtain the page resource of the first application page.
The page cache data of the first application page is obtained from the local cache data by intercepting the loading request of the first application page, the display of the first application page is realized by directly utilizing the page cache data of the first application page, and the page resource of the first application page is not required to be obtained through a server.
In some embodiments, a page resource link carried in a loading request may be obtained based on the loading request of the first application page, and whether page cache data corresponding to the page resource link is included in local cache data is determined based on the page resource link; and if the local cache data contains page cache data corresponding to the page resource link, displaying the first application page based on the page cache data.
The embodiment of the disclosure intercepts the preloading request after detecting the preloading request of the first application page; and acquiring the page resource link of the first application page, and based on the page resource link, realizing the pre-loading processing of the page resource of the first application page to obtain page cache data, so that the page resource of the first application page is not acquired through a network any more, the page resource of the application page does not need to be stored in a network server, and the false exposure of the page resource of the application page are reduced.
In addition, when the loading operation aiming at the first application page is detected, the first application page is displayed by directly utilizing the page cache data of the first application page obtained by preloading, the display speed of the page can be effectively improved, and the use experience of a user is improved.
Optionally, the page resource link includes: an advertisement resource link;
the method comprises the following steps:
determining the maximum quantity of advertisement resources allowed to be synchronously loaded by the terminal equipment;
determining the number of advertisement resources to be loaded corresponding to the first application page based on the advertisement resource link;
comparing the number of the advertisement resources to be loaded corresponding to the first application page with the maximum number;
the pre-loading the page resource of the first application page based on the page resource link to obtain the page cache data of the first application page includes:
if the number of the advertisement resources to be loaded corresponding to the first application page is larger than or equal to the maximum number, selecting a target advertisement resource from a plurality of advertisement resources to be loaded corresponding to the first application page; wherein the number of the selected target advertisement resources is equal to the maximum number;
and based on the advertisement resource link of the target advertisement resource, pre-loading the target advertisement resource of the first application page to obtain page cache data of the first application page.
In an embodiment of the present disclosure, the page resource link includes: and linking the advertisement resources.
It can be understood that, because the number of users of the network platform is large, the advertisement is launched into each application page of the network platform, so that the advertisement browsing amount can be effectively increased, the advertisement audience number can be increased, and the advertising effect can be enlarged. Typically, the advertisement resource will be embedded within the application page as part of the page resource data for the application page on which the advertisement is placed, the application page and the advertisement resource within the application page being rendered by a page view component based on the page resource data.
However, in this way, the advertiser needs to upload the advertisement resource to the network server, and the advertisement content is easily tampered, falsely exposed or incorrectly exposed.
According to the method and the device for displaying the advertisement resource, the cache data of the advertisement resource are obtained in a mode of preloading the advertisement resource link, the advertisement resource is displayed in the first application page by utilizing the cache data of the advertisement resource, the page resource of the first application page does not need to be acquired through the server, and the advertisement resource does not need to be uploaded into the server.
The maximum number of the advertisement resources allowed to be synchronously loaded by the terminal equipment can be preset; for example, the maximum number of advertisement resources allowed to be loaded synchronously by the terminal device is a default setting value of the system; or the maximum number of the advertisement resources allowed to be synchronously loaded by the terminal equipment can be set by the user in a user-defined mode.
In some embodiments, the maximum number of advertisement resources that the terminal device is allowed to load synchronously may be determined based on the current network status of the terminal device.
It can be understood that the network status of the terminal device is an important factor affecting the loading effect of the terminal device, for example, when the network of the terminal device is low, the resource loading of the terminal device may be slow.
The method and the device for displaying the application page dynamically determine the maximum number of the advertisement resources allowed to be synchronously loaded by the terminal equipment based on the current network state of the terminal equipment, reduce the network congestion to a certain extent and improve the display speed of the application page.
After the maximum number of the advertisement resources allowed to be synchronously loaded by the terminal equipment is determined, the number of the advertisement resources to be loaded corresponding to the first application page can be determined based on the advertisement resource link of the first application page;
generally, one application page may be provided with at least one advertisement presentation area, and the positions and the number of advertisement presentation areas within different application pages may be different. The advertisement resource link of the first application page is determined from the page resource links of the first application page, and the number of the advertisement resources to be loaded corresponding to the first application page can be determined according to the number of the advertisement resource links.
And comparing the quantity of the advertisement resources to be loaded corresponding to the first application page with the maximum quantity of the advertisement resources allowed to be synchronously loaded by the terminal equipment, and determining a target advertisement resource from the plurality of advertisement resources to be loaded if the comparison result indicates that the quantity of the advertisement resources to be loaded corresponding to the first application page is greater than or equal to the maximum quantity of the advertisement resources allowed to be synchronously loaded by the terminal equipment.
Here, the number of the targeted advertisement resources is equal to the maximum number of advertisement resources allowed to be loaded synchronously by the terminal device. It can be understood that when the number of the advertisement resources to be loaded corresponding to the first application page exceeds the maximum number of the advertisement resources allowed to be loaded synchronously by the terminal device, one part of the advertisement resources needs to be loaded preferentially, and the other part of the advertisement resources needs to be loaded in a delayed manner; and the target advertisement resource is an advertisement resource needing to be loaded preferentially in the advertisement resources to be loaded.
And acquiring the advertisement resource link of the target advertisement resource, and preloading the target advertisement resource based on the advertisement resource link to obtain page cache data of the first application page.
Here, the page cache data may be advertisement cache data of the first application page.
According to the method and the device, the terminal device carries out pre-loading processing on the advertisement resource to be loaded of the first application page to obtain page cache data, on one hand, the first application page is displayed based on the page cache data, the display speed of the application page can be effectively improved, the use experience of a user is improved, on the other hand, the advertisement resource does not need to be uploaded to a server, and the situations of wrong exposure and false exposure of the advertisement resource are reduced.
Optionally, the method comprises:
if the number of the advertisement resources to be loaded corresponding to the first application page is smaller than the maximum number, determining a plurality of advertisement resources to be loaded corresponding to the first application page as first target advertisement resources;
determining a next target sub-page to be accessed from a plurality of sub-application pages corresponding to the first application page;
selecting a plurality of second target advertisement resources based on a plurality of advertisement resources to be loaded corresponding to the target sub-page; wherein a sum of the quantities of the first and second targeted advertising resources is equal to the maximum quantity;
and based on the advertisement resource link of the first target advertisement resource and the second target advertisement resource, pre-loading the first target advertisement resource and the second target advertisement resource to obtain page cache data of the first application page.
In the embodiment of the present disclosure, if the comparison result indicates that the number of the advertisement resources to be loaded corresponding to the first application page is less than the maximum number of the advertisement resources allowed to be synchronously loaded by the terminal device, all the advertisement resources to be loaded on the first application page may be determined as the first target advertisement resource to be preferentially loaded;
determining a plurality of sub application pages corresponding to the first application page based on the page resources of the first application page; and determining a next target sub-page to be accessed from the plurality of sub-application pages of the first application page. Selecting a plurality of second target advertisement resources which are preferentially loaded from a plurality of advertisement resources to be loaded corresponding to the target sub-page;
here, the sum of the numbers of the first and second targeted advertisement resources is equal to the maximum number of advertisement resources that the terminal device allows to be loaded synchronously.
A plurality of sub-application pages corresponding to the first application page may be determined based on a page resource (e.g., a JS resource) of the first application page.
It will be appreciated that application pages are typically displayed using Iframe nested child pages, i.e., a complete application page is nested from a parent application page and multiple child application pages. Here, the first application page may be a parent application page, the first application page may be embedded with a plurality of child application pages, and a user may skip to access the child application pages after clicking a link of any one of the child application pages in the first application page in the process of accessing the first application page. Moreover, since the links of the sub application pages are nested in the first application page, if the sub application pages are accessed, the first application page needs to be accessed first, and then the sub application pages are accessed through the first application page.
The mode of determining the target sub-page from the multiple sub-application pages of the first application page may be set according to actual requirements, which is not limited in the embodiments of the present disclosure. For example, the sub-application page with the highest access frequency may be determined as the target sub-page according to the access frequencies corresponding to the plurality of sub-application pages.
In some embodiments, a first target sub-page to be accessed next may be determined from a plurality of sub-application pages corresponding to the first application page; determining a quantity difference between the maximum quantity of the advertisement resources allowed to be synchronously loaded by the terminal equipment and the quantity of the first target advertisement resources; comparing the quantity of the advertisement resources to be loaded corresponding to the first target sub-page with the quantity difference; and if the quantity of the advertisement resources to be loaded corresponding to the first target sub-page is greater than the quantity difference, selecting a second target advertisement resource from the plurality of advertisement resources to be loaded of the first target sub-page.
If the number of the advertisement resources to be loaded corresponding to the first target sub-page is smaller than the number difference, determining a second target sub-page to be accessed; and selecting a second target advertisement resource from the plurality of advertisement resources to be loaded based on the first target sub-page and the second target sub-page.
Here, the second target sub-page may be a sub-page of the first application page, and may also be a sub-page of the first target sub-page; and the access sequence of the second target sub-page is later than that of the first target sub-page.
The advertisement resources to be loaded of all of the first target sub-page and the advertisement resources to be loaded of the second target sub-page portion may be determined as the second target advertisement resource.
After a first target advertisement resource and a second target advertisement resource are determined, respectively preloading the first target advertisement resource and the second target advertisement resource based on the advertisement resource link of the first target advertisement resource and the advertisement resource link of the second target advertisement resource, and obtaining page cache data of a first application page.
It can be understood that, in the embodiment of the present disclosure, when the number of the advertisement resources to be loaded of the first application page is less than the maximum number, the advertisement resources to be loaded of the first application page and the advertisement resources to be loaded of the target sub-page to be accessed next are at least partially preloaded, and network resources of the terminal device are fully utilized, so as to improve the display speed of the application page and the sub-application page.
Optionally, the method comprises:
acquiring user attribute information of a user; the user attribute information at least includes: the region to which the user belongs;
acquiring historical delivery data of advertisement resources to be loaded in a region to which a user belongs;
determining loading priorities of a plurality of advertisement resources to be loaded corresponding to the first application page based on the historical delivery data;
the selecting a target advertisement resource from a plurality of advertisement resources to be loaded corresponding to the first application page comprises:
and selecting the target advertisement resource from the plurality of advertisement resources to be loaded corresponding to the first application page based on the loading priorities of the plurality of advertisement resources to be loaded corresponding to the first application page.
In the embodiment of the present disclosure, user account information may be determined based on the login information of the user, and the user attribute information may be determined according to the user account information.
It can be understood that the terminal device may store a corresponding relationship between the user account information and the user attribute information, and when the user logs in, the user account information may be determined in response, and the user attribute information may be determined based on the corresponding relationship stored in advance.
Or, the corresponding relationship between the user account information and the user attribute information may be stored in a server, and after the user account information is determined, the user attribute information is acquired through interaction with the server.
Of course, the user account information may also be determined in other ways, for example, by determining a fingerprint of the user, or determining a face of the user, which is not limited in this disclosure.
In some embodiments, the user attribute information of the user may be obtained based on an access request of the user for an application page of any application in the terminal device.
It can be understood that the access request carries a user identifier of a user, and the user attribute information of the user can be obtained based on the user identifier.
Here, the embodiment of the present disclosure does not limit how to obtain the user identifier of the user. For example, the user identification of the user can be obtained from the user Cookie (login information); and the user identification is written into the Cookie when the user logs in.
In an embodiment of the present disclosure, the user attribute information at least includes: the region to which the user belongs;
in some embodiments, the user attribute information further comprises: attribute information such as user ID, user gender, and/or user age.
Here, the historical placement data may include: click rate, conversion rate and/or negative feedback information of the advertisement resources to be loaded, and the like.
It can be understood that the historical delivery data of the advertisement resource to be loaded in different regions may be different; therefore, the historical delivery data corresponding to the region to which the user belongs can be determined from the historical delivery data corresponding to a plurality of different regions.
Determining historical delivery data corresponding to a plurality of to-be-loaded advertisement resources corresponding to the first application page according to the historical delivery data of the to-be-loaded advertisement resources in the region to which the user belongs, and sequencing the plurality of to-be-loaded advertisement resources corresponding to the first application page based on the historical delivery data corresponding to the plurality of to-be-loaded advertisement resources corresponding to the first application page to obtain loading priorities among the plurality of to-be-loaded advertisement resources of the first application page.
It can be understood that, according to the click rate of the plurality of advertisement resources to be loaded corresponding to the first application page, the loading priority among the plurality of advertisement resources to be loaded of the first application page may be determined; and if the click rate of the advertisement resource to be loaded is higher, the loading priority of the advertisement resource to be loaded is higher.
After determining the loading priority among the multiple advertisement resources to be loaded of the first application page, a target advertisement resource may be determined from the multiple advertisements to be loaded of the first application page based on the loading priority.
Therefore, when the advertisement resources are preloaded, the target advertisement resources which are preferentially loaded are selected according to the historical delivery data of the plurality of advertisement resources to be loaded, so that the click rate and/or the conversion rate of the target advertisement resources displayed on the first application page are/is improved in the display process of the first application page.
Optionally, the determining, based on the historical placement data, the loading priorities of the multiple advertisement resources to be loaded corresponding to the first application page includes:
acquiring advertisement conversion information of a user in a preset time period; wherein the advertisement conversion information is at least used for indicating the advertisement category to which the converted advertisement belongs;
acquiring advertisement category information to which advertisement resources to be loaded belong;
determining first priority information of different types of advertisement resources to be loaded based on the advertisement conversion information and the advertisement category information;
respectively determining second priority information of a plurality of advertisement resources to be loaded in each category based on the historical delivery data;
and determining the loading priority of a plurality of advertisement resources to be loaded corresponding to the first application page according to the first priority information and the second priority information of the advertisement resources to be loaded.
In the embodiment of the disclosure, advertisement conversion information of a user in a preset time period can be acquired, and based on an advertisement category to which at least one converted advertisement indicated by the advertisement conversion information belongs, a user preferred advertisement category is determined.
Here, the preset time period may be set according to actual requirements, for example, the preset time period may be within one week or within one month.
In some embodiments, the advertisement conversion information of the last time of the user can be obtained, the advertisement category to which the converted advertisement indicated by the advertisement conversion information belongs is determined, and the advertisement category preferred by the user is determined.
It can be understood that if the advertisement conversion information indicates that the advertisement category to which the converted advertisement belongs is the sports goods category, it may be determined that the user is interested in the sports goods in the near future, and at this time, if the advertisement of the sports goods category is delivered to the user, the probability that the advertisement is clicked by the user is high.
Classifying the advertisement resources to be loaded to obtain the advertisement category information of the advertisement resources to be loaded; and determining to-be-loaded advertisement resources of different categories to be sequenced based on the advertisement conversion information, and determining first priority information of the to-be-loaded advertisement resources of the different categories.
For example, ad resources to be loaded may include: sports goods advertisement resources and game advertisement resources; based on the advertisement conversion information, the user is determined to be interested in sports goods recently, so that the first priority of the sports goods advertisement resource can be determined to be higher than the first priority of the game advertisement resource.
It should be noted that, the number of the advertisement resources to be loaded corresponding to one advertisement category may be 1, and may also be multiple. If a certain advertisement category is a priority-loaded advertisement category, but the number of the advertisement resources to be loaded corresponding to the advertisement category is greater than the maximum number of the advertisement resources allowed to be loaded synchronously by the terminal device, at this time, a target advertisement resource needs to be selected from a plurality of advertisement resources to be loaded corresponding to the advertisement category; however, since the first priority information of the multiple advertisement resources to be loaded is the same, the target advertisement resource cannot be selected according to the first priority information.
Therefore, in the embodiment of the disclosure, after the first priority information of the advertisement resources to be loaded is determined, historical delivery data of the plurality of advertisement resources to be loaded is obtained, and the plurality of advertisement resources to be loaded in each category are respectively sorted based on the historical delivery data of the plurality of advertisement resources to be loaded in each category, so as to obtain the second priority information of the plurality of advertisement resources to be loaded in each category.
The loading priority among the plurality of advertisement resources to be loaded corresponding to the first application page can be determined based on the first priority information and the second priority information of the advertisement resources to be loaded.
It should be noted that the priority level strength of the first priority level information is greater than the priority level strength of the second priority level information. It can be understood that, if the first application page corresponds to 3 advertisement resources to be loaded (advertisement resources A, B and C, respectively); the first priority information of the advertisement resource to be loaded is as follows: a ═ B > C; the second priority information of the advertisement resource to be loaded is: c > B > A; at this time, according to the first priority information and the second priority information, the determined loading priority of the advertisement to be loaded is: b > A > C.
According to the method and the device for loading the advertisement resources, when the loading priority of the plurality of advertisement resources to be loaded corresponding to the first application page is determined, not only historical delivery data of the advertisement resources to be loaded are considered, but also preference information of the user on advertisement categories is considered, so that the advertisement resources which are possibly interested by the user can be loaded preferentially, and the click rate and/or the conversion rate of the advertisement resources are improved.
Optionally, after the loading operation for the first application page is detected, displaying the first application page based on page cache data of the first application page includes:
after the loading operation is detected, displaying the first application page based on page cache data of the first application page;
determining a next target sub-page to be accessed from a plurality of sub-application pages corresponding to the first application page;
and preloading the page resources of the target sub-page.
In the embodiment of the disclosure, after detecting that a user performs a loading operation on the first application page, the page view component sends a loading request of the first application page to a server, and a terminal device intercepts the loading request of the first application page and displays the first application page based on cache data of the first application page in the local cache data; determining a next target sub-page to be accessed from a plurality of sub-application pages corresponding to the first application page in the display process of the first application page; and preloading the page resources of the target sub-page based on the page resource link of the target sub-page to obtain page cache data of the target sub-page.
And after detecting an access request of a user for the target sub-page in the first application page, directly displaying the target sub-page based on page cache data of the target sub-page without acquiring page resources of the target sub-page from a server, thereby improving the display speed of the application page.
Optionally, the determining a next target sub-page to be accessed from a plurality of sub-application pages corresponding to the first application page includes:
acquiring historical behavior information of a user; the historical behavior information includes at least: the access time period and a historical access path corresponding to the access time period;
determining a target access time period matched with the access time of the first application page and a target access path corresponding to the target access time period based on the historical behavior information;
and predicting a next target sub-page to be accessed from a plurality of sub-application pages corresponding to the first application page based on the target access path.
In the embodiment of the disclosure, historical behavior information related to access of a user and an application page can be acquired;
in some embodiments, historical behavior information of the user within a preset time period may be obtained; here, the preset time period may be set according to actual requirements; for example, historical behavior information of the user over the past two weeks is obtained.
The historical behavior information includes at least: and the access time period and the historical access path corresponding to the access time period. It should be noted that the access time period may be a corresponding time period when the user accesses the application page. Here, the time period may be preset, for example, a day may be divided into 4 time periods; respectively morning time period (6 o 'clock-12 o' clock), afternoon time period (12 o 'clock-18 o' clock), evening time period (18 o 'clock-24 o' clock) and morning time period (24 o 'clock-6 o' clock).
The historical access path comprises all application pages accessed in one-time access behavior of the user and the access sequence among the application pages.
For example, the historical behavior information of the user indicates that the user will access a news APP during the morning hours; and the historical access paths are sequentially: a news APP main page, a social news category sub-page and a military news category sub-page.
Here, there is a corresponding relationship between the historical access path and the access time period; there may be differences in the historical access paths for different access time periods. For example, when a user accesses a news APP in the morning, the corresponding historical access paths are a news APP main page, a social news category sub-page and a military news category sub-page in sequence; when a user accesses the news APP in the evening time period, the corresponding historical access paths are the news APP main page, the entertainment sub-page and the game sub-page in sequence.
Acquiring access time of a user to a first application page, and determining a target access time period matched with the access time based on pre-acquired historical behavior information; screening out a historical access path related to a first application page from historical behavior information corresponding to the target access time period, and determining the historical access path related to the first application page as a target access path; and determining a next target sub-page to be accessed from the plurality of sub-application pages of the first application page based on the target access path.
Here, the access time of the user to the first application page may be acquired upon detecting an access request of the user for the first application page. Or acquiring the current time of the terminal equipment, and determining the current time as the access time; and determining a first application page to be accessed by the user based on the access time and the historical behavior information.
It can be understood that, during the access process of the user to the first application page, the target access path and the target sub-page indicated by the target access path are determined based on the access time of the first application page.
Before a user accesses a first application page, a target access path can be determined according to the current time of the terminal equipment and the historical behavior information of the user; and determining a first application page and a target sub-page based on the target access path.
For example, the current time of the terminal device indicates that the time is close to the morning time period, and the user is indicated to access a news APP in the morning time period according to the historical behavior information of the user; therefore, the news APP main page can be determined as a first application page, the historical access path related to the news APP main page in the time period is determined as a target access path, and preloading processing is carried out on all application pages related to the target access path.
After the target sub-page is determined, pre-loading the page resources of the target sub-page to obtain page cache data of the target sub-page; and when an access request of a user for the target sub-page in the first application page is detected, directly displaying the target sub-page based on page cache data of the target sub-page.
The method and the device for predicting the target sub-page to be accessed by the user comprise the steps that the historical behavior information of the user is obtained, the target access path matched with the access time is determined, and therefore the next target sub-page to be accessed by the user is predicted from a plurality of sub-application pages corresponding to the first application page based on the target access road condition; by pre-loading the page resources of the target sub-page, after an access request of a user for the target sub-page is detected, the target sub-page is displayed directly based on the page cache data of the target sub-page, the page resources of the target sub-page do not need to be acquired from a server, and the display speed of an application page is improved.
Optionally, the method comprises:
detecting a jump operation aiming at a currently displayed first application page, and suspending preloading processing of page resources of the target sub-page;
determining a second application page indicated by the jump operation;
acquiring a page resource link of the second application page;
and loading the page resource of the second application page based on the page resource link of the second application page, and displaying the second application page.
In the embodiment of the disclosure, in the display process of the first application page, when the terminal device detects a jump operation of a user for the first application page, the terminal device suspends the preloading processing of the page resource of the target sub-page and determines the second page indicated by the jump operation.
Here, the jump operation may be triggering (e.g., clicking, long-pressing, sliding, etc.) a page jump control in the first application page;
the embodiment of the disclosure can suspend the preloading processing of the page resource of the target sub-page after detecting the jump operation; then determining a second application page indicated by the jump operation; if the second application page is not the target sub-page, continuing to suspend the preloading processing of the page resources of the target sub-page; and if the second application page is the target sub-page, restoring the preloading processing of the page resource of the target sub-page.
Or, after the jump operation is detected, determining a second application page indicated by the jump operation; if the second application page is not the target sub-page, suspending the preloading processing of the page resources of the target sub-page; and if the second application page is the target sub-page, keeping the preloading processing of the target sub-page.
It can be understood that, because the currently available network resources of the terminal device are limited, when a jump operation for a first application page is detected, that is, an application page to be accessed by a user is not the target sub-page, the user needs to load a page resource of a second application page indicated by the jump operation, so as to display the second application page; therefore, the preloading processing of the page resources of the target sub-page needs to be suspended first, and the network resources are released; and then loading the page resources of the second application page by using the released network resources.
Responding to the jump operation, the page view component sends a loading request aiming at the second application page to a server so as to obtain page resources of the second application page; after the terminal equipment detects the loading request, intercepting the loading request; and acquiring the page resource of the second application page based on the page resource link carried by the loading request so as to display the second application page.
Here, the resource connection corresponding to the page resource connection may be acquired from a local resource pool based on the page resource connection; and directly multiplexing the pre-established resource connection to acquire the page resource of the second application page, thereby improving the resource loading speed.
Optionally, the method comprises:
detecting a return operation aiming at a first application page, and switching and displaying the first application page;
and restoring the preloading processing of the page resources of the target sub-page.
In the embodiment of the disclosure, in the display process of the second application page, a return operation of a user for the first application page is detected, and the second application page is switched to be displayed back to the first application page based on the page cache data of the first application page.
Here, the return operation may be triggering (e.g., clicking, long-pressing, sliding, etc.) a page return control in the second application page;
it can be understood that, in the display process of the second application page, the terminal device may perform pre-loading processing on the page resources of the sub-application pages of the second application page; when the return operation aiming at the first application page is detected, the preloading processing of the page resources of the sub application page of the second application page is suspended; and resuming the pre-loading of page resources of the target sub-page that were not completed before.
Optionally, the method comprises:
acquiring validity period information carried by the page resource link;
determining the cache validity period of the page cache data of the first application page based on the validity period information;
after the loading operation for the first application page is detected, displaying the first application page based on the page cache data of the first application page, including:
after the loading operation aiming at the first application page is detected, determining whether page cache data of the first application page exceeds the cache validity period or not;
and if the page cache data of the first application page does not exceed the cache validity period, displaying the first application page based on the page cache data of the first application page.
In the embodiment of the disclosure, a page resource link of a first application page and validity period information corresponding to the page resource link can be acquired based on a loading request of the first application page; and determining the caching validity period of the page cache data of the first application page based on the time information indicated by the validity period information.
It is to be understood that the cache validity period is used to indicate a maximum duration of the page cache data stored in the terminal device. And if the cache validity period is exceeded, the page cache data can be invalid.
After the terminal device detects the loading operation of the first application page, the storage duration of the page cache data of the first application page can be firstly determined to be compared with the cache validity period corresponding to the first application page; if the storage duration of the page cache data of the first application page does not exceed the cache validity period according to the comparison result, which indicates that the page cache data of the first application page is not invalid, the first application page may be displayed based on the page cache data of the first application page.
Optionally, the method comprises:
if the page cache data of the first application page exceeds the cache validity period, deleting the page cache data of the first application page;
and loading the page resource of the first application page based on the page resource link, and displaying the first application page.
In the embodiment of the present disclosure, if the comparison result indicates that the storage duration of the page cache data of the first application page exceeds the cache validity period, it indicates that the page cache data of the first application page may be invalidated, and in order to reduce the occupation of the memory by the invalidated data, the page cache data of the first application page may be deleted; and loading the page resource of the first application page based on the page resource connection of the first application page, and displaying the first application page based on the page resource.
In some embodiments, the terminal device may determine, based on a cache validity period of page cache data of an application page, whether a storage duration of a page resource link and/or page cache data of the application page stored in a local link pool exceeds the cache validity period; and if the storage duration of the page resource link and/or the page cache data of the target application page exceeds the cache validity period, deleting the page resource link and/or the page cache data of the target application page.
In the embodiment of the disclosure, the verification of the cache validity period is performed on the page resource link and/or the page cache data in the local link pool, so that the page resource link and/or the page cache data in the local link pool are effectively managed, and the occupation of the memory space of the terminal device by the invalid page resource link and/or the page cache data is reduced.
The present disclosure also provides the following embodiments:
fig. 2 is a flowchart illustrating a second method for preloading page resources according to an exemplary embodiment, where the method includes:
step S201, after a preloading request of a first application page sent by a page view component of a terminal device is detected, the preloading request of the first application page is intercepted; the preloading request is used for requesting a server to acquire page resources of the first application page;
in this example, the page view component may be a Webview object; when an applicable program is started, creating a Webview object through a singleton mode, and initializing the Webview object in advance; and carrying out resource analysis through the Webview object.
It should be noted that many application pages in the Application (APP) are implemented by the web page of H5, and the APP is only responsible for loading the web page, but rendering the web page is time-consuming when loading the H5 page because of slow network speed or poor device performance. Because the component for loading the application page is the Webview object and the main time for loading the webpage is concentrated on initialization of the Webview, the Webview object can be created and initialized when the APP is started, and the initialized Webview object can be directly used for loading or preloading the application page.
In this example, a Webview object may be used to pre-access the first application page in the background, and at this time, the Webview object sends a preloading request to a server to obtain a page resource of the first application page; and after the terminal equipment detects the preloading request, intercepting the preloading request to avoid error exposure caused by subsequent JS execution.
Step S202, acquiring a page resource link of the first application page carried by the preloading request; wherein the page resource link comprises an advertisement resource link;
in this example, the Webview object is used to perform resource analysis on the first application page, so as to obtain a page resource link corresponding to a page resource of the first application page.
Here, the page asset links may include asset links corresponding to base material assets and advertisement asset links. It should be noted that the basic material resources may include: JS resources, CSS resources, pictures, audio and/or video resources, etc.
And sending the page resource link corresponding to the acquired page resource of the first application page to a material downloader for management.
Note that in this example, the page resource download and link warm-up are performed by a dedicated material downloader. Here, the material downloader may put the loading request or the preloading request of the application page into a local link pool to cache the page resource link of the application page, and complete the preheating of the page resource link to obtain the resource connection corresponding to the application page.
Step S203, determining the maximum number of advertisement resources allowed to be synchronously loaded by the terminal equipment; determining the number of advertisement resources to be loaded corresponding to the first application page based on the advertisement resource link; comparing the quantity of the advertisement resources to be loaded corresponding to the first application page with the maximum quantity;
in the example, the material downloader determines the maximum number N of advertisement resources allowed to be synchronously loaded by the terminal equipment based on the current network state of the terminal equipment; determining the number of advertisement resources to be loaded corresponding to the first application page based on the number of advertisement resource links of the first application page; and comparing the number of the advertisement resources to be loaded of the first application page with the maximum number N.
Step S204, if the number of the advertisement resources to be loaded corresponding to the first application page is greater than or equal to the maximum number, selecting a target advertisement resource from the plurality of advertisement resources to be loaded corresponding to the first application page based on the loading priorities of the plurality of advertisement resources to be loaded corresponding to the first application page; wherein the number of the selected target advertisement resources is equal to the maximum number;
in this example, if the number of the advertisement resources to be loaded corresponding to the first application page is greater than or equal to the maximum number N, the advertisement resources to be loaded may be prioritized according to the loading priorities of the advertisement resources to be loaded corresponding to the first application page, and the N advertisement resources to be loaded are selected from the advertisement resources to be loaded after being prioritized as the target advertisement resource.
It can be understood that, when the number of the advertisement resources to be loaded corresponding to the first application page exceeds the maximum number N, a part of the advertisement resources to be loaded may be preloaded preferentially, and another part of the advertisement resources to be loaded may be preloaded in a delayed manner.
Here, the loading priorities of the multiple advertisement resources to be loaded corresponding to the first application page may be determined first, and the N target advertisement resources that need to be preloaded in priority may be determined based on the loading priorities of the multiple advertisement resources to be loaded.
In some embodiments, user attribute information of a user may be obtained; the user attribute information at least includes: the region to which the user belongs; acquiring historical delivery data of advertisement resources to be loaded in a region to which a user belongs; determining loading priorities of a plurality of advertisement resources to be loaded corresponding to the first application page based on the historical delivery data;
in this example, for a new user, the region to which the user belongs may be acquired, and the users are classified based on the region to which the user belongs; and setting a loading priority for each advertisement resource to be loaded according to the historical delivery data of the advertisement resource to be loaded corresponding to the region of the user.
Here, the historical placement data may include: advertisement click rate, conversion rate and other large disk data, and negative feedback information.
It can be understood that, since historical delivery data of the same advertisement resource to be loaded in different regions may be different, loading priorities of the same advertisement resource to be loaded in different regions are different; after the new users are classified according to the regions to which the new users belong, the loading priorities of a plurality of advertisement resources to be loaded according to which the target advertisement resources are determined are the same for all the new users corresponding to the regions.
In other embodiments, advertisement conversion information of a user in a preset time period is obtained; wherein the advertisement conversion information is at least used for indicating the advertisement category to which the converted advertisement belongs; acquiring advertisement category information to which advertisement resources to be loaded belong; determining first priority information of different types of advertisement resources to be loaded based on the advertisement conversion information and the advertisement category information; respectively determining second priority information of a plurality of advertisement resources to be loaded in each category based on the historical delivery data; and determining the loading priority of a plurality of advertisement resources to be loaded corresponding to the first application page according to the first priority information and the second priority information of the advertisement resources to be loaded.
In this example, for an old user, preference information of the user may be acquired, and based on the preference information of the user, first priority information is determined.
It should be noted that, as the user uses the application, some historical usage data of the user in the use process may be recorded, for example, advertisement conversion information, access time to each application page, access path, dwell time in each application page, and other data; based on the historical usage data, preference information for the user is determined.
It can be understood that the multiple advertisement resources to be loaded can be classified to obtain the advertisement categories to which the multiple advertisement resources to be loaded belong; the method comprises the steps of obtaining advertisement conversion information of a user in a preset time period, and determining first priority information of a plurality of advertisement resources to be loaded based on the advertisement conversion information and advertisement categories to which the plurality of advertisement resources to be loaded belong.
Here, the advertisement categories may include: category information and subcategory information; it is understood that the category information may include: categories such as games, e-commerce, and the like; subcategory information corresponding to the game class may include: shooting, intelligence development and other subcategories; the subcategory information corresponding to the e-commerce class may include: sports e-commerce, food e-commerce, makeup e-commerce, etc.
The first priority information of the plurality of advertisement resources to be loaded can be determined according to the advertisement conversion information and the category information and subcategory information of the plurality of advertisement resources to be loaded.
Here, the targeted advertising subcategories of user preferences may be determined based on the most recent advertising conversion information; and determining first priority information of the plurality of advertisement resources to be loaded according to the target advertisement subcategory and the category information and subcategory information of the plurality of advertisement resources to be loaded.
It is to be understood that the first priority of the advertisement resource to be loaded matching the target advertisement subcategory is highest, the first priority of the advertisement resource to be loaded matching the target category to which the target advertisement subcategory belongs is lowest, and the first priority of the advertisement resource to be loaded not matching the target category to which the target advertisement subcategory belongs is next to the first priority of the advertisement resource to be loaded matching the target category to which the target advertisement subcategory belongs.
After the first priority of the advertisement resources to be loaded is determined, determining second priorities of a plurality of advertisement resources to be loaded with the same first priority based on historical delivery data; and determining the loading priority of a plurality of advertisement resources to be loaded corresponding to the first application page according to the first priority and the second priority of the advertisement resources to be loaded.
Step S205, based on the advertisement resource link of the target advertisement resource, pre-loading the target advertisement resource of the first application page to obtain page cache data of the first application page;
in this example, after the target advertisement resource corresponding to the first application page is determined, based on the advertisement resource link of the target advertisement resource, the target advertisement resource of the first application page is preloaded to obtain the page cache data of the first application page.
Step S206, if the number of the advertisement resources to be loaded corresponding to the first application page is less than the maximum number, determining a plurality of advertisement resources to be loaded corresponding to the first application page as first target advertisement resources; determining a next target sub-page to be accessed from a plurality of sub-application pages corresponding to the first application page; selecting a plurality of second target advertisement resources based on the loading priorities of a plurality of advertisement resources to be loaded corresponding to the target sub-page; wherein a sum of the quantities of the first targeted advertising resource and the second targeted advertising resource is equal to the maximum quantity;
in this example, if the number of the advertisement resources to be loaded corresponding to the first application page is less than the maximum number N, the advertisement resources to be loaded of the next target sub-page to be accessed may be selected for supplementation based on user preference.
Determining a quantity difference M based on the quantity of the advertisement resources to be loaded corresponding to the first application page and the maximum quantity; determining a plurality of advertisement resources to be loaded corresponding to a first application page as first target advertisement resources; and based on the loading priorities of the plurality of advertisement resources to be loaded of the next target sub-page to be accessed, selecting M second target advertisement resources from the plurality of advertisement resources to be loaded of the target sub-page.
Here, the method of determining the loading priority of the plurality of advertisement resources to be loaded of the target sub page is the same as the method of determining the loading priority of the plurality of advertisement resources to be loaded of the first application page.
Step S207, based on the advertisement resource link of the first target advertisement resource and the second target advertisement resource, pre-loading the first target advertisement resource and the second target advertisement resource to obtain page cache data of the first application page;
in this example, after a first target advertisement resource and a second target advertisement resource are determined, based on advertisement resource links of the first target advertisement resource and the second target advertisement resource, the first target advertisement resource and the second target advertisement resource are pre-loaded, respectively, so as to obtain page cache data.
Step S208, obtaining the validity period information carried by the page resource link; determining the cache validity period of the page cache data of the first application page based on the validity period information; after the loading operation aiming at the first application page is detected, determining whether page cache data of the first application page exceeds the cache validity period or not;
in this example, the header file of the page resource link carries validity period information, and the material downloader may manage the page cache data and the page resource link stored in the local link pool according to the cache validity period.
As can be appreciated, the material downloader may delete the page cache data and/or the page resource link exceeding the cache validity period stored in the local link pool according to the cache validity period of the page cache data, so as to release the memory space; namely, the material downloader can manage the page cache data and the page resource links stored in the local link pool according to the cache validity period.
The method comprises the steps that when a page resource of a first application page is preloaded, a material downloader acquires validity period information carried in a page resource link corresponding to the page resource; determining the cache validity of the page cache data according to the validity information; and after detecting the loading operation of the user on the first application page, intercepting a loading request of the first application page sent by the Webview object, and determining whether page cache data of the first application page exceeds the cache validity period.
In some embodiments, after detecting a loading operation for the first application page, determining whether page cache data of the first application page is pre-stored; if the page cache data of the first application page are stored, determining whether the page cache data of the first application page exceeds the cache validity period;
and if the page cache data of the first application page is not stored, loading the page resource of the first application page based on the page resource link of the first application page stored in advance.
It is understood that when the page cache data of the first application page is not stored, the page resource link which is already preheated can be directly reused.
Step S209, if the page cache data of the first application page exceeds the cache validity period, deleting the page cache data of the first application page; loading the page resource of the first application page based on the page resource link, and displaying the first application page;
in this example, if the page cache data of the first application page exceeds the cache validity period, the page cache data corresponding to the first application page in the local link pool may be deleted; acquiring a page resource link of a first application page from the intercepted loading request, loading the page resource of the first application page based on the page resource link, and displaying the first application page based on the page resource.
Step S210, if the page cache data of the first application page does not exceed the cache validity period, displaying the first application page based on the page cache data of the first application page;
in this example, if the page cache data of the first application page does not exceed the cache validity period, the page cache data of the first application page may be obtained from a local link pool, and the first application page may be displayed based on the page cache data.
Step S211, obtaining historical behavior information of the user; the historical behavior information includes at least: the access time period and a historical access path corresponding to the access time period; determining a target access time period matched with the access time of the first application page and a target access path corresponding to the target access time period based on the historical behavior information;
in this example, the terminal device may obtain historical behavior information of the user during a display process of the first application page or a preloading process of a page resource of the first application page, and predict a target access path of the user based on the historical behavior information.
Step S212, predicting a next target sub-page to be accessed from a plurality of sub-application pages corresponding to the first application page based on the target access path; preloading page resources of the target sub-page;
in the example, based on the access sequence of each application page in the target access path, determining a next target sub-page to be accessed; and analyzing the resources of the target sub-page to obtain page resource links of the target sub-page, and preloading the page resources of the target sub-page based on the page resource links to obtain page cache data of the target sub-page.
Step S213, detecting the jump operation aiming at the currently displayed first application page, and suspending the preloading processing of the page resource of the target sub-page; determining a second application page indicated by the jump operation; acquiring a page resource link of the second application page; loading the page resource of the second application page based on the page resource link of the second application page, and displaying the second application page;
in this example, in the process of preloading page resources of the target sub-page, a jump operation for a currently displayed first application page is detected, and preloading processing on the target sub-page is suspended; intercepting a loading request aiming at the second application page, and loading the page resource of the second application page based on the page resource link in the loading request so as to display the second application page.
Step S214, detecting a return operation aiming at a first application page, and switching and displaying the first application page; and restoring the preloading processing of the page resources of the target sub-page.
In this example, if a return operation for the first application page is detected, the second application page is switched to display back to the first application page; and automatically breakpoint-resuming the page resources of the target sub-page.
In some embodiments, it may be determined whether the page cache data of the target sub-page exceeds the cache validity period of the target sub-page; if the cache validity period is not exceeded, restoring the preloading processing of the page resources of the target sub-page; and if the validity period of the cache is exceeded, deleting the downloaded part of page resources, and re-preloading the page resources of the target sub-page.
Illustratively, as shown in fig. 3-4, fig. 3 is a flowchart illustrating a page resource preloading phase of an application page according to an exemplary embodiment. FIG. 4 is a flowchart illustrating a page resource loading phase of an application page in accordance with an exemplary embodiment.
The preloading phase comprises:
step S301, preloading a primary HTML page by a Webview object, and sending a preloading request of the primary HTML page to a server;
step S302, determining whether the page cache data of the primary HTML page is cached effectively or not based on the caching validity period; if the cache is valid, execute step S303; if the cache is invalid, go to step S305;
step S303, acquiring a page resource link of a secondary HTML page;
step S304, determining whether the cache of the page cache data of the second-level HTML page is effective or not based on the cache validity period; if the cache is valid, executing step S306;
step S305, intercepting a preloading request of a primary HTML page; acquiring page resource connection in the preloading request;
step S306, the page resource link is sent to a material downloader;
step S307, based on the page resource link, the page resource is downloaded by using the material downloader, and page cache data is obtained.
The loading phase comprises:
step S401, loading a primary HTML page by a Webview object, and intercepting a loading request of the primary HTML page;
step S402, determining whether page cache data of a first-level HTML page exists; if the page cache data exists, executing step S403; if there is no page cache data, execute step S404;
step S403, if page cache data exist, loading the page cache data;
step S404, if no page cache data exists, based on a preset loading request, loading page resources by using a material downloader;
and step S405, rendering and displaying a primary HTML page by using the Webview object.
The embodiment of the disclosure also provides a device for preloading page resources. Fig. 5 is a schematic structural diagram illustrating an apparatus for preloading page resources according to an exemplary embodiment, as shown in fig. 5, the apparatus is applied to a terminal device, and the apparatus 100 includes:
the intercepting module 101 is configured to intercept a preloading request of a first application page after detecting the preloading request of the first application page sent by a page view component of a terminal device; the preloading request is used for requesting a server to acquire page resources of the first application page
An obtaining module 102, configured to obtain a page resource link of the first application page carried by the preloading request;
the preloading module 103 is configured to perform preloading processing on the page resource of the first application page based on the page resource link, so as to obtain page cache data of the first application page;
a display module 104, configured to display the first application page based on the page cache data of the first application page after the loading operation for the first application page is detected.
Optionally, the page resource link includes: an advertisement resource link;
the apparatus, comprising: a determining module 105 configured to:
determining the maximum quantity of advertisement resources allowed to be synchronously loaded by the terminal equipment;
determining the number of advertisement resources to be loaded corresponding to the first application page based on the advertisement resource link;
comparing the number of the advertisement resources to be loaded corresponding to the first application page with the maximum number;
if the number of the advertisement resources to be loaded corresponding to the first application page is larger than or equal to the maximum number, selecting a target advertisement resource from a plurality of advertisement resources to be loaded corresponding to the first application page; wherein the number of the selected target advertisement resources is equal to the maximum number;
the preloading module 103 is configured to:
and based on the advertisement resource link of the target advertisement resource, pre-loading the target advertisement resource of the first application page to obtain page cache data of the first application page.
Optionally, the determining module 105 is configured to:
if the number of the advertisement resources to be loaded corresponding to the first application page is smaller than the maximum number, determining a plurality of advertisement resources to be loaded corresponding to the first application page as first target advertisement resources;
determining a next target sub-page to be accessed from a plurality of sub-application pages corresponding to the first application page;
selecting a plurality of second target advertisement resources based on a plurality of advertisement resources to be loaded corresponding to the target sub-page; wherein a sum of the quantities of the first targeted advertising resource and the second targeted advertising resource is equal to the maximum quantity;
the preloading module 103 is configured to:
and based on the advertisement resource link of the first target advertisement resource and the second target advertisement resource, pre-loading the first target advertisement resource and the second target advertisement resource to obtain page cache data of the first application page.
Optionally, the obtaining module 102 is configured to:
acquiring user attribute information of a user; the user attribute information at least includes: the region to which the user belongs;
acquiring historical delivery data of advertisement resources to be loaded in a region to which a user belongs;
determining loading priorities of a plurality of advertisement resources to be loaded corresponding to the first application page based on the historical delivery data;
the determining module 105 is configured to:
and selecting the target advertisement resource from the plurality of advertisement resources to be loaded corresponding to the first application page based on the loading priorities of the plurality of advertisement resources to be loaded corresponding to the first application page.
Optionally, the obtaining module 102 is configured to:
acquiring advertisement conversion information of a user in a preset time period; wherein the advertisement conversion information is at least used for indicating the advertisement category to which the converted advertisement belongs;
acquiring advertisement category information to which advertisement resources to be loaded belong;
determining first priority information of different types of advertisement resources to be loaded based on the advertisement conversion information and the advertisement category information;
respectively determining second priority information of a plurality of advertisement resources to be loaded in each category based on the historical delivery data;
and determining the loading priority of a plurality of advertisement resources to be loaded corresponding to the first application page according to the first priority information and the second priority information of the advertisement resources to be loaded.
Optionally, the display module 104 is configured to:
after the loading operation is detected, displaying the first application page based on page cache data of the first application page;
determining a next target sub-page to be accessed from a plurality of sub-application pages corresponding to the first application page;
and preloading the page resources of the target sub-page.
Optionally, the determining module 105 is configured to:
acquiring historical behavior information of a user; the historical behavior information includes at least: the access time period and a historical access path corresponding to the access time period;
determining a target access time period matched with the access time of the first application page and a target access path corresponding to the target access time period based on the historical behavior information;
and predicting a next target sub-page to be accessed from a plurality of sub-application pages corresponding to the first application page based on the target access path.
Optionally, the display module 104 is configured to:
detecting a jump operation aiming at a currently displayed first application page, and suspending preloading processing of page resources of the target sub-page;
determining a second application page indicated by the jump operation;
acquiring a page resource link of the second application page;
and loading the page resource of the second application page based on the page resource link of the second application page, and displaying the second application page.
Optionally, the display module 104 is configured to:
detecting a return operation aiming at a first application page, and switching and displaying the first application page;
and restoring the preloading processing of the page resources of the target sub-page.
Optionally, the display module 104 is configured to:
acquiring validity period information carried by the page resource link;
determining the cache validity period of the page cache data of the first application page based on the validity period information;
after the loading operation aiming at the first application page is detected, determining whether page cache data of the first application page exceeds the cache validity period or not;
and if the page cache data of the first application page does not exceed the cache validity period, displaying the first application page based on the page cache data of the first application page.
Optionally, the display module 104 is configured to:
if the page cache data of the first application page exceeds the cache validity period, deleting the page cache data of the first application page;
and loading the page resource of the first application page based on the page resource link, and displaying the first application page.
Fig. 6 is a block diagram illustrating a terminal device according to an example embodiment. For example, the terminal device 800 may be a mobile phone, a mobile computer, or the like.
Referring to fig. 6, terminal device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the terminal device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operation at the device 800. Examples of such data include instructions for any application or method operating on terminal device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power components 806 provide power to the various components of terminal device 800. Power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for terminal device 800.
The multimedia component 808 comprises a screen providing an output interface between the terminal device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive an external audio signal when the terminal device 800 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
Sensor component 814 includes one or more sensors for providing various aspects of state assessment for terminal device 800. For example, sensor assembly 814 can detect the open/closed state of device 800, the relative positioning of components, such as a display and keypad of terminal device 800, sensor assembly 814 can also detect a change in the position of terminal device 800 or a component of terminal device 800, the presence or absence of user contact with terminal device 800, orientation or acceleration/deceleration of terminal device 800, and a change in the temperature of terminal device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
Communication component 816 is configured to facilitate communications between terminal device 800 and other devices in a wired or wireless manner. The terminal device 800 may access a wireless network based on a communication standard, such as Wi-Fi, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the terminal device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the terminal device 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (24)

1. The method for preloading the page resources is applied to terminal equipment, and comprises the following steps:
intercepting a preloading request of a first application page after detecting the preloading request of the first application page sent by a page view component of a terminal device; the preloading request is used for requesting a server to acquire page resources of the first application page;
acquiring a page resource link of the first application page carried by the preloading request;
based on the page resource link, performing preloading processing on the page resource of the first application page to obtain page cache data of the first application page;
and after the loading operation aiming at the first application page is detected, displaying the first application page based on the page cache data of the first application page.
2. The method of claim 1, wherein the page resource link comprises: an advertisement resource link;
the method comprises the following steps:
determining the maximum quantity of advertisement resources allowed to be synchronously loaded by the terminal equipment;
determining the number of advertisement resources to be loaded corresponding to the first application page based on the advertisement resource link;
comparing the number of the advertisement resources to be loaded corresponding to the first application page with the maximum number;
the pre-loading the page resource of the first application page based on the page resource link to obtain the page cache data of the first application page includes:
if the number of the advertisement resources to be loaded corresponding to the first application page is larger than or equal to the maximum number, selecting a target advertisement resource from a plurality of advertisement resources to be loaded corresponding to the first application page; wherein the number of the selected target advertisement resources is equal to the maximum number;
and preloading the target advertisement resource of the first application page based on the advertisement resource link of the target advertisement resource to obtain page cache data of the first application page.
3. The method of claim 2, wherein the method comprises:
if the number of the advertisement resources to be loaded corresponding to the first application page is smaller than the maximum number, determining a plurality of advertisement resources to be loaded corresponding to the first application page as first target advertisement resources;
determining a next target sub-page to be accessed from a plurality of sub-application pages corresponding to the first application page;
selecting a plurality of second target advertisement resources based on a plurality of advertisement resources to be loaded corresponding to the target sub-page; wherein a sum of the quantities of the first and second targeted advertising resources is equal to the maximum quantity;
and based on the advertisement resource link of the first target advertisement resource and the second target advertisement resource, pre-loading the first target advertisement resource and the second target advertisement resource to obtain page cache data of the first application page.
4. The method of claim 2, comprising:
acquiring user attribute information of a user; the user attribute information at least includes: the region to which the user belongs;
acquiring historical delivery data of advertisement resources to be loaded in a region to which a user belongs;
determining loading priorities of a plurality of advertisement resources to be loaded corresponding to the first application page based on the historical delivery data;
the selecting of the target advertisement resource from the plurality of advertisement resources to be loaded corresponding to the first application page includes:
and selecting the target advertisement resource from the plurality of advertisement resources to be loaded corresponding to the first application page based on the loading priorities of the plurality of advertisement resources to be loaded corresponding to the first application page.
5. The method of claim 4, wherein determining the loading priority of the plurality of advertisement resources to be loaded corresponding to the first application page based on the historical placement data comprises:
acquiring advertisement conversion information of a user in a preset time period; wherein the advertisement conversion information is at least used for indicating the advertisement category to which the converted advertisement belongs;
acquiring advertisement category information to which advertisement resources to be loaded belong;
determining first priority information of different types of advertisement resources to be loaded based on the advertisement conversion information and the advertisement category information;
respectively determining second priority information of a plurality of advertisement resources to be loaded in each category based on the historical delivery data;
and determining the loading priority of a plurality of advertisement resources to be loaded corresponding to the first application page according to the first priority information and the second priority information of the advertisement resources to be loaded.
6. The method of claim 1, wherein displaying the first application page based on page cache data of the first application page after detecting the loading operation for the first application page comprises:
after the loading operation is detected, displaying the first application page based on page cache data of the first application page;
determining a next target sub-page to be accessed from a plurality of sub-application pages corresponding to the first application page;
and preloading the page resources of the target sub-page.
7. The method according to claim 3 or 6, wherein the determining a next target sub-page to be accessed from a plurality of sub-application pages corresponding to the first application page comprises:
acquiring historical behavior information of a user; the historical behavior information includes at least: the access time period and a historical access path corresponding to the access time period;
determining a target access time period matched with the access time of the first application page and a target access path corresponding to the target access time period based on the historical behavior information;
and predicting a next target sub-page to be accessed from a plurality of sub-application pages corresponding to the first application page based on the target access path.
8. The method of claim 6, comprising:
detecting a jump operation aiming at a currently displayed first application page, and suspending preloading processing of page resources of the target sub-page;
determining a second application page indicated by the jump operation;
acquiring a page resource link of the second application page;
and loading the page resource of the second application page based on the page resource link of the second application page, and displaying the second application page.
9. The method of claim 8, comprising:
detecting a return operation aiming at a first application page, and switching and displaying the first application page;
and restoring the preloading processing of the page resources of the target sub-page.
10. The method of claim 1, comprising:
acquiring validity period information carried by the page resource link;
determining the cache validity period of the page cache data of the first application page based on the validity period information;
after the loading operation for the first application page is detected, displaying the first application page based on the page cache data of the first application page, including:
after the loading operation aiming at the first application page is detected, determining whether page cache data of the first application page exceeds the cache validity period or not;
and if the page cache data of the first application page does not exceed the cache validity period, displaying the first application page based on the page cache data of the first application page.
11. The method of claim 10, comprising:
if the page cache data of the first application page exceeds the cache validity period, deleting the page cache data of the first application page;
and loading the page resource of the first application page based on the page resource link, and displaying the first application page.
12. The device for preloading page resources is applied to terminal equipment and comprises:
the system comprises an interception module, a pre-loading module and a processing module, wherein the interception module is used for intercepting a pre-loading request of a first application page after detecting the pre-loading request of the first application page sent by a page view component of terminal equipment; the preloading request is used for requesting a server to acquire page resources of the first application page
The acquisition module is used for acquiring the page resource link of the first application page carried by the preloading request;
the preloading module is used for preloading page resources of the first application page based on the page resource link to obtain page cache data of the first application page;
and the display module is used for displaying the first application page based on the page cache data of the first application page after the loading operation aiming at the first application page is detected.
13. The apparatus of claim 12, wherein the page resource link comprises: an advertisement resource link;
the apparatus, comprising: a determination module to:
determining the maximum quantity of advertisement resources allowed to be synchronously loaded by the terminal equipment;
determining the number of advertisement resources to be loaded corresponding to the first application page based on the advertisement resource link;
comparing the quantity of the advertisement resources to be loaded corresponding to the first application page with the maximum quantity;
if the number of the advertisement resources to be loaded corresponding to the first application page is larger than or equal to the maximum number, selecting a target advertisement resource from a plurality of advertisement resources to be loaded corresponding to the first application page; wherein the number of the selected target advertisement resources is equal to the maximum number;
the preload module is configured to:
and based on the advertisement resource link of the target advertisement resource, pre-loading the target advertisement resource of the first application page to obtain page cache data of the first application page.
14. The apparatus of claim 13, wherein the determining module is configured to:
if the number of the advertisement resources to be loaded corresponding to the first application page is smaller than the maximum number, determining a plurality of advertisement resources to be loaded corresponding to the first application page as first target advertisement resources;
determining a target sub-page to be accessed from a plurality of sub-application pages corresponding to the first application page;
selecting a plurality of second target advertisement resources based on a plurality of advertisement resources to be loaded corresponding to the target sub-page; wherein a sum of the quantities of the first and second targeted advertising resources is equal to the maximum quantity;
the preload module is configured to:
and based on the advertisement resource link of the first target advertisement resource and the second target advertisement resource, performing pre-loading processing on the first target advertisement resource and the second target advertisement resource to obtain page cache data of the first application page.
15. The apparatus of claim 13, wherein the obtaining module is configured to:
acquiring user attribute information of a user; the user attribute information at least includes: the region to which the user belongs;
acquiring historical delivery data of advertisement resources to be loaded in a region to which a user belongs;
determining loading priorities of a plurality of advertisement resources to be loaded corresponding to the first application page based on the historical delivery data;
the determining module is configured to:
and selecting the target advertisement resource from the plurality of advertisement resources to be loaded corresponding to the first application page based on the loading priorities of the plurality of advertisement resources to be loaded corresponding to the first application page.
16. The apparatus of claim 15, wherein the obtaining module is configured to:
acquiring advertisement conversion information of a user in a preset time period; wherein the advertisement conversion information is at least used for indicating the advertisement category to which the converted advertisement belongs;
acquiring advertisement category information to which advertisement resources to be loaded belong;
determining first priority information of different types of advertisement resources to be loaded based on the advertisement conversion information and the advertisement category information;
respectively determining second priority information of a plurality of advertisement resources to be loaded in each category based on the historical delivery data;
and determining the loading priority of a plurality of advertisement resources to be loaded corresponding to the first application page according to the first priority information and the second priority information of the advertisement resources to be loaded.
17. The apparatus of claim 12, wherein the display module is configured to:
after the loading operation is detected, displaying the first application page based on page cache data of the first application page;
determining a next target sub-page to be accessed from a plurality of sub-application pages corresponding to the first application page;
and preloading the page resources of the target sub-page.
18. The apparatus of claim 14 or 17, wherein the determining module is configured to:
acquiring historical behavior information of a user; the historical behavior information includes at least: the access time period and a historical access path corresponding to the access time period;
determining a target access time period matched with the access time of the first application page and a target access path corresponding to the target access time period based on the historical behavior information;
and predicting a next target sub-page to be accessed from a plurality of sub-application pages corresponding to the first application page based on the target access path.
19. The apparatus of claim 17, wherein the display module is configured to:
detecting a jump operation aiming at a currently displayed first application page, and suspending preloading processing of page resources of the target sub-page;
determining a second application page indicated by the jump operation;
acquiring a page resource link of the second application page;
and loading the page resource of the second application page based on the page resource link of the second application page, and displaying the second application page.
20. The apparatus of claim 19, wherein the display module is configured to:
detecting a return operation aiming at a first application page, and switching and displaying the first application page;
and restoring the preloading processing of the page resources of the target sub-page.
21. The apparatus of claim 12, wherein the display module is configured to:
acquiring validity period information carried by the page resource link;
determining the cache validity period of the page cache data of the first application page based on the validity period information;
after the loading operation aiming at the first application page is detected, determining whether page cache data of the first application page exceeds the cache validity period or not;
and if the page cache data of the first application page does not exceed the cache validity period, displaying the first application page based on the page cache data of the first application page.
22. The apparatus of claim 21, wherein the display module is configured to:
if the page cache data of the first application page exceeds the cache validity period, deleting the page cache data of the first application page;
and loading the page resource of the first application page based on the page resource link, and displaying the first application page.
23. An apparatus for preloading page resources, comprising:
a processor;
a memory for storing executable instructions;
wherein the processor is configured to: the method for preloading page resources of any one of claims 1-11 is implemented when executing executable instructions stored in said memory.
24. A non-transitory computer readable storage medium, wherein instructions, when executed by a processor of a preloading device for page resources, enable the preloading device for page resources to perform the method for preloading page resources as claimed in any one of claims 1-11.
CN202210669228.4A 2022-06-14 2022-06-14 Page resource preloading method and device and storage medium Pending CN115061745A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210669228.4A CN115061745A (en) 2022-06-14 2022-06-14 Page resource preloading method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210669228.4A CN115061745A (en) 2022-06-14 2022-06-14 Page resource preloading method and device and storage medium

Publications (1)

Publication Number Publication Date
CN115061745A true CN115061745A (en) 2022-09-16

Family

ID=83201351

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210669228.4A Pending CN115061745A (en) 2022-06-14 2022-06-14 Page resource preloading method and device and storage medium

Country Status (1)

Country Link
CN (1) CN115061745A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115858974A (en) * 2023-03-01 2023-03-28 成都萌想科技有限责任公司 Data tracking method, system, electronic device and medium
CN117421069A (en) * 2023-11-24 2024-01-19 久睦本(海南)科技股份有限公司 Dynamic loading method, system, equipment and storage medium of internet applet

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115858974A (en) * 2023-03-01 2023-03-28 成都萌想科技有限责任公司 Data tracking method, system, electronic device and medium
CN115858974B (en) * 2023-03-01 2023-04-25 成都萌想科技有限责任公司 Data tracking method, system, electronic equipment and medium
CN117421069A (en) * 2023-11-24 2024-01-19 久睦本(海南)科技股份有限公司 Dynamic loading method, system, equipment and storage medium of internet applet

Similar Documents

Publication Publication Date Title
CN107329743B (en) Application page display method and device and storage medium
CN109032606B (en) Native application compiling method and device and terminal
AU2020202136A1 (en) Telecommunications call augmentation system
US10949490B2 (en) Method and apparatus for displaying webpage content
CN107229711B (en) Webpage display method and device
US10642456B2 (en) Application distribution method and device
US10817282B2 (en) Application configuration file generation method and apparatus, application page display method and apparatus and storage medium
CN111026491B (en) Interface display method, device, electronic equipment, server and storage medium
CN115061745A (en) Page resource preloading method and device and storage medium
CN108153832B (en) Push information display method and device
CN110971974B (en) Configuration parameter creating method, device, terminal and storage medium
CN111078325B (en) Application program running method and device, electronic equipment and storage medium
CN111639276A (en) Resource preloading method and device and storage medium
CN113076504B (en) Skeleton screen generation method, device, equipment and storage medium
CN105808304B (en) Code deployment method, device and system
US11210449B2 (en) Page display method and device and storage medium
CN105096162B (en) Content item display method and device
CN104572230B (en) Script file loading method and device and script file generating method and device
CN111859209A (en) Content display method, device and storage medium
CN111046265B (en) Card data display method, device, equipment and storage medium
CN111008050B (en) Page task execution method, device, terminal and storage medium
CN111079040B (en) Resource sniffing method, device, terminal, server and storage medium
CN110968492B (en) Information processing method and device and storage medium
CN105630948B (en) Network page display method and device
CN114025317B (en) Method, device, server, terminal and storage medium for spreading multimedia resources

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination