CN112905920A - Page display method and device - Google Patents

Page display method and device Download PDF

Info

Publication number
CN112905920A
CN112905920A CN201911229406.6A CN201911229406A CN112905920A CN 112905920 A CN112905920 A CN 112905920A CN 201911229406 A CN201911229406 A CN 201911229406A CN 112905920 A CN112905920 A CN 112905920A
Authority
CN
China
Prior art keywords
page
data
target program
server
page data
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.)
Granted
Application number
CN201911229406.6A
Other languages
Chinese (zh)
Other versions
CN112905920B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201911229406.6A priority Critical patent/CN112905920B/en
Publication of CN112905920A publication Critical patent/CN112905920A/en
Application granted granted Critical
Publication of CN112905920B publication Critical patent/CN112905920B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching

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

The method for displaying the page comprises the steps of intercepting a page access request sent by an application through a target program, displaying the page according to corresponding cached historical page data, obtaining current page data corresponding to the page access request from a server through the target program, and refreshing the page according to page content data contained in the current page data and a page template contained in the historical access page data. Therefore, when a user accesses a page, the page is displayed according to the historical page data to improve the page display speed, then the page is refreshed according to the current page data acquired from the server, and the page refreshing speed is further improved by adopting a mode of integrating the page template in the historical access page data with the page content data of the current page data when the page is refreshed.

Description

Page display method and device
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method and an apparatus for displaying a page.
Background
With the development of internet technology and the mass increase of network resources, the requirement of people on the page access speed is higher and higher.
In the prior art, when a user accesses a page, the server obtains page data of a second-level page, and thus, when the user accesses the second-level page, the page is displayed according to pre-cached page data, so as to improve the page access speed.
However, since the above-mentioned page preloading manner requires a trigger mechanism of the main page, only the page data of the secondary page can be preloaded, but not the page data of the main page, and thus the page loading speed of the main page cannot be increased.
Therefore, a page display scheme capable of increasing the page loading speed is urgently needed.
Disclosure of Invention
The embodiment of the application provides a page display method and device, which are used for improving the page loading speed when a page is displayed.
In one aspect, a method for displaying a page is provided, including:
intercepting a page access request to be sent to a server by an application through a target program, wherein the target program is a current page independent of the application and runs in a background process;
when historical access page data corresponding to the page access request are cached, obtaining the historical access page data through a target program;
displaying a page according to historical access page data;
sending a page access request to a server through a target program, and receiving current page data returned by the server, wherein the historical access page data and the current page data are both composed of a page template and page content data;
and refreshing the page according to the page content data contained in the current page data and the page template contained in the historical access page data.
In one aspect, an apparatus for displaying a page is provided, including:
the intercepting unit is used for intercepting a page access request to be sent to the server by an application through a target program, wherein the target program is a current page independent of the application and runs in a background process;
the acquisition unit is used for acquiring historical access page data through a target program when the historical access page data corresponding to the page access request is cached;
the display unit is used for displaying a page according to the historical access page data;
the receiving unit is used for sending a page access request to the server through the target program and receiving current page data returned by the server, wherein the historical access page data and the current page data are both composed of a page template and page content data;
and the refreshing unit is used for refreshing the page according to the page content data contained in the current page data and the page template contained in the historical access page data.
Preferably, the refresh unit is configured to:
receiving page content data in current page data returned by a target program in a designated communication mode, wherein the page content data in the current page data is acquired from the current page data by the target program according to designated identification information;
integrating the received page content data with a page template contained in the historical access page data;
and refreshing the page according to the integrated data.
Preferably, the current page data is obtained by the server according to the following steps:
acquiring a corresponding page template and page content data according to page address information contained in the page access request;
and binding the acquired page template and the page content data, and rendering to generate current page data, wherein the page content data is located in the specified identification information in the current page data.
In one aspect, a control device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform any of the steps of the page display method described above.
In one aspect, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of any of the above-mentioned methods of page display.
In the method and the device for displaying the page, the page access request sent by the application is intercepted by the target program, the page is displayed according to the cached corresponding historical page data, the current page data corresponding to the page access request is obtained from the server through the target program, and the page is refreshed according to the page content data contained in the current page data and the page template contained in the historical access page data. Therefore, when a user accesses a page, the page is displayed according to the historical page data to improve the page display speed, then the page is refreshed according to the current page data acquired from the server, and the page refreshing speed is further improved by adopting a mode of integrating the page template in the historical access page data with the page content data of the current page data when the page is refreshed.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a schematic diagram of a system architecture for page display according to an embodiment of the present disclosure;
FIG. 2 is a flowchart illustrating an implementation of a method for displaying a page according to an embodiment of the present disclosure;
FIG. 3 is a schematic structural diagram of a page display apparatus according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a control device in an embodiment of the present application.
Detailed Description
In order to make the purpose, technical solution and beneficial effects of the present application more clear and more obvious, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
First, some terms referred to in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.
The control device: the electronic device can be mobile or fixed, and can be used for installing various applications and displaying objects provided in the installed applications. For example, a mobile phone, a tablet computer, various wearable devices, a vehicle-mounted device, a Personal Digital Assistant (PDA), a point of sale (POS), or other electronic devices capable of implementing the above functions may be used.
The application comprises the following steps: i.e. application programs, computer programs that can perform one or more services, typically have a visual display interface that can interact with a user, for example electronic maps and wechat, are referred to as applications.
HyperText Markup Language (HTML): is a specification, a standard, that marks parts of a web page to be displayed by means of a marker symbol. The web page file is a text file, and by adding a marker in the text file, the browser can be informed of how to display the contents (such as how to process words, how to arrange pictures, how to display pictures, etc.). The browser reads the web page files in sequence and then interprets and displays the contents of its markup according to the markup.
Document Object Model (DOM): is a programming interface for HTML and Extensible Markup Language (XML) documents. It provides a structured representation of a document and defines a way in which the structure can be accessed from a program to change the structure, style and content of the document. The DOM parses a document into a set of structures consisting of nodes and objects (objects containing properties and methods). In short, it connects a web page with a script or programming language.
Service worker (service worker): the script is a script which is applied to the background and runs independently of the webpage, and can also be understood as a network proxy server. It cannot interact with the DOM, but can communicate with the application JavaScript main thread. It is an independent thread, independent of the current web page process. Meanwhile, the proxy request can be intercepted and the file can be cached, and the cached file can be fetched by the webpage process. As is well known, the javaScript is single-threaded, and as the web service is complicated, developers gradually perform many resource-consuming operations in the javaScript, which makes the disadvantage of the single-threaded more obvious. Based on this, we can give a service worker a complicated and time-consuming matter to do.
Message notification (postMessage) method: is a common function in application program interfaces for placing a message in a message queue. The messages in the message queue are obtained by calling GetMessage and PeekMessage.
Rendering by the server: refers to the server rendering the required components or pages into HTML strings and returning to the application. The application can directly generate a page to be presented to the user from the obtained HTML string without executing JavaScript code to generate DOM content.
The design concept of the embodiment of the present application is described below.
With the development of internet technology and the mass increase of network resources, the requirement of people on the page access speed is higher and higher.
Conventionally, page data is preloaded in the following two ways to increase the page display speed.
The first mode is as follows: resources that use the rel ═ prefetch attribute of the < link > tag are loaded ahead of time.
The second way is: the method comprises the steps of registering a service worker when a first-level page is accessed for the first time, simulating page data of a second-level page which is possibly accessed by a user in a thread of the service worker, caching after the page data is obtained, and directly reading the requested page data when the second-level page is loaded, so that the time for requesting the number of the pages of the second-level page is reduced.
The first-level page is a main page, and the second-level page is a page which can be returned through the previous page.
However, the two modes require the trigger mechanism of the main page to pre-load the page data, so that the page data of the secondary page can only be pre-loaded, the page data of the main page cannot be pre-loaded, and the page loading speed of the main page cannot be increased.
Obviously, a technical solution capable of increasing the page loading speed of the page including the main page is not provided in the conventional technology, and therefore, a technical solution for page display is urgently needed, and the page loading speed of the page including the main page can be increased when the page is displayed.
In view of the above analysis and consideration, an embodiment of the present application provides a page display scheme, where a target program intercepts a page access request sent by an application, displays a page according to cached corresponding historical page data, obtains current page data corresponding to the page access request from a server through the target program, and refreshes the page according to page content data included in the current page data and a page template included in the historical access page data.
To further illustrate the technical solutions provided by the embodiments of the present application, the following detailed description is made with reference to the accompanying drawings and the detailed description. Although the embodiments of the present application provide method steps as shown in the following embodiments or figures, more or fewer steps may be included in the method based on conventional or non-inventive efforts. In steps where no necessary causal relationship exists logically, the order of execution of the steps is not limited to that provided by the embodiments of the present application. The method can be executed in the order of the embodiments or the method shown in the drawings or in parallel in the actual process or the control device.
Referring to fig. 1, a schematic diagram of a system architecture for displaying a page is shown, which includes a control device 101 and a server 102. The control device 101 may be a personal computer, a notebook computer, a mobile terminal, or the like. The control device has installed therein an application for page access, such as a browsing application, a news application, etc.
The method comprises the steps that an application in the control equipment registers and starts a target program, when a user accesses a page, a page access request is intercepted through the target program, the page is displayed according to cached corresponding historical page data, current page data are obtained from a server according to the page access request, and then the page is refreshed according to page content data in the current page data and a page template in the historical access data.
The embodiment of the application is mainly applied to an application scene of page secondary access, the execution main body is mainly an application, and other application scenes and devices can be adopted, the type of the application is not limited, and all applications capable of accessing the server are within the protection scope of the embodiment of the application.
Referring to fig. 2, a flowchart of an implementation of a method for displaying a page provided by the present application is shown. The method comprises the following specific processes:
step 200: the application sends a page access request to the server in response to a trigger operation for the application page.
Specifically, the user performs a trigger operation such as clicking or sliding on an application page of the application to access the target page. And the application responds to the received trigger operation, generates a page access request and sends the page access request to the server.
Step 201: and the application intercepts a page access request to be sent to the server by the application through the target program.
Specifically, before step 201 is executed, the application registers and starts the target program from an access page provided by the server in advance.
The target program is used for acquiring rendered page data from the server according to the page access request and caching the acquired page data. The target program is a program which is independent from the current page of the application and runs in the background process, namely the target program is an independent thread which runs outside the main thread of the application. When the application executes the page script (namely the application main thread), the specified communication mode is called to communicate with the target program, and page data returned by the target program is obtained.
Optionally, the page data may be an HTML document, and the target program may be a service worker. The specified communication method is the postMessage method.
In practical applications, the target program may adopt other corresponding programs according to practical application scenarios, and is not limited herein.
In one embodiment, when an application accesses a home page for the first time, page data rendered by a server is received, a page is displayed according to the received page data, page script registration is executed, and a service worker is started. The service worker is an independent thread running outside the main application JavaScript thread. And the service worker receives the page data which is returned by the server and is rendered by the server, and caches the acquired page data.
Therefore, when the application sends a page access request to the server, the page access request can be intercepted by the target program running in the background.
Step 202: the application judges whether historical access page data corresponding to the page access request is cached, if so, step 203 is executed, otherwise, step 207 is executed.
Specifically, the application judges whether historical access page data corresponding to the page access request is cached through the target program.
The page access request includes page address information to be accessed, for example, the page address information may be a Uniform Resource Locator (URL). The page data may include, but is not limited to: text data, image data, animation data, video data, music data, program data, and the like.
The historical access page data corresponding to the page access request is as follows: the page data corresponding to the historical access request is determined according to the page address information contained in the page access request, that is, the page data corresponding to the historical access request containing the page address information in the cache (cache).
For example, if the page address information included in the page access request a is a target URL, the service worker obtains the target URL included in the page access request a, determines the latest historical access request B including the target URL according to the historical access log, and obtains the historical access page data of the historical access request B in the cache.
Step 203: the application obtains historical access data through the target program.
Specifically, when step 203 is executed, the following steps are adopted:
s2031: and the target program acquires page address information contained in the page access request and acquires the latest historical access page data corresponding to the historical access request containing the page address information from the cache.
S2032: and the application receives the historical access page data returned by the target program through the specified communication mode.
In one embodiment, the application page script receives historical access page data returned by the service worker through a postMessage method.
Step 204: the application accesses the page data display page according to the history.
In the embodiment of the application, in order to reduce page loading time and improve user experience, the application acquires a specific type of target program from the server, and the target program can cache historical access page data of historical access requests and display pages by using the historical access page data. Therefore, when the application sends the page access request to the server, the target program can intercept the page access request, acquire the historical access page data corresponding to the page access request from the cache, and display the page by using the historical access page data, thereby greatly reducing the page loading time and improving the page display speed.
Step 205: and the application sends a page access request to the server through the target program and receives current page data returned by the server.
Specifically, when step 205 is executed, the following steps may be adopted:
s2051: the target program sends a page access request to the server.
S2052: and the server acquires the corresponding page template and the page content data according to the page address information contained in the page access request.
Specifically, first, the server loads a compiled reach application.
Secondly, when the page access request is determined to be received, the server transmits the page access request to the React application in a mode of function call and incoming parameters.
And moreover, a data pulling submodule in the React application judges the page content to be displayed by analyzing the incoming page access request, and calculates the data required by the page content.
And then, the React application generates a data pulling request according to the required data through the data request middleware, and pulls the page template and the page content data according to the data pulling request.
S2053: and the server binds the acquired page template and the page content data and renders to generate the current page data.
Specifically, after the read application binds the page content data and the page template through the static rendering middleware, HTML codes are generated by a render ToString method, a page containing the page content data is obtained, and the page is rendered into an HTML character string, namely the current page data.
It should be noted that both the historical access page data and the current page data are composed of a page template and page content data. The page template is a frame structure of the page, and when the page is refreshed by the application, the page content data is embedded into the page template to obtain the refreshed page.
Wherein the page content data is located in the specified identification information in the current page data. The designation identification information may be understood as a variable, and the page content data as a variable value. Specifically, the static rendering middleware stores the page content data in the specified identification information in the current page data.
In one embodiment, the static rendering middleware stores the page content data in the window _ initial State flag bit in the HTML document.
In this way, the server returns the rendered current page data to the target program.
Step 206: and the application refreshes the page according to the page content data contained in the current page data and the page template contained in the historical access page data.
Specifically, when step 206 is executed, the following steps may be adopted:
s2061: and the target program acquires the page content data from the current page data according to the specified identification information.
S2062: and the application receives page content data returned by the target program through the specified communication mode.
S2063: and the application integrates the received page content data with the page template contained in the historical access page data.
S2064: and refreshing the page according to the integrated data.
Therefore, when a user accesses a page, the cached historical access page can be displayed first, then the page is refreshed through the current page data, the page display speed is improved, and further, when the page is refreshed, the page template in the historical access page data and the page content data in the current page data are adopted for integration, so that the page refreshing speed is further improved.
Further, the application caches the acquired current page data through the target program.
Thus, the page can be displayed through the cached current page data when the page access request is received next time.
Step 207: and when determining that the historical access page data corresponding to the uncached page access request is obtained, the application sends the page access request to the server through the target program.
Step 208: and the application receives the current page data returned by the server through the target program.
Step 209: and the application displays the page according to the current page data.
Therefore, when historical access page data corresponding to the local uncached page access request exist, the current page data acquired by the server are used for displaying the page.
Further, the application caches the acquired current page data through the target program.
Thus, the page can be displayed through the cached current page data when the page access request is received next time.
In the traditional mode, the page data can be preloaded only by a trigger mechanism of the main page, so that the page data of the secondary page can be preloaded only, but the page data of the main page cannot be preloaded, and further the page loading speed of the main page cannot be improved. In the embodiment of the application, the cached historical access page is displayed first, and then the page is refreshed through the current page data acquired by the server, so that the page display speed of the page including the main page can be improved.
According to the embodiment of the application, the time for acquiring the main page when the user accesses the page for the second time can be saved, the loading speed of the user accessing the page for the second time is effectively improved, the page rendering time is reduced, the loading time can be reduced by 60% through testing, and the user experience is greatly improved.
Based on the same inventive concept, the embodiment of the present application further provides a page display apparatus, and as the principle of the apparatus and the device for solving the problem is similar to that of a page display method, the implementation of the apparatus can refer to the implementation of the method, and repeated details are omitted.
Fig. 3 is a schematic structural diagram of a page display apparatus according to an embodiment of the present disclosure. An apparatus for page display comprising:
an intercepting unit 301, configured to intercept, by a target program, a page access request to be sent by an application to a server, where the target program is a program that is independent of the application and runs in a background process;
an obtaining unit 302, configured to obtain historical access page data through a target program when historical access page data corresponding to a page access request is cached;
a display unit 303 configured to display a page according to the history access page data;
the receiving unit 304 is configured to send a page access request to the server through the target program, and receive current page data returned by the server, where the historical access page data and the current page data are both composed of a page template and page content data;
a refreshing unit 305, configured to refresh the page according to the page content data included in the current page data and the page template included in the history access page data.
Preferably, the intercepting unit 301 is further configured to:
and registering and starting an object program from the access page provided by the server, wherein the object program is used for acquiring rendered page data from the server according to the page access request and caching the acquired page data.
Preferably, the intercepting unit 301 is further configured to:
when determining that historical access page data corresponding to the uncached page access request is obtained, sending the page access request to a server through a target program;
receiving current page data returned by the server through the target program;
and displaying the page according to the current page data.
Preferably, the refresh unit 305 is further configured to:
and caching the acquired current page data through the target program.
Preferably, the refresh unit 305 is configured to:
receiving page content data in current page data returned by a target program in a designated communication mode, wherein the page content data in the current page data is acquired from the current page data by the target program according to designated identification information;
integrating the received page content data with a page template contained in the historical access page data;
and refreshing the page according to the integrated data.
Preferably, the current page data is obtained by the server according to the following steps:
acquiring a corresponding page template and page content data according to page address information contained in the page access request;
and binding the acquired page template and the page content data, and rendering to generate current page data, wherein the page content data is located in the specified identification information in the current page data.
In the method and the device for displaying the page, the page access request sent by the application is intercepted by the target program, the page is displayed according to the cached corresponding historical page data, the current page data corresponding to the page access request is obtained from the server through the target program, and the page is refreshed according to the page content data contained in the current page data and the page template contained in the historical access page data. Therefore, when a user accesses a page, the page is displayed according to the historical page data to improve the page display speed, then the page is refreshed according to the current page data acquired from the server, and the page refreshing speed is further improved by adopting a mode of integrating the page template in the historical access page data with the page content data of the current page data when the page is refreshed.
Fig. 4 shows a schematic configuration of a control device. Referring to fig. 4, the control apparatus 4000 includes: processor 4010, memory 4020, power supply 4030, display unit 4040, and input unit 4050.
The processor 4010 is a control center of the control apparatus 4000, connects each component by various interfaces and lines, and executes various functions of the control apparatus 4000 by running or executing software programs and/or data stored in the memory 4020, thereby performing overall monitoring of the control apparatus 4000.
In the embodiment of the present application, the processor 4010 executes the method of page display provided in the embodiment shown in fig. 2 when calling the computer program stored in the memory 4020.
Optionally, processor 4010 may comprise one or more processing units; preferably, the processor 4010 may integrate an application processor, which mainly handles operating systems, user interfaces, applications, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 4010. In some embodiments, the processor, memory, and/or memory may be implemented on a single chip, or in some embodiments, they may be implemented separately on separate chips.
The memory 4020 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, various applications, and the like; the storage data area may store data created according to the use of the control apparatus 4000, and the like. Further, the memory 4020 may include a high speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The control device 4000 may further include a power supply 4030 (e.g., a battery) to provide power to the various components, which may be logically coupled to the processor 4010 via a power management system to enable management of charging, discharging, and power consumption via the power management system.
The display unit 4040 may be configured to display information input by a user or information provided to the user, and various menus of the control apparatus 4000. The display unit 4040 may include a display panel 4041. The Display panel 4041 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The input unit 4050 may be used to receive information such as numbers or characters input by a user. The input unit 4050 may include a touch panel 4051 and other input devices 4052. Touch panel 4051, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 4051 (e.g., operations by a user on or near touch panel 4051 using a finger, a stylus, or any other suitable object or attachment).
Specifically, the touch panel 4051 may detect a touch operation of the user, detect signals generated by the touch operation, convert the signals into touch point coordinates, transmit the touch point coordinates to the processor 4010, receive a command transmitted from the processor 4010, and execute the command. In addition, the touch panel 4051 may be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. Other input devices 4052 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, power on and off keys, etc.), a trackball, a mouse, a joystick, and the like.
Of course, the touch panel 4051 may cover the display panel 4041, and when the touch panel 4051 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 4010 to determine the type of the touch event, and then the processor 4010 provides a corresponding visual output on the display panel 4041 according to the type of the touch event. Although in fig. 4, the touch panel 4051 and the display panel 4041 are two separate components to implement the input and output functions of the control device 4000, in some embodiments, the touch panel 4051 and the display panel 4041 may be integrated to implement the input and output functions of the control device 4000.
The control device 4000 may also include one or more sensors, such as pressure sensors, gravitational acceleration sensors, proximity light sensors, and the like. Of course, the control device 4000 may further include other components such as a camera, which are not shown in fig. 4 and will not be described in detail since they are not components that are used in the embodiment of the present application.
Those skilled in the art will appreciate that fig. 4 is merely an example of a control device and is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or different components.
Embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for data processing in any of the above-mentioned method embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a general hardware platform, and certainly can also be implemented by hardware. Based on such understanding, the above technical solutions substantially or partially contributing to the related art may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes several instructions for enabling a control device (which may be a personal computer, a server, or a network device, etc.) to execute the methods of the various embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1. A method of page display, comprising:
intercepting a page access request to be sent to a server by an application through a target program, wherein the target program is a current page independent of the application and runs in a background process;
when historical access page data corresponding to the page access request are cached, obtaining the historical access page data through the target program;
displaying a page according to the historical access page data;
sending the page access request to the server through the target program, and receiving current page data returned by the server, wherein the historical access page data and the current page data are both composed of a page template and page content data;
and refreshing the page according to the page content data contained in the current page data and the page template contained in the historical access page data.
2. The method of claim 1, prior to intercepting, by the target program, a page access request to be sent by the application to the server, further comprising:
and registering and starting the target program from the access page provided by the server, wherein the target program is used for acquiring rendered page data from the server according to the page access request and caching the acquired page data.
3. The method of claim 1, after intercepting, by the target program, a page access request to be sent by the application to the server, further comprising:
when determining that historical access page data corresponding to the page access request is not cached, sending the page access request to the server through the target program;
receiving current page data returned by the server through the target program;
and displaying a page according to the current page data.
4. The method of any one of claims 1-3, further comprising:
and caching the acquired current page data through the target program.
5. The method of any one of claims 1-3, wherein refreshing pages based on page content data contained in the current page data and page templates contained in the historical access page data comprises:
receiving page content data in the current page data returned by the target program in a designated communication mode, wherein the page content data in the current page data is acquired from the current page data by the target program according to designated identification information;
integrating the received page content data with a page template contained in the historical access page data;
and refreshing the page according to the integrated data.
6. A method according to any one of claims 1-3, wherein the current page data is obtained by the server according to the following steps:
acquiring a corresponding page template and page content data according to page address information contained in the page access request;
and binding the acquired page template and the page content data, and rendering to generate current page data, wherein the page content data is located in the specified identification information in the current page data.
7. An apparatus for page display, comprising:
the system comprises an intercepting unit, a processing unit and a processing unit, wherein the intercepting unit is used for intercepting a page access request to be sent to a server by an application through a target program, and the target program is a current page independent of the application and runs in a background process;
the acquisition unit is used for acquiring historical access page data through the target program when the historical access page data corresponding to the page access request is cached;
the display unit is used for displaying a page according to the historical access page data;
the receiving unit is used for sending the page access request to the server through the target program and receiving current page data returned by the server, wherein the historical access page data and the current page data are both composed of a page template and page content data;
and the refreshing unit is used for refreshing the page according to the page content data contained in the current page data and the page template contained in the historical access page data.
8. The apparatus of claim 7, wherein the truncation unit is further to:
and registering and starting the target program from the access page provided by the server, wherein the target program is used for acquiring rendered page data from the server according to the page access request and caching the acquired page data.
9. The apparatus of claim 7, wherein the truncation unit is further to:
when determining that historical access page data corresponding to the page access request is not cached, sending the page access request to the server through the target program;
receiving current page data returned by the server through the target program;
and displaying a page according to the current page data.
10. The apparatus of any of claims 7-9, wherein the refresh unit is further to:
and caching the acquired current page data through the target program.
CN201911229406.6A 2019-12-04 2019-12-04 Page display method and device Active CN112905920B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911229406.6A CN112905920B (en) 2019-12-04 2019-12-04 Page display method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911229406.6A CN112905920B (en) 2019-12-04 2019-12-04 Page display method and device

Publications (2)

Publication Number Publication Date
CN112905920A true CN112905920A (en) 2021-06-04
CN112905920B CN112905920B (en) 2023-08-04

Family

ID=76110727

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911229406.6A Active CN112905920B (en) 2019-12-04 2019-12-04 Page display method and device

Country Status (1)

Country Link
CN (1) CN112905920B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115033656A (en) * 2022-08-15 2022-09-09 海纳云物联科技有限公司 Data processing method and device based on map cache technology and electronic device
CN117171419A (en) * 2023-10-31 2023-12-05 腾讯科技(深圳)有限公司 Content processing method, device, electronic apparatus, storage medium, and program product

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020103858A1 (en) * 2000-10-02 2002-08-01 Bracewell Shawn D. Template architecture and rendering engine for web browser access to databases
US20030066031A1 (en) * 2001-09-28 2003-04-03 Siebel Systems, Inc. Method and system for supporting user navigation in a browser environment
CN102467366A (en) * 2010-11-04 2012-05-23 北京无线恒远科技有限公司 Page developing method and device based on wireless application protocol (WAP)
CN105607927A (en) * 2015-12-18 2016-05-25 小米科技有限责任公司 Page display method and apparatus
US20190058667A1 (en) * 2016-06-01 2019-02-21 Guangzhou Ucweb Computer Technology Co., Ltd. Apparatus, hybrid apparatus, and method for network resource access
US10331769B1 (en) * 2012-03-23 2019-06-25 Amazon Technologies, Inc. Interaction based prioritized retrieval of embedded resources
CN109948090A (en) * 2019-03-08 2019-06-28 腾讯科技(深圳)有限公司 Webpage loading method and device
CN110456738A (en) * 2018-05-07 2019-11-15 华中科技大学 Monitoring system and its monitoring method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020103858A1 (en) * 2000-10-02 2002-08-01 Bracewell Shawn D. Template architecture and rendering engine for web browser access to databases
US20030066031A1 (en) * 2001-09-28 2003-04-03 Siebel Systems, Inc. Method and system for supporting user navigation in a browser environment
CN102467366A (en) * 2010-11-04 2012-05-23 北京无线恒远科技有限公司 Page developing method and device based on wireless application protocol (WAP)
US10331769B1 (en) * 2012-03-23 2019-06-25 Amazon Technologies, Inc. Interaction based prioritized retrieval of embedded resources
CN105607927A (en) * 2015-12-18 2016-05-25 小米科技有限责任公司 Page display method and apparatus
US20190058667A1 (en) * 2016-06-01 2019-02-21 Guangzhou Ucweb Computer Technology Co., Ltd. Apparatus, hybrid apparatus, and method for network resource access
CN110456738A (en) * 2018-05-07 2019-11-15 华中科技大学 Monitoring system and its monitoring method
CN109948090A (en) * 2019-03-08 2019-06-28 腾讯科技(深圳)有限公司 Webpage loading method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115033656A (en) * 2022-08-15 2022-09-09 海纳云物联科技有限公司 Data processing method and device based on map cache technology and electronic device
CN115033656B (en) * 2022-08-15 2023-08-08 海纳云物联科技有限公司 Data processing method and device based on map caching technology and electronic device
CN117171419A (en) * 2023-10-31 2023-12-05 腾讯科技(深圳)有限公司 Content processing method, device, electronic apparatus, storage medium, and program product
CN117171419B (en) * 2023-10-31 2024-04-30 腾讯科技(深圳)有限公司 Content processing method, device, electronic apparatus, storage medium, and program product

Also Published As

Publication number Publication date
CN112905920B (en) 2023-08-04

Similar Documents

Publication Publication Date Title
US20200396186A1 (en) Thumbnail image previews
KR102436987B1 (en) Method and terminal device for extracting web page content
US10754917B2 (en) Method and system for displaying customized webpage on double webview
CA2734999C (en) New tab pages and bookmark toolbars in a browser
US10091313B2 (en) Method and system for tracking web link usage
US9405745B2 (en) Language translation using embeddable component
US20060155780A1 (en) Adding personalized value to web sites
US20080301300A1 (en) Predictive asynchronous web pre-fetch
US20090003704A1 (en) Method and system for controlling browser by using image
CN102799372B (en) A kind of method for uploading of pictorial information and upload device
US11537683B2 (en) Configuration of content site user interaction monitoring in data networks
US20140047359A1 (en) Mechanism for adding new search modes to user agent
CN108874922B (en) Client device, webpage rendering method based on single page application and storage medium
US20170300459A1 (en) Card-type desktop implementation method and apparatus
US8090702B2 (en) Analyzing web site traffic
CN112905920B (en) Page display method and device
CN113392358A (en) Static resource preloading method and device
US11720407B2 (en) Resource pre-fetch using age threshold
US20140258834A1 (en) Systems and Methods for Displaying Content with Inline Advertising Zones
CN113330432A (en) Asynchronous predictive caching of content listed in search results
KR100407206B1 (en) Pre-processor and method and apparatus for processing web documents using the same
CN117390326A (en) Page management method, device, equipment and storage medium
KR20020043372A (en) Method and system for closing a new window automatically on a web-browser
CN115687817A (en) Router page rapid loading method and device, electronic equipment and storage medium
KR20110090966A (en) Method for operating an ending widget with data retrieved from a starting widget

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
GR01 Patent grant
GR01 Patent grant