CN109948090B - Webpage loading method and device - Google Patents

Webpage loading method and device Download PDF

Info

Publication number
CN109948090B
CN109948090B CN201910175753.9A CN201910175753A CN109948090B CN 109948090 B CN109948090 B CN 109948090B CN 201910175753 A CN201910175753 A CN 201910175753A CN 109948090 B CN109948090 B CN 109948090B
Authority
CN
China
Prior art keywords
text data
terminal
access request
keywords
template page
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.)
Active
Application number
CN201910175753.9A
Other languages
Chinese (zh)
Other versions
CN109948090A (en
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.)
Shenzhen Yayue Technology Co ltd
Original Assignee
Shenzhen Yayue 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 Shenzhen Yayue Technology Co ltd filed Critical Shenzhen Yayue Technology Co ltd
Priority to CN201910175753.9A priority Critical patent/CN109948090B/en
Publication of CN109948090A publication Critical patent/CN109948090A/en
Application granted granted Critical
Publication of CN109948090B publication Critical patent/CN109948090B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to the technical field of computers, in particular to a webpage loading method, which takes all information streams in a terminal screen window as target information streams when a user stops sliding on a terminal screen, caches text data corresponding to the target information streams, reads text data corresponding to an access request stored in the terminal when the webpage access request for accessing the target information streams is detected, determines a template page matched with the text data, and loads a webpage according to the read text data and the template page, thereby achieving the effect of improving the webpage loading speed. The invention also provides a webpage loading device.

Description

Webpage loading method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for loading a web page.
Background
In terms of webpage production and the like, in order to achieve a richer presentation effect, webpage designs mostly comprise various webpage elements such as characters, images, audio and video, files are large due to the diversification of the webpage elements, when a browser loads a webpage, the time for acquiring the webpage elements from a server is very long, and accordingly the presentation time of the webpage elements in the browser is prolonged.
In order to improve the loading speed of the webpage, the information classes APP (Application) such as daily flash report and the like can buffer the text page after the Feeds item clicks to open the Web text page for the first time, so that the effect of directly reading and buffering the same item after opening the same item again and improving the speed of opening the text page is achieved. However, the user has no acceleration effect when opening the Web text page for the first time, and only has the cache acceleration effect when clicking for the second time, but the probability that the user accesses the same Web text page again is very low; the text content caching process is only executed after clicking the text, and the speed optimization effect is not obvious.
Disclosure of Invention
Aiming at the problems in the prior art, the invention aims to provide a webpage loading method and device, which can improve webpage loading speed and shorten user waiting time.
In one aspect, the present invention provides a method for loading a web page, including:
determining a target information stream, acquiring text data corresponding to the target information stream, and storing the text data in the terminal, wherein the target information stream is all information streams in a terminal screen window when a user stops sliding on a terminal screen;
when a webpage access request for accessing the target information stream is detected, reading text data stored in the terminal and corresponding to the access request;
Determining a template page matched with the text data;
and loading a webpage according to the read text data and the template page.
In another aspect, the present invention provides a web page loading device, including:
the storage unit is used for determining a target information stream, acquiring text data corresponding to the target information stream, and storing the text data in the terminal, wherein the target information stream is all information streams in a terminal screen window when a user stops sliding on the terminal screen;
the acquisition unit is used for reading text data corresponding to the access request stored in the terminal when the webpage access request for accessing the target information stream is detected;
a determining unit for determining a template page matched with the text data;
and the loading unit is used for loading the webpage according to the read text data and the template page.
Due to the technical scheme, the invention has the following beneficial effects:
the invention provides a webpage loading scheme, which realizes the caching of text data in an information flow sliding scene of a terminal through the integrated data caching of the terminal and the Web, reads the cached data on the Web page, and can rapidly load the page by utilizing the cached data when a user opens an information flow item for the first time, thereby improving the webpage loading speed. After the text content is cached, the problems of long text page loading time and long white screen can be avoided even if the information flow entry is opened under the weak network condition. In addition, the cache is pulled when the user slides, so that the user is not aware, and the user experience is not influenced; meanwhile, the flow consumption of the cached text content is low, and the invention improves the reading experience of the user on the basis of saving the flow cost for the user as much as possible.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is an application environment diagram of a web page loading system according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for loading a web page according to an embodiment of the present invention;
FIG. 3 is a schematic view of a scene operation provided by an embodiment of the present invention;
FIG. 4 is a schematic flow chart of buffering text data according to an embodiment of the present invention;
FIG. 5 is a flowchart of a method for determining text data corresponding to a web page access request according to an embodiment of the present invention;
FIG. 6 is a flow chart of a method for determining a template page provided by an embodiment of the present invention;
FIG. 7 is a flowchart of a method for loading a web page according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of a webpage loading device according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of the memory cell of FIG. 8;
fig. 10 is a schematic diagram of the structure of the acquisition unit in fig. 8;
FIG. 11 is a schematic diagram of a configuration of a webpage loading device according to an embodiment of the present invention;
fig. 12 is a block diagram of a hardware structure of a terminal according to an embodiment of the present invention.
Detailed Description
In order to enable those skilled in the art to better understand the present invention, the following description will make clear and complete descriptions of the technical solutions according to the embodiments of the present invention with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the prior art, in order to improve the page loading speed, the Web text page is cached. For example, the information class APP such as daily flash report caches the text page after the Feeds item clicks open the Web text page for the first time, and then opens the same item again to directly read the cache, so that the speed of opening the text page is improved. However, after the study of the prior art, the inventors consider that the above-mentioned technique has the following drawbacks: (1) The operation of requesting text data is carried out after the text page is opened, and the time of sliding and checking Feeds by a user is not fully utilized to cache the text data; (2) Opening the text page and requesting data is influenced by the network environment of the user, so that the webpage opening speed is not as good as that of the user in the weak network environment; (3) The action of caching the text page data is only executed after the text page is opened for the first time, so that a user can enjoy the benefit of reading the cache and improving the opening speed only by accessing the same Web text page again, but APP rarely hits the text cache because the repeated check of the same news is a very low-frequency operation, and the action of optimizing the speed is not achieved; (4) WebView does not pre-render in the background, so that the Web page is re-initialized every time the Web page is opened, and the first screen rendering time is increased.
Based on the analysis, the embodiment of the invention provides a webpage loading scheme, which realizes that the user slides and browses the information stream and simultaneously caches text data corresponding to the information stream, and when the user clicks the information stream, the user can rapidly present the webpage content, so that the webpage loading efficiency is improved. The technical solutions in the embodiments of the present invention are clearly and completely described below with reference to the accompanying drawings.
FIG. 1 is an application environment diagram of a web page loading system in one embodiment. As shown in fig. 1, the system may include a terminal 110 and a server 120.
Specifically, the terminal 110 may include a smart phone, a desktop computer, a tablet computer, a notebook computer, a digital assistant, an intelligent wearable device, and other types of physical devices; wherein, intelligent wearable equipment can include intelligent bracelet, intelligent wrist-watch, intelligent glasses, intelligent helmet etc.. Of course, the terminal 110 is not limited to the electronic device with a certain entity, and may be software running in the electronic device. Specifically, for example, the terminal 110 may be a web page provided by a service provider such as a WeChat or a microblog, or may be an application provided by the service provider to the user.
In particular, the server 120 may include a server that operates independently, or a distributed server, or a server cluster that is composed of a plurality of servers. The server 120 may include functional components and basic data to implement the relevant functions of the terminal.
In the embodiment of the present disclosure, the terminal 110 may perform information interaction with the server 120. The terminal 110 may be configured to display an information stream that is continuously updated and presented to the user, and the terminal 110 may further obtain text data corresponding to the information stream from the server 120, so that the text data corresponding to the information stream is presented on the terminal 110 when the user clicks on the corresponding information stream.
Embodiments of a web page loading method and a web page loading device are described below with reference to the environment schematic diagram shown in fig. 1.
Fig. 2 is a schematic flow chart of a web page loading method provided in an embodiment of the present invention, where the flow chart may be implemented by the terminal 110, and the present specification provides the method operation steps as described in the embodiment or the flowchart, but may include more or fewer operation steps based on conventional or non-inventive labor. The order of steps recited in the embodiments is merely one way of performing the order of steps and does not represent a unique order of execution. When implemented in a real system or client product, the methods illustrated in the embodiments or figures may be performed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment). Referring to fig. 2, the method for loading a web page includes:
Step S201: determining a target information stream, acquiring text data corresponding to the target information stream, and storing the text data in the terminal, wherein the target information stream is all information streams in a terminal screen window when a user stops sliding on a terminal screen.
The embodiment scheme is mainly applied to the APP with the WebView component, and requires the terminal equipment to have network access capability and the APP with the WebView component, wherein the WebView is a very practical component in the APP, is based on a Webkit webpage rendering engine like a Safari, chrome browser, and can conveniently display the terminal component of the interface of software by loading HTML data.
Specifically, the user may view Feeds within the APP, i.e., information streams that are continuously updated and presented to the user's content, hereinafter referred to as information streams. According to the embodiment, the user slides to view the information flow and simultaneously caches the text data corresponding to the information flow, so that when the user clicks a certain information flow item, page content corresponding to the information flow is rapidly presented. Referring to fig. 3, a user may view information streams by performing a sliding operation on a terminal screen, where the terminal screen displays information streams of a plurality of entries, and each of the information streams of the entries is a thumbnail content, and when the user further clicks on a certain information stream entry, the user directly jumps to a page to present content details corresponding to the clicked information stream, where the content details may be text, pictures, audio, video, and the like.
In one possible implementation manner, during the sliding operation of the user on the terminal screen, all the information streams in the window of the terminal screen when the user stops sliding on the terminal screen are used as target information streams, text data corresponding to the target information streams are obtained from the server, and the obtained text data are stored in the cache of the terminal, so that when a subsequent user clicks a certain item in the target information streams, the text data corresponding to the item can be quickly loaded. In this embodiment, once the user sliding stop is detected, text data corresponding to all information flows in the terminal screen window are cached, so that the text data caching time is shortened, the user is not aware, and the user experience is not affected.
In another possible implementation manner, the operation of sliding Feeds on the terminal screen by the user may be monitored, when the sliding action is detected to stop, the timing is started, when the timing reaches a preset time threshold, all information streams in the current window of the terminal screen are used as target information streams, text data corresponding to the target information streams are acquired from the server, and the acquired text data are stored in the terminal. In this embodiment, after the user sliding operation is detected to stop, whether the residence time reaches the preset time threshold is continuously determined, and text data corresponding to the information flow in the screen window is pulled to be cached when the residence time reaches the time threshold, so that on one hand, the efficiency of subsequently loading webpage content can be improved, and on the other hand, the information flow of the text data to be cached is screened through the time threshold, so that the consumption of the flow of the cached content can be reduced. Meanwhile, if the residence time of the information flow is too short, the probability that the user wants to further read the text data corresponding to the information flow is lower, and based on the probability, the information flow with too short residence time is screened out through a time threshold value, so that the hit rate of the cached text data can be improved.
Fig. 4 is a schematic flow chart of buffering text data according to an embodiment of the present invention. Referring to fig. 4, the step of buffering text data corresponding to the target information stream may include the following steps:
s401: extracting keywords of each item in the target information flow;
s403: sending a text data acquisition request to a server, wherein the text data acquisition request comprises keywords of a target information flow item;
s405: receiving text data corresponding to the keywords returned by the server;
s407: and storing the text data and the keywords of the target information flow item in a cache of the terminal correspondingly.
Specifically, the information flow includes at least one item, the item can present content in a summary manner, and keywords of the item can be extracted from the summary; further, a text data acquisition request is generated according to the extracted keywords, the text data acquisition request is sent to the server, so that the server pulls corresponding text data according to the keywords, after the terminal receives the text data returned by the server, the text data and the keywords of each item in the information flow are correspondingly stored, and then the corresponding text data can be obtained through searching the keywords.
Step S203: and when a webpage access request for accessing the target information stream is detected, reading text data stored in the terminal and corresponding to the access request.
When a user clicks any item in the information stream to view specific content, if the item clicked by the user is an item in the target information stream, the stored text data can be directly pulled from the terminal cache, and if the item clicked by the user is not an item in the target information stream, the text data corresponding to the item needs to be acquired from the server. Fig. 5 is a flowchart of a method for determining text data corresponding to a web page access request according to an embodiment of the present invention. Referring to fig. 5, the method for determining text data corresponding to a web page access request may include the following steps:
s501: receiving a webpage access request, wherein the webpage access request comprises keywords of information flow items;
s503: inquiring whether the cache of the terminal stores the same keywords as the keywords of the information flow items in the webpage access request or not;
s505: if the text data is stored, reading text data corresponding to keywords of information flow entries in the webpage access request from the terminal, and taking the read text data as text data corresponding to the access request;
S507: if not, acquiring text data corresponding to the keywords of the information flow items in the webpage access request from the server, and taking the text data returned by the server as the text data corresponding to the access request.
Specifically, when a user clicks any item in the information flow in the screen window, a web page access request is triggered to be generated, and after the terminal receives the web page access request, the terminal queries according to keywords of the information flow item corresponding to the web page access request, specifically: comparing the keywords of the information flow item with the keywords stored in the terminal cache, if the same keywords exist in the terminal cache, judging that the terminal has cached the text data corresponding to the information flow item, reading the text data corresponding to the keywords from the terminal cache as the text data corresponding to the access request, and if the same keywords do not exist in the terminal cache, judging that the terminal does not cache the text data corresponding to the information flow item, and requesting the text data from the server according to the keywords of the information flow item.
By pre-caching the text data corresponding to the information flow, the text data can be obtained from the local place rapidly when the user clicks the information flow item, the loading time of the webpage is shortened, and meanwhile, the text data is not required to be requested to the server, so that the webpage can be loaded successfully even in a weak network environment, and the reading experience of the user is improved.
Step S205: and determining a template page matched with the text data.
Fig. 6 is a flowchart of a method for determining a template page according to an embodiment of the present invention. Referring to fig. 6, the method for determining a template page in this embodiment may include the following steps:
s601: the running environment of the current information stream is detected.
Specifically, the current running environment of the information stream may be a hardware environment of the terminal.
S603: and judging whether the running environment of the current information flow meets the preset condition.
In one possible implementation manner, the determining whether the running environment of the current information stream meets the preset condition may include: judging whether the APP to which the current information flow belongs operates in an Android X5 kernel, if so, judging that the operating environment of the current information flow meets preset conditions, and if not, judging that the operating environment of the current information flow does not meet the preset conditions.
It should be noted that, the conventional system kernel (WebView) has the problems of high adapting cost, unsafety, instability, low consumption flow, low speed, poor video playing, poor file capability, and the like, which is a difficult problem commonly faced by mobile application developers when developing Hybrid App. If the browsing service is based on an X5 kernel solution (comprising a kernel and cloud service), the general problem faced by the traditional mobile Web technology can be effectively solved, and meanwhile, the service capability of browsing scenes in an application (Hybrid App) can be greatly expanded.
S605: if the preset condition is satisfied, inquiring whether the terminal has a prerendered template page, and if the preset condition is not satisfied, executing step S609.
In the embodiment of the invention, the template page can be prerendered and stored through the Android X5 kernel, so that the template page can be rapidly loaded to generate the display page when the page is required to be loaded.
S607: and if the terminal is a template page with pre-rendering, acquiring the pre-rendered template page as a rendering template page matched with the text data, and if the terminal is not provided with the pre-rendered template page, executing step S609.
S609: and loading the template page through the network view component, and taking the loaded template page as the template page matched with the text data.
Step S207: and loading a webpage according to the read text data and the template page.
Specifically, the template page may be an H5 template page, the text data is read through the front end code of the H5 template page, the original built-in resource file (such as js\css) is combined, the final page is rendered in WebView, and the page is displayed in a terminal screen window for a user to read.
According to the webpage loading method, through integrated data caching of the terminal and the Web, text data are cached in an information flow sliding scene of the terminal, cached data are read on the Web page, and when a user opens an information flow item for the first time, the page can be quickly loaded by using the cached data, so that the webpage loading speed is improved. After the text content is cached, the problems of long text page loading time and long white screen can be avoided even if the information flow entry is opened under the weak network condition.
Fig. 7 is a flowchart of a web page loading method according to an embodiment of the present invention. Referring to fig. 7, the method for loading the web page includes the following steps:
step S701: determining a target information stream, acquiring text data corresponding to the target information stream, and storing the text data in the terminal, wherein the target information stream is all information streams in a terminal screen window when a user stops sliding on a terminal screen;
step S703: when a webpage access request for accessing the target information stream is detected, reading text data stored in the terminal and corresponding to the access request;
step S705: determining a template page matched with the text data;
step S707: and loading a webpage according to the read text data and the template page.
Step S709: and if the application to which the current information flow belongs runs in the Android X5 kernel, prerendering the template page through the Android X5 kernel and storing the prerendered template page.
The specific operation of steps S701 to S707 in the embodiment of the present invention is referred to the above embodiment, and will not be described herein. After the rendering of the page in step S707 is completed, it may further be determined whether the application to which the current information flow belongs is running in the Android X5 kernel, and if so, the template page may be prerendered by the Android X5 kernel and stored for use in next rendering of the page. If the template page is prerendered and stored by the Android X5 kernel, the rendered template page can be directly used without reloading the template page when the step S705 is executed, so that the webpage loading speed is further improved.
The web page loading method of the present embodiment will be described below with reference to a terminal and a server configuration module. Specifically, the terminal is configured with a Hippy front end, a terminal interface and an information text framework layer; the server is configured with a text caching platform layer and an information background. The page loading method specifically comprises the following steps:
1. the user slides on the terminal screen to check Feeds, when the sliding stops, the Hippy front end takes keys of all Feeds in the current screen window as request parameters, generates a text data acquisition request, and sends the text data acquisition request to a text cache platform layer;
2. the text caching platform layer acquires the request parameters in the request through text data, pulls text caches corresponding to key values in batches, and returns the text caches to the terminal;
3. after receiving text data returned by the text caching platform layer, the terminal stores the text data into a cache through a terminal storage interface provided by the Hippy front end;
4. clicking any item of Feeds by a user to generate a text page loading request containing an item key value;
5. the information text framework layer judges whether text data corresponding to a key value in a text page loading request exist in a terminal storage through a terminal interface, and if so, jumps to the step 7; if not, jumping to the step 6;
6. The information text framework layer requests text data corresponding to the key value in the text page loading request to the information background and stores the text data in a cache;
7. the terminal reads the cache and returns the data to the information text framework layer;
8. if the Android X5 kernel APP is the Android X5 kernel, inquiring whether a pre-rendered H5 template page exists in the background of the terminal, if so, jumping to the 10 th step, and if the pre-rendered template page does not exist or the APP is a non-Android X5 kernel, jumping to the 9 th step;
9. the terminal opens a new WebView and loads an H5 template page;
reading text page data by using a front end code of the H5 template page, combining original built-in resource files (such as JS\CSS), and rendering a final page in WebView;
11. if the context page is the Android X5 kernel APP, after the APP finishes rendering the context page, the X5 kernel is notified of prerendering the template page through an interface for the next rendering of the context page.
The embodiment has the following beneficial effects: after clicking the Feeds item, the user opens the text page to quickly see the content; after the text content is cached, the user can open the text page even in the weak network condition, so that the problem of long text page loading time and long white screen time can be avoided; the flow consumption of the text content is low, and the flow cost is saved for the user as much as possible while the reading experience of the user is improved.
The embodiment of the invention also provides a webpage loading device, as shown in fig. 8, the webpage loading device 800 includes a storage unit 810, an acquisition unit 820, a determination unit 830 and a loading unit 840. Wherein, the liquid crystal display device comprises a liquid crystal display device,
the storage unit 810 is configured to determine a target information stream, obtain text data corresponding to the target information stream, and store the text data in the terminal, where the target information stream is all information streams in a terminal screen window when a user stops sliding on a terminal screen;
an obtaining unit 820, configured to, when detecting a web page access request for accessing the target information stream, read text data corresponding to the access request stored in the terminal;
a determining unit 830, configured to determine a template page that matches the text data;
and a loading unit 840 for loading a web page according to the read text data and the template page.
Further, the storage unit 810 includes an extracting module 811, a transmitting module 812, a data receiving module 813, and a storage module 814. Wherein, the liquid crystal display device comprises a liquid crystal display device,
an extracting module 811, configured to extract keywords of each item in the target information stream;
a sending module 812, configured to send a text data acquisition request to a server, where the text data acquisition request includes a keyword of a target information flow entry;
The data receiving module 813 is configured to receive text data corresponding to the keyword returned by the server;
and the storage module 814 is configured to store the text data and the keyword of the target information flow entry in the buffer of the terminal.
Further, the obtaining unit 820 includes a request receiving module 821, a querying module 822, a first determining module 823, and a second determining module 824. Wherein, the liquid crystal display device comprises a liquid crystal display device,
a request receiving module 821, configured to receive a web page access request, where the web page access request includes a keyword of an information flow entry;
a query module 822, configured to query whether a cache of the terminal stores a keyword that is the same as a keyword of an information flow entry in the web page access request;
a first determining module 823, configured to, when the query module queries that a keyword that is the same as a keyword of an information flow entry in the web page access request is already stored in a cache of a terminal, read text data corresponding to the keyword of the information flow entry in the web page access request in the terminal, and use the read text data as text data corresponding to the access request;
and the second determining module 824 is configured to obtain, when the query module queries that the keyword identical to the keyword of the information flow entry in the web page access request is not stored in the cache of the terminal, text data corresponding to the keyword of the information flow entry in the web page access request from the server, and use the text data returned by the server as the text data corresponding to the access request.
The webpage loading device and the webpage loading method are based on the same invention conception.
The embodiment of the present invention also provides a web page loading device, as shown in fig. 11, where the web page loading device 1100 includes a storage unit 1110, an acquisition unit 1120, a determination unit 1130, a loading unit 1140, a pre-rendering unit 1150, and a pre-storage unit 1160. Wherein, the liquid crystal display device comprises a liquid crystal display device,
a storage unit 1110, configured to determine a target information stream, obtain text data corresponding to the target information stream, and store the text data in the terminal, where the target information stream is all information streams in a terminal screen window when a user stops sliding on a terminal screen;
an obtaining unit 1120, configured to read text data corresponding to the access request stored in the terminal when a web access request for accessing the target information stream is detected;
a determining unit 1130 for determining a template page matching the text data;
a loading unit 1140, configured to load a web page according to the read text data and the template page;
the pre-rendering unit 1150 is configured to pre-render a template page through an Android X5 kernel;
and a pre-storage unit 1160, configured to store the template page obtained by the rendering of the pre-rendering unit.
The webpage loading device and the webpage loading method are based on the same invention conception.
According to the embodiment of the invention, through the integrated data caching of the terminal and the Web, the text data is cached in the information flow sliding scene of the terminal, the cached data is read in the Web page, and when a user opens an information flow item for the first time, the page can be quickly loaded by using the cached data, so that the loading speed of the webpage is improved. After the text content is cached, the problems of long text page loading time and long white screen can be avoided even if the information flow entry is opened under the weak network condition. In addition, the cache is pulled when the user slides, so that the user is not aware, and the user experience is not influenced; meanwhile, the flow consumption of the cached text content is low, and the invention improves the reading experience of the user on the basis of saving the flow cost for the user as much as possible.
The embodiment of the invention provides a terminal, which comprises a processor and a memory, wherein at least one instruction, at least one section of program, a code set or an instruction set is stored in the memory, and the at least one instruction, the at least one section of program, the code set or the instruction set is loaded and executed by the processor to realize the webpage loading method provided by the embodiment of the method.
The memory may be used to store software programs and modules that the processor executes to perform various functional applications and data processing by executing the software programs and modules stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, application programs required for functions, and the like; the storage data area may store data created according to the use of the device, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory may also include a memory controller to provide access to the memory by the processor.
The embodiment of the invention also provides a schematic structure diagram of a terminal, as shown in fig. 12, which can be used for implementing the page loading method provided in the above embodiment. Specifically, the present invention relates to a method for manufacturing a semiconductor device.
The client may include RF (Radio Frequency) circuitry 1210, memory 1220 including one or more computer-readable storage media, input unit 1230, display unit 1240, sensor 1250, audio circuitry 1260, wiFi (wireless fidelity ) module 1270, processor 1280 including one or more processing cores, and power supply 1290. Those skilled in the art will appreciate that the client architecture shown in fig. 12 is not limiting and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components. Wherein:
The RF circuit 1210 may be used for receiving and transmitting signals during a message or a call, and in particular, after receiving downlink information of a base station, the downlink information is processed by one or more processors 1280; in addition, data relating to uplink is transmitted to the base station. Typically, RF circuitry 1210 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a subscriber identity module (sim) card, a transceiver, a coupler, an LNA (Low Noise Amplifier ), a duplexer, and the like. In addition, RF circuitry 810 may also communicate with networks and other clients via wireless communications. The wireless communication may use any communication standard or protocol including, but not limited to, GSM (Global System of Mobile communication, global system for mobile communications), GPRS (General Packet Radio Service ), CDMA (Code Division Multiple Access, code division multiple access), WCDMA (Wideband Code Division Multiple Access ), LTE (Long Term Evolution, long term evolution), email, SMS (Short Messaging Service, short message service), and the like.
Memory 1220 may be used to store software programs and modules, and processor 1280 may perform various functional applications and data processing by executing the software programs and modules stored in memory 1220. The memory 1220 may mainly include a storage program area that may store an operating system, application programs required for functions, and the like, and a storage data area; the storage data area may store data created according to the use of the client, etc. In addition, memory 1220 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 1220 may also include a memory controller to provide access to the memory 1220 by the processor 880 and the input unit 1230.
The input unit 1230 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, the input unit 1230 may include a touch-sensitive surface 1231 and other input devices 1232. The touch-sensitive surface 1231, also referred to as a touch display screen or touch pad, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch-sensitive surface 1231 or thereabout using any suitable object or accessory such as a finger, stylus, etc.), and actuate the corresponding connection device according to a pre-set program. Alternatively, the touch-sensitive surface 1231 may comprise two portions, a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 1280, and can receive commands from the processor 1280 and execute them. In addition, the touch-sensitive surface 1231 may be implemented in a variety of types, such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch-sensitive surface 1231, the input unit 1230 may also include other input devices 1232. In particular, other input devices 1232 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc.
The display unit 1240 may be used to display information input by a user or information provided to the user and various graphical user interfaces of the client, which may be composed of graphics, text, icons, video, and any combination thereof. The display unit 1240 may include a display panel 1241, and alternatively, the display panel 1241 may be configured in the form of an LCD (Liquid Crystal Displ ay ), an OLED (Organic Light-Emitting Diode), or the like. Further, the touch-sensitive surface 1231 can overlay the display panel 1241, and upon detection of a touch operation on or near the touch-sensitive surface 1231, the touch-sensitive surface is passed to the processor 1280 to determine the type of touch event, which then the processor 1280 provides a corresponding visual output on the display panel 1241 according to the type of touch event. Wherein the touch-sensitive surface 1231 and the display panel 1241 may be two separate components to implement input and input functions, but in some embodiments the touch-sensitive surface 1231 may be integrated with the display panel 1241 to implement input and output functions.
The client may also include at least one sensor 1250, such as a light sensor, a motion sensor, and other sensors. In particular, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 1241 according to the brightness of ambient light, and a proximity sensor that may turn off the display panel 1241 and/or the backlight when the client moves to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking) and the like for recognizing the gesture of the client; other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may be configured by the client are not described in detail herein.
Audio circuitry 1260, speaker 1261, microphone 1262 may provide an audio interface between a user and the client. Audio circuit 1260 may transmit the received electrical signal after audio data conversion to speaker 1261, where the electrical signal is converted to a sound signal by speaker 1261 for output; on the other hand, microphone 1262 converts the collected sound signals into electrical signals, which are received by audio circuit 1260 and converted into audio data, which are processed by audio data output processor 1280 for transmission to, for example, another client via RF circuit 1210, or which are output to memory 1220 for further processing. Audio circuitry 1260 may also include an ear bud jack to provide communication of peripheral headphones with the client.
WiFi belongs to a short-distance wireless transmission technology, and the client can help a user to send and receive e-mails, browse web pages, access streaming media and the like through the WiFi module 1270, so that wireless broadband Internet access is provided for the user. Although fig. 12 shows a WiFi module 1270, it will be appreciated that it does not belong to the essential constitution of the client, and can be omitted entirely as required within the scope of not changing the essence of the invention.
Processor 1280 is a control center of the client, connects various parts of the entire client using various interfaces and lines, and performs various functions and processes data of the client by running or executing software programs and/or modules stored in memory 1220, and calling data stored in memory 1220, thereby performing overall monitoring of the client. Optionally, processor 1280 may include one or more processing cores; preferably, the processor 1280 may integrate an application processor and a modem processor, wherein the application processor primarily handles operating systems, user interfaces, application programs, etc., and the modem processor primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 1280.
The client also includes a power supply 1290 (e.g., a battery) for powering the various components, which can be logically coupled to the processor 1280 via a power management system to provide charge, discharge, and power management functions via the power management system. Power supply 1290 may also include one or more of any of a dc or ac power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown, the client may further include a camera, a bluetooth module, etc., which will not be described herein. In particular, in this embodiment, the display unit of the client is a touch screen display, and the client further includes a memory, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the one or more processors.
The embodiment of the invention also provides a storage medium, which can be arranged in a terminal to store at least one instruction, at least one section of program, a code set or an instruction set related to a webpage loading method in the embodiment of the method, and the at least one instruction, the at least one section of program, the code set or the instruction set is loaded and executed by the processor to implement the webpage loading method provided by the embodiment of the method.
Alternatively, in this embodiment, the storage medium may be located in at least one network client of a plurality of network clients of the computer network. Alternatively, in the present embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. And the foregoing description has been directed to specific embodiments of this specification. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the device and server embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and references to the parts of the description of the method embodiments are only required.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The foregoing description of the preferred embodiments of the invention is not intended to limit the invention to the precise form disclosed, and any such modifications, equivalents, and alternatives falling within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims (10)

1. A web page loading method, comprising:
determining a target information stream, acquiring text data corresponding to the target information stream, and storing the text data in a terminal, wherein the target information stream is all information streams in a terminal screen window when the residence time of a user after stopping sliding on the terminal screen reaches a preset time threshold;
when a webpage access request for accessing the target information stream is detected, reading text data stored in the terminal and corresponding to the access request;
judging whether an application to which the current information flow belongs runs in an Android X5 kernel or not;
if yes, inquiring whether the terminal has a pre-rendered template page, if yes, acquiring the pre-rendered template page as a rendering template page matched with the text data, and if not, loading the template page through a network view component, and taking the loaded template page as a template page matched with the text data;
If not, loading a template page through the network view component, and taking the loaded template page as a template page matched with the text data;
and loading a webpage according to the read text data and the template page.
2. The method according to claim 1, wherein the determining the target information stream, obtaining text data corresponding to the target information stream, and storing the text data in the terminal comprises:
extracting keywords of each item in the target information flow;
sending a text data acquisition request to a server, wherein the text data acquisition request comprises keywords of a target information flow item;
receiving text data corresponding to the keywords returned by the server;
and storing the text data and the keywords of the target information flow item in a cache of the terminal correspondingly.
3. The method according to claim 2, wherein when a web page access request for accessing the target information stream is detected, reading text data stored in the terminal and corresponding to the access request includes:
receiving a webpage access request, wherein the webpage access request comprises keywords of information flow items;
inquiring whether the cache of the terminal stores the same keywords as the keywords of the information flow items in the webpage access request or not;
If the text data is stored, reading text data corresponding to keywords of information flow entries in the webpage access request from the terminal, and taking the read text data as text data corresponding to the access request;
if not, acquiring text data corresponding to the keywords of the information flow items in the webpage access request from the server, and taking the text data returned by the server as the text data corresponding to the access request.
4. The method according to claim 1, wherein if the application to which the current information flow belongs runs in the Android X5 kernel, the loading the web page according to the read text data and the template page further comprises:
and prerendering the template page through the Android X5 kernel and storing.
5. A web page loading device, comprising:
the storage unit is used for determining a target information stream, acquiring text data corresponding to the target information stream, and storing the text data in the terminal, wherein the target information stream is all information streams in a terminal screen window when the residence time of a user reaches a preset time threshold after the user stops sliding on the terminal screen;
the acquisition unit is used for reading text data corresponding to the access request stored in the terminal when the webpage access request for accessing the target information stream is detected;
A determining unit for determining a template page matched with the text data;
the loading unit is used for loading the webpage according to the read text data and the template page;
the determining unit is used for judging whether the application to which the current information flow belongs runs in an Android X5 kernel or not;
if yes, inquiring whether the terminal has a pre-rendered template page, if yes, acquiring the pre-rendered template page as a rendering template page matched with the text data, and if not, loading the template page through a network view component, and taking the loaded template page as a template page matched with the text data;
if not, loading the template page through the network view component, and taking the loaded template page as the template page matched with the text data.
6. The apparatus of claim 5, wherein the storage unit comprises:
the extraction module is used for extracting keywords of each item in the target information flow;
a sending module, configured to send a text data acquisition request to a server, where the text data acquisition request includes a keyword of a target information flow entry;
the data receiving module is used for receiving text data corresponding to the keywords returned by the server;
And the storage module is used for storing the text data and the keywords of the target information flow item in the cache of the terminal correspondingly.
7. The apparatus of claim 6, wherein the acquisition unit comprises:
the request receiving module is used for receiving a webpage access request, wherein the webpage access request comprises keywords of information flow items;
the query module is used for querying whether the keyword which is the same as the keyword of the information flow item in the webpage access request is stored in the cache of the terminal;
the first determining module is used for reading text data corresponding to the keywords of the information flow items in the webpage access request from the terminal when the inquiring module inquires that the keywords which are the same as the keywords of the information flow items in the webpage access request are stored in the cache of the terminal, and taking the read text data as the text data corresponding to the access request;
and the second determining module is used for acquiring text data corresponding to the keywords of the information flow items in the webpage access request from the server when the inquiring module inquires that the keywords which are the same as the keywords of the information flow items in the webpage access request are not stored in the cache of the terminal, and taking the text data returned by the server as the text data corresponding to the access request.
8. The apparatus of claim 5, wherein the apparatus further comprises:
the prerender unit is used for prerendering the template page through the Android X5 kernel;
and the pre-storage unit is used for storing the template page obtained by the rendering of the pre-rendering unit.
9. A terminal comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set, or instruction set, the at least one instruction, at least one program, code set, or instruction set being loaded and executed by the processor to implement the web page loading method of any of claims 1-4.
10. A storage medium storing at least one instruction, at least one program, code set, or instruction set, the at least one instruction, at least one program, code set, or instruction set being loaded and executed by a processor to implement the web page loading method of any one of claims 1-4.
CN201910175753.9A 2019-03-08 2019-03-08 Webpage loading method and device Active CN109948090B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910175753.9A CN109948090B (en) 2019-03-08 2019-03-08 Webpage loading method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910175753.9A CN109948090B (en) 2019-03-08 2019-03-08 Webpage loading method and device

Publications (2)

Publication Number Publication Date
CN109948090A CN109948090A (en) 2019-06-28
CN109948090B true CN109948090B (en) 2023-06-09

Family

ID=67008525

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910175753.9A Active CN109948090B (en) 2019-03-08 2019-03-08 Webpage loading method and device

Country Status (1)

Country Link
CN (1) CN109948090B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110727478B (en) * 2019-10-16 2021-11-16 腾讯科技(深圳)有限公司 Method, device, equipment and medium for rendering page based on mixed mode
CN110889060A (en) * 2019-11-05 2020-03-17 北京三快在线科技有限公司 Webpage display method and device, computer equipment and storage medium
CN112905920B (en) * 2019-12-04 2023-08-04 腾讯科技(深圳)有限公司 Page display method and device
CN112311843A (en) * 2020-03-18 2021-02-02 北京沃东天骏信息技术有限公司 Data loading method and device
CN111427645A (en) * 2020-03-20 2020-07-17 青岛聚好联科技有限公司 H5-based cross-terminal adaptive display method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104765746A (en) * 2014-01-06 2015-07-08 腾讯科技(深圳)有限公司 Data processing method and device for mobile communication terminal browser
CN105094797A (en) * 2014-05-15 2015-11-25 奥克兰联合服务有限公司 Application analysis system for electronic devices
WO2016176219A1 (en) * 2015-04-26 2016-11-03 Intel Corporation All in one mobile computing device
CN106547833A (en) * 2016-10-11 2017-03-29 乐视控股(北京)有限公司 Web browser method and device
CN108986233A (en) * 2018-06-11 2018-12-11 佛山欧神诺陶瓷有限公司 The method and its system of preview graph in a kind of Fast Drawing room

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9647918B2 (en) * 2009-01-28 2017-05-09 Headwater Research Llc Mobile device and method attributing media services network usage to requesting application
US9448977B2 (en) * 2012-08-24 2016-09-20 Qualcomm Innovation Center, Inc. Website blueprint generation and display algorithms to reduce perceived web-page loading time
CN107256232B (en) * 2017-05-16 2021-04-02 百度在线网络技术(北京)有限公司 Information recommendation method and device
CN107066632B (en) * 2017-06-05 2018-03-16 厦门美柚信息科技有限公司 The method and device that a kind of info web preloads
CN107609184A (en) * 2017-09-30 2018-01-19 北京奇虎科技有限公司 Data load method and device based on web page browsing behavior
CN108023960B (en) * 2017-12-08 2019-05-21 百度在线网络技术(北京)有限公司 The method for constructing the device and the push of Feed stream information of Feed stream application
CN108509589B (en) * 2018-03-29 2022-02-18 阿里巴巴(中国)有限公司 Information flow display method and system, computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104765746A (en) * 2014-01-06 2015-07-08 腾讯科技(深圳)有限公司 Data processing method and device for mobile communication terminal browser
CN105094797A (en) * 2014-05-15 2015-11-25 奥克兰联合服务有限公司 Application analysis system for electronic devices
WO2016176219A1 (en) * 2015-04-26 2016-11-03 Intel Corporation All in one mobile computing device
CN106547833A (en) * 2016-10-11 2017-03-29 乐视控股(北京)有限公司 Web browser method and device
CN108986233A (en) * 2018-06-11 2018-12-11 佛山欧神诺陶瓷有限公司 The method and its system of preview graph in a kind of Fast Drawing room

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于微信平台的共享外卖机系统的设计与实现;柴云;《中国优秀硕士学位论文全文数据库信息科技辑》;I138-808 *

Also Published As

Publication number Publication date
CN109948090A (en) 2019-06-28

Similar Documents

Publication Publication Date Title
CN109948090B (en) Webpage loading method and device
CN103617165B (en) Picture loading method, device and terminal
CN107329985B (en) Page collection method and device and mobile terminal
US10095666B2 (en) Method and terminal for adding quick link
CN108156508B (en) Barrage information processing method and device, mobile terminal, server and system
US10956653B2 (en) Method and apparatus for displaying page and a computer storage medium
CN113420051B (en) Data query method and device, electronic equipment and storage medium
CN110019840B (en) Method, device and server for updating entities in knowledge graph
CN110020293B (en) Multimedia data display method, device and storage medium
US20150128033A1 (en) Method and apparatus for webpage browsing
CN104750730B (en) Browser display method and device
CN106326489B (en) Method and device for updating network resources
WO2015027909A1 (en) Method and apparatus for obtaining hot-topic information
CN107992615B (en) Website recommendation method, server and terminal
CN113064635A (en) Page display method and device of smart television
JP6915074B2 (en) Message notification method and terminal
CN106844572B (en) Search result processing method and device for search result processing
CN108268232B (en) Picture display method, device, system and storage medium
CN107632985B (en) Webpage preloading method and device
CN112925878B (en) Data processing method and device
CN110213597B (en) Method and device for entering live broadcast room through browser
CN112445967A (en) Information push method and device, readable storage medium and information push system
CN107798008B (en) Content pushing system, method and device
CN108563712B (en) Webpage picture viewing method and device and storage equipment
CN104809121B (en) Method and device for controlling display of browser webpage window

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
TA01 Transfer of patent application right

Effective date of registration: 20221123

Address after: 1402, Floor 14, Block A, Haina Baichuan Headquarters Building, No. 6, Baoxing Road, Haibin Community, Xin'an Street, Bao'an District, Shenzhen, Guangdong 518100

Applicant after: Shenzhen Yayue Technology Co.,Ltd.

Address before: 518057 Tencent Building, No. 1 High-tech Zone, Nanshan District, Shenzhen City, Guangdong Province, 35 floors

Applicant before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant