CN112149017A - Webpage access method, device and system, electronic equipment and storage medium - Google Patents

Webpage access method, device and system, electronic equipment and storage medium Download PDF

Info

Publication number
CN112149017A
CN112149017A CN202010959984.1A CN202010959984A CN112149017A CN 112149017 A CN112149017 A CN 112149017A CN 202010959984 A CN202010959984 A CN 202010959984A CN 112149017 A CN112149017 A CN 112149017A
Authority
CN
China
Prior art keywords
webpage
accessed
data
interface data
interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010959984.1A
Other languages
Chinese (zh)
Inventor
李正雄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
JD Digital Technology Holdings Co Ltd
Original Assignee
JD Digital Technology Holdings 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 JD Digital Technology Holdings Co Ltd filed Critical JD Digital Technology Holdings Co Ltd
Priority to CN202010959984.1A priority Critical patent/CN112149017A/en
Publication of CN112149017A publication Critical patent/CN112149017A/en
Pending legal-status Critical Current

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

Abstract

The application relates to a webpage access method, a device, a system, electronic equipment and a storage medium, wherein the method comprises the following steps: receiving a webpage request of a webpage to be accessed from a client; acquiring first interface data corresponding to the webpage to be accessed from a cache; rendering the first interface data to webpage data corresponding to the webpage to be accessed; and sending the rendered webpage data to the client, and rendering the webpage to be accessed by the client according to the rendered webpage data. The technical scheme reduces the calling times and calling data volume of the network server interface, and particularly can greatly reduce the pressure of the network server interface when the page access volume is increased and the request data volume is overlarge. In addition, asynchronous request data are not limited by the performance of the network server interface any more, and the webpage loading speed is guaranteed.

Description

Webpage access method, device and system, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a system, an electronic device, and a storage medium for accessing a web page.
Background
With the development of the internet, front-end and back-end separation has become a standard application mode of internet projects. The front end generally refers to a browser, an APP, and other applications on the client side accessing the network, and the back end refers to a device, such as a Web server and an application server, on the network side providing network data. In this mode, the front end renders an HTML page, calls the back end interface data in an asynchronous manner, and the back end returns only data required by the front end, does not render the HTML page any more, and does not control the effect of the front end any more.
However, due to asynchronous data request, the loading speed and user experience of the page are directly affected by the performance of the interface; and when the page is reloaded, the request is sent from the front end to the back end to obtain data; when the page access amount is increased and the request data is overlarge, the calling times and the calling data amount of the back-end interface are correspondingly increased, so that the pressure of the back-end interface is overlarge.
Disclosure of Invention
In order to solve the technical problem or at least partially solve the technical problem, embodiments of the present application provide a method, an apparatus, a system, an electronic device, and a storage medium for accessing a web page.
According to an aspect of an embodiment of the present application, there is provided a web page access method, including:
receiving a webpage request of a webpage to be accessed from a client;
acquiring first interface data corresponding to the webpage to be accessed from a cache;
rendering the first interface data to webpage data corresponding to the webpage to be accessed;
and sending the rendered webpage data to the client, and rendering the webpage to be accessed by the client according to the rendered webpage data.
Optionally, when the first interface data corresponding to the to-be-accessed webpage is not acquired from the cache, the method further includes:
acquiring the first interface data from a network server corresponding to the webpage to be accessed according to the webpage request;
and caching the first interface data.
Optionally, the method further includes:
periodically acquiring second interface data corresponding to the webpage from the network server;
and caching second interface data of the webpage.
Optionally, the rendering the first interface data to the webpage data corresponding to the webpage to be accessed includes:
acquiring the webpage data;
determining a first preset label in the webpage data;
converting the first interface data into a preset format to obtain third interface data;
generating a second preset label according to the third interface data;
and inserting the second preset tag into the first preset tag to obtain the rendered webpage data.
Optionally, the obtaining, from the cache, the first interface data corresponding to the webpage to be accessed includes:
in a preset access control stage, sending a query request comprising a key value corresponding to the webpage to be accessed to a cache database;
and receiving first interface data corresponding to the key value obtained by querying the cache database.
Optionally, the method further includes:
receiving webpage data from a development end;
carrying out proxy server configuration on the webpage data;
and uploading the configured webpage data to a network server through the OpenResty container for publication.
According to another aspect of the embodiments of the present application, there is provided a web page access apparatus, including:
the receiving module is used for receiving a webpage request of a webpage to be accessed from a client;
the acquisition module is used for acquiring first interface data corresponding to the webpage to be accessed from a cache;
the rendering module is used for rendering the first interface data to webpage data corresponding to the webpage to be accessed;
and the sending module is used for sending the rendered webpage data to the client, and the client renders the webpage to be accessed according to the rendered webpage data.
According to another aspect of the embodiments of the present application, there is also provided a web page access system, including: the system comprises a client, a resource server and a network server, wherein the resource server is used for caching interface data corresponding to a webpage acquired from the network server in advance;
the client is used for sending a webpage request of a webpage to be accessed to the resource server;
the resource server is used for acquiring first interface data corresponding to the webpage to be accessed from a cache according to the webpage request; rendering the first interface data to webpage data corresponding to the webpage to be accessed; sending the rendered webpage data to the client;
and the client is used for rendering the webpage to be accessed according to the rendered webpage data.
Optionally, the system further includes: a network server;
the resource server is used for sending the webpage request to a network server corresponding to the webpage to be accessed when the first interface data corresponding to the webpage to be accessed is not acquired from the cache;
the network server is used for returning the first interface data corresponding to the webpage to be accessed to the resource server according to the access request;
the resource server is used for caching the first interface data.
According to another aspect of the embodiments of the present application, there is also provided a storage medium including a stored program that executes the above steps when the program is executed.
According to another aspect of an embodiment of the present application, there is provided an electronic device including: the system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the above method steps when executing the computer program.
According to another aspect of embodiments of the present application, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the above-mentioned method steps.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages:
the interface data of the web page are cached in advance through the resource server, when a web page request sent by the client is received, the interface data cached in advance are directly inquired locally, the inquired interface data are rendered into the web page data, the rendered web page data are returned to the client, the calling times and the calling data volume of the network server interface are reduced, and particularly when the page access volume is increased and the request data volume is overlarge, the pressure of the network server interface can be greatly reduced. In addition, asynchronous request data are not limited by the performance of the network server interface any more, and the webpage loading speed is guaranteed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
Fig. 1 is a block diagram of a web page access system according to an embodiment of the present application;
FIG. 2 is a block diagram of a web page access system according to another embodiment of the present application;
fig. 3 is a flowchart of a web page access method according to an embodiment of the present application;
fig. 4 is a flowchart of a web page access method according to another embodiment of the present application;
FIG. 5 is a flowchart of a method for accessing a web page according to another embodiment of the present application;
fig. 6 is a flowchart illustrating a method for a client to access a web page according to an embodiment of the present application;
fig. 7 is a flowchart illustrating rendering of web page data by a client according to an embodiment of the present application;
fig. 8 is a block diagram of a web page access device according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
According to the embodiment of the application, the resource server is arranged between the front end (namely the client) and the back end (namely the network server), and the interface data corresponding to the webpage is pre-cached through the resource server. Therefore, the resource server feeds back the pre-cached interface data to the front end according to the page request sent by the front end, so that the calling of the network server interface is reduced, and the pressure of the network server interface is reduced.
Fig. 1 is a block diagram of a web page access system according to an embodiment of the present application. As shown in fig. 1, the system includes: client 1, resource server 2 and web server 3.
The resource server 2 pre-caches interface data corresponding to a web page acquired from the web server 3. Alternatively, the resource server 2 may periodically obtain interface data corresponding to the web page from the web server 3.
The system comprises a client 1, a resource server 2 and a server, wherein the client is used for sending a webpage request of a webpage to be accessed to the resource server 2;
the resource server 2 is used for acquiring first interface data corresponding to the webpage to be accessed from the cache according to the webpage request; rendering the first interface data to webpage data corresponding to the webpage to be accessed; sending the rendered webpage data to the client 1;
and the client 1 is used for rendering the webpage to be accessed according to the rendered webpage data.
Optionally, the resource server 2 is configured to send the web page request to the web server 3 corresponding to the web page to be accessed when the first interface data corresponding to the web page to be accessed is not acquired from the cache;
the network server 3 is used for returning the first interface data corresponding to the webpage to be accessed to the resource server 2 according to the access request;
and the resource server 2 is used for caching the first interface data.
Optionally, as shown in fig. 2, the system further includes a Content Delivery Network (CDN) node 4, and the client sends a web page request to the CDN node 4. When the CDN node 4 misses a to-be-accessed web page corresponding to a web page request, the web page request is sent to the resource server 2, and web page data corresponding to the to-be-accessed web page is acquired from the resource server 2.
After the HTML file corresponding to the webpage to be accessed is loaded by the resource server 2, the interface data corresponding to the webpage to be accessed is searched from the Redis database, the script tag is generated according to the interface data, the script tag is inserted into the HTML file, and the webpage data are fed back to the client.
The remote Dictionary service is an open source log-type and Key-Value database written in ANSI C language, supporting network, based on memory and persistent, and provides API in multiple languages. In this embodiment, the Redis database is a high-performance key-value database.
If the interface data of the network server changes, but the interface data stored by the CDN node is still within the validity period, the data acquired by the client from the CDN node will not change. Therefore, when the interface data of the network server changes, the interface data needs to be synchronized to the CDN nodes in time, and the CDN node data needs to be updated and cleaned in time. The network server may send a data update message to the CDN node, and the CDN node obtains updated interface data from the network server according to the data update message and deletes interface data cached before.
Based on the system architecture, a web page access method provided by the embodiment of the invention is introduced below.
Fig. 3 is a flowchart of a web page access method according to an embodiment of the present application. As shown in fig. 3, the method is applied to a resource server, which is located between a client and a network server. The method comprises the following steps:
in step S11, a web page request of a web page to be accessed from a client is received.
The web page request may include a web page identifier of a web page to be accessed, which may be a domain name, a web address, an IP address, a URL, and the like.
Step S12, obtaining the first interface data corresponding to the to-be-accessed webpage from the cache.
The resource server acquires interface data corresponding to the webpage from the network server in advance and caches the interface data. When a webpage request sent by a client is received, the interface data corresponding to the webpage request is directly searched from the pre-cached interface data.
Optionally, the resource server caches the interface data in a Redis database.
And step S13, rendering the first interface data to the webpage data corresponding to the webpage to be accessed.
Specifically, the first interface data may be inserted into a preset position of the web page data.
And step S14, sending the rendered webpage data to the client, and rendering the webpage to be accessed by the client according to the rendered webpage data.
Through the steps S11 to S14, the interface data of the web page is cached in advance by the resource server, when a web page request sent by the client is received, the interface data cached in advance is directly queried locally, the queried interface data is rendered into the web page data, the rendered additional web page data is returned to the client, the number of times of calling the web server interface and the amount of calling data are reduced, and particularly when the page access amount is increased and the amount of requested data is too large, the pressure of the web server interface can be greatly reduced. In addition, asynchronous request data are not limited by the performance of the network server interface any more, and the webpage loading speed is guaranteed.
In another optional embodiment, when the first interface data corresponding to the web page to be accessed is not acquired from the cache, the method further includes: step A1, acquiring first interface data from a network server corresponding to a webpage to be accessed according to a webpage request; step a2, cache the first interface data.
The resource server acquires the first interface data from the network server through the HTTP interface, and caches the first interface data in Redis after the first interface data is successfully acquired.
The interface data corresponding to the web page to be accessed may include interface data that is not cached by the resource server, such as interface data with stronger timeliness, or cached interface data that has failed, and at this time, the resource server needs to obtain the interface data from the network server.
Optionally, the method further includes: step B1, periodically acquiring second interface data corresponding to the webpage from the network server; and step B2, caching the second interface data of the webpage.
Wherein, the resource server can obtain the interface data from the network server periodically, such as once per week or once per month; alternatively, the interface data may be acquired from the network server according to the validity period of each interface data, for example, if the validity period of the interface data a is three days, the resource server acquires the interface data a from the network server every three days, and if the validity period of the interface data B is one week, the resource server acquires the interface data B from the network server every week.
Optionally, the interface data pre-cached by the resource server is generally interface data with poor timeliness, such as interface data updated every three days, every week, or every month, and for interface data with strong timeliness, the interface data still needs to be acquired from the network server in real time.
Fig. 4 is a flowchart of a web page access method according to another embodiment of the present application. As shown in fig. 4, the step S13 includes the following steps:
step S21, acquiring webpage data;
step S22, determining a first preset tag in the webpage data;
step S23, converting the first interface data into a preset format to obtain third interface data;
step S24, generating a second preset label according to the third interface data;
and step S25, inserting the second preset tag into the first preset tag to obtain rendered webpage data.
Specifically, in the above-described step S21, web page data, such as HTML text, may be acquired using an ngx.location.capture or ngx.location.capture _ multi instruction.
In step S22, the head tags in the HTML text may be matched by regular expressions. Wherein, the head is the tag positioned at the head of the html webpage and < body > after < html >, and the html tag beginning with < head > and ending with </head >. head contains meta, title, link, base, script, etc. tags.
In the above step S23, the first interface data may be converted into a JavaScript Object Notation (Json) format.
In step S24, a script tag is generated according to the interface data in the Json format, and the script tag is inserted into the head tag, thereby completing rendering the interface data into the web page data. The script tag can be embedded with a JavaScript or CSS file of the webpage.
After the rendered webpage data are fed back to the client, the client can search the interface data from the head tag of the webpage data, and then webpage rendering can be performed according to the webpage data.
In another alternative embodiment, the step S12 includes:
step C1, in the preset access control stage, sending the query request including the key value corresponding to the webpage to be accessed to the cache database;
and step C2, receiving the first interface data corresponding to the key values obtained by querying the cache database.
Fig. 5 is a flowchart of a web page access method according to another embodiment of the present application. In another alternative embodiment, as shown in fig. 5, the method further comprises:
step S31, receiving webpage data from the development end; the webpage data comprise page codes such as HTML, CSS and JS.
Step S32, proxy server configuration is carried out on the webpage data; the proxy server may be Nginx, which is a high performance HTTP and reverse proxy web server.
Step S33, the configured web page data is uploaded to a web server through the openreserve container and published.
Openness is a high-performance Web platform based on Nginx and Lua, and a large number of fine Lua libraries, third-party modules and most of dependent items are integrated inside the high-performance Web platform. The method is used for conveniently building dynamic Web application, Web service and dynamic gateway which can process ultra-high concurrency and extremely high expansibility.
In the step S12, the interface data may be obtained by accessing Redis according to a key value agreed with the interface in a content _ by _ lua _ file (block) control phase of openreserve. The data in the Redis is stored in a Key-Value Key Value pair form, and the Value is interface data. Meanwhile, the operation of step S13 is also performed in the content _ by _ lua _ file (block) control phase of openness.
The following describes the process of accessing a web page by a client in detail.
Fig. 6 is a flowchart illustrating a method for a client to access a web page according to an embodiment of the present application. As shown in fig. 6, the flow is as follows:
step S401, a client sends a webpage request;
step S402, the CDN node inquires webpage data corresponding to a webpage to be accessed according to the webpage request;
step S403, after receiving the web page request, the CDN node determines whether to hit the web page to be accessed, if so, performs step S413, and if not, performs step 404;
step S404, the CDN node sends a webpage request to a resource server;
step S405, the resource server loads an HTML file of a webpage to be accessed;
step S406, judging whether the loading is successful, if not, executing step S407, and if so, executing step S408;
step S407, the resource server returns 404 error information to the client;
step S408, the resource server acquires interface data corresponding to the webpage to be accessed from Redis;
step S409, judging whether interface data exist in Redis, if not, executing step S410, and if so, executing step S412;
step S410, the resource server obtains interface data from the network server through the HTTP interface;
step S411, judging whether the interface data is successfully acquired, if so, executing step S412, and if not, executing step S412;
step S412, the resource server generates a script tag according to the interface data and inserts the script tag into the HTML file to obtain webpage data;
step S413, responding to the client. And if the webpage data are finally obtained, returning the webpage data to the client, and if the interface data are not obtained from the network server, responding to the preset information of the client.
Through the steps S401 to S413, the resource server caches the interface data of the web page in advance, directly queries the interface data cached in advance locally when receiving the web page request sent by the client, renders the queried interface data into the web page data, and returns the rendered web page data to the client, so as to reduce the number of calls and the data volume of the web server interface, and especially, when the page access volume is increased and the requested data volume is too large, the pressure of the web server interface can be greatly reduced. In addition, asynchronous request data are not limited by the performance of the network server interface any more, and the webpage loading speed is guaranteed. The process of rendering web page data by the client is described in detail below.
Fig. 7 is a flowchart illustrating rendering of web page data by a client according to an embodiment of the present disclosure. As shown in fig. 7, the flow is as follows:
step S501, a client opens a URL of a webpage to be accessed;
step S502, loading an HTML file of a webpage to be accessed;
step S503, requesting interface data of a webpage to be accessed;
step S504, the client searches interface data from the head label of the received HTML file;
step S505, judging whether the head label has interface data, if so, executing step S506, otherwise, executing step S507;
step S506, the client renders a page to be accessed;
step S507, sending an HTTP request, acquiring interface data, and executing step S506;
step S508, completing loading the web page.
Through the steps S501 to S508, the client directly loads the web page according to the interface data returned by the resource server, so that the asynchronous request data is not limited by the interface performance of the network server any more, and the loading speed of the web page is increased. The client side caches the interface data of the web page in advance through the resource server, directly queries the pre-cached interface data locally when receiving a web page request sent by the client side, renders the queried interface data into the web page data, and returns the rendered web page data to the client side, so that the calling times and the calling data volume of the network server interface are reduced, and particularly, when the page access volume is increased and the request data volume is overlarge, the pressure of the network server interface can be greatly reduced.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application.
Fig. 8 is a block diagram of a web page access apparatus provided in an embodiment of the present application, which may be implemented as part of or all of an electronic device through software, hardware, or a combination of the two. As shown in fig. 8, the web page access apparatus applied to a resource server includes:
a receiving module 81, configured to receive a web page request of a web page to be accessed from a client;
an obtaining module 82, configured to obtain, from a cache, first interface data corresponding to the to-be-accessed webpage;
the rendering module 83 is configured to render the first interface data to webpage data corresponding to the webpage to be accessed;
a sending module 84, configured to send the rendered web page data to the client, and render the web page to be accessed by the client according to the rendered web page data.
An embodiment of the present application further provides an electronic device, as shown in fig. 9, the electronic device may include: the system comprises a processor 1501, a communication interface 1502, a memory 1503 and a communication bus 1504, wherein the processor 1501, the communication interface 1502 and the memory 1503 complete communication with each other through the communication bus 1504.
A memory 1503 for storing a computer program;
the processor 1501, when executing the computer program stored in the memory 1503, implements the steps of the method embodiments described below.
The communication bus mentioned in the electronic device may be a Peripheral component interconnect (pci) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
The present application further provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method embodiments of:
receiving a webpage request of a webpage to be accessed from a client;
acquiring first interface data corresponding to the webpage to be accessed from a cache;
rendering the first interface data to webpage data corresponding to the webpage to be accessed;
and sending the rendered webpage data to the client, and rendering the webpage to be accessed by the client according to the rendered webpage data.
Optionally, when the first interface data corresponding to the to-be-accessed webpage is not acquired from the cache, the method further includes:
acquiring the first interface data from a network server corresponding to the webpage to be accessed according to the webpage request;
and caching the first interface data.
Optionally, the method further includes:
periodically acquiring second interface data corresponding to the webpage from the network server;
and caching second interface data of the webpage.
Optionally, the rendering the first interface data to the webpage data corresponding to the webpage to be accessed includes:
acquiring the webpage data;
determining a first preset label in the webpage data;
converting the first interface data into a preset format to obtain third interface data;
generating a second preset label according to the third interface data;
and inserting the second preset tag into the first preset tag to obtain the rendered webpage data.
Optionally, the obtaining, from the cache, the first interface data corresponding to the webpage to be accessed includes:
in a preset access control stage, sending a query request comprising a key value corresponding to the webpage to be accessed to a cache database;
and receiving first interface data corresponding to the key value obtained by querying the cache database.
Optionally, the method further includes:
receiving webpage data from a development end;
carrying out proxy server configuration on the webpage data;
and uploading the configured webpage data to a network server through the OpenResty container for publication.
It should be noted that, for the above-mentioned apparatus, electronic device and computer-readable storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
It is further noted that, herein, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (11)

1. A method for accessing a web page, comprising:
receiving a webpage request of a webpage to be accessed from a client;
acquiring first interface data corresponding to the webpage to be accessed from a cache;
rendering the first interface data to webpage data corresponding to the webpage to be accessed;
and sending the rendered webpage data to the client, and rendering the webpage to be accessed by the client according to the rendered webpage data.
2. The method according to claim 1, wherein when the first interface data corresponding to the web page to be accessed is not acquired from the cache, the method further comprises:
acquiring the first interface data from a network server corresponding to the webpage to be accessed according to the webpage request;
and caching the first interface data.
3. The method of claim 1, further comprising:
periodically acquiring second interface data corresponding to the webpage from the network server;
and caching second interface data of the webpage.
4. The method of claim 1, wherein the rendering the first interface data to the webpage data corresponding to the webpage to be accessed comprises:
acquiring the webpage data;
determining a first preset label in the webpage data;
converting the first interface data into a preset format to obtain third interface data;
generating a second preset label according to the third interface data;
and inserting the second preset tag into the first preset tag to obtain the rendered webpage data.
5. The method according to claim 1, wherein the obtaining the first interface data corresponding to the to-be-accessed webpage from the cache comprises:
in a preset access control stage, sending a query request comprising a key value corresponding to the webpage to be accessed to a cache database;
and receiving first interface data corresponding to the key value obtained by querying the cache database.
6. The method of claim 1, further comprising:
receiving webpage data from a development end;
carrying out proxy server configuration on the webpage data;
and uploading the configured webpage data to a network server through the OpenResty container for publication.
7. A web page access apparatus, comprising:
the receiving module is used for receiving a webpage request of a webpage to be accessed from a client;
the acquisition module is used for acquiring first interface data corresponding to the webpage to be accessed from a cache;
the rendering module is used for rendering the first interface data to webpage data corresponding to the webpage to be accessed;
and the sending module is used for sending the rendered webpage data to the client, and the client renders the webpage to be accessed according to the rendered webpage data.
8. A web page access system, comprising: the system comprises a client, a resource server and a network server; the resource server is used for caching interface data corresponding to the webpage acquired from the network server in advance;
the client is used for sending a webpage request of a webpage to be accessed to the resource server;
the resource server is used for acquiring first interface data corresponding to the webpage to be accessed from a cache according to the webpage request; rendering the first interface data to webpage data corresponding to the webpage to be accessed; sending the rendered webpage data to the client;
and the client is used for rendering the webpage to be accessed according to the rendered webpage data.
9. The system of claim 8, further comprising: a network server;
the resource server is used for sending the webpage request to a network server corresponding to the webpage to be accessed when the first interface data corresponding to the webpage to be accessed is not acquired from the cache;
the network server is used for returning the first interface data corresponding to the webpage to be accessed to the resource server according to the access request;
the resource server is used for caching the first interface data.
10. An electronic device, comprising: the system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
the memory is used for storing a computer program;
the processor, when executing the computer program, implementing the method steps of any of claims 1-6.
11. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method steps of any one of claims 1 to 6.
CN202010959984.1A 2020-09-14 2020-09-14 Webpage access method, device and system, electronic equipment and storage medium Pending CN112149017A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010959984.1A CN112149017A (en) 2020-09-14 2020-09-14 Webpage access method, device and system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010959984.1A CN112149017A (en) 2020-09-14 2020-09-14 Webpage access method, device and system, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112149017A true CN112149017A (en) 2020-12-29

Family

ID=73892239

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010959984.1A Pending CN112149017A (en) 2020-09-14 2020-09-14 Webpage access method, device and system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112149017A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112765507A (en) * 2021-01-27 2021-05-07 上海淇玥信息技术有限公司 Method and device for rendering first screen of page and loading resources and electronic equipment
CN113645062A (en) * 2021-07-13 2021-11-12 阿里巴巴新加坡控股有限公司 Page data processing method and device and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109241471A (en) * 2018-10-26 2019-01-18 珠海格力电器股份有限公司 Page rendering method, server, browser and exploitation for energy information management system
CN109684575A (en) * 2018-10-30 2019-04-26 平安科技(深圳)有限公司 Processing method and processing device, storage medium, the computer equipment of web data
CN110287432A (en) * 2019-06-28 2019-09-27 北京金山安全软件有限公司 Network information processing method and device and electronic equipment
CN110598149A (en) * 2019-08-15 2019-12-20 平安普惠企业管理有限公司 Webpage access method, device and storage medium
CN110647706A (en) * 2019-08-29 2020-01-03 北京金堤科技有限公司 Method, device and equipment for processing webpage access request and storage medium
CN111159614A (en) * 2019-12-30 2020-05-15 北京金堤科技有限公司 Webpage resource acquisition method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109241471A (en) * 2018-10-26 2019-01-18 珠海格力电器股份有限公司 Page rendering method, server, browser and exploitation for energy information management system
CN109684575A (en) * 2018-10-30 2019-04-26 平安科技(深圳)有限公司 Processing method and processing device, storage medium, the computer equipment of web data
CN110287432A (en) * 2019-06-28 2019-09-27 北京金山安全软件有限公司 Network information processing method and device and electronic equipment
CN110598149A (en) * 2019-08-15 2019-12-20 平安普惠企业管理有限公司 Webpage access method, device and storage medium
CN110647706A (en) * 2019-08-29 2020-01-03 北京金堤科技有限公司 Method, device and equipment for processing webpage access request and storage medium
CN111159614A (en) * 2019-12-30 2020-05-15 北京金堤科技有限公司 Webpage resource acquisition method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112765507A (en) * 2021-01-27 2021-05-07 上海淇玥信息技术有限公司 Method and device for rendering first screen of page and loading resources and electronic equipment
CN112765507B (en) * 2021-01-27 2023-12-26 上海淇玥信息技术有限公司 Page first screen rendering and resource loading method and device and electronic equipment
CN113645062A (en) * 2021-07-13 2021-11-12 阿里巴巴新加坡控股有限公司 Page data processing method and device and electronic equipment

Similar Documents

Publication Publication Date Title
US10887418B1 (en) Parallel, side-effect based DNS pre-caching
CN105095280B (en) Browser caching method and device
CN112073405B (en) Webpage data loading method and device, computer equipment and storage medium
CN107465707B (en) Content refreshing method and device for content distribution network
US8219633B2 (en) Acceleration of web pages access using next page optimization, caching and pre-fetching
JP6091579B2 (en) Method and apparatus for handling nested fragment caching of web pages
US8745341B2 (en) Web server cache pre-fetching
KR102151457B1 (en) Method and apparatus for reducing page load time in a communication system
TWI656772B (en) Method, system, web server, browser and GPS for obtaining webpage
CN103685604B (en) A kind of domain name pre-parsed method and device
CN103152367A (en) Cache dynamic maintenance updating method and system
CN112149017A (en) Webpage access method, device and system, electronic equipment and storage medium
CN109634753B (en) Data processing method, device, terminal and storage medium for switching browser kernels
US8566448B2 (en) System and method for providing device file using device identifier
CN107070988A (en) Message processing method and device
US20070288591A1 (en) Method, system, and program product for caching application data in a browser cache
CN111651703B (en) Page jump method and device, electronic equipment and readable storage medium
US10983996B2 (en) Asynchronous predictive caching of content listed in search results
CN103269353A (en) Web cache and return optimization method and Web cache system
CN113127420B (en) Metadata request processing method, device, equipment and medium
CN105279156A (en) Network information communication method and network information browsing device
US20160117392A1 (en) Information search method and apparatus
KR100959759B1 (en) System and Method for Web Accelerating Service of Server Supporting Type of Mobile Internet
CN105512280A (en) Site file caching method and system
CN104869182A (en) Domain name resolution method and device

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: Jingdong Digital Technology Holding Co., Ltd