CN109495553B - Webpage display control method and system and reverse proxy server - Google Patents

Webpage display control method and system and reverse proxy server Download PDF

Info

Publication number
CN109495553B
CN109495553B CN201811288783.2A CN201811288783A CN109495553B CN 109495553 B CN109495553 B CN 109495553B CN 201811288783 A CN201811288783 A CN 201811288783A CN 109495553 B CN109495553 B CN 109495553B
Authority
CN
China
Prior art keywords
webpage
server
static
user terminal
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811288783.2A
Other languages
Chinese (zh)
Other versions
CN109495553A (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 CN201811288783.2A priority Critical patent/CN109495553B/en
Publication of CN109495553A publication Critical patent/CN109495553A/en
Application granted granted Critical
Publication of CN109495553B publication Critical patent/CN109495553B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application provides a webpage display control method, a webpage display control system and a reverse proxy server, and relates to the technical field of Internet, wherein the method comprises the following steps: and receiving a webpage request sent by the user terminal to the reverse proxy server, and sending the webpage request to the direct server. And when error reporting information fed back by the direct-out server is received, sending the webpage request to the static server, and then forwarding the static webpage data sent by the static server to the user terminal so that the user terminal can acquire the webpage content data from the content database, and generate and display a webpage according to the webpage content data and the static webpage data. Compared with the reverse proxy service which directly feeds back the received error reporting information to the user terminal, the reverse proxy server sends the webpage request to the static server when the user terminal displays the error page, so that the user terminal can display the requested webpage when the webpage requests are increased, and the user experience is improved.

Description

Webpage display control method and system and reverse proxy server
Technical Field
The embodiment of the invention relates to the technical field of internet, in particular to a webpage display control method, a webpage display control system and a reverse proxy server.
Background
Generally, a Web page viewed by a user on a browser is obtained by the browser interacting with a Web server. To increase the speed at which users access web pages, some web pages employ a direct-out server to provide web page data. After the user inputs the website and submits, the direct server goes to the data server to obtain the data required by the user, and then the obtained data is written on the webpage, so that the user can quickly see the webpage, however, when activities such as sales promotion occur, the user requesting the webpage is increased rapidly, the direct server cannot timely process all webpage requests, and the error report page is returned to the browser end, so that bad experience is brought to the user.
Disclosure of Invention
In the prior art, when the outbound server cannot process a rapidly-increased webpage request, an error-reporting page is directly returned to the browser end, which brings a problem of poor experience to a user.
In one aspect, an embodiment of the present application provides a method for controlling webpage display, including:
receiving a webpage request sent by a user terminal, and sending the webpage request to a straight-out server;
when error reporting information fed back by the straight-out server is received, the webpage request is sent to a static server;
and forwarding the static webpage data sent by the static server to the user terminal so that the user terminal acquires webpage content data from a content database, and generates and displays a webpage according to the webpage content data and the static webpage data.
Because the straight-out server cannot process the network request of the user terminal and sends the error reporting information to the reverse proxy server, the reverse proxy server does not directly feed back the received error reporting information to the user terminal, displays an error page on the user terminal, but sends the webpage request to the static server, and then forwards the static webpage data sent by the static server to the user terminal, so that the user terminal obtains the webpage content data from the content database, and then generates and displays a webpage by combining the webpage content data and the static webpage data, when the webpage requests increase, the user terminal can still display the requested webpage, thereby improving the user experience.
On the other hand, an embodiment of the present application provides a method for controlling webpage display, including:
the reverse proxy server receives a webpage request sent by a user terminal and sends the webpage request to the straight-out server;
when the straight-out server cannot process the webpage request, error reporting information fed back to the reverse proxy server is sent;
when the reverse proxy server receives the error reporting information fed back by the straight-out server, the webpage request is sent to a static server;
the static server sends the static webpage data corresponding to the webpage request to a reverse proxy server;
and the reverse proxy server forwards the static webpage data sent by the static server to the user terminal so that the user terminal acquires webpage content data from a content database, and generates and displays a webpage according to the webpage content data and the static webpage data.
In another aspect, an embodiment of the present application provides a reverse proxy server, including:
the system comprises a receiving module, a direct-out server and a server, wherein the receiving module is used for receiving a webpage request sent by a user terminal and sending the webpage request to the direct-out server;
the distribution module is used for sending the webpage request to the static server when receiving the error reporting information fed back by the straight-out server;
and the sending module is used for forwarding the static webpage data sent by the static server to the user terminal so that the user terminal acquires the webpage content data from a content database, and generates and displays a webpage according to the webpage content data and the static webpage data.
In another aspect, an embodiment of the present application provides a web page display control system, including:
the system comprises a reverse proxy server, a straight-out server and a static server;
the reverse proxy server is used for receiving a webpage request sent by a user terminal and sending the webpage request to the straight-out server;
the straight-out server is used for feeding back error reporting information to the reverse proxy server when the webpage request cannot be processed;
the reverse proxy server is further configured to send the web page request to a static server when receiving the error reporting information fed back by the straight-out server;
the static server is used for sending the static webpage data corresponding to the webpage request to the reverse proxy server;
the reverse proxy server is further configured to forward the static webpage data sent by the static server to the user terminal, so that the user terminal obtains the webpage content data from a content database, and generates and displays a webpage according to the webpage content data and the static webpage data.
In another aspect, an embodiment of the present application provides a web page display control apparatus, including at least one processor and at least one memory, where the memory stores a computer program, and when the program is executed by the processor, the processor executes the steps of the web page display control method.
In another aspect, an embodiment of the present application provides a computer-readable medium, which stores a computer program executable by a web page display control apparatus, and when the program runs on the web page display control apparatus, the web page display control apparatus executes the steps of the web page display control method.
In the embodiment of the application, the direct-out server is adopted to process the network request when the direct-out server can process the network request of the user terminal, so that the speed of the user for accessing the webpage is improved. When the straight-out server cannot process the network request of the user terminal and error reporting information is sent to the reverse proxy server, the reverse proxy server sends the webpage request to the static server, the static server processes the webpage request instead of directly feeding back the received error reporting information to the user terminal, and the error page is displayed at the user terminal, so that when the webpage requests increase, the user terminal can still display the requested webpage, and the user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a diagram of an application scenario applicable to an embodiment of the present application;
fig. 2 is a display interface diagram of a browser according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a method for controlling webpage display according to an embodiment of the present application;
FIG. 4 is an interface diagram for displaying error codes according to an embodiment of the present application;
fig. 5 is a schematic flowchart of a method for forwarding a web page request according to an embodiment of the present application;
fig. 6 is a schematic flowchart of a method for controlling webpage display according to an embodiment of the present application;
fig. 7 is a schematic flowchart of a method for controlling webpage display according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a reverse proxy server according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a web page display control system according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a web page display control device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more clearly apparent, the present invention is described in further 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 invention and are not intended to limit the invention.
For convenience of understanding, terms referred to in the embodiments of the present invention are explained below.
Web page: the HTML tag is a plain text file containing HTML tags, and a lot of contents including characters, pictures, videos and the like are placed on the Internet for others to access.
Static web page: the webpage is a common webpage, the contents to be displayed on the webpage are all written on the webpage in advance, and the contents and the display effect of the webpage are basically not changed.
Dynamic web page: the method is a special webpage, scripts exist in the webpage, and when a user opens the webpage, a browser end requests a database through the scripts to acquire content data needing to be displayed and display the data on the webpage. The content displayed by the dynamic page may change over time, environment, or as a result of database operations.
And (3) directly sending out a server: when a user opens a page, the server is directly started to acquire the displayed content data, and then the displayed content data and the static data are returned to the browser end together, so that the browser end does not need to go to the server to request the displayed content data through a script.
Reverse proxy: the proxy server receives the connection request on the network, then forwards the request to the server on the internal network, and returns the result obtained from the server to the client requesting the connection on the network.
Nginx: a lightweight Web server/reverse proxy server and E-mail proxy server features less memory and high concurrency.
In a specific practical process, the inventor of the present invention finds that when the number of user terminals sending web page requests increases, for example, some websites push out promotion activities, a direct server often cannot process all web page requests in time, and for web page requests that are not processed, an error page is returned to a browser end, so that a user cannot normally access a web page in a peak period, thereby bringing a bad experience to the user.
In view of the above, the inventor of the present application has considered that a reverse proxy server is adopted to receive a web page request sent by a user terminal, and sends the web page request to a direct server. When the reverse proxy server receives the error reporting information fed back by the straight-out server, the straight-out server cannot process the webpage request, and the reverse proxy server forwards the webpage request to the static server. The static server pre-stores static webpage data, and the content of the static webpage data is fixed and basically has no change. And after receiving the webpage request, the static server directly returns the static webpage data. The reverse proxy server sends the static web page data to the user terminal. And after receiving the static webpage data, the user terminal acquires the webpage content data from the content database, generates and displays a webpage according to the webpage content data and the static webpage data. Because the straight-out server cannot process the network request of the user terminal and sends the error reporting information to the reverse proxy server, the reverse proxy server does not directly feed back the received error reporting information to the user terminal, displays an error page on the user terminal, but sends the webpage request to the static server, and then forwards the static webpage data sent by the static server to the user terminal, so that the user terminal obtains the webpage content data from the content database, and then generates and displays a webpage by combining the webpage content data and the static webpage data, when the webpage requests increase, the user terminal can still display the requested webpage, thereby improving the user experience.
The web page display control method in the embodiment of the present application is suitable for displaying a dynamic web page, and is particularly applied to an application scenario as shown in fig. 1, where the application scenario includes a user terminal 101, a reverse proxy server 102, a straight-out server 103, and a static server 104.
The user terminal 101 is an electronic device with network communication capability, which may be a smart phone, a tablet computer, a portable personal computer, or the like. The user terminal 101 has an application program such as a browser installed thereon. The user terminal 101 is connected to the reverse proxy server 102 through a wireless network. The reverse proxy server 102 is connected to the outbound server 103 and the static server 104, respectively. The outbound server 103 may be a server or a server cluster composed of several servers or a cloud computing center.
The user clicks a browser icon in the user terminal 101 and enters a browser interface, as shown in fig. 2. And then the user inputs the content to be accessed in the browser interface and submits the content. The user terminal 101 sends a web page request to the reverse proxy server 102, and the reverse proxy server 102 sends the web page request to the outbound server 103. The outbound server 103 processes the web page request, and the processing process specifically includes: corresponding static web page data is determined according to the web page request, web page content data is obtained from the content database, and then the static web page data and the web page content data are sent to the reverse proxy server 102.
When the process of processing the web page request by the outbound server 103 fails, the reverse proxy server 102 receives the error report information fed back by the outbound server 103, and then sends the web page request to the static server 104. After receiving the web page request, the static server 104 sends static web page data corresponding to the web page request to the reverse proxy server 102, and then the reverse proxy server 102 sends the static web page data to the user terminal 101. After receiving the static web page data, the user terminal 101 pulls the web page content data from the content database, and then generates and displays a web page according to the static web page data and the web page content data.
When the process of processing the web page request by the outbound server 103 is normal, the reverse proxy server 102 receives the web page content data and the static web page data sent by the outbound server 103, and then sends the web page content data and the static web page data to the user terminal 101. After receiving the static web page data and the web page content data, the user terminal 101 generates and displays a web page according to the static web page data and the web page content data.
Based on the application scenario diagram shown in fig. 1, an embodiment of the present application provides a flow of a method for controlling webpage display, where the flow of the method may be executed by a reverse proxy server, as shown in fig. 3, and includes the following steps:
step S301, the reverse proxy server receives the webpage request sent by the user terminal and sends the webpage request to the direct server.
Alternatively, a backup server of the reverse proxy server may be configured in advance, and the reverse proxy server and the backup server may be respectively located in different areas, for example, the reverse proxy server is located in beijing, and the backup server is located in shanghai. When the reverse proxy server fails, for example, the reverse proxy server stops working due to large-area power failure, the standby server starts working and receives a webpage request sent by the user terminal, so that the user can normally access the webpage, and the stability is improved. In a specific implementation, the reverse proxy server may be Nginx.
The network request includes OPTIONS (returning HTTP request methods supported by the server for a specific resource), GET (making a request to a specific resource), POST (submitting data to a specified resource for processing request), and the like.
Step S302, when the reverse proxy server receives the error reporting information fed back by the straight-out server, the reverse proxy server sends the webpage request to the static server.
And the straight-out server feeds back error reporting information to the reverse proxy server under the conditions that the response time is greater than a preset threshold value, the straight-out server is down, the straight-out server is powered off and the like.
Illustratively, an online education website promotes a limited sales event in summer holidays, during which a large number of users visit the online education website so that a large number of web page requests are received by the server. And when the server cannot respond to the webpage request within the preset time, the server feeds back error reporting information to the reverse proxy server.
Step S303, the reverse proxy server forwards the static webpage data sent by the static server to the user terminal, so that the user terminal obtains the webpage content data from the content database, and generates and displays a webpage according to the webpage content data and the static webpage data.
Static web page data is pre-stored in the static server, and the static web page data refers to data that does not change basically in the display process of a web page, such as frame data of the web page.
After the user terminal acquires the static webpage data, the user terminal pulls the webpage to display necessary scripts, such as a CSS script and a JS script. And then, pulling the webpage content data from the content database, wherein the webpage content data are the specific content displayed on the webpage and can be changed at different time and in different environments. And finally, generating and displaying the webpage according to the static webpage data, the webpage content data, the CSS script and the JS script.
And when the direct-out server cannot process the network request of the user terminal, sending error reporting information to the reverse proxy server. And the reverse proxy server sends the webpage request to the static server, and then forwards the static webpage data sent by the static server to the user terminal, so that the user terminal acquires the webpage content data from the content database, and generates and displays a webpage by combining the webpage content data and the static webpage data. Compared with the reverse proxy service which directly feeds back the received error reporting information to the user terminal, the reverse proxy server sends the webpage request to the static server when the user terminal displays the error page, so that the user terminal can display the requested webpage when the webpage requests are increased, and the user experience is improved.
Alternatively, in step S302, the error information may be a text prompt or an error code. Error codes include, but are not limited to, 400, 401, 404, 499, 500, 501, 502, 503, 504.
Where 400 indicates an erroneous request, i.e., the server does not understand the syntax of the request.
401 indicates that no authorization, i.e. the request requires authentication. For web pages that need to be logged in, the server may return this response.
404 indicates that the requested web page does not exist.
499 indicates that the client is actively disconnected.
500 indicates that the server has an internal error, i.e., the server has encountered an error and is unable to complete the request.
501 shows that it has not been implemented, i.e. the server does not have the function of fulfilling requests. For example, the server may return this code if it is unable to identify the requested method.
502 indicates that the wrong gateway, i.e., the server acting as a gateway or proxy, received an invalid response from an upstream server.
503 denotes that the service is unavailable, i.e. the server is currently unavailable (due to overload or down maintenance).
504 indicates that the gateway has timed out, i.e., the server acts as a gateway or proxy, but does not receive a request from an upstream server in a timely manner.
505 indicates that the HTTP version is not supported and the server does not support the HTTP protocol version used in the request.
Illustratively, when the reverse proxy server returns an error code 404 to the user terminal, the user terminal will display an interface as shown in fig. 4 instead of the web interface requested by the user, thereby giving the user a bad experience.
Therefore, in the embodiment of the present application, when the reverse proxy server receives the error code, the method sends the web page request to the static server, which specifically includes the following steps, as shown in fig. 5:
in step S501, the reverse proxy server receives an error code fed back by the outbound server.
In step S502, the reverse proxy server compares the received error code with the configured error code list.
In step S503, the reverse proxy server sends the web page request to the static server when it is determined that the received error code matches the error code list.
Illustratively, the error code list is preconfigured, as shown in table 1:
table 1.
Error code Meaning of error code
401 Indicating that it is not authorized, i.e. the request requires authentication.
404 Indicating that the requested web page does not exist.
500 Indicating that the server has an internal error, i.e., the server has encountered an error, and is unable to complete the request.
503 Indicating that the service is unavailable, i.e., the server is currently unavailable (due to overload or down maintenance).
The reverse proxy server receives the error code 404 fed back by the outbound server, compares the error code 404 with the configured table 1, and sends the web page request to the static server if the error code 404 is determined to be included in the table 1. Because the error code list is configured in advance and comprises all the error codes of the network request to be forwarded, when the error codes returned by the direct server are received, the error type can be determined and the webpage request can be sent to the static server by inquiring the error code list, so that the processing efficiency of the network request is improved.
Alternatively, in step S301, there are a plurality of servers. When the reverse proxy server sends the web page request to the straight-out servers, one straight-out server may be determined from the straight-out servers according to the load states of the straight-out servers, and then the web page request is sent to the determined straight-out server.
In a specific implementation, the out-going server with the lowest load can be selected from the plurality of out-going servers, and then the network request is sent to the out-going server with the lowest load.
Optionally, when the reverse proxy server receives the error reporting information fed back by the straight-out server, the load states of other straight-out servers may be determined first, if a straight-out server with a lower load exists in other straight-out servers, the network request may be forwarded to the server with a lower load first, and if the load states of other straight-out servers are all higher, the web request is sent to the static server. The straight-out server obtains the webpage content data from the content database when receiving the webpage request, and then sends the static webpage data and the webpage content data to the reverse proxy server, so that the user terminal can directly generate and display a webpage according to the webpage content data and the static webpage data forwarded by the reverse proxy server, and does not need to pull the webpage content data after receiving the static webpage data.
Optionally, in step S301, after the reverse proxy server sends the web page request to the outbound server, when receiving the web page content data and the static web page data sent by the outbound server, which indicates that the outbound server can normally process the web page request, the reverse proxy server sends the web page content data and the static web page data to the user terminal, so that the user terminal generates and displays a web page according to the web page content data and the static web page data.
When the direct-out server can process the network request of the user terminal, the direct-out server is adopted to process the network request, so that the speed of the user for accessing the webpage is improved. When the straight-out server cannot process the network request of the user terminal and error reporting information is sent to the reverse proxy server, the reverse proxy server sends the webpage request to the static server, the static server processes the webpage request instead of directly feeding back the received error reporting information to the user terminal, and the error page is displayed at the user terminal, so that when the webpage requests increase, the user terminal can still display the requested webpage, and the user experience is improved.
In order to better explain the embodiments of the present application, a web page display control method provided by the embodiments of the present application is described below with reference to a specific implementation scenario, where the method is performed by a user terminal, a reverse proxy server, a direct server, and a static server interactively. Setting a webpage as an online education webpage, launching promotion activities on holidays, submitting each user after inputting the website of the online education webpage in a browser, receiving a webpage request sent by each user terminal by a reverse proxy server, and sending the webpage request to a direct-out server. In one possible embodiment, when the direct server can process the web page request, a flowchart of the web page display control method is shown in fig. 6, and includes the steps of:
step S601, the user terminal sends a web page request to the reverse proxy server.
Step S602, the reverse proxy server receives the web page request sent by the user terminal, and sends the web page request to the direct server.
Step S603, the server is taken out to pull the web page content data corresponding to the web page request from the content database.
Step S604, the outbound server sends the static web page data and the web page content data to the reverse proxy server.
In step S605, the reverse proxy server transmits the static web page data and the web page content data to the user terminal.
In step S606, the user terminal pulls the CSS script and the JS script.
In step S607, the user terminal generates and displays a web page according to the static web page data, the web page content data, the CSS script, and the JS script.
In another possible embodiment, when the direct server cannot process the web page request, a flowchart of the web page display control method is shown in fig. 7, and includes the steps of:
step S701, the user terminal sends a web page request to the reverse proxy server.
Step S702, the reverse proxy server receives the web page request sent by the user terminal, and sends the web page request to the direct server.
Step S703, the error reporting information fed back from the server to the reverse proxy server is directly output.
Step S704, the reverse proxy server receives the error reporting information fed back by the direct server, and sends the web page request to the static server.
Step S705, the static server sends the static webpage data corresponding to the webpage request to the reverse proxy server.
Step S706, the reverse proxy server forwards the static webpage data to the user terminal.
In step S707, the user terminal obtains the web page content data from the content database.
In step S708, the user terminal pulls the CSS script and the JS script.
Step S709, the user terminal generates and displays a web page according to the static web page data, the web page content data, the CSS script, and the JS script.
When the direct-out server can process the network request of the user terminal, the direct-out server is adopted to process the network request, so that the speed of the user for accessing the webpage is improved. When the straight-out server cannot process the network request of the user terminal and error reporting information is sent to the reverse proxy server, the reverse proxy server sends the webpage request to the static server, the static server processes the webpage request instead of directly feeding back the received error reporting information to the user terminal, and the error page is displayed at the user terminal, so that when the webpage requests increase, the user terminal can still display the requested webpage, and the user experience is improved.
Based on the same technical concept, an embodiment of the present application provides a reverse proxy server, as shown in fig. 8, the apparatus 800 includes:
a receiving module 801, configured to receive a web page request sent by a user terminal, and send the web page request to a direct server;
the allocation module 802 is configured to send the web page request to a static server when receiving error reporting information fed back by the straight-out server;
a sending module 803, configured to forward the static webpage data sent by the static server to the user terminal, so that the user terminal obtains webpage content data from a content database, and generates and displays a webpage according to the webpage content data and the static webpage data.
The allocation module 802 is specifically configured to:
receiving an error code fed back by the straight-out server;
comparing the received error code with a configured error code list;
and when the received error code is determined to be matched with the error code list, sending the webpage request to a static server.
Optionally, the number of the outbound servers is multiple;
the receiving module 801 is specifically configured to:
determining one straight-out server from all the straight-out servers according to the load state of all the straight-out servers;
and sending the webpage request to the determined straight-out server.
The assignment module 802 is further configured to:
and after the webpage request is sent to a straight-out server, when the webpage content data and the static webpage data sent by the straight-out server are received, the webpage content data and the static webpage data are sent to the user terminal, so that the user terminal generates and displays a webpage according to the webpage content data and the static webpage data.
Based on the same technical concept, an embodiment of the present application provides a web page display control system, as shown in fig. 9, the apparatus 900 includes: a reverse proxy server 901, a outbound server 902, and a static server 903.
The reverse proxy server 901 is configured to receive a web page request sent by a user terminal, and send the web page request to a straight-out server;
the outbound server 902 is configured to send an error report message to the reverse proxy server when the web page request cannot be processed;
the reverse proxy server 901 is further configured to send the web page request to a static server when receiving the error reporting information fed back by the straight-out server;
the static server 903 is configured to send static webpage data corresponding to the webpage request to a reverse proxy server;
the reverse proxy server 901 is further configured to forward the static webpage data sent by the static server to the user terminal, so that the user terminal obtains webpage content data from a content database, and generates and displays a webpage according to the webpage content data and the static webpage data.
Optionally, the method further comprises:
the outbound server 902 is further configured to, when the web page request can be processed, obtain web page content data from the content database, and send the web page content data and the static web page data to the reverse proxy server;
the reverse proxy server 901 is further configured to forward the web page content data and the static web page data to the user terminal, so that the user terminal generates a web page according to the web page content data and the static web page data and displays the web page.
Based on the same technical concept, the embodiment of the present application provides a web page display control device, as shown in fig. 10, including at least one processor 1001 and a memory 1002 connected to the at least one processor, where a specific connection medium between the processor 1001 and the memory 1002 is not limited in the embodiment of the present application, and the processor 1001 and the memory 1002 in fig. 10 are connected through a bus as an example. The bus may be divided into an address bus, a data bus, a control bus, etc.
In the embodiment of the present application, the memory 1002 stores instructions executable by the at least one processor 1001, and the at least one processor 1001 may execute the steps included in the foregoing web page display control method by executing the instructions stored in the memory 1002.
The processor 1001 is a control center of the web page display control device, and may be connected to various portions of the web page display control device through various interfaces and lines, and control the display of a web page by executing or executing instructions stored in the memory 1002 and calling data stored in the memory 1002. Alternatively, the processor 1001 may include one or more processing units, and the processor 1001 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application program, and the like, and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 1001. In some embodiments, the processor 1001 and the memory 1002 may be implemented on the same chip, or in some embodiments, they may be implemented separately on separate chips.
The processor 1001 may be a general-purpose processor, such as a Central Processing Unit (CPU), a digital signal processor, an Application Specific Integrated Circuit (ASIC), a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof, and may implement or perform the methods, steps, and logic blocks disclosed in the embodiments of the present Application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in a processor.
Memory 1002, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory 1002 may include at least one type of storage medium, and may include, for example, a flash Memory, a hard disk, a multimedia card, a card-type Memory, a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Programmable Read Only Memory (PROM), a Read Only Memory (ROM), a charge Erasable Programmable Read Only Memory (EEPROM), a magnetic Memory, a magnetic disk, an optical disk, and so on. The memory 1002 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 1002 in the embodiments of the present application may also be circuitry or any other device capable of performing a storage function for storing program instructions and/or data.
Based on the same inventive concept, embodiments of the present application provide a computer-readable medium storing a computer program executable by a web page display control apparatus, which, when the program is run on the web page display control apparatus, causes the web page display control apparatus to execute steps of a web page display control method.
It should be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (8)

1. A method for controlling display of a web page, comprising:
the method comprises the steps that a reverse proxy server receives a webpage request sent by a user terminal, sends the webpage request to a straight-out server, obtains static webpage data corresponding to the webpage request from a static server through the straight-out server, obtains webpage content data corresponding to the webpage request from a content database, and sends the webpage content data and the static webpage data to the user terminal, so that the user terminal generates a webpage according to the webpage content data and the static webpage data and displays the webpage;
when the reverse proxy server receives the error code fed back by the straight-out server, comparing the received error code with a configured error code list; when the received error code is determined to be matched with the error code list, the webpage request is sent to the static server;
and the reverse proxy server forwards the static webpage data sent by the static server to the user terminal so that the user terminal acquires the webpage content data from the content database, and generates and displays a webpage according to the webpage content data and the static webpage data.
2. The method of claim 1, wherein the egress server is plural;
sending the web page request to a direct-out server, comprising:
determining one straight-out server from all the straight-out servers according to the load state of all the straight-out servers;
and sending the webpage request to the determined straight-out server.
3. A method for controlling display of a web page, comprising:
the reverse proxy server receives a webpage request sent by a user terminal, sends the webpage request to a straight-out server, and obtains static webpage data corresponding to the webpage request from a static server and webpage content data corresponding to the webpage request from a content database through the straight-out server; sending the webpage content data and the static webpage data to the user terminal so that the user terminal generates and displays a webpage according to the webpage content data and the static webpage data;
when the straight-out server cannot process the webpage request, an error code is fed back to the reverse proxy server;
when the reverse proxy server receives the error code fed back by the straight-out server, comparing the received error code with a configured error code list; when the received error code is determined to be matched with the error code list, the webpage request is sent to the static server;
the static server sends the static webpage data corresponding to the webpage request to the reverse proxy server;
and the reverse proxy server forwards the static webpage data sent by the static server to the user terminal so that the user terminal acquires the webpage content data from the content database, and generates and displays a webpage according to the webpage content data and the static webpage data.
4. A reverse proxy server, comprising:
the receiving module is used for receiving a webpage request sent by a user terminal, sending the webpage request to a straight-out server, acquiring static webpage data corresponding to the webpage request from a static server through the straight-out server, acquiring webpage content data corresponding to the webpage request from a content database, and sending the webpage content data and the static webpage data to the user terminal so that the user terminal generates and displays a webpage according to the webpage content data and the static webpage data;
the distribution module is used for comparing the received error codes with a configured error code list when the error codes fed back by the straight-out server are received; when the received error code is determined to be matched with the error code list, the webpage request is sent to the static server;
and the sending module is used for forwarding the static webpage data sent by the static server to the user terminal so that the user terminal acquires the webpage content data from the content database, and generates and displays a webpage according to the webpage content data and the static webpage data.
5. The reverse proxy server of claim 4, wherein the egress server is plural;
the receiving module is specifically configured to:
determining one straight-out server from all the straight-out servers according to the load state of all the straight-out servers;
and sending the webpage request to the determined straight-out server.
6. A web page display control system, comprising:
the system comprises a reverse proxy server, a straight-out server and a static server;
the reverse proxy server is used for receiving a webpage request sent by a user terminal, sending the webpage request to a straight-out server, acquiring static webpage data corresponding to the webpage request from a static server through the straight-out server, and acquiring webpage content data corresponding to the webpage request from a content database; sending the webpage content data and the static webpage data to the user terminal so that the user terminal generates and displays a webpage according to the webpage content data and the static webpage data;
the straight-out server is also used for feeding back an error code to the reverse proxy server when the webpage request cannot be processed;
the reverse proxy server is further configured to compare the received error code with a configured error code list when receiving the error code fed back by the straight-out server; when the received error code is determined to be matched with the error code list, the webpage request is sent to the static server;
the static server is used for sending the static webpage data corresponding to the webpage request to the reverse proxy server;
the reverse proxy server is further configured to forward the static webpage data sent by the static server to the user terminal, so that the user terminal obtains the webpage content data from the content database, and generates and displays a webpage according to the webpage content data and the static webpage data.
7. A web page display control apparatus comprising at least one processor and at least one memory, wherein the memory stores a computer program which, when executed by the processor, causes the processor to perform the steps of the method of any of claims 1 to 2 or 3.
8. A computer-readable medium, in which a computer program executable by a web page display control apparatus is stored, which program, when run on the web page display control apparatus, causes the web page display control apparatus to carry out the steps of the method of any one of claims 1 to 2 or 3.
CN201811288783.2A 2018-10-31 2018-10-31 Webpage display control method and system and reverse proxy server Active CN109495553B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811288783.2A CN109495553B (en) 2018-10-31 2018-10-31 Webpage display control method and system and reverse proxy server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811288783.2A CN109495553B (en) 2018-10-31 2018-10-31 Webpage display control method and system and reverse proxy server

Publications (2)

Publication Number Publication Date
CN109495553A CN109495553A (en) 2019-03-19
CN109495553B true CN109495553B (en) 2020-12-22

Family

ID=65691777

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811288783.2A Active CN109495553B (en) 2018-10-31 2018-10-31 Webpage display control method and system and reverse proxy server

Country Status (1)

Country Link
CN (1) CN109495553B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110196957A (en) * 2019-06-03 2019-09-03 广州凡科互联网科技股份有限公司 A kind of continous way static resource update method
CN110266802A (en) * 2019-06-24 2019-09-20 深圳市网心科技有限公司 Reverse proxy method of servicing, server, system and medium based on ID identification
CN111752559B (en) * 2019-11-07 2024-02-06 北京沃东天骏信息技术有限公司 Front-end and back-end separation system, method, device and storage medium
CN111125602B (en) * 2019-12-25 2023-11-14 腾讯音乐娱乐科技(深圳)有限公司 Page construction method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103631905A (en) * 2013-11-22 2014-03-12 北京奇虎科技有限公司 Webpage loading method and browser
CN104754073A (en) * 2015-03-25 2015-07-01 百度在线网络技术(北京)有限公司 Resource access method and device
CN106021617A (en) * 2016-07-12 2016-10-12 腾讯科技(深圳)有限公司 Page generation method and device
WO2017005080A1 (en) * 2015-07-09 2017-01-12 腾讯科技(深圳)有限公司 Webpage display method, terminal device and storage medium
CN106933817A (en) * 2015-12-29 2017-07-07 华为技术有限公司 A kind of content search method and apparatus, system based on B/S structures
CN108717435A (en) * 2018-05-16 2018-10-30 腾讯科技(深圳)有限公司 Webpage loading method, information processing method, computer equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11663110B2 (en) * 2016-10-31 2023-05-30 International Business Machines Corporation Analysis to check web API code usage and specification

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103631905A (en) * 2013-11-22 2014-03-12 北京奇虎科技有限公司 Webpage loading method and browser
CN104754073A (en) * 2015-03-25 2015-07-01 百度在线网络技术(北京)有限公司 Resource access method and device
WO2017005080A1 (en) * 2015-07-09 2017-01-12 腾讯科技(深圳)有限公司 Webpage display method, terminal device and storage medium
CN106933817A (en) * 2015-12-29 2017-07-07 华为技术有限公司 A kind of content search method and apparatus, system based on B/S structures
CN106021617A (en) * 2016-07-12 2016-10-12 腾讯科技(深圳)有限公司 Page generation method and device
CN108717435A (en) * 2018-05-16 2018-10-30 腾讯科技(深圳)有限公司 Webpage loading method, information processing method, computer equipment and storage medium

Also Published As

Publication number Publication date
CN109495553A (en) 2019-03-19

Similar Documents

Publication Publication Date Title
CN109495553B (en) Webpage display control method and system and reverse proxy server
CN106990975B (en) Application heat deployment method, device and system
US10666758B2 (en) Browser resource pre-pulling method, terminal and storage medium
US8447757B1 (en) Latency reduction techniques for partitioned processing
WO2017167050A1 (en) Configuration information generation and transmission method, and resource loading method, apparatus and system
CN102957712A (en) Method and system for loading website resources
US10762095B2 (en) Validation of log formats
CN112422702A (en) CDN back-to-source method, system and computer equipment
WO2019118459A1 (en) Decentralized name verification using recursive attestation
CN113411404A (en) File downloading method, device, server and storage medium
CN105512227A (en) Webpage data loading method and system
CN112672187B (en) Page generation method and device, computer equipment and readable storage medium
CN112818270B (en) Data cross-domain transfer method and device and computer equipment
CN111431767A (en) Multi-browser resource synchronization method and device, computer equipment and storage medium
US8745245B1 (en) System and method for offline detection
CN112437148B (en) Service request processing method and device, service server and system
CN112445873B (en) List display processing method, related device, equipment and medium
CN111444448B (en) Data processing method, server and system
CN106126663B (en) Page aggregation method and device
CN111800511A (en) Processing method, system, equipment and readable storage medium for synchronous login state
CN107203915B (en) Data storage method and device
CN110992131B (en) Form processing method, form processing device and storage medium
CN105721398A (en) Data access method and device
CN114168876A (en) Page display method and device, computer equipment and computer readable storage medium
CN113704648A (en) Page data processing method, device, equipment and storage medium

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