WO2019109797A1 - 网页资源的获取方法、装置、终端及存储介质 - Google Patents

网页资源的获取方法、装置、终端及存储介质 Download PDF

Info

Publication number
WO2019109797A1
WO2019109797A1 PCT/CN2018/116224 CN2018116224W WO2019109797A1 WO 2019109797 A1 WO2019109797 A1 WO 2019109797A1 CN 2018116224 W CN2018116224 W CN 2018116224W WO 2019109797 A1 WO2019109797 A1 WO 2019109797A1
Authority
WO
WIPO (PCT)
Prior art keywords
webpage
address
webpage address
resource
preloaded
Prior art date
Application number
PCT/CN2018/116224
Other languages
English (en)
French (fr)
Inventor
陈岩
刘耀勇
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2019109797A1 publication Critical patent/WO2019109797A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation

Definitions

  • the embodiments of the present invention relate to the field of Internet technologies, and in particular, to a method, an apparatus, a terminal, and a storage medium for acquiring a webpage resource.
  • the terminal when a user browses a webpage on a terminal, for example, the user browses the news in the application of the mobile phone, and the user selects a webpage, the terminal displays the webpage. Before displaying the webpage, the terminal needs to obtain the webpage resource of the webpage before the webpage can be displayed. Therefore, after the user selects a webpage, the terminal downloads the webpage resource of the webpage according to the Uniform Resource Locator (URL) of the webpage, and the terminal needs a certain time consuming to download the webpage resource according to the URL. Among them, the URL is also called a webpage address.
  • URL Uniform Resource Locator
  • the embodiment of the present application provides a method, an apparatus, a terminal, and a storage medium for acquiring a webpage resource.
  • the technical solution is as follows:
  • the first aspect provides a method for obtaining a webpage resource, where the method includes:
  • the historical webpage address refers to a webpage address that has been visited during the historical period
  • a second aspect provides a device for acquiring a webpage resource, where the device includes:
  • An address obtaining module configured to acquire at least one historical webpage address, where the historical webpage address refers to a webpage address that has been visited in a historical period;
  • An address selection module configured to select a common webpage address from the historical webpage address, where the common webpage address refers to a historical webpage address whose access frequency is greater than a preset frequency in the historical period;
  • a resource obtaining module configured to download a webpage resource corresponding to the common webpage address
  • the resource obtaining module is further configured to: crawl webpage resources corresponding to at least one target webpage address according to the webpage resource corresponding to the common webpage address;
  • a resource storage module configured to store a webpage resource corresponding to the preloaded webpage address, where the preloaded webpage address includes the common webpage address and the target webpage address.
  • a terminal comprising a processor and a memory, the memory storing at least one instruction loaded by the processor and executed to implement a webpage as described in the first aspect above How to get resources.
  • a fourth aspect a computer readable storage medium having stored therein at least one instruction loaded by a processor and executed to implement a web page resource as described in the first aspect above Get the method.
  • a computer program product for implementing a method for acquiring a web page resource as described in the first aspect above is provided when the computer program product is executed.
  • the webpage resource corresponding to the webpage resource corresponding to the common webpage address and the webpage resource crawled from the webpage resource corresponding to the common webpage address is pre-downloaded and stored, so that when the webpage access request is subsequently received, the pre-stored webpage can be obtained.
  • Obtaining the requested webpage resource in the resource does not require downloading the webpage resource from the network, thereby reducing the time-consuming time for obtaining the webpage resource and improving the efficiency of displaying the webpage.
  • FIG. 1 is a flowchart of a method for acquiring a webpage resource according to an exemplary embodiment
  • FIG. 2 is a schematic diagram of a webpage crawling according to an exemplary embodiment
  • FIG. 3 is a flowchart of a method for acquiring a webpage resource according to another exemplary embodiment
  • FIG. 4 is a block diagram of an apparatus for acquiring a webpage resource according to an exemplary embodiment
  • FIG. 5 is a block diagram of an apparatus for acquiring a webpage resource according to another exemplary embodiment
  • FIG. 6 is a schematic structural diagram of a terminal according to an exemplary embodiment.
  • the method for obtaining the webpage resource provided by the related technology the terminal needs to download the webpage resource according to the webpage address of the webpage after the user selects the webpage, so that the terminal needs to download the webpage resource for a period of time after the user selects the webpage, so that the webpage is displayed before the webpage is displayed. Long wait times lead to less efficient display of web pages.
  • the webpage resource corresponding to the webpage resource corresponding to the common webpage address and the webpage resource corresponding to the webpage address crawled from the common webpage address are pre-downloaded and stored, so that the webpage access is subsequently received.
  • the requested webpage resource can be obtained from the pre-stored webpage resource, and the webpage resource is not required to be downloaded from the network, which reduces the time-consuming of acquiring the webpage resource, and improves the efficiency of displaying the webpage.
  • the execution subject of each step may be a terminal.
  • the execution body of each step may be an application running in the terminal.
  • the application refers to an application capable of displaying a webpage, such as a browser, a news application, an instant messaging software, a social application software, a video playing software, and the like.
  • the terminal may be an electronic device such as a mobile phone, a tablet computer, an e-book reader, a multimedia playback device, or a laptop portable computer.
  • FIG. 1 is a flowchart of a method for acquiring a webpage resource according to an exemplary embodiment. The method can include the following steps:
  • Step 101 Acquire at least one historical webpage address.
  • the terminal acquires at least one historical webpage address, where the historical webpage address refers to a webpage address that the terminal has visited in the historical period.
  • the historical period refers to one or more historical periods.
  • the historical period may be the latest day, the most recent week, the most recent month, etc., and for example, the historical period may be a historical period from a certain historical moment to the current moment (or another historical moment), or the historical period may be more The embodiment of the present application does not limit this.
  • this step includes the following sub-steps:
  • Each access record includes a webpage address corresponding to a webpage access operation.
  • each of the access records further includes at least one of a timestamp, an application, and a network type corresponding to one webpage access operation.
  • the timestamp indicates the specific time at which the access recorded by the access record occurred. For example, in the record of the user browsing the webpage, a historical webpage address has 2 access records in the historical period, and the timestamps of the 2 access records indicate the time of 2017/6/16 13:24:25 and 2017/6, respectively. /17 8:29:30. The user visited the historical web address at 2017/6/16 13:24:25 and 2017/6/17 8:29:30 respectively.
  • the application represents the application that made the access recorded by the access record.
  • the network type indicates the type of network used by the terminal when performing the access recorded by the access record, for example, Wireless Local Area Networks (WLAN), The 4th Generation Mobile Communication (4G), and Local area network (LAN) and so on.
  • WLAN Wireless Local Area Networks
  • 4G The 4th Generation Mobile Communication
  • LAN Local area network
  • the historical access data acquired by the terminal is as shown in Table-1 below:
  • the user used the XX browser to access the webpage with the web address www.baid.com on the 4G network at 2017/6/16 13:24:25.
  • the terminal acquires an access record in the historical period from the historical access data.
  • the historical period can be set according to actual experience. For example, if the historical period is 7 days, the terminal obtains the access record within 7 days from the historical access data.
  • the terminal determines the webpage address in the access record in the historical period as the historical webpage address, and each historical webpage address may have one or more access records in the historical period.
  • Step 102 Select a common webpage address from the historical webpage address.
  • the terminal selects a common webpage address according to the access frequency of the historical webpage address in the historical period.
  • the frequency of access to a historical web page address is used to indicate how often the terminal accesses the corresponding web page using the historical web page address.
  • the terminal selects a historical webpage address whose access frequency is greater than the preset frequency in the historical period as a common webpage address.
  • the preset frequency can be set according to actual experience. For example, if the average frequency is set to 10 times per day as the preset frequency, the commonly used webpage address is a historical webpage address whose access frequency is greater than 10 times per day. In the above manner, the terminal selects a webpage address frequently accessed by the user in the historical webpage address.
  • the access frequency of the historical webpage address may be any one of the average number of visits per day, the average number of visits per hour, the total number of visits in the historical period, the average interval between each visit, and the minimum number of visits per day. This embodiment of the present application does not limit this.
  • Step 103 Download a webpage resource corresponding to a common webpage address.
  • the terminal downloads the corresponding webpage resource according to the common webpage address.
  • the webpage address includes a resource type of the webpage resource, a host domain name and a resource file name of the resource, and the terminal can determine the location of the corresponding webpage resource in the network according to the webpage address, thereby downloading the webpage resource.
  • the above webpage address may be a URL.
  • the downloaded web resources include video, audio, images, and other web page addresses.
  • the terminal can display the webpage corresponding to the webpage resource according to the webpage resource.
  • Step 104 Crawl the webpage resource corresponding to the at least one target webpage address according to the webpage resource corresponding to the common webpage address.
  • the at least one target webpage address includes: a webpage address included in a webpage resource corresponding to the common webpage address; and/or a webpage address included in the webpage resource corresponding to the lower-level webpage address of the common webpage address.
  • the lower-level webpage address of a common webpage address refers to the webpage address obtained by crawling according to a common webpage address.
  • the lower-level webpage address of the common webpage address may be a webpage address obtained by crawling from a webpage resource corresponding to the common webpage address, or may be a webpage address further crawled from the webpage resource corresponding to the webpage address obtained by the crawling.
  • the terminal downloads the webpage resource corresponding to the webpage address according to the webpage address included in the downloaded webpage resource, and downloads the webpage resource corresponding to the webpage address included in the newly downloaded webpage resource according to the webpage address included in the newly downloaded webpage resource, In this way, the download is stopped until the downloaded web resource meets the preset condition. For example, the data amount of the downloaded web resource reaches the upper limit of the storage capacity.
  • the above process of downloading web resources is called web crawling. After the webpage crawling, the terminal crawls the webpage resource corresponding to the at least one target webpage address after downloading the webpage resource corresponding to the common webpage address.
  • the webpage resource corresponding to the common webpage address A includes the webpage address B
  • the webpage resource corresponding to the webpage address B includes the webpage address C
  • the webpage resource corresponding to the webpage address C includes the webpage address D
  • the address C and the web page address D are destination web page addresses that are crawled based on the common web page address A.
  • the terminal first extracts the webpage address included in the webpage resource corresponding to the common webpage address, and uses the webpage address as the target webpage address extracted by the first round.
  • the terminal downloads the webpage resource corresponding to the target webpage address extracted in the first round, extracts the webpage address included in the webpage resource, and uses the webpage address as the target webpage address extracted by the second round.
  • the terminal downloads the webpage resource corresponding to the target webpage address extracted in the second round.
  • the terminal further extracts the third round of the target webpage address according to the webpage resource corresponding to the target webpage address extracted in the second round, and so on, until the data amount of the stored webpage resource is greater than the preset data amount, and stops downloading.
  • the webpage resource corresponding to the target webpage address extracted by each round is the webpage resource corresponding to the at least one target webpage address crawled by the terminal.
  • the webpage address A is a common webpage address
  • the terminal first downloads the webpage resource corresponding to the webpage address A
  • the webpage resource corresponding to the webpage address A includes the webpage address B and the webpage address C.
  • the webpage address B and the webpage address C are the destination webpage addresses extracted in the first round.
  • the terminal further downloads the webpage resource corresponding to the webpage address B and the webpage resource corresponding to the webpage address C.
  • the webpage resource corresponding to the webpage address B includes the webpage address D and the webpage address E
  • the webpage resource corresponding to the webpage address C includes the webpage address F and the webpage Address G.
  • the webpage address D, the webpage address E, the webpage address F, and the webpage address G are the destination webpage addresses extracted in the second round.
  • the terminal then downloads the webpage resources corresponding to the webpage address D, the webpage address E, the webpage address F, and the webpage address G respectively.
  • the terminal stops the webpage crawling.
  • the webpage resource corresponding to the target webpage address crawled by the terminal is a webpage resource corresponding to the webpage address B, the webpage address C webpage address D, the webpage address E, the webpage address F, and the webpage address G respectively.
  • the terminal may stop the webpage crawling after downloading the webpage resource corresponding to the target webpage address, or stop the webpage crawling during the process of downloading the webpage resource corresponding to the target webpage address.
  • condition that the downloading is stopped when the data amount of the stored webpage resource is greater than the preset data amount, is merely exemplary.
  • condition for stopping the download may also be the downloaded target webpage address.
  • the number of the number is greater than the preset number
  • the number of rounds to be crawled is greater than the preset number of rounds
  • the webpage resource corresponding to the target webpage address is downloaded by the terminal, and the remaining storage capacity of the terminal is less than the preset capacity. limited.
  • Step 105 Store a webpage resource corresponding to the preloaded webpage address.
  • Preloaded web addresses include common web addresses and landing page addresses.
  • the terminal stores the webpage resource corresponding to the downloaded common webpage address and the webpage resource corresponding to the target webpage address downloaded during the crawling process, and stores the webpage resource in the non-volatile memory of the terminal as the webpage resource corresponding to the preloaded webpage address.
  • the webpage resource corresponding to the target webpage address is stored on the hard disk.
  • the terminal stores the pre-loaded webpage address while storing the webpage resource corresponding to the preloaded webpage address.
  • the terminal also records the correspondence between the preloaded webpage address and the stored webpage resource.
  • step 105 the following steps are further included (not shown in FIG. 1):
  • Step 106 Obtain a webpage access request carrying the requested webpage address.
  • the terminal When the user requests to display a web page, the terminal obtains a web page access request.
  • the request webpage address carried in the webpage access request is the webpage address of the webpage opened by the user.
  • the user browses the webpage by using a browser, and inputs a webpage address in the address input field, and the request webpage address carried in the webpage access request is the webpage address input by the user.
  • Step 107 Detect whether the requested webpage address is included in the preloaded webpage address.
  • the terminal detects whether the requested webpage address is included according to the recorded preloaded webpage address.
  • Step 108 If the pre-loaded webpage address includes the requested webpage address, the webpage corresponding to the requested webpage address is displayed according to the webpage resource corresponding to the stored requesting webpage address.
  • the terminal detects that the pre-loaded webpage address includes the requested webpage address, it indicates that the terminal has downloaded and stores the webpage resource corresponding to the requested webpage address.
  • the terminal directly displays the webpage requesting the webpage address according to the webpage resource corresponding to the requested webpage address that has been stored in the non-volatile memory, and does not need to download the webpage resource corresponding to the requested webpage address again.
  • Step 109 If the pre-loaded webpage address does not include the requested webpage address, download the webpage resource corresponding to the requested webpage address, and display the webpage corresponding to the requested webpage address.
  • the method provided by the embodiment of the present application pre-downloads and stores a webpage resource corresponding to a webpage resource corresponding to a common webpage address and a webpage address that is crawled from a webpage resource corresponding to a common webpage address, so as to enable subsequent receiving.
  • the requested webpage resource can be obtained from the pre-stored webpage resource, and the webpage resource is not required to be downloaded from the network, thereby reducing the time required for acquiring the webpage resource and improving the efficiency of displaying the webpage.
  • the content of the pre-stored webpage resource can be enriched, and the user's actual operating habit when browsing the webpage can be satisfied, so as to user as much as possible.
  • the web resources of the most likely web pages are downloaded first to ensure the utilization and validity of the pre-stored web resources.
  • FIG. 3 is a flowchart of a method for acquiring a webpage resource according to another exemplary embodiment. The method can include the following steps:
  • Step 301 Acquire at least one historical webpage address.
  • step 301 is the same as the step 101 in the embodiment provided in FIG. 1.
  • FIG. 1 for an embodiment, which is not described in this embodiment.
  • Step 302 Acquire a first access timestamp and a last access timestamp of the historical webpage address in the historical period.
  • the first access timestamp of the historical webpage address obtained by the terminal in the historical period indicates the time when the user first accessed the historical webpage address in the historical period.
  • the last access timestamp of the historical webpage address obtained by the terminal in the historical period indicates the time when the user last accessed the historical webpage address in the historical period.
  • the terminal acquires the first access timestamp and the last access timestamp of the historical webpage address in the historical period.
  • Step 303 Calculate the interval duration between the first access timestamp and the last access timestamp.
  • the terminal calculates the interval duration of the first access to the historical webpage address and the last access to the historical webpage address in the historical period according to the time indicated by the first access timestamp and the time represented by the last access timestamp.
  • the time represented by the first access timestamp and the time represented by the last access timestamp are 2017/6/16 13:24:25 and 2017/6/17 13:24:25, respectively, and the calculated interval duration is For 1 day.
  • Step 304 Calculate the access frequency of the historical webpage address according to the total number of accesses and the interval duration of the historical webpage address in the historical period.
  • the access frequency is calculated by dividing the total number of accesses of the historical webpage address in the historical period by the interval duration.
  • the total number of visits and the interval duration of a historical webpage address in the historical period are 10 times and 2 days, respectively, and the access frequency of the historical webpage address is 5 times a day.
  • Step 305 If the access frequency of the historical webpage address is greater than the preset frequency, the historical webpage address is selected as the common webpage address.
  • the terminal selects a historical webpage address whose access frequency is greater than the preset frequency in the historical period as a common webpage address.
  • the terminal acquires two historical web page addresses: a historical web page address A and a historical web page address B.
  • the access frequency of the historical webpage address A is 5 times a day
  • the access frequency of the historical webpage address B is 3 times a day
  • the preset frequency is 4 times a day
  • the terminal selects the historical webpage address A as a common webpage address.
  • the terminal may further detect whether the total number of times of the historical webpage address in the historical period is greater than a preset number; if the total number of times of the historical webpage address in the historical period is greater than the preset number of times, Step 302 is performed. If the total number of accesses of the historical webpage address in the historical period is not greater than the preset number of times, step 302 is not performed, and the historical webpage address is not selected as the common webpage address. Since the access frequency is obtained by dividing the total number of visits by the interval duration, if the interval of the history web address is too short, even if the total number of visits is small, the calculated access frequency will be higher.
  • the historical web page address has a small number of visits in the historical period, and is not the web address that the user frequently visits. If the terminal selects the historical webpage address as a common webpage address, it means that the selected common webpage address has an error. By detecting whether the total number of accesses is greater than a preset number of times, the above error can be avoided, and the accuracy of the selected common webpage address is ensured.
  • Step 306 Download a webpage resource corresponding to a common webpage address.
  • Step 307 Crawl the webpage resource corresponding to the at least one target webpage address according to the webpage resource corresponding to the common webpage address.
  • Step 308 storing a webpage resource corresponding to the preloaded webpage address.
  • steps 306 to 308 are the same as steps 103 to 105 in the embodiment provided in FIG. 1.
  • steps 103 to 105 in the embodiment provided in FIG. 1.
  • the terminal obtains a historical access speed corresponding to the preloaded webpage address.
  • the terminal acquires a historical access speed corresponding to each of the preloaded webpage addresses.
  • the historical access speed corresponding to the preloaded webpage address is used to indicate the degree of downloading the webpage resource corresponding to the preloaded webpage address. If the historical access speed corresponding to the preloaded webpage address is less than the preset speed, the speed of downloading the webpage resource corresponding to the preloaded webpage address is slow, and the waiting time before displaying the webpage is too long, and the terminal stores the webpage corresponding to the preloaded webpage address.
  • the terminal does not store the preloading.
  • the webpage resource corresponding to the webpage address can be selectively stored.
  • the terminal does not store the web resources corresponding to the faster web address, which saves storage space.
  • the terminal only uses the above method for common webpage addresses.
  • the terminal stores an access record of a common webpage address, and the access record includes a historical access speed corresponding to a common webpage address, so that the terminal can directly obtain the historical access speed corresponding to the common webpage address.
  • the terminal After storing the webpage resource corresponding to the preloaded webpage address, the terminal starts a restart timer. When the restart timer expires for a preset period of time. The terminal deletes the webpage resource corresponding to the stored preloaded webpage address, and starts from step 301 again.
  • the preset duration can be set according to actual experience or user requirements. In the above manner, the terminal can periodically determine the preloaded webpage address according to the latest historical webpage address of the user, and download and store the webpage resource corresponding to the preloaded webpage address, so as to ensure the timeliness of the webpage resource corresponding to the preloaded webpage address.
  • the method provided by the embodiment of the present application pre-downloads and stores a webpage resource corresponding to a webpage resource corresponding to a common webpage address and a webpage address that is crawled from a webpage resource corresponding to a common webpage address, so as to enable subsequent receiving.
  • the requested webpage resource can be obtained from the pre-stored webpage resource, and the webpage resource is not required to be downloaded from the network, thereby reducing the time required for acquiring the webpage resource and improving the efficiency of displaying the webpage.
  • the frequency of the access is determined by the interval between the first access timestamp and the last access timestamp, thereby determining the common webpage address, and ensuring that the selected common webpage address is the address frequently accessed by the user, further ensuring The utilization and validity of pre-stored web resources.
  • the above embodiment describes the process of pre-downloading and storing webpage resources corresponding to preloaded webpage addresses.
  • the terminal periodically updates the webpage resource corresponding to the preloaded webpage address.
  • the method for obtaining a webpage resource provided by the embodiment of the present application may further include the following steps:
  • the content of a web page may change over time, and when the content of a web page changes, the web page resources may also change.
  • the terminal needs to update the stored webpage resources. After the terminal stores the webpage resource corresponding to the preloaded webpage address, the terminal obtains the resource update duration corresponding to the preloaded webpage address. After the storage is performed, the terminal updates the webpage resource corresponding to the preloaded webpage address according to the resource update duration.
  • the terminal obtains the resource update duration corresponding to the preloaded webpage address by:
  • step a when the stored length of the webpage resource corresponding to the preloaded webpage address reaches the ith resource update duration corresponding to the preloaded webpage address, the webpage resource corresponding to the preloaded webpage address is re-downloaded, wherein the initial value of i is 1
  • the first resource update duration is a preset value.
  • the stored time length of the web resource refers to the time interval from the moment when the terminal downloads the web resource last time to the current time.
  • the terminal After the i-th download of the webpage resource corresponding to the preloaded webpage address, the terminal re-downloads the webpage resource corresponding to the preloaded webpage address after the i-th resource update duration.
  • the first resource update duration is set to 10 minutes in advance, and after 10 minutes of downloading the webpage resource corresponding to the preloaded webpage address, the terminal re-downloads the webpage resource corresponding to the preloaded webpage address after 10 minutes.
  • step b it is detected whether the webpage resource corresponding to the re-downloaded preloaded webpage address changes relative to the webpage resource corresponding to the stored preloaded webpage address.
  • step c if the change does not occur, the i+1th resource update duration corresponding to the preloaded webpage address is determined, and the i+1th resource update duration is greater than the i thth resource update duration.
  • the webpage resource corresponding to the re-downloaded preloaded webpage address changes relative to the webpage resource corresponding to the stored preloaded webpage address
  • the first to the i-1th resource update durations are added to obtain the preloaded webpage address. The corresponding resource update duration.
  • the i-th resource update duration is T i
  • the terminal downloads the webpage resource corresponding to the preloaded webpage address for the first time, and the preset first resource update duration is 10 minutes. After 10 minutes, the terminal re-downloads the webpage resources corresponding to the preloaded webpage address. The webpage resource corresponding to the reloaded preloaded webpage address does not change with respect to the webpage resource corresponding to the stored preloaded webpage address, and the terminal determines that the second resource update duration is 20 minutes. After 20 minutes, the terminal re-downloads the webpage resources corresponding to the preloaded webpage address. The webpage resource corresponding to the reloaded preloaded webpage address does not change with respect to the webpage resource corresponding to the stored preloaded webpage address, and the terminal determines that the third resource update duration is 40 minutes.
  • the terminal After 40 minutes, the terminal re-downloads the webpage resources corresponding to the preloaded webpage address.
  • the webpage resource corresponding to the re-downloaded preloaded webpage address changes with respect to the webpage resource corresponding to the stored preloaded webpage address, and the value of i is 3 at this time.
  • the terminal adds the first resource update duration and the second resource update duration, and the resource update duration corresponding to the preloaded webpage address is 30 minutes.
  • Step d If the change has occurred, determine the i+1th resource update duration corresponding to the preloaded webpage address, and the i+1th resource update duration is less than the ith resource update duration.
  • the time length of the i-th resource update is determined as the resource update duration corresponding to the pre-loaded webpage address, when the webpage resource corresponding to the re-downloaded pre-loaded webpage address does not change with respect to the webpage resource corresponding to the stored pre-loaded webpage address.
  • the i-th resource update duration is T i
  • the terminal downloads the webpage resource corresponding to the preloaded webpage address for the first time, and the preset first resource update duration is 10 minutes. After 10 minutes, the terminal re-downloads the webpage resources corresponding to the preloaded webpage address. The webpage resource corresponding to the reloaded preloaded webpage address changes with respect to the webpage resource corresponding to the stored preloaded webpage address, and the terminal determines that the second resource update duration is 5 minutes. After 5 minutes, the terminal re-downloads the webpage resources corresponding to the preloaded webpage address. The webpage resource corresponding to the reloaded preloaded webpage address changes with respect to the webpage resource corresponding to the stored preloaded webpage address, and the terminal determines that the third resource update duration is 2.5 minutes.
  • the terminal After 2.5 minutes, the terminal re-downloads the webpage resources corresponding to the preloaded webpage address.
  • the webpage resource corresponding to the re-downloaded preloaded webpage address does not change with respect to the webpage resource corresponding to the stored preloaded webpage address, and the value of i is 3 at this time.
  • the terminal uses the third resource update duration as the resource update duration corresponding to the preloaded webpage address: 2.5 minutes.
  • the terminal can separately determine the resource update duration for each preloaded webpage address, ensure the accuracy of the resource update duration, and ensure that the webpage resources corresponding to the preloaded webpage address are updated in time, and the processing of updating the webpage resource can be saved. Overhead.
  • the webpage resource corresponding to the preloaded webpage address is re-downloaded.
  • the webpage resource corresponding to the pre-loaded webpage address that is re-downloaded is used to update the webpage resource corresponding to the stored pre-loaded webpage address.
  • the terminal After determining the resource update duration corresponding to the preloaded webpage address, the terminal updates the webpage resource corresponding to the stored preloaded webpage address according to the resource update duration. For the changed web resource, the terminal deletes the last downloaded web resource and stores the re-downloaded web resource. For a webpage resource that has not changed, the terminal may delete the webpage resource that was last downloaded, store the re-downloaded webpage resource, or store the webpage resource that was last downloaded.
  • the terminal may perform the step of re-downloading the webpage resource corresponding to the preloaded webpage address in the specified working state, and implement the updating of the webpage resource corresponding to the preloaded webpage address.
  • the specified working state may be an idle state and/or a state of connecting to a free network (such as a free WiFi network), the idle state may be no application running, or only less than a preset number of applications running.
  • the resource update operation is performed when the terminal is idle or connected to the free network, to avoid affecting the normal operation of the terminal, or generating additional traffic charges.
  • the corresponding web resource can be updated according to the resource update duration of the preloaded webpage address, and the webpage resource corresponding to the stored preloaded webpage address is made as the latest webpage resource as much as possible, thereby ensuring the timeliness of the webpage resource.
  • FIG. 4 is a block diagram of an apparatus for acquiring a webpage resource according to an exemplary embodiment.
  • the apparatus has a function of implementing the above-described method examples, and the functions may be implemented by hardware or by hardware to execute corresponding software.
  • the device may include an address obtaining module 401, an address selecting module 402, a resource obtaining module 403, and a resource storing module 404.
  • the address obtaining module 401 is configured to obtain at least one historical webpage address, where the historical webpage address refers to a webpage address that has been visited in a historical period.
  • the address selection module 402 is configured to select a common webpage address from the historical webpage address, where the common webpage address refers to a historical webpage address whose access frequency is greater than a preset frequency in the historical period.
  • the resource obtaining module 403 is configured to download a webpage resource corresponding to the common webpage address.
  • the resource obtaining module 403 is further configured to: crawl the webpage resource corresponding to the at least one target webpage address according to the webpage resource corresponding to the common webpage address.
  • the resource storage module 404 is configured to store a webpage resource corresponding to the preloaded webpage address, where the preloaded webpage address includes the common webpage address and the target webpage address.
  • the device pre-downloads and stores the webpage resource corresponding to the webpage resource corresponding to the common webpage address and the webpage resource that is crawled from the webpage resource corresponding to the common webpage address, so as to enable subsequent receiving.
  • the requested webpage resource can be obtained from the pre-stored webpage resource, and the webpage resource is not required to be downloaded from the network, thereby reducing the time required for acquiring the webpage resource and improving the efficiency of displaying the webpage.
  • the at least one target webpage address includes: a webpage address included in a webpage resource corresponding to the common webpage address; and/or a subordinate of the common webpage address
  • the webpage address included in the webpage resource corresponding to the webpage address, and the subordinate webpage address of the common webpage address refers to the webpage address obtained by crawling according to the common webpage address.
  • the resource obtaining module 403 is configured to: extract a target webpage address included in a webpage resource corresponding to the common webpage address; and download a target webpage address corresponding to the first round of downloading. a webpage resource; extracting a webpage address included in a webpage resource corresponding to the target webpage address extracted in the first round; downloading a webpage resource corresponding to the webpage address extracted in the second round, and so on, until the stored webpage resource Stop downloading when the amount of data is greater than the preset amount of data.
  • the address selection module 402 is configured to: acquire a first access timestamp and a last access timestamp of the historical webpage address in the historical period; Calculating the interval between the first access timestamp and the last access timestamp; calculating the historical webpage address according to the total number of accesses of the historical webpage address in the historical period and the interval duration The access frequency; when the access frequency of the historical webpage address is greater than the preset frequency, the historical webpage address is selected as the common webpage address.
  • the address selection module 402 is further configured to: detect whether the total number of accesses of the historical webpage address in the historical period is greater than a preset number of times; when the historical webpage address is in the history When the total number of accesses in the period is greater than the preset number of times, the step of acquiring the first access timestamp and the last access timestamp of the historical webpage address in the historical period is started.
  • the apparatus further includes: a duration acquisition module 405.
  • the duration acquisition module 405 is configured to obtain a resource update duration corresponding to the preloaded webpage address.
  • the resource obtaining module 403 is further configured to re-download the webpage resource corresponding to the preloaded webpage address when the stored length of the webpage resource corresponding to the preloaded webpage address reaches the resource update duration corresponding to the preloaded webpage address.
  • the resource storage module 404 is further configured to update, by using the re-downloaded webpage resource corresponding to the preloaded webpage address, the webpage resource corresponding to the stored preloaded webpage address.
  • the duration acquisition module 405 is configured to:
  • the webpage resource corresponding to the preloaded webpage address is re-downloaded, wherein the i The initial value is 1, and the first resource update duration is a preset value;
  • the step starts to be executed, and when the re-downloaded webpage resource corresponding to the pre-loaded webpage address does not change relative to the stored webpage resource corresponding to the pre-loaded webpage address, the i-th resource update duration is determined as the pre-predetermined The length of the resource update corresponding to the loaded web page address.
  • the resource storage module 404 is further configured to: obtain a historical access speed corresponding to the preloaded webpage address, where the pre-loaded webpage address corresponds to a historical access speed. And storing the webpage resource corresponding to the webpage resource corresponding to the preloaded webpage address; if the historical access speed corresponding to the preloaded webpage address is less than the preset speed, storing the webpage resource corresponding to the preloaded webpage address; If the historical access speed corresponding to the loaded webpage address is greater than the preset speed, the webpage resource corresponding to the preloaded webpage address is not stored.
  • the apparatus further includes: a webpage display module 406.
  • the webpage display module 406 is configured to: obtain a webpage access request that carries the requested webpage address; and detect whether the pre-loaded webpage address includes the requested webpage address; if the preloaded webpage address includes the requested webpage address, And displaying, according to the stored webpage resource corresponding to the requested webpage address, the webpage corresponding to the requested webpage address.
  • FIG. 6 is a structural block diagram of a terminal 500 provided by an exemplary embodiment of the present application.
  • the terminal 500 can be a portable mobile terminal, such as a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), and a MP4 (Moving Picture Experts Group Audio Layer IV). Image experts compress standard audio layers 4) players, laptops or desktops.
  • Terminal 500 may also be referred to as a user device, a portable terminal, a laptop terminal, a desktop terminal, and the like.
  • the terminal 500 includes a processor 501 and a memory 502.
  • Processor 501 can include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like.
  • the processor 501 may be configured by at least one of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). achieve.
  • the processor 501 may also include a main processor and a coprocessor.
  • the main processor is a processor for processing data in an awake state, which is also called a CPU (Central Processing Unit); the coprocessor is A low-power processor for processing data in standby.
  • the processor 501 can be integrated with a GPU (Graphics Processing Unit) that is responsible for rendering and rendering of the content that the display needs to display.
  • the processor 501 may also include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
  • AI Artificial Intelligence
  • Memory 502 can include one or more computer readable storage media, which can be non-transitory. Memory 502 can also include high speed random access memory, as well as non-volatile memory, such as one or more disk storage devices, flash storage devices. In some embodiments, the non-transitory computer readable storage medium in the memory 502 is configured to store at least one instruction for execution by the processor 501 to implement the web resource provided by the method embodiment of the present application. How to get it.
  • the terminal 500 optionally further includes: a peripheral device interface 503 and at least one peripheral device.
  • the processor 501, the memory 502, and the peripheral device interface 503 can be connected by a bus or a signal line.
  • Each peripheral device can be connected to the peripheral device interface 503 via a bus, signal line or circuit board.
  • the peripheral device includes at least one of a radio frequency circuit 504, a touch display screen 505, a camera 506, an audio circuit 507, a positioning component 508, and a power source 509.
  • Peripheral device interface 503 can be used to connect at least one peripheral device associated with an I/O (Input/Output) to processor 501 and memory 502.
  • processor 501, memory 502, and peripheral interface 503 are integrated on the same chip or circuit board; in some other embodiments, any of processor 501, memory 502, and peripheral interface 503 or The two can be implemented on a separate chip or circuit board, which is not limited in this embodiment.
  • the RF circuit 504 is configured to receive and transmit an RF (Radio Frequency) signal, also referred to as an electromagnetic signal.
  • Radio frequency circuit 504 communicates with the communication network and other communication devices via electromagnetic signals.
  • the RF circuit 504 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal.
  • the radio frequency circuit 504 includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and the like.
  • Radio frequency circuit 504 can communicate with other terminals via at least one wireless communication protocol.
  • the wireless communication protocols include, but are not limited to, the World Wide Web, a metropolitan area network, an intranet, generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (Wireless Fidelity) networks.
  • the RF circuit 504 may also include NFC (Near Field Communication) related circuitry, which is not limited in this application.
  • the display screen 505 is used to display a UI (User Interface).
  • the UI can include graphics, text, icons, video, and any combination thereof.
  • display 505 is a touch display
  • display 505 also has the ability to acquire touch signals over the surface or surface of display 505.
  • the touch signal can be input to the processor 501 as a control signal for processing.
  • display 505 can also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards.
  • the display screen 505 may be one, and the front panel of the terminal 500 is disposed; in other embodiments, the display screen 505 may be at least two, respectively disposed on different surfaces of the terminal 500 or in a folded design; In still other embodiments, display screen 505 can be a flexible display screen disposed on a curved surface or a folded surface of terminal 500. Even the display screen 505 can be set to a non-rectangular irregular pattern, that is, a profiled screen.
  • the display screen 505 can be prepared by using an LCD (Liquid Crystal Display) or an OLED (Organic Light-Emitting Diode).
  • Camera component 506 is used to capture images or video.
  • camera assembly 506 includes a front camera and a rear camera.
  • the front camera is placed on the front panel of the terminal, and the rear camera is placed on the back of the terminal.
  • the rear camera is at least two, which are respectively a main camera, a depth camera, a wide-angle camera, and a telephoto camera, so as to realize the background blur function of the main camera and the depth camera, and the main camera Combine with a wide-angle camera for panoramic shooting and VR (Virtual Reality) shooting or other integrated shooting functions.
  • camera assembly 506 can also include a flash.
  • the flash can be a monochrome temperature flash or a two-color temperature flash.
  • the two-color temperature flash is a combination of a warm flash and a cool flash that can be used for light compensation at different color temperatures.
  • the audio circuit 507 can include a microphone and a speaker.
  • the microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals for processing to the processor 501 for processing or input to the RF circuit 504 for voice communication.
  • the microphone can also be an array microphone or an omnidirectional acquisition microphone.
  • the speaker is then used to convert electrical signals from processor 501 or radio frequency circuit 504 into sound waves.
  • the speaker can be a conventional film speaker or a piezoelectric ceramic speaker.
  • the audio circuit 507 can also include a headphone jack.
  • the location component 508 is used to locate the current geographic location of the terminal 500 to implement navigation or LBS (Location Based Service).
  • the positioning component 508 can be a positioning component based on a US-based GPS (Global Positioning System), a Chinese Beidou system, or a Russian Galileo system.
  • Power source 509 is used to power various components in terminal 500.
  • the power source 509 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery.
  • the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery.
  • a wired rechargeable battery is a battery that is charged by a wired line
  • a wireless rechargeable battery is a battery that is charged by a wireless coil.
  • the rechargeable battery can also be used to support fast charging technology.
  • terminal 500 also includes one or more sensors 510.
  • the one or more sensors 510 include, but are not limited to, an acceleration sensor 511, a gyro sensor 512, a pressure sensor 513, a fingerprint sensor 514, an optical sensor 515, and a proximity sensor 516.
  • the acceleration sensor 511 can detect the magnitude of the acceleration on the three coordinate axes of the coordinate system established by the terminal 500.
  • the acceleration sensor 511 can be used to detect components of gravity acceleration on three coordinate axes.
  • the processor 501 can control the touch display screen 505 to display the user interface in a landscape view or a portrait view according to the gravity acceleration signal collected by the acceleration sensor 511.
  • the acceleration sensor 511 can also be used for the acquisition of game or user motion data.
  • the gyro sensor 512 can detect the body direction and the rotation angle of the terminal 500, and the gyro sensor 512 can cooperate with the acceleration sensor 511 to collect the 3D motion of the user to the terminal 500. Based on the data collected by the gyro sensor 512, the processor 501 can implement functions such as motion sensing (such as changing the UI according to the user's tilting operation), image stabilization at the time of shooting, game control, and inertial navigation.
  • functions such as motion sensing (such as changing the UI according to the user's tilting operation), image stabilization at the time of shooting, game control, and inertial navigation.
  • the pressure sensor 513 may be disposed at a side border of the terminal 500 and/or a lower layer of the touch display screen 505.
  • the pressure sensor 513 When the pressure sensor 513 is disposed on the side frame of the terminal 500, the user's holding signal to the terminal 500 can be detected, and the processor 501 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 513.
  • the operability control on the UI interface is controlled by the processor 501 according to the user's pressure on the touch display screen 505.
  • the operability control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.
  • the fingerprint sensor 514 is used to collect the fingerprint of the user.
  • the processor 501 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 514, or the fingerprint sensor 514 identifies the identity of the user according to the collected fingerprint. Upon identifying that the identity of the user is a trusted identity, the processor 501 authorizes the user to perform related sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying and changing settings, and the like.
  • the fingerprint sensor 514 can be disposed on the front, back, or side of the terminal 500. When the physical button or vendor logo is provided on the terminal 500, the fingerprint sensor 514 can be integrated with the physical button or the manufacturer logo.
  • Optical sensor 515 is used to collect ambient light intensity.
  • the processor 501 can control the display brightness of the touch display 505 based on the ambient light intensity acquired by the optical sensor 515. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 505 is raised; when the ambient light intensity is low, the display brightness of the touch display screen 505 is lowered.
  • the processor 501 can also dynamically adjust the shooting parameters of the camera assembly 506 based on the ambient light intensity acquired by the optical sensor 515.
  • Proximity sensor 516 also referred to as a distance sensor, is typically disposed on the front panel of terminal 500. Proximity sensor 516 is used to collect the distance between the user and the front of terminal 500. In one embodiment, when the proximity sensor 516 detects that the distance between the user and the front side of the terminal 500 is gradually decreasing, the processor 501 controls the touch display screen 505 to switch from the bright screen state to the screen state; when the proximity sensor 516 detects When the distance between the user and the front side of the terminal 500 gradually becomes larger, the processor 501 controls the touch display screen 505 to switch from the state of the screen to the bright state.
  • FIG. 6 does not constitute a limitation to the terminal 500, and may include more or less components than those illustrated, or may combine some components or adopt different component arrangements.
  • a computer readable storage medium having stored therein at least one instruction, when executed by a processor of a terminal, to implement a webpage resource provided by the above embodiment Get the method.
  • the computer readable storage medium described above may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device.
  • a computer program product for implementing the method for obtaining web resources provided in the above embodiments when the computer program product is executed.
  • a plurality as referred to herein means two or more.
  • "and/or” describing the association relationship of the associated objects, indicating that there may be three relationships, for example, A and/or B, which may indicate that there are three cases where A exists separately, A and B exist at the same time, and B exists separately.
  • the character "/" generally indicates that the contextual object is an "or" relationship.

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

一种网页资源的获取方法、装置、终端及存储介质。所述方法包括:获取至少一个历史网页地址(101);从历史网页地址中选取常用网页地址(102);下载常用网页地址对应的网页资源(103);根据常用网页地址对应的网页资源,爬取至少一个目标网页地址对应的网页资源(104);存储预加载网页地址对应的网页资源(105)。通过将预加载网页地址对应的网页资源预先下载存储,以使得后续接收到网页访问请求时,能够从上述预先存储的网页资源中获取所请求的网页资源,不必从网络中请求下载网页资源,减少了获取网页资源的耗时,提高了显示网页的效率。

Description

网页资源的获取方法、装置、终端及存储介质
本申请要求于2017年12月05日提交的申请号为201711270485.6、发明名称为“网页资源的获取方法、装置及终端”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及互联网技术领域,特别涉及一种网页资源的获取方法、装置、终端及存储介质。
背景技术
随着网络技术的发展,上网浏览网页已经成为人们生活中必不可少的一部分。
在相关技术中,用户在终端上浏览网页时,例如用户在手机的应用程序中浏览新闻,用户选取一个网页,则终端显示该网页。而在显示网页前,终端需要先获取该网页的网页资源,才能显示该网页。因此,终端在用户选取一个网页后,根据该网页的统一资源定位符(Uniform Resource Locator,URL)下载该网页的网页资源,而终端根据该URL下载网页资源需要一定的耗时。其中,URL又称为网页地址。
发明内容
本申请实施例提供了一种网页资源的获取方法、装置、终端及存储介质。所述技术方案如下:
第一方面,提供了一种网页资源的获取方法,所述方法包括:
获取至少一个历史网页地址,所述历史网页地址是指在历史周期内访问过的网页地址;
从所述历史网页地址中选取常用网页地址,所述常用网页地址是指在所述历史周期内访问频率大于预设频率的历史网页地址;
下载所述常用网页地址对应的网页资源;
根据所述常用网页地址对应的网页资源,爬取至少一个目标网页地址对应的网页资源;
存储预加载网页地址对应的网页资源,所述预加载网页地址包括所述常用网页地址和所述目标网页地址。
第二方面,提供了一种网页资源的获取装置,所述装置包括:
地址获取模块,用于获取至少一个历史网页地址,所述历史网页地址是指在历史周期内访问过的网页地址;
地址选取模块,用于从所述历史网页地址中选取常用网页地址,所述常用网页地址是指在所述历史周期内访问频率大于预设频率的历史网页地址;
资源获取模块,用于下载所述常用网页地址对应的网页资源;
所述资源获取模块,还用于根据所述常用网页地址对应的网页资源,爬取至少一个目标网页地址对应的网页资源;
资源存储模块,用于存储预加载网页地址对应的网页资源,所述预加载网页地址包括所述常用网页地址和所述目标网页地址。
第三方面,提供了一种终端,所述终端包括处理器和存储器,所述存储器存储有至少一条指令,所述指令由所述处理器加载并执行以实现如上述第一方面所述的网页资源的获取方法。
第四方面,提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有至少一条指令,所述指令由处理器加载并执行以实现如上述第一方面所述的网页资源的获取方法。
第五方面,提供了一种计算机程序产品,当该计算机程序产品被执行时,其用于实现如上述第一方面所述的网页资源的获取方法。
本申请实施例提供的技术方案可以带来如下有益效果:
通过将常用网页地址对应的网页资源和从常用网页地址对应的网页资源中爬取的目标网页地址对应的网页资源预先下载存储,以使得后续接收到网页访问请求时,能够从上述预先存储的网页资源中获取所请求的网页资源,不必从网络中请求下载网页资源,减少了获取网页资源的耗时,提高了显示网页的效率。
附图说明
图1是根据一示例性实施例示出的一种网页资源的获取方法的流程图;
图2是根据一示例性实施例示出的一种网页爬取的示意图;
图3是根据另一示例性实施例示出的一种网页资源的获取方法的流程图;
图4是根据一示例性实施例示出的一种网页资源的获取装置的框图;
图5是根据另一示例性实施例示出的一种网页资源的获取装置的框图;
图6是根据一示例性实施例示出的一种终端的结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
相关技术提供的获取网页资源的方式,终端需要在用户选取网页后,再根据该网页的网页地址去下载网页资源,导致终端在用户选取网页后需要一段时间下载网页资源,从而使得显示网页前的等待时间较长,导致显示网页的效率较低。
本申请实施例提供的技术方案中,通过将常用网页地址对应的网页资源和从常用网页地址对应的网页资源中爬取的目标网页地址对应的网页资源预先下载存储,以使得后续接收到网页访问请求时,能够从上述预先存储的网页资源中获取所请求的网页资源,不必从网络中请求下载网页资源,减少了获取网页资源的耗时,提高了显示网页的效率。
本申请实施例提供的方法,各步骤的执行主体可以是终端。可选地,各步骤的执行主体可以是终端中运行的应用程序。该应用程序是指能够显示网页的应用程序,例如浏览器、新闻应用程序、即时通信软件、社交应用软件和视频播放软件等等。上述终端可以是手机、平板电脑、电子书阅读器、多媒体播放设备、膝上型便携计算机等电子设备。
图1是根据一示例性实施例示出的一种网页资源的获取方法的流程图。该方法可以包括如下几个步骤:
步骤101,获取至少一个历史网页地址。
终端获取至少一个历史网页地址,该历史网页地址是指该终端在历史周期内访问过的网页地址。历史周期是指某一个或多个历史时段。例如,历史周期可以是最近一天、最近一个星期、最近一个月等,又例如历史周期可以是从某一个历史时刻到当前时刻(或另一历史时刻)的历史时段,或者历史周期还可以是多个历史时段,本申请实施例对此不作限定。
可选地,本步骤包括如下几个子步骤:
1、获取历史访问数据,历史访问数据包括至少一条访问记录;
每一条访问记录包括一次网页访问操作对应的网页地址;可选地,每一条访问记录还包括一次网页访问操作对应的时间戳、应用程序、网络类型中的至少一种。
时间戳表示该次访问记录所记录的访问发生的具体时间。例如,在用户浏览网页的记录中,一历史网页地址在历史周期中有2次访问记录,2次访问记录的时间戳表示的时间分别是2017/6/16 13:24:25和2017/6/17 8:29:30。用户分别在2017/6/16 13:24:25和2017/6/17 8:29:30访问了该历史网页地址。
应用程序表示进行该次访问记录所记录的访问的应用程序。
网络类型表示进行该次访问记录所记录的访问时,终端所使用的网络类型,例如,无线局域网(Wireless Local Area Networks,WLAN)、***移动通信技术(The 4th Generation  Mobile Communication,4G)和局域网(Local Area Network,LAN)等等。
示例性地,终端获取的历史访问数据如下表-1所示:
网络类型 应用程序 网页地址 时间戳
4G XX浏览器 www.baid.com 2017/6/16 13:24:25
WLAN XX新闻 www.XXnews.com 2017/6/17 8:29:30
表-1
如表-1所示,用户在2017/6/16 13:24:25使用了XX浏览器通过4G网络访问了网页地址为www.baid.com的网页。
2、获取历史周期内的访问记录。
终端从历史访问数据中获取历史周期内的访问记录。其中,历史周期可以根据实际经验设定,例如设定为历史周期为7天,则终端从历史访问数据中获取7天内访问记录。
3、根据历史周期内的访问记录,确定至少一个历史网页地址。
终端将历史周期内的访问记录中的网页地址确定为历史网页地址,每一个历史网页地址在历史周期内可以有一次或多次访问记录。
步骤102,从历史网页地址中选取常用网页地址。
在获取历史网页地址之后,终端根据历史网页地址在历史周期内的访问频率选取常用网页地址。一个历史网页地址的访问频率用于表示终端使用该历史网页地址访问相应网页的频繁程度。终端选取在历史周期内的访问频率大于预设频率的历史网页地址作为常用网页地址。其中,预设频率可以根据实际经验设定。例如,设定平均每天10次为预设频率,则选取的常用网页地址为访问频率大于平均每天10次的历史网页地址。通过上述方式,终端在历史网页地址中选出用户经常访问的网页地址。可选地,历史网页地址的访问频率可以是平均每天的访问次数,平均每小时的访问次数,在历史周期内的访问总次数,平均每次访问的时间间隔和每天最少访问次数中的任意一种,本申请实施例对此不作限定。
步骤103,下载常用网页地址对应的网页资源。
终端在选取常用网页地址后,根据常用网页地址下载对应的网页资源。网页地址包括了网页资源的资源类型、存放资源的主机域名和资源文件名,终端根据网页地址能够确定对应的网页资源在网络中的位置,从而下载该网页资源。可选地,上述网页地址可以是URL。下载的网页资源包括视频、音频、图片和其它网页的网页地址等等。终端根据网页资源即可显示该网页资源对应的网页。
步骤104,根据常用网页地址对应的网页资源,爬取至少一个目标网页地址对应的网页资源。
其中,上述至少一个目标网页地址包括:常用网页地址对应的网页资源中包含的网页地址;和/或,常用网页地址的下级网页地址对应的网页资源中包含的网页地址。常用网页地址的下级网页地址是指根据常用网页地址爬取得到的网页地址。例如,常用网页地址的下级网页地址可以是从常用网页地址对应的网页资源中爬取得到的网页地址,也可以从上述爬取得到的网页地址对应的网页资源中进一步爬取得到的网页地址。
终端根据已下载的网页资源中包括的网页地址下载该网页地址对应的网页资源,又根据新下载的网页资源中包括的网页地址再下载新下载的网页资源中包括的网页地址对应的网页资源,如此反复,直至已下载的网页资源符合预设条件时停止下载,例如已下载的网页资源的数据量达到了存储容量的上限。上述下载网页资源的过程称为网页爬取。通过上述网页爬取,终端在下载常用网页地址对应的网页资源后,爬取至少一个目标网页地址对应的网页资源。示例性地,常用网页地址A对应的网页资源中包括网页地址B,网页地址B对应的网页资源中包括网页地址C,网页地址C对应的网页资源中包括网页地址D,则网页地址B、网页地址C和网页地址D为根据常用网页地址A爬取到的目标网页地址。
可选地,终端在爬取至少一个目标网页地址对应的网页资源的过程中,先提取常用网页地址对应的网页资源中包含的网页地址,将该网页地址作为第1轮提取的目标网页地址。终 端下载第1轮提取的目标网页地址对应的网页资源,提取该网页资源中包含的网页地址,将该网页地址作为第2轮提取的目标网页地址。终端再下载第2轮提取的目标网页地址对应的网页资源。接下来终端再根据第2轮提取的目标网页地址对应的网页资源,进行第3轮目标网页地址的提取,以此类推,直至已存储的网页资源的数据量大于预设数据量时停止下载。此时,每一轮提取的目标网页地址对应的网页资源即终端爬取的至少一个目标网页地址对应的网页资源。示例性地,如图2所示,网页地址A为常用网页地址,终端先下载网页地址A对应的网页资源,网页地址A对应的网页资源中包含网页地址B和网页地址C。网页地址B和网页地址C为第1轮提取的目标网页地址。终端再下载网页地址B对应的网页资源和网页地址C对应的网页资源,网页地址B对应的网页资源中包含网页地址D和网页地址E,网页地址C对应的网页资源中包含网页地址F和网页地址G。网页地址D、网页地址E、网页地址F和网页地址G为第2轮提取的目标网页地址。终端再下载网页地址D、网页地址E、网页地址F和网页地址G分别对应的网页资源。以此类推,直至已存储的网页资源的数据量大于预设数据量,终端停止网页爬取。最终,终端爬取的目标网页地址对应的网页资源为网页地址B、网页地址C网页地址D、网页地址E、网页地址F和网页地址G分别对应的网页资源。
需要说明的是,终端可以在下载完一轮目标网页地址对应的网页资源后停止网页爬取,也可以在下载一轮目标网页地址对应的网页资源过程中停止网页爬取。
另外,上述停止下载的条件“已存储的网页资源的数据量大于预设数据量时”仅是示例性的,在其它可能的实施方式中,停止下载的条件还可以是已下载的目标网页地址的数量大于预设数量、爬取的轮数大于预设轮数、终端下载完一轮目标网页地址对应的网页资源,且终端剩余的存储容量小于预设容量等,本申请实施例对此不作限定。
步骤105,存储预加载网页地址对应的网页资源。
预加载网页地址包括常用网页地址和目标网页地址。终端将下载的常用网页地址对应的网页资源和爬取过程中下载的目标网页地址对应的网页资源进行存储,将其存储至终端的非易失性存储器中,作为预加载网页地址对应的网页资源。例如,将目标网页地址对应的网页资源存储至硬盘中。终端在存储预加载网页地址对应的网页资源的同时,并记录预加载网页地址。此外,终端还记录预加载网页地址与存储的网页资源之间的对应关系。
可选地,上述步骤105之后还包括如下步骤(图1中未示出):
步骤106,获取携带有请求网页地址的网页访问请求。
用户请求显示一个网页时,终端获取到一网页访问请求。该网页访问请求中携带的请求网页地址即用户所打开的网页的网页地址。示例性地,用户使用浏览器浏览网页,在地址输入栏中输入一网页地址,网页访问请求中携带的请求网页地址即用户输入的网页地址。
步骤107,检测预加载网页地址中是否包含请求网页地址。
终端根据记录的预加载网页地址,检测其中是否包含请求网页地址。
步骤108,若预加载网页地址中包含请求网页地址,则根据已存储的请求网页地址对应的网页资源,显示请求网页地址对应的网页。
若终端检测到预加载网页地址中包含请求网页地址,则表示终端已经下载并存储该请求网页地址对应的网页资源。终端直接根据已存储在非易失性存储器中的请求网页地址对应的网页资源,显示请求网页地址的网页,无需再次下载请求网页地址对应的网页资源。
步骤109,若预加载网页地址中不包含请求网页地址,则下载请求网页地址对应的网页资源,以及显示请求网页地址对应的网页。
综上所述,本申请实施例提供的方法,通过将常用网页地址对应的网页资源和从常用网页地址对应的网页资源中爬取的目标网页地址对应的网页资源预先下载存储,以使得后续接收到网页访问请求时,能够从上述预先存储的网页资源中获取所请求的网页资源,不必从网络中请求下载网页资源,减少了获取网页资源的耗时,提高了显示网页的效率。
另外,还通过从常用网页地址对应的网页资源中爬取目标网页地址对应的网页资源,能 够丰富预先存储的网页资源的内容,且符合用户实际浏览网页时的操作习惯,以尽可能地将用户最有可能浏览的网页的网页资源先下载下来,确保预先存储的网页资源的利用率和有效性。
图3是根据另一示例性实施例示出的一种网页资源的获取方法的流程图。该方法可以包括如下几个步骤:
步骤301,获取至少一个历史网页地址。
上述步骤301与图1提供的实施例中步骤101相同,详细介绍请参照图1实施例,本实施例对此不再进行赘述。
步骤302,获取历史网页地址在历史周期内的第一次访问时间戳和最后一次访问时间戳。
终端获取的历史网页地址在历史周期内的第一次访问时间戳,表示用户在历史周期内第一次访问该历史网页地址的时间。终端获取的历史网页地址在历史周期内的最后一次访问时间戳,表示用户在历史周期内最后一次访问该历史网页地址的时间。
可选地,对于每一个历史网页地址,终端获取该历史网页地址在历史周期内的第一次访问时间戳和最后一次访问时间戳。
步骤303,计算第一次访问时间戳和最后一次访问时间戳之间的间隔时长。
终端根据第一次访问时间戳表示的时间和最后一次访问时间戳表示的时间,计算用户在历史周期中第一次访问上述历史网页地址和最后一次访问上述历史网页地址的间隔时长。例如,第一次访问时间戳表示的时间和最后一次访问时间戳表示的时间分别是2017/6/16 13:24:25和2017/6/17 13:24:25,则计算得到的间隔时长为1天。
步骤304,根据历史网页地址在历史周期内的访问总次数和间隔时长,计算历史网页地址的访问频率。
终端在计算出间隔时长后,用历史网页地址在历史周期内的访问总次数除以间隔时长,即可计算出访问频率。示例性地,一历史网页地址在历史周期内的访问总次数和间隔时长分别为10次和2天,则该历史网页地址的访问频率为每天5次。
步骤305,若历史网页地址的访问频率大于预设频率,则选取该历史网页地址作为常用网页地址。
终端选取在历史周期内的访问频率大于预设频率的历史网页地址作为常用网页地址。示例性地,终端获取两个历史网页地址:历史网页地址A和历史网页地址B。历史网页地址A的访问频率为每天5次,历史网页地址B的访问频率为每天3次,而预设频率为每天4次,则终端选取历史网页地址A为常用网页地址。
可选地,在上述步骤302之前,终端还可以先检测历史网页地址在历史周期内的访问总次数是否大于预设次数;若历史网页地址在历史周期内的访问总次数大于预设次数,则执行步骤302;若历史网页地址在历史周期内的访问总次数不大于预设次数,则不执行步骤302,且不选取该历史网页地址作为常用网页地址。由于访问频率是由访问总次数除以间隔时长得到,若一历史网页地址的间隔时长过短,即使访问总次数较少,计算得到的访问频率也会较高。但该历史网页地址在历史周期内的访问总次数较少,并不是用户经常访问的网页地址。终端若选取该历史网页地址为常用网页地址就意味着选取的常用网页地址出现了误差。通过上述先检测访问总次数是否大于预设次数的方式,能够避免出现上述误差,保证选取的常用网页地址的准确性。
步骤306,下载常用网页地址对应的网页资源。
步骤307,根据常用网页地址对应的网页资源,爬取至少一个目标网页地址对应的网页资源。
步骤308,存储预加载网页地址对应的网页资源。
上述步骤306至步骤308与图1提供的实施例中步骤103至步骤105相同,详细介绍请参照图1实施例。本实施例对此不再进行赘述。
可选地,终端获取预加载网页地址对应的历史访问速度。例如,终端获取每一个预加载网页地址各自对应的历史访问速度。预加载网页地址对应的历史访问速度用于指示下载预加载网页地址对应的网页资源的快慢程度。若预加载网页地址对应的历史访问速度小于预设速度,表明下载预加载网页地址对应的网页资源的速度较慢,导致显示网页前的等待时间过长,则终端存储预加载网页地址对应的网页资源;若预加载网页地址对应的历史访问速度大于预设速度,表明下载预加载网页地址对应的网页资源的速度较块,不会导致显示网页前的等待时间过长,则终端不存储预加载网页地址对应的网页资源。通过上述方式,能够有选择性地存储下载较慢的网页地址对应的网页资源。对于下载较快的网页地址对应的网页资源,则终端不进行存储,节省了存储空间。可选地,终端只针对常用网页地址使用上述方式。终端存有常用网页地址的访问记录,该访问记录包括常用网页地址对应的历史访问速度,从而终端能够直接获取常用网页地址对应的历史访问速度。
可选地,在存储预加载网页地址对应的网页资源之后,终端启动重启计时器。当重启计时器计时达到预设时长后。终端删除已存储的预加载网页地址对应的网页资源,再次从步骤301开始执行。其中,预设时长可以根据实际经验或用户需求设定。通过上述方式,终端能够周期性根据用户最新的历史网页地址确定预加载网页地址,并下载、存储预加载网页地址对应的网页资源,保证预加载网页地址对应的网页资源的时效性。
综上所述,本申请实施例提供的方法,通过将常用网页地址对应的网页资源和从常用网页地址对应的网页资源中爬取的目标网页地址对应的网页资源预先下载存储,以使得后续接收到网页访问请求时,能够从上述预先存储的网页资源中获取所请求的网页资源,不必从网络中请求下载网页资源,减少了获取网页资源的耗时,提高了显示网页的效率。
另外,还通过第一次访问时间戳和最后一次访问时间戳之间的间隔时长确定访问频率,从而确定常用网页地址,尽可能的确保选取的常用网页地址是用户经常访问的地址,进一步地确保预先存储的网页资源的利用率和有效性。
上文实施例介绍了预先下载和存储预加载网页地址对应的网页资源的过程。可选地,终端对预加载网页地址对应的网页资源进行周期性地更新。本申请实施例提供的网页资源的获取方法还可以包括如下步骤:
1、获取预加载网页地址对应的资源更新时长。
网页的内容可能随时间发生变化,当网页的内容发生变化时,网页资源也会发生变化。终端为了确保能够显示网页最新的内容,需要对已存储的网页资源进行更新。终端在存储预加载网页地址对应的网页资源后,会获取该预加载网页地址对应的资源更新时长。在进行存储后,终端根据资源更新时长对预加载网页地址对应的网页资源进行更新。
可选地,终端通过如下方式获取预加载网页地址对应的资源更新时长:
步骤a,当预加载网页地址对应的网页资源的已存储时长达到预加载网页地址对应的第i次资源更新时长时,重新下载预加载网页地址对应的网页资源,其中,i的初始值为1,第1次资源更新时长为预先设定的值。
网页资源的已存储时长是指终端上一次下载该网页资源的时刻,到当前时刻的时间间隔。在终端第i次下载预加载网页地址对应的网页资源之后,经过第i次资源更新时长,终端重新下载预加载网页地址对应的网页资源。示例性地,第1次资源更新时长为预先设定为10分钟,则在第1次下载预加载网页地址对应的网页资源之后,经过10分钟,终端重新下载预加载网页地址对应的网页资源。
步骤b,检测重新下载的预加载网页地址对应的网页资源相对于已存储的预加载网页地址对应的网页资源是否发生变化。
步骤c,若未发生变化,则确定预加载网页地址对应的第i+1次资源更新时长,第i+1次资源更新时长大于第i次资源更新时长。
终端在确定第i+1次资源更新时长后,令i=i+1,并再次从步骤a开始执行。直至重新下 载的预加载网页地址对应的网页资源相对于已存储的预加载网页地址对应的网页资源发生变化时,将第1次至第i-1次资源更新时长相加,得到预加载网页地址对应的资源更新时长。
可选地,第i次的资源更新时长为T i,则终端确定第i+1次的资源更新时长T i+1=a×T i,a为大于1的常数,例如a=2。
示例性地,终端第1次下载预加载网页地址对应的网页资源,预先设定的第1次资源更新时长为10分钟。10分钟后,终端重新下载预加载网页地址对应的网页资源。重新下载的预加载网页地址对应的网页资源相对于已存储的预加载网页地址对应的网页资源未发生变化,则终端确定第2次资源更新时长为20分钟。20分钟后,终端重新下载预加载网页地址对应的网页资源。重新下载的预加载网页地址对应的网页资源相对于已存储的预加载网页地址对应的网页资源未发生变化,则终端确定第3次资源更新时长为40分钟。40分钟后,终端重新下载预加载网页地址对应的网页资源。重新下载的预加载网页地址对应的网页资源相对于已存储的预加载网页地址对应的网页资源发生变化,此时i的值为3。终端将第1次资源更新时长和第2次资源更新时长相加,得到预加载网页地址对应的资源更新时长为30分钟。
步骤d、若已发生变化,则确定预加载网页地址对应的第i+1次资源更新时长,第i+1次资源更新时长小于第i次资源更新时长。
终端在确定第i+1次资源更新时长后,令i=i+1,并再次从步骤a开始执行。直至重新下载的预加载网页地址对应的网页资源相对于已存储的预加载网页地址对应的网页资源未发生变化时,将第i次资源更新时长确定为预加载网页地址对应的资源更新时长。
可选地,第i次的资源更新时长为T i,则终端确定第i+1次的资源更新时长T i+1=b×T i,b为下于1且大于0的常数,例如a=0.5。
示例性地,终端第1次下载预加载网页地址对应的网页资源,预先设定的第1次资源更新时长为10分钟。10分钟后,终端重新下载预加载网页地址对应的网页资源。重新下载的预加载网页地址对应的网页资源相对于已存储的预加载网页地址对应的网页资源发生变化,则终端确定第2次资源更新时长为5分钟。5分钟后,终端重新下载预加载网页地址对应的网页资源。重新下载的预加载网页地址对应的网页资源相对于已存储的预加载网页地址对应的网页资源发生变化,则终端确定第3次资源更新时长为2.5分钟。2.5分钟后,终端重新下载预加载网页地址对应的网页资源。重新下载的预加载网页地址对应的网页资源相对于已存储的预加载网页地址对应的网页资源未发生变化,此时i的值为3。终端将第3次资源更新时长作为预加载网页地址对应的资源更新时长:2.5分钟。
通过上述方式,终端能够为每一个预加载网页地址单独确定资源更新时长,确保资源更新时长的准确性,既能保证预加载网页地址对应的网页资源及时得到更新,又能节省更新网页资源的处理开销。
2、当预加载网页地址对应的网页资源的已存储时长达到预加载网页地址对应的资源更新时长时,重新下载预加载网页地址对应的网页资源。
3、采用重新下载的预加载网页地址对应的网页资源,对已存储的预加载网页地址对应的网页资源进行更新。
在确定预加载网页地址对应的资源更新时长后,终端按照资源更新时长对已存储的预加载网页地址对应的网页资源进行更新。对于发生变化的网页资源,终端删除上一次下载的网页资源,存储重新下载的网页资源。对于未发生变化的网页资源,终端可以有删除上一次下载的网页资源,存储重新下载的网页资源,也可以仍存储上一次下载的网页资源。
另外,终端可以在处于指定工作状态下,执行上述重新下载预加载网页地址对应的网页资源的步骤,实现对预加载网页地址对应的网页资源进行更新。其中,指定工作状态可以是空闲状态和/或连接免费网络(如免费WiFi网络)的状态,空闲状态可以是无应用程序运行,或者仅有少于预设数量的应用程序运行。通过上述方式,在终端空闲或连接免费网络时执行资源更新操作,避免影响到终端的正常运行,或者产生额外的流量费用。
通过上述方式,能够根据预加载网页地址的资源更新时长更新对应的网页资源,尽可能 地让存储的预加载网页地址对应的网页资源为最新的网页资源,确保网页资源的时效性。
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。
图4是根据一示例性实施例示出的一种网页资源的获取装置的框图。该装置具有实现上述方法示例的功能,所述功能可以由硬件实现,也可以由硬件执行相应的软件实现。该装置可以包括:地址获取模块401,地址选取模块402,资源获取模块403和资源存储模块404。
地址获取模块401,用于获取至少一个历史网页地址,所述历史网页地址是指在历史周期内访问过的网页地址。
地址选取模块402,用于从所述历史网页地址中选取常用网页地址,所述常用网页地址是指在所述历史周期内访问频率大于预设频率的历史网页地址。
资源获取模块403,用于下载所述常用网页地址对应的网页资源。
所述资源获取模块403,还用于根据所述常用网页地址对应的网页资源,爬取至少一个目标网页地址对应的网页资源。
资源存储模块404,用于存储预加载网页地址对应的网页资源,所述预加载网页地址包括所述常用网页地址和所述目标网页地址。
综上所述,本申请实施例提供的装置,通过将常用网页地址对应的网页资源和从常用网页地址对应的网页资源中爬取的目标网页地址对应的网页资源预先下载存储,以使得后续接收到网页访问请求时,能够从上述预先存储的网页资源中获取所请求的网页资源,不必从网络中请求下载网页资源,减少了获取网页资源的耗时,提高了显示网页的效率。
在基于图4实施例提供的一个可选实施例中,所述至少一个目标网页地址包括:所述常用网页地址对应的网页资源中包含的网页地址;和/或,所述常用网页地址的下级网页地址对应的网页资源中包含的网页地址,所述常用网页地址的下级网页地址是指根据所述常用网页地址爬取得到的网页地址。
在基于图4实施例提供的一个可选实施例中,资源获取模块403,用于:提取所述常用网页地址对应的网页资源中包含的目标网页地址;下载第1轮提取的目标网页地址对应的网页资源;提取所述第1轮提取的目标网页地址对应的网页资源中包含的目标网页地址;下载第2轮提取的目标网页地址对应的网页资源,以此类推,直至已存储的网页资源的数据量大于预设数据量时停止下载。
在基于图4实施例提供的一个可选实施例中,地址选取模块402,用于:获取所述历史网页地址在所述历史周期内的第一次访问时间戳和最后一次访问时间戳;计算所述第一次访问时间戳和所述最后一次访问时间戳之间的间隔时长;根据所述历史网页地址在所述历史周期内的访问总次数和所述间隔时长,计算所述历史网页地址的访问频率;当所述历史网页地址的访问频率大于所述预设频率时,选取所述历史网页地址作为所述常用网页地址。
在本申请的一些实施例中,地址选取模块402,还用于:检测所述历史网页地址在所述历史周期内的访问总次数是否大于预设次数;当所述历史网页地址在所述历史周期内的访问总次数大于所述预设次数时,从所述获取所述历史网页地址在所述历史周期内的第一次访问时间戳和最后一次访问时间戳的步骤开始执行。
在基于图4实施例提供的一个可选实施例中,如图5所示,所述装置还包括:时长获取模块405。
时长获取模块405,用于获取所述预加载网页地址对应的资源更新时长。
资源获取模块403,还用于当所述预加载网页地址对应的网页资源的已存储时长达到所述预加载网页地址对应的资源更新时长时,重新下载所述预加载网页地址对应的网页资源。
资源存储模块404,还用于采用重新下载的所述预加载网页地址对应的网页资源,对已存储的所述预加载网页地址对应的网页资源进行更新。
在本申请的一些实施例中,所述时长获取模块405,用于:
当所述预加载网页地址对应的网页资源的已存储时长达到所述预加载网页地址对应的第i次资源更新时长时,重新下载所述预加载网页地址对应的网页资源,其中,所述i的初始值为1,第1次资源更新时长为预先设定的值;
检测重新下载的所述预加载网页地址对应的网页资源相对于已存储的所述预加载网页地址对应的网页资源是否发生变化;
若未发生变化,则确定所述预加载网页地址对应的第i+1次资源更新时长,所述第i+1次资源更新时长大于所述第i次资源更新时长;令i=i+1,并再次从所述当所述预加载网页地址对应的网页资源的已存储时长达到所述预加载网页地址对应的第i次资源更新时长时,重新下载所述预加载网页地址对应的网页资源的步骤开始执行,直至重新下载的所述预加载网页地址对应的网页资源相对于已存储的所述预加载网页地址对应的网页资源发生变化时,将第1次至第i-1次资源更新时长相加,得到所述预加载网页地址对应的资源更新时长;
若已发生变化,则确定所述预加载网页地址对应的第i+1次资源更新时长,所述第i+1次资源更新时长小于所述第i次资源更新时长;令i=i+1,再次从所述当所述预加载网页地址对应的网页资源的已存储时长达到所述预加载网页地址对应的第i次资源更新时长时,重新下载所述预加载网页地址对应的网页资源的步骤开始执行,直至重新下载的所述预加载网页地址对应的网页资源相对于已存储的所述预加载网页地址对应的网页资源未发生变化时,将第i次资源更新时长确定为所述预加载网页地址对应的资源更新时长。
在基于图4实施例提供的另一个可选实施例中,资源存储模块404,还用于:获取所述预加载网页地址对应的历史访问速度,所述预加载网页地址对应的历史访问速度用于指示下载所述预加载网页地址对应的网页资源的快慢;若所述预加载网页地址对应的历史访问速度小于预设速度,则存储所述预加载网页地址对应的网页资源;若所述预加载网页地址对应的历史访问速度大于所述预设速度,则不存储所述预加载网页地址对应的网页资源。
在基于图4实施例提供的另一个可选实施例中,如图5所示,所述装置还包括:网页显示模块406。
网页显示模块406,用于:获取携带有请求网页地址的网页访问请求;检测所述预加载网页地址中是否包含所述请求网页地址;若所述预加载网页地址中包含所述请求网页地址,则根据已存储的所述请求网页地址对应的网页资源,显示所述请求网页地址对应的网页。
需要说明的是,上述实施例提供的装置在实现其功能时,仅以上述各个功能模块的划分进行举例说明,实际应用中,可以根据实际需要而将上述功能分配由不同的功能模块完成,即将设备的内容结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的装置与方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
图6示出了本申请一个示例性实施例提供的终端500的结构框图。该终端500可以是便携式移动终端,比如:智能手机、平板电脑、MP3播放器(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、笔记本电脑或台式电脑。终端500还可能被称为用户设备、便携式终端、膝上型终端、台式终端等其他名称。
通常,终端500包括有:处理器501和存储器502。
处理器501可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器501可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器501也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central Processing Unit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器 501可以在集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器501还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。
存储器502可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器502还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器502中的非暂态的计算机可读存储介质用于存储至少一个指令,该至少一个指令用于被处理器501所执行以实现本申请中方法实施例提供的网页资源的获取方法。
在一些实施例中,终端500还可选包括有:***设备接口503和至少一个***设备。处理器501、存储器502和***设备接口503之间可以通过总线或信号线相连。各个***设备可以通过总线、信号线或电路板与***设备接口503相连。具体地,***设备包括:射频电路504、触摸显示屏505、摄像头506、音频电路507、定位组件508和电源509中的至少一种。
***设备接口503可被用于将I/O(Input/Output,输入/输出)相关的至少一个***设备连接到处理器501和存储器502。在一些实施例中,处理器501、存储器502和***设备接口503被集成在同一芯片或电路板上;在一些其他实施例中,处理器501、存储器502和***设备接口503中的任意一个或两个可以在单独的芯片或电路板上实现,本实施例对此不加以限定。
射频电路504用于接收和发射RF(Radio Frequency,射频)信号,也称电磁信号。射频电路504通过电磁信号与通信网络以及其他通信设备进行通信。射频电路504将电信号转换为电磁信号进行发送,或者,将接收到的电磁信号转换为电信号。可选地,射频电路504包括:天线***、RF收发器、一个或多个放大器、调谐器、振荡器、数字信号处理器、编解码芯片组、用户身份模块卡等等。射频电路504可以通过至少一种无线通信协议来与其它终端进行通信。该无线通信协议包括但不限于:万维网、城域网、内联网、各代移动通信网络(2G、3G、4G及5G)、无线局域网和/或WiFi(Wireless Fidelity,无线保真)网络。在一些实施例中,射频电路504还可以包括NFC(Near Field Communication,近距离无线通信)有关的电路,本申请对此不加以限定。
显示屏505用于显示UI(User Interface,用户界面)。该UI可以包括图形、文本、图标、视频及其它们的任意组合。当显示屏505是触摸显示屏时,显示屏505还具有采集在显示屏505的表面或表面上方的触摸信号的能力。该触摸信号可以作为控制信号输入至处理器501进行处理。此时,显示屏505还可以用于提供虚拟按钮和/或虚拟键盘,也称软按钮和/或软键盘。在一些实施例中,显示屏505可以为一个,设置终端500的前面板;在另一些实施例中,显示屏505可以为至少两个,分别设置在终端500的不同表面或呈折叠设计;在再一些实施例中,显示屏505可以是柔性显示屏,设置在终端500的弯曲表面上或折叠面上。甚至,显示屏505还可以设置成非矩形的不规则图形,也即异形屏。显示屏505可以采用LCD(Liquid Crystal Display,液晶显示屏)、OLED(Organic Light-Emitting Diode,有机发光二极管)等材质制备。
摄像头组件506用于采集图像或视频。可选地,摄像头组件506包括前置摄像头和后置摄像头。通常,前置摄像头设置在终端的前面板,后置摄像头设置在终端的背面。在一些实施例中,后置摄像头为至少两个,分别为主摄像头、景深摄像头、广角摄像头、长焦摄像头中的任意一种,以实现主摄像头和景深摄像头融合实现背景虚化功能、主摄像头和广角摄像头融合实现全景拍摄以及VR(Virtual Reality,虚拟现实)拍摄功能或者其它融合拍摄功能。在一些实施例中,摄像头组件506还可以包括闪光灯。闪光灯可以是单色温闪光灯,也可以是双色温闪光灯。双色温闪光灯是指暖光闪光灯和冷光闪光灯的组合,可以用于不同色温下的光线补偿。
音频电路507可以包括麦克风和扬声器。麦克风用于采集用户及环境的声波,并将声波 转换为电信号输入至处理器501进行处理,或者输入至射频电路504以实现语音通信。出于立体声采集或降噪的目的,麦克风可以为多个,分别设置在终端500的不同部位。麦克风还可以是阵列麦克风或全向采集型麦克风。扬声器则用于将来自处理器501或射频电路504的电信号转换为声波。扬声器可以是传统的薄膜扬声器,也可以是压电陶瓷扬声器。当扬声器是压电陶瓷扬声器时,不仅可以将电信号转换为人类可听见的声波,也可以将电信号转换为人类听不见的声波以进行测距等用途。在一些实施例中,音频电路507还可以包括耳机插孔。
定位组件508用于定位终端500的当前地理位置,以实现导航或LBS(Location Based Service,基于位置的服务)。定位组件508可以是基于美国的GPS(Global Positioning System,全球定位***)、中国的北斗***或俄罗斯的伽利略***的定位组件。
电源509用于为终端500中的各个组件进行供电。电源509可以是交流电、直流电、一次性电池或可充电电池。当电源509包括可充电电池时,该可充电电池可以是有线充电电池或无线充电电池。有线充电电池是通过有线线路充电的电池,无线充电电池是通过无线线圈充电的电池。该可充电电池还可以用于支持快充技术。
在一些实施例中,终端500还包括有一个或多个传感器510。该一个或多个传感器510包括但不限于:加速度传感器511、陀螺仪传感器512、压力传感器513、指纹传感器514、光学传感器515以及接近传感器516。
加速度传感器511可以检测以终端500建立的坐标系的三个坐标轴上的加速度大小。比如,加速度传感器511可以用于检测重力加速度在三个坐标轴上的分量。处理器501可以根据加速度传感器511采集的重力加速度信号,控制触摸显示屏505以横向视图或纵向视图进行用户界面的显示。加速度传感器511还可以用于游戏或者用户的运动数据的采集。
陀螺仪传感器512可以检测终端500的机体方向及转动角度,陀螺仪传感器512可以与加速度传感器511协同采集用户对终端500的3D动作。处理器501根据陀螺仪传感器512采集的数据,可以实现如下功能:动作感应(比如根据用户的倾斜操作来改变UI)、拍摄时的图像稳定、游戏控制以及惯性导航。
压力传感器513可以设置在终端500的侧边框和/或触摸显示屏505的下层。当压力传感器513设置在终端500的侧边框时,可以检测用户对终端500的握持信号,由处理器501根据压力传感器513采集的握持信号进行左右手识别或快捷操作。当压力传感器513设置在触摸显示屏505的下层时,由处理器501根据用户对触摸显示屏505的压力操作,实现对UI界面上的可操作性控件进行控制。可操作性控件包括按钮控件、滚动条控件、图标控件、菜单控件中的至少一种。
指纹传感器514用于采集用户的指纹,由处理器501根据指纹传感器514采集到的指纹识别用户的身份,或者,由指纹传感器514根据采集到的指纹识别用户的身份。在识别出用户的身份为可信身份时,由处理器501授权该用户执行相关的敏感操作,该敏感操作包括解锁屏幕、查看加密信息、下载软件、支付及更改设置等。指纹传感器514可以被设置终端500的正面、背面或侧面。当终端500上设置有物理按键或厂商Logo时,指纹传感器514可以与物理按键或厂商Logo集成在一起。
光学传感器515用于采集环境光强度。在一个实施例中,处理器501可以根据光学传感器515采集的环境光强度,控制触摸显示屏505的显示亮度。具体地,当环境光强度较高时,调高触摸显示屏505的显示亮度;当环境光强度较低时,调低触摸显示屏505的显示亮度。在另一个实施例中,处理器501还可以根据光学传感器515采集的环境光强度,动态调整摄像头组件506的拍摄参数。
接近传感器516,也称距离传感器,通常设置在终端500的前面板。接近传感器516用于采集用户与终端500的正面之间的距离。在一个实施例中,当接近传感器516检测到用户与终端500的正面之间的距离逐渐变小时,由处理器501控制触摸显示屏505从亮屏状态切换为息屏状态;当接近传感器516检测到用户与终端500的正面之间的距离逐渐变大时,由处理器501控制触摸显示屏505从息屏状态切换为亮屏状态。
本领域技术人员可以理解,图6中示出的结构并不构成对终端500的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。
在示例性实施例中,还提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令,所述指令在被终端的处理器执行时以实现上述实施例提供的网页资源的获取方法。可选地,上述计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。
在示例性实施例中,还提供了一种计算机程序产品,当该计算机程序产品被执行时,其用于实现上述实施例中提供的网页资源的获取方法。
应当理解的是,在本文中提及的“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
以上所述仅为本申请的示例性实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种网页资源的获取方法,其特征在于,所述方法包括:
    获取至少一个历史网页地址,所述历史网页地址是指在历史周期内访问过的网页地址;
    从所述历史网页地址中选取常用网页地址,所述常用网页地址是指在所述历史周期内访问频率大于预设频率的历史网页地址;
    下载所述常用网页地址对应的网页资源;
    根据所述常用网页地址对应的网页资源,爬取至少一个目标网页地址对应的网页资源;
    存储预加载网页地址对应的网页资源,所述预加载网页地址包括所述常用网页地址和所述目标网页地址。
  2. 根据权利要求1所述的方法,其特征在于,所述至少一个目标网页地址包括:
    所述常用网页地址对应的网页资源中包含的网页地址;
    和/或,
    所述常用网页地址的下级网页地址对应的网页资源中包含的网页地址,所述常用网页地址的下级网页地址是指根据所述常用网页地址爬取得到的网页地址。
  3. 根据权利要求1所述的方法,其特征在于,所述根据所述常用网页地址对应的网页资源,爬取至少一个目标网页地址对应的网页资源,包括:
    提取所述常用网页地址对应的网页资源中包含的目标网页地址;
    下载第1轮提取的目标网页地址对应的网页资源;
    提取所述第1轮提取的目标网页地址对应的网页资源中包含的目标网页地址;
    下载第2轮提取的目标网页地址对应的网页资源,以此类推,直至已存储的网页资源的数据量大于预设数据量时停止下载。
  4. 根据权利要求1所述的方法,其特征在于,所述从所述历史网页地址中选取常用网页地址,包括:
    获取所述历史网页地址在所述历史周期内的第一次访问时间戳和最后一次访问时间戳;
    计算所述第一次访问时间戳和所述最后一次访问时间戳之间的间隔时长;
    根据所述历史网页地址在所述历史周期内的访问总次数和所述间隔时长,计算所述历史网页地址的访问频率;
    若所述历史网页地址的访问频率大于所述预设频率,则选取所述历史网页地址作为所述常用网页地址。
  5. 根据权利要求4所述的方法,其特征在于,所述获取所述历史网页地址在所述历史周期内的第一次访问时间戳和最后一次访问时间戳之前,还包括:
    检测所述历史网页地址在所述历史周期内的访问总次数是否大于预设次数;
    若所述历史网页地址在所述历史周期内的访问总次数大于所述预设次数,则从所述获取所述历史网页地址在所述历史周期内的第一次访问时间戳和最后一次访问时间戳的步骤开始执行。
  6. 根据权利要求1所述的方法,其特征在于,所述存储预加载网页地址对应的网页资源之后,还包括:
    获取所述预加载网页地址对应的资源更新时长;
    当所述预加载网页地址对应的网页资源的已存储时长达到所述预加载网页地址对应的资源更新时长时,重新下载所述预加载网页地址对应的网页资源;
    采用重新下载的所述预加载网页地址对应的网页资源,对已存储的所述预加载网页地址 对应的网页资源进行更新。
  7. 根据权利要求6所述的方法,其特征在于,所述获取所述预加载网页地址对应的资源更新时长,包括:
    当所述预加载网页地址对应的网页资源的已存储时长达到所述预加载网页地址对应的第i次资源更新时长时,重新下载所述预加载网页地址对应的网页资源,其中,所述i的初始值为1,第1次资源更新时长为预先设定的值;
    检测重新下载的所述预加载网页地址对应的网页资源相对于已存储的所述预加载网页地址对应的网页资源是否发生变化;
    若未发生变化,则确定所述预加载网页地址对应的第i+1次资源更新时长,所述第i+1次资源更新时长大于所述第i次资源更新时长;令i=i+1,并再次从所述当所述预加载网页地址对应的网页资源的已存储时长达到所述预加载网页地址对应的第i次资源更新时长时,重新下载所述预加载网页地址对应的网页资源的步骤开始执行,直至重新下载的所述预加载网页地址对应的网页资源相对于已存储的所述预加载网页地址对应的网页资源发生变化时,将第1次至第i-1次资源更新时长相加,得到所述预加载网页地址对应的资源更新时长;
    若已发生变化,则确定所述预加载网页地址对应的第i+1次资源更新时长,所述第i+1次资源更新时长小于所述第i次资源更新时长;令i=i+1,再次从所述当所述预加载网页地址对应的网页资源的已存储时长达到所述预加载网页地址对应的第i次资源更新时长时,重新下载所述预加载网页地址对应的网页资源的步骤开始执行,直至重新下载的所述预加载网页地址对应的网页资源相对于已存储的所述预加载网页地址对应的网页资源未发生变化时,将第i次资源更新时长确定为所述预加载网页地址对应的资源更新时长。
  8. 根据权利要求1至7任一项所述的方法,其特征在于,所述方法还包括:
    获取所述预加载网页地址对应的历史访问速度,所述预加载网页地址对应的历史访问速度用于指示下载所述预加载网页地址对应的网页资源的快慢;
    若所述预加载网页地址对应的历史访问速度小于预设速度,则存储所述预加载网页地址对应的网页资源;
    若所述预加载网页地址对应的历史访问速度大于所述预设速度,则不存储所述预加载网页地址对应的网页资源。
  9. 根据权利要求1至7任一项所述的方法,其特征在于,所述存储预加载网页地址对应的网页资源之后,还包括:
    获取携带有请求网页地址的网页访问请求;
    检测所述预加载网页地址中是否包含所述请求网页地址;
    若所述预加载网页地址中包含所述请求网页地址,则根据已存储的所述请求网页地址对应的网页资源,显示所述请求网页地址对应的网页。
  10. 一种网页资源的获取装置,其特征在于,所述装置包括:
    地址获取模块,用于获取至少一个历史网页地址,所述历史网页地址是指在历史周期内访问过的网页地址;
    地址选取模块,用于从所述历史网页地址中选取常用网页地址,所述常用网页地址是指在所述历史周期内访问频率大于预设频率的历史网页地址;
    资源获取模块,用于下载所述常用网页地址对应的网页资源;
    所述资源获取模块,还用于根据所述常用网页地址对应的网页资源,爬取至少一个目标网页地址对应的网页资源;
    资源存储模块,用于存储预加载网页地址对应的网页资源,所述预加载网页地址包括所述常用网页地址和所述目标网页地址。
  11. 根据权利要求10所述的装置,其特征在于,所述至少一个目标网页地址包括:
    所述常用网页地址对应的网页资源中包含的网页地址;
    和/或,
    所述常用网页地址的下级网页地址对应的网页资源中包含的网页地址,所述常用网页地址的下级网页地址是指根据所述常用网页地址爬取得到的网页地址。
  12. 根据权利要求10所述的装置,其特征在于,所述资源获取模块,用于:
    提取所述常用网页地址对应的网页资源中包含的目标网页地址;
    下载第1轮提取的目标网页地址对应的网页资源;
    提取所述第1轮提取的目标网页地址对应的网页资源中包含的目标网页地址;
    下载第2轮提取的目标网页地址对应的网页资源,以此类推,直至已存储的网页资源的数据量大于预设数据量时停止下载。
  13. 根据权利要求10所述的装置,其特征在于,所述地址选取模块,用于:
    获取所述历史网页地址在所述历史周期内的第一次访问时间戳和最后一次访问时间戳;
    计算所述第一次访问时间戳和所述最后一次访问时间戳之间的间隔时长;
    根据所述历史网页地址在所述历史周期内的访问总次数和所述间隔时长,计算所述历史网页地址的访问频率;
    当所述历史网页地址的访问频率大于所述预设频率时,选取所述历史网页地址作为所述常用网页地址。
  14. 根据权利要求13所述的装置,其特征在于,所述地址选取模块,还用于:
    检测所述历史网页地址在所述历史周期内的访问总次数是否大于预设次数;
    当所述历史网页地址在所述历史周期内的访问总次数大于所述预设次数时,从所述获取所述历史网页地址在所述历史周期内的第一次访问时间戳和最后一次访问时间戳的步骤开始执行。
  15. 根据权利要求10所述的装置,其特征在于,所述装置还包括:
    时长获取模块,用于获取所述预加载网页地址对应的资源更新时长;
    所述资源获取模块,还用于当所述预加载网页地址对应的网页资源的已存储时长达到所述预加载网页地址对应的资源更新时长时,重新下载所述预加载网页地址对应的网页资源;
    所述资源存储模块,还用于采用重新下载的所述预加载网页地址对应的网页资源,对已存储的所述预加载网页地址对应的网页资源进行更新。
  16. 根据权利要求15所述的装置,其特征在于,所述时长获取模块,用于:
    当所述预加载网页地址对应的网页资源的已存储时长达到所述预加载网页地址对应的第i次资源更新时长时,重新下载所述预加载网页地址对应的网页资源,其中,所述i的初始值为1,第1次资源更新时长为预先设定的值;
    检测重新下载的所述预加载网页地址对应的网页资源相对于已存储的所述预加载网页地址对应的网页资源是否发生变化;
    若未发生变化,则确定所述预加载网页地址对应的第i+1次资源更新时长,所述第i+1次资源更新时长大于所述第i次资源更新时长;令i=i+1,并再次从所述当所述预加载网页地址对应的网页资源的已存储时长达到所述预加载网页地址对应的第i次资源更新时长时,重新下载所述预加载网页地址对应的网页资源的步骤开始执行,直至重新下载的所述预加载网页地址对应的网页资源相对于已存储的所述预加载网页地址对应的网页资源发生变化时,将第1次至第i-1次资源更新时长相加,得到所述预加载网页地址对应的资源更新时长;
    若已发生变化,则确定所述预加载网页地址对应的第i+1次资源更新时长,所述第i+1次资源更新时长小于所述第i次资源更新时长;令i=i+1,再次从所述当所述预加载网页地址对应的网页资源的已存储时长达到所述预加载网页地址对应的第i次资源更新时长时,重新下载所述预加载网页地址对应的网页资源的步骤开始执行,直至重新下载的所述预加载网页地址对应的网页资源相对于已存储的所述预加载网页地址对应的网页资源未发生变化时,将第i次资源更新时长确定为所述预加载网页地址对应的资源更新时长。
  17. 根据权利要求10至16任一项所述的装置,其特征在于,所述资源存储模块,还用于:
    获取所述预加载网页地址对应的历史访问速度,所述预加载网页地址对应的历史访问速度用于指示下载所述预加载网页地址对应的网页资源的快慢;
    若所述预加载网页地址对应的历史访问速度小于预设速度,则存储所述预加载网页地址对应的网页资源;
    若所述预加载网页地址对应的历史访问速度大于所述预设速度,则不存储所述预加载网页地址对应的网页资源。
  18. 根据权利要求10至16任一项所述的装置,其特征在于,所述装置还包括:网页显示模块,用于:
    获取携带有请求网页地址的网页访问请求;
    检测所述预加载网页地址中是否包含所述请求网页地址;
    若所述预加载网页地址中包含所述请求网页地址,则根据已存储的所述请求网页地址对应的网页资源,显示所述请求网页地址对应的网页。
  19. 一种终端,其特征在于,所述终端包括处理器和存储器,所述存储器存储有至少一条指令,所述指令由所述处理器加载并执行以实现如权利要求1至9任一项所述的网页资源的获取方法。
  20. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有至少一条指令,所述指令由处理器加载并执行以实现如权利要求1至9任一项所述的网页资源的获取方法。
PCT/CN2018/116224 2017-12-05 2018-11-19 网页资源的获取方法、装置、终端及存储介质 WO2019109797A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711270485.6 2017-12-05
CN201711270485.6A CN109948087B (zh) 2017-12-05 2017-12-05 网页资源的获取方法、装置及终端

Publications (1)

Publication Number Publication Date
WO2019109797A1 true WO2019109797A1 (zh) 2019-06-13

Family

ID=66750775

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/116224 WO2019109797A1 (zh) 2017-12-05 2018-11-19 网页资源的获取方法、装置、终端及存储介质

Country Status (2)

Country Link
CN (1) CN109948087B (zh)
WO (1) WO2019109797A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110458360A (zh) * 2019-08-13 2019-11-15 腾讯科技(深圳)有限公司 热门资源的预测方法、装置、设备及存储介质
CN111030936A (zh) * 2019-11-18 2020-04-17 腾讯云计算(北京)有限责任公司 网络访问的限流控制方法、装置及计算机可读存储介质
CN112148395A (zh) * 2019-06-26 2020-12-29 杭州萤石软件有限公司 页面显示方法、装置、设备及存储介质
US11362869B2 (en) * 2018-07-31 2022-06-14 Telefonaktiebolaget Lm Ericsson (Publ) Method, transmitter, structure, transceiver and access point for provision of multi-carrier on-off keying signal
CN115329179A (zh) * 2022-10-14 2022-11-11 卡奥斯工业智能研究院(青岛)有限公司 数据采集资源量控制方法、装置、设备及存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110968815B (zh) * 2019-12-04 2023-06-20 北京达佳互联信息技术有限公司 页面刷新方法、装置、终端及存储介质
CN114896542A (zh) * 2022-05-31 2022-08-12 北京字节跳动网络技术有限公司 页面资源预取方法、装置、介质及电子设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130018866A1 (en) * 2011-07-15 2013-01-17 International Business Machines Corporation System for searching for a web document
CN103544320A (zh) * 2013-11-05 2014-01-29 从兴技术有限公司 一种网页生成方法及装置
CN104794165A (zh) * 2015-03-26 2015-07-22 百度在线网络技术(北京)有限公司 一种页面展现方法、装置及***
CN105956152A (zh) * 2016-05-13 2016-09-21 北京金山安全软件有限公司 一种加载网页的方法、装置及电子设备

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101329674A (zh) * 2007-06-18 2008-12-24 北京搜狗科技发展有限公司 一种提供个性化搜索的***和方法
CN101369284B (zh) * 2008-09-28 2010-12-22 北京搜狗科技发展有限公司 一种加载网页的方法及装置
CN101996193B (zh) * 2009-08-21 2016-08-24 北京搜狗科技发展有限公司 一种展现网络资源链接的处理方法、***及互联网终端
CN101882162B (zh) * 2010-06-29 2016-05-11 北京搜狗科技发展有限公司 一种网络信息推送方法及***
CN102402518A (zh) * 2010-09-09 2012-04-04 ***通信有限公司 一种访问网页的方法及装置
CN102567521B (zh) * 2011-12-29 2013-08-07 维构(上海)文化传媒有限公司 网页数据抓取过滤方法
CN102591963A (zh) * 2011-12-30 2012-07-18 奇智软件(北京)有限公司 网页内容加载控制方法及装置
CN102737116B (zh) * 2012-05-29 2016-04-13 深圳市同洲电子股份有限公司 一种网页资源保存方法和装置
CN102752288B (zh) * 2012-06-06 2015-07-08 华为技术有限公司 网络访问行为识别方法和装置
CN104036160B (zh) * 2013-03-07 2019-03-15 腾讯科技(深圳)有限公司 一种网页浏览方法、装置及浏览器
CN103281303A (zh) * 2013-04-28 2013-09-04 乐视网信息技术(北京)股份有限公司 一种获取数据的方法和设备
CN105095226B (zh) * 2014-04-25 2019-08-02 广州市动景计算机科技有限公司 网页资源加载方法及装置
CN104753922A (zh) * 2015-03-10 2015-07-01 百度在线网络技术(北京)有限公司 用于预加载的方法、服务端、客户端及***
CN105955766B (zh) * 2016-04-22 2019-08-30 北京小米移动软件有限公司 应用预加载方法及装置
CN106294609B (zh) * 2016-07-29 2020-06-19 北京小米移动软件有限公司 页面加载方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130018866A1 (en) * 2011-07-15 2013-01-17 International Business Machines Corporation System for searching for a web document
CN103544320A (zh) * 2013-11-05 2014-01-29 从兴技术有限公司 一种网页生成方法及装置
CN104794165A (zh) * 2015-03-26 2015-07-22 百度在线网络技术(北京)有限公司 一种页面展现方法、装置及***
CN105956152A (zh) * 2016-05-13 2016-09-21 北京金山安全软件有限公司 一种加载网页的方法、装置及电子设备

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11362869B2 (en) * 2018-07-31 2022-06-14 Telefonaktiebolaget Lm Ericsson (Publ) Method, transmitter, structure, transceiver and access point for provision of multi-carrier on-off keying signal
US11750425B2 (en) 2018-07-31 2023-09-05 Telefonaktiebolaget Lm Ericsson (Publ) Method, transmitter, structure, transceiver and access point for provision of multi-carrier on-off keying signal
CN112148395A (zh) * 2019-06-26 2020-12-29 杭州萤石软件有限公司 页面显示方法、装置、设备及存储介质
CN110458360A (zh) * 2019-08-13 2019-11-15 腾讯科技(深圳)有限公司 热门资源的预测方法、装置、设备及存储介质
CN110458360B (zh) * 2019-08-13 2023-07-18 腾讯科技(深圳)有限公司 热门资源的预测方法、装置、设备及存储介质
CN111030936A (zh) * 2019-11-18 2020-04-17 腾讯云计算(北京)有限责任公司 网络访问的限流控制方法、装置及计算机可读存储介质
CN111030936B (zh) * 2019-11-18 2023-04-07 腾讯云计算(北京)有限责任公司 网络访问的限流控制方法、装置及计算机可读存储介质
CN115329179A (zh) * 2022-10-14 2022-11-11 卡奥斯工业智能研究院(青岛)有限公司 数据采集资源量控制方法、装置、设备及存储介质
CN115329179B (zh) * 2022-10-14 2023-04-28 卡奥斯工业智能研究院(青岛)有限公司 数据采集资源量控制方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN109948087A (zh) 2019-06-28
CN109948087B (zh) 2021-11-16

Similar Documents

Publication Publication Date Title
WO2019109797A1 (zh) 网页资源的获取方法、装置、终端及存储介质
CN110674022B (zh) 行为数据获取方法、装置及存储介质
CN109977333B (zh) 网页显示方法、装置、计算机设备及存储介质
US20220159323A1 (en) Method for pre-loading content data, and electronic device
CN110110263B (zh) 网页显示方法、装置、终端及存储介质
WO2019179237A1 (zh) 获取实景电子地图的方法、装置、设备和存储介质
WO2019105393A1 (zh) 网页内容的处理方法、装置、浏览器、设备及存储介质
KR20180005695A (ko) 정보 획득 방법 및 디바이스
CN110147503B (zh) 信息发布方法、装置、计算机设备和存储介质
CN112257006A (zh) 页面信息的配置方法、装置、设备及计算机可读存储介质
WO2020253129A1 (zh) 歌曲显示方法、装置、设备及存储介质
CN108038232B (zh) 网页编辑方法、装置和***、存储介质
CN110825465B (zh) 日志数据处理方法、装置、电子设备及存储介质
CN111159551B (zh) 用户生成内容的显示方法、装置及计算机设备
CN111597797A (zh) 社交圈消息的编辑方法、装置、设备及介质
CN111682983A (zh) 界面显示方法、装置、终端及服务器
CN111241451A (zh) 网页处理方法、装置、计算机设备及存储介质
CN111158780B (zh) 存储应用数据的方法、装置、电子设备及介质
WO2022127200A1 (zh) 内容显示方法及装置
CN112597417B (zh) 页面更新方法、装置、电子设备及存储介质
CN110390065B (zh) 网页获取方法、装置及***
CN111142726B (zh) 图像显示方法及电子设备
CN111191254B (zh) 访问校验方法、装置、计算机设备及存储介质
CN113836426A (zh) 一种信息推送的方法、装置及电子设备
CN113378085B (zh) 页面加载方法、装置、终端及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18886778

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18886778

Country of ref document: EP

Kind code of ref document: A1