HK1213704B - Method for obtaining web pages, system, network server, browser and gslb server - Google Patents
Method for obtaining web pages, system, network server, browser and gslb server Download PDFInfo
- Publication number
- HK1213704B HK1213704B HK16101378.2A HK16101378A HK1213704B HK 1213704 B HK1213704 B HK 1213704B HK 16101378 A HK16101378 A HK 16101378A HK 1213704 B HK1213704 B HK 1213704B
- Authority
- HK
- Hong Kong
- Prior art keywords
- address
- webpage
- domain name
- gslb
- web page
- Prior art date
Links
Description
Technical Field
The present application relates to the field of communications network technologies, and in particular, to a method, a system, a web server, a browser, and a GSLB for acquiring a web page.
Background
With the development of communication network technology, various information can be acquired by browsing various web pages provided by various websites. In order to increase the web page opening speed, a new layer of Network architecture CDN (Content Delivery Network) is added to the existing Internet (Internet), and the Content of the web page is delivered to the Network edge closest to the user through the CDN, so that the user can obtain the Content of the web page nearby, and the response speed of the user to access the web page is increased. The existing web page generally consists of a web page basic frame and web page reference contents (such as a style sheet file CSS, a JavaScript script, a picture, a video, and the like), in order to facilitate CDN acceleration, the web page reference contents adopt a domain name different from that of the web page basic frame, and meanwhile, in order to avoid a restriction of concurrent access of a single domain name of a browser, different web page reference contents adopt different domain names, for example: the domain names of the web page reference contents include static. Therefore, when acquiring a web page, it is necessary to acquire a web page basic frame constituting the web page according to a domain name of the web page basic frame constituting the web page, acquire each web page reference content constituting the web page according to a domain name of each web page reference content constituting the web page, and combine the web page basic frame and each web page reference content to obtain the web page.
Referring to fig. 1, the conventional specific process for acquiring a web page is as follows: the browser acquires a web Domain Name (e.g., www.example.cn) of a pre-visited web page, queries that an IP (Internet Protocol ) address corresponding to the web Domain Name is not cached locally (the browser itself and an Operating System (OS)), and then sends a Domain Name resolution request (1a) carrying the web Domain Name to a Local DNS (Local Domain Name Server). The local DNS receives the domain name resolution request, inquires that the local DNS does not cache the IP address corresponding to the webpage domain name, acquires the IP address corresponding to the webpage domain name through a Root DNS (Root DNS) and a Global Server Load Balance (GSLB), and returns the IP address corresponding to the webpage domain name to the browser (1 b). The browser establishes connection with a Web Server (Web Server) of the pre-accessed Web page according to the IP address corresponding to the Web page domain name, and sends an HTTP (Hyper Text Transfer Protocol) request (2a) carrying the IP address to the Web Server. The web server receives the HTTP request, generates and returns a web page basic frame (2b) corresponding to the IP address to the browser. The browser receives a webpage basic frame returned by the network server, analyzes the webpage basic frame to obtain domain names of a plurality of webpage reference contents, initiates a domain name analysis request of the domain name carrying the webpage reference contents (each time the domain name analysis request carries the domain name of one webpage reference content), and obtains the IP address (similar to 1a and 1b) of the webpage reference contents. The browser requests the web reference content from a corresponding web reference content server (e.g., picture reference content server) according to the IP address of the web reference content (3 a). The web reference content server returns the web reference content to the browser (3 b). And (3) repeating the steps 1a,1b, 3a and 3b for multiple times (the domain name of the webpage reference content is repeated for multiple times), acquiring all webpage reference contents contained in the pre-accessed webpage by the browser, and combining all the webpage reference contents with the webpage basic frame to obtain the webpage.
In the existing method for acquiring the webpage, when the webpage contains a plurality of webpage reference contents, a domain name resolution request needs to be initiated for a plurality of times, the steps (1a,1b, 3a and 3b) are repeated for a plurality of times, the time is long, the efficiency of acquiring the webpage is low, and the webpage loading is slow.
Disclosure of Invention
The technical problem to be solved by the application is to provide a method, a system, a network server, a browser and a GSLB for acquiring a webpage, when the webpage contains a plurality of webpage quoted contents, a domain name resolution request does not need to be initiated for many times, the time for acquiring the webpage quoted contents is short, the efficiency for acquiring the webpage is improved, and the webpage loading speed can be accelerated.
In order to solve the above problem, the present application discloses a method for acquiring a web page, including:
acquiring a hypertext transfer protocol (HTTP) request carrying a first network protocol (IP) address;
inquiring a webpage basic frame corresponding to the first IP address, and analyzing the webpage basic frame to obtain domain names of all webpage reference contents corresponding to the first IP address;
sending a domain name resolution request to a global load balancing server GSLB, wherein the domain name resolution request carries domain names of all webpage reference contents;
acquiring a second IP address of each webpage reference content from the GSLB, wherein the second IP address of each webpage reference content corresponds to the domain name of each webpage reference content in the domain names of all webpage reference contents;
and sending the webpage basic frame and the second IP address of each webpage reference content to a browser, so that the browser acquires and displays the webpage.
Further, acquiring the HTTP request carrying the first IP address includes:
acquiring an HTTP request carrying the first IP address and the GSLB address;
correspondingly, sending a domain name resolution request to the global load balancing server GSLB includes:
and sending a domain name resolution request to the GSLB corresponding to the GSLB address.
Further, sending a domain name resolution request to the global load balancing server GSLB, comprising:
inquiring local GSLB configuration information to obtain a local corresponding GSLB address; the GSLB configuration information comprises a local corresponding GSLB address;
and sending a domain name resolution request to the GSLB corresponding to the GSLB address.
Further, sending a domain name resolution request to the global load balancing server GSLB, comprising:
and sending a domain name resolution request to the GSLB by using an EDNS mode or an HTTP mode of an extended domain name server.
Further, the HTTP request is initiated after the browser acquires the first IP address corresponding to the domain name of the web page of the pre-access web page.
Further, sending a domain name resolution request to a global load balancing server GSLB, where the domain name resolution request carries domain names of all web page reference contents, including:
sending a domain name resolution request to a global load balancing server GSLB, wherein the domain name resolution request carries domain names of all webpage reference contents and a user terminal IP address of a browser initiating the HTTP request, so that after receiving the domain name resolution request, the GSLB resolves the domain names of all the webpage reference contents, and obtains a second IP address of each webpage reference content corresponding to the domain name of each webpage reference content in the domain names of all the webpage reference contents by combining the user terminal IP address and a scheduling algorithm of the GSLB.
In order to solve the above problem, the present application also discloses a method for acquiring a web page, where the method includes:
acquiring a first IP address corresponding to a webpage domain name of a pre-access webpage;
sending an HTTP request carrying the first IP address to a network server, so that after receiving the HTTP request, the network server queries a webpage basic frame corresponding to the first IP address, analyzes the webpage basic frame to obtain domain names of all webpage reference contents corresponding to the first IP address, and sends a domain name resolution request to a global load balancing server GSLB, wherein the domain name resolution request carries the domain names of all the webpage reference contents;
receiving a webpage basic frame sent by the network server and a second IP address of each webpage reference content obtained by the GSLB forwarded by the network server, wherein the second IP address of each webpage reference content corresponds to the domain name of each webpage reference content in the domain names of all the webpage reference contents;
and acquiring each webpage reference content from each webpage reference content server corresponding to the second IP address of each webpage reference content, and combining the webpage basic frame with each webpage reference content to obtain a webpage.
Further, acquiring a first IP address corresponding to a domain name of a pre-visited web page includes:
acquiring a webpage domain name of the pre-visited webpage;
inquiring whether a first IP address corresponding to the webpage domain name is cached locally or not and a GSLB address;
if the cache is not available, sending a domain name resolution request carrying the webpage domain name to a local Domain Name Server (DNS), so that the local DNS obtains a first IP address corresponding to the webpage domain name and a GSLB address after receiving the domain name resolution request;
receiving a first IP address corresponding to the webpage domain name and a GSLB address returned by the local DNS;
correspondingly, sending an HTTP request carrying the first IP address to a network server, so that after receiving the HTTP request, the network server queries a web page basic frame corresponding to the first IP address, analyzes the web page basic frame to obtain domain names of all web page reference contents corresponding to the first IP address, and sends a domain name analysis request to a global load balancing server GSLB, including:
and sending an HTTP request carrying the first IP address and the GSLB address to a network server, so that after receiving the HTTP request, the network server inquires a webpage basic frame corresponding to the first IP address, analyzes the webpage basic frame to obtain domain names of all webpage reference contents corresponding to the first IP address, and sends a domain name analysis request to a global load balancing server GSLB corresponding to the GSLB address.
Further, after querying whether the first IP address corresponding to the web page domain name is cached locally or not and the GSLB address, the method further includes:
if so, judging whether a first IP address corresponding to the webpage domain name cached locally and a GSLB address are valid;
if the local cache is valid, acquiring a first IP address corresponding to the webpage domain name and a GSLB address of the local cache;
correspondingly, sending an HTTP request carrying the first IP address to a network server, so that after receiving the HTTP request, the network server queries a web page basic frame corresponding to the first IP address, analyzes the web page basic frame to obtain domain names of all web page reference contents corresponding to the first IP address, and sends a domain name analysis request to a global load balancing server GSLB, including:
and sending an HTTP request carrying the first IP address and the GSLB address to a network server, so that after receiving the HTTP request, the network server inquires a webpage basic frame corresponding to the first IP address, analyzes the webpage basic frame to obtain domain names of all webpage reference contents corresponding to the first IP address, and sends a domain name analysis request to a global load balancing server GSLB corresponding to the GSLB address.
Further, after determining whether the first IP address corresponding to the web page domain name cached locally and the GSLB address are valid, the method further includes:
and if not, executing the step of sending a domain name resolution request carrying the webpage domain name to a local DNS.
In order to solve the above problem, the present application also discloses a method for domain name resolution, where the method includes:
receiving a domain name resolution request, wherein the domain name resolution request carries domain names of all webpage reference contents in a pre-access webpage and a user side IP address of a browser corresponding to the pre-access webpage;
and analyzing the domain names of all the webpage reference contents, and combining the user side IP address and a local self scheduling algorithm to obtain a second IP address of each webpage reference content corresponding to the domain name of each webpage reference content in the domain names of all the webpage reference contents.
Further, after obtaining the second IP address of each web page reference content corresponding to the domain name of each web page reference content in the domain names of all the web page reference contents, the method further includes:
sending a second IP address of each webpage reference content corresponding to the domain name of each webpage reference content to a network server, so that the network server sends the second IP address of each webpage reference content and a webpage basic frame corresponding to a first IP address to a browser, wherein the first IP address corresponds to the webpage domain name of the pre-accessed webpage; and enabling the browser to acquire the webpage for displaying.
In order to solve the above problem, the present application also discloses a network server, including:
the first acquisition module is used for acquiring a hypertext transfer protocol (HTTP) request carrying a first network protocol (IP) address;
the query module is used for querying the webpage basic frame corresponding to the first IP address, analyzing the webpage basic frame and obtaining domain names of all webpage reference contents corresponding to the first IP address;
the first sending module is used for sending a domain name resolution request to a global load balancing server GSLB, wherein the domain name resolution request carries domain names of all webpage reference contents;
the processing module is used for acquiring a second IP address of each webpage reference content from the GSLB, wherein the second IP address of each webpage reference content corresponds to the domain name of each webpage reference content in the domain names of all the webpage reference contents;
and the second sending module is used for sending the webpage basic frame and the second IP address of each webpage reference content to a browser so that the browser can acquire and display the webpage.
Further, the first obtaining module comprises:
a first obtaining unit, configured to obtain an HTTP request carrying the first IP address and the GSLB address;
accordingly, the first transmitting module comprises:
and the first sending unit is used for sending a domain name resolution request to the GSLB corresponding to the GSLB address.
Further, the first transmitting module includes:
the first query unit is used for querying local GSLB configuration information to obtain a local corresponding GSLB address; the GSLB configuration information comprises a local corresponding GSLB address;
and the second sending unit is used for sending the domain name resolution request to the GSLB corresponding to the GSLB address.
Further, the first transmitting module includes:
and the third sending unit is used for sending the domain name resolution request to the GSLB by using an EDNS mode or an HTTP mode.
Further, the HTTP request is initiated after the browser acquires the first IP address corresponding to the domain name of the web page of the pre-access web page.
Further, the first sending module further comprises:
and the processing unit is used for sending a domain name resolution request to a global load balancing server GSLB, wherein the domain name resolution request carries domain names of all webpage reference contents and a user terminal IP address of a browser which initiates the HTTP request, so that after the GSLB receives the domain name resolution request, the GSLB resolves the domain names of all the webpage reference contents, and obtains a second IP address of each webpage reference content corresponding to the domain name of each webpage reference content in the domain names of all the webpage reference contents by combining the user terminal IP address and a scheduling algorithm of the GSLB.
In order to solve the above problem, the present application also discloses a browser, including:
the second acquisition module is used for acquiring a first IP address corresponding to the webpage domain name of the pre-access webpage;
a third sending module, configured to send an HTTP request carrying the first IP address to a web server, so that after receiving the HTTP request, the web server queries a web page basic frame corresponding to the first IP address, parses the web page basic frame, obtains domain names of all web page reference contents corresponding to the first IP address, and sends a domain name resolution request to a global load balancing server GSLB, where the domain name resolution request carries domain names of all web page reference contents;
a first receiving module, configured to receive a web page basic frame sent by the web server and a second IP address of each web page reference content obtained by the GSLB and forwarded by the web server, where the second IP address of each web page reference content corresponds to a domain name of each web page reference content in domain names of all web page reference contents;
and the combination module is used for acquiring each webpage reference content from each webpage reference content server corresponding to the second IP address of each webpage reference content, and combining the webpage basic frame with each webpage reference content to obtain a webpage.
Further, the second obtaining module includes:
the second acquisition unit is used for acquiring the webpage domain name of the pre-access webpage;
the second query unit is used for querying whether a first IP address corresponding to the webpage domain name and a GSLB address are cached locally;
a fourth sending unit, configured to send a domain name resolution request carrying the web domain name to a local domain name server DNS if the query result of the second querying unit is not cached, so that the local DNS obtains a first IP address corresponding to the web domain name and a GSLB address after receiving the domain name resolution request;
a receiving unit, configured to receive a first IP address corresponding to the web page domain name and a GSLB address, where the first IP address is returned by the local DNS;
accordingly, the third sending module comprises:
a fifth sending unit, configured to send an HTTP request carrying the first IP address and the GSLB address to a network server, so that after receiving the HTTP request, the network server queries a webpage infrastructure corresponding to the first IP address, parses the webpage infrastructure, obtains domain names of all webpage reference contents corresponding to the first IP address, and sends a domain name parsing request to a global load balancing server GSLB corresponding to the GSLB address.
Further, the second obtaining module further includes:
a judging unit, configured to judge whether a first IP address corresponding to the web page domain name cached locally and a GSLB address are valid if the query result of the second querying unit is cached;
a third obtaining unit, configured to obtain a first IP address corresponding to the web page domain name cached locally and a GSLB address if the determination result of the determining unit is valid;
accordingly, the third sending module comprises:
a sixth sending unit, configured to send an HTTP request carrying the first IP address and the GSLB address to a network server, so that after receiving the HTTP request, the network server queries a webpage infrastructure corresponding to the first IP address, parses the webpage infrastructure, obtains domain names of all webpage reference contents corresponding to the first IP address, and sends a domain name parsing request to a global load balancing server GSLB corresponding to the GSLB address.
Further, the second obtaining module further includes:
and a notifying unit, configured to notify the fourth sending unit to execute the step of sending the domain name resolution request carrying the web domain name to the local DNS if the determination result of the determining unit is not valid.
In order to solve the above problem, the present application further discloses a global load balancing server GSLB, where the GSLB includes:
the second receiving module is used for receiving a domain name resolution request, wherein the domain name resolution request carries domain names of all webpage reference contents in a pre-access webpage and a user side IP address of a browser corresponding to the pre-access webpage;
and the analysis module is used for analyzing the domain names of all the webpage reference contents and obtaining a second IP address of each webpage reference content corresponding to the domain name of each webpage reference content in the domain names of all the webpage reference contents by combining the IP address of the user side and a local self scheduling algorithm.
Further, the GSLB further comprises:
a fourth sending module, configured to send the second IP address of each web page reference content corresponding to the domain name of each web page reference content to a web server, so that the web server sends the second IP address of each web page reference content and a web page basic frame corresponding to the first IP address to a browser, where the first IP address corresponds to the web page domain name of the pre-visited web page; and enabling the browser to acquire the webpage for displaying.
In order to solve the above problem, the present application also discloses a system for acquiring a web page, the system comprising: any of the above-described web servers, and/or any of the above-described browsers, and/or any of the above-described GSLBs.
Compared with the prior art, the application can obtain the following technical effects:
when the webpage contains a plurality of webpage quoted contents, a domain name resolution request does not need to be initiated for many times, the time for acquiring the webpage quoted contents is short, the efficiency for acquiring the webpage is improved, and the webpage loading speed can be accelerated. The real IP address of the user is used as a scheduling basis, and the scheduling accuracy is greatly improved. The DNS resolution is realized through the network server instead of the traditional client mode, the resolution time between the network server and the GSLB is superior to the time for initiating the resolution by the client under the common condition, and the webpage loading speed can be improved.
Of course, it is not necessary for any one product to achieve all of the above-described technical effects simultaneously.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a flow chart of a conventional method for obtaining a web page;
FIG. 2 is a flowchart of a first method for obtaining a web page according to an embodiment of the present application;
FIG. 3 is a flowchart of a second method for obtaining a web page according to an embodiment of the present application;
fig. 4 is a flowchart of a method for acquiring a first IP address corresponding to a domain name of a pre-visited web page according to an embodiment of the present disclosure;
fig. 5 is a flowchart of a method for acquiring a first IP address corresponding to a domain name of a web page and a GSLB address after a local DNS receives a domain name resolution request according to an embodiment of the present application;
FIG. 6 is a schematic block diagram illustrating a method for retrieving a web page according to an embodiment of the present disclosure;
FIG. 7 is a flowchart of a method for domain name resolution according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a network server according to an embodiment of the present application;
FIG. 9 is a schematic structural diagram of a browser in an embodiment of the present application;
FIG. 10 is a schematic diagram of a GSLB according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of another GSLB according to an embodiment of the present application.
Detailed Description
Embodiments of the present application will be described in detail with reference to the drawings and examples, so that how to implement technical means to solve technical problems and achieve technical effects of the present application can be fully understood and implemented.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
Description of the embodiments
The following is a further illustration of the implementation of the method of the present application in one embodiment. As shown in fig. 2, a flowchart of a method for acquiring a web page according to an embodiment of the present application is shown, where the method includes:
s101: and acquiring the HTTP request carrying the first IP address.
The HTTP request is initiated after the browser acquires a first IP address corresponding to a webpage domain name of a pre-access webpage.
Specifically, in order to facilitate the subsequent request GSLB to resolve domain names of all web page reference contents, the HTTP request may further carry a GSLB address, that is, the HTTP request carrying the first IP address is obtained, which includes: and acquiring the HTTP request carrying the first IP address and the GSLB address. The GSLB address can be a GSLB address used by the browser in the process of acquiring the first IP address corresponding to the webpage domain name of the pre-access webpage, and the used GSLB address is recorded by the browser in the process of acquiring the first IP address corresponding to the webpage domain name of the pre-access webpage and then is carried in the HTTP request to be sent to the local.
S102: and inquiring the webpage basic frame corresponding to the first IP address.
Specifically, the corresponding relationship between the IP address and the web page basic frame may be preset, and after the first IP address is obtained, the web page basic frame corresponding to the first IP address is obtained by querying the corresponding relationship between the preset IP address and the web page basic frame.
S103: and analyzing the webpage basic frame to obtain the domain names of all webpage reference contents corresponding to the first IP address.
Specifically, the web page can be obtained only by combining the web page basic frame with all the web page reference contents, and the domain names of all the web page reference contents required to be used in the web page basic frame can be obtained by analyzing the web page basic frame.
S104: and sending a domain name resolution request to a global load balancing server GSLB, wherein the domain name resolution request carries domain names of all webpage reference contents.
Specifically, after receiving the domain name resolution request, the GSLB resolves the domain names of all the web page reference contents, and obtains, in combination with the IP address of the local CDN and the scheduling algorithm of the GSLB itself, the second IP address of each web page reference content corresponding to the domain name of each web page reference content in the domain names of all the web page reference contents.
The domain name resolution request can also carry a user end IP address of a browser which initiates the HTTP request, correspondingly, after the GSLB receives the domain name resolution request, the GSLB resolves the domain names of all the webpage reference contents, and obtains a second IP address of each webpage reference content corresponding to the domain name of each webpage reference content in the domain names of all the webpage reference contents by combining the user end IP address and a scheduling algorithm of the GSLB.
Specifically, since the local link is the user-side IP address of the browser that initiates the HTTP request, that is, the real IP address of the user (if the user is linked to the local via another proxy server, the real IP address of the user can be obtained via the HTTP header X-Forward-For), the real IP address of the user can be locally transferred to the GSLB.
Specifically, GSLB may perform resolution in combination with the user side IP address when resolving domain names of all web page reference contents, so that an optimal second IP address (i.e. an IP address closest to the "edge" of the network of the user) of each web page reference content may be obtained because the user side IP address is the real IP address of the user who has visited the web page in advance. Because the second IP address of each webpage reference content is obtained by the GSLB according to the real IP address of the user, the uncertainty of the prior art that the IP address of the local DNS is sent to the GSLB for reference analysis can be avoided.
Specifically, when the HTTP request in S101 further carries a GSLB address, the sending of the domain name resolution request to the global load balancing server GSLB by the HTTP request includes:
and sending a domain name resolution request to the GSLB corresponding to the GSLB address.
Specifically, when the HTTP request in S101 does not carry the GSLB address, sending a domain name resolution request to the global load balancing server GSLB includes:
inquiring local GSLB configuration information to obtain a local corresponding GSLB address; the GSLB configuration information comprises a local corresponding GSLB address;
and sending a domain name resolution request to the GSLB corresponding to the GSLB address.
That is, GSLB configuration information may be preset locally, and a local corresponding GSLB address may be obtained by querying the local GSLB configuration information.
Specifically, sending a domain name resolution request to the global load balancing server GSLB includes:
sending a domain name resolution request to the global load balancing server GSLB by using an EDNS (Extension DNS) method or an HTTP method.
S105: and acquiring a second IP address of each webpage reference content from the GSLB, and sending the webpage basic frame and the second IP address of each webpage reference content to the browser so that the browser acquires the webpage for displaying. Specifically, after obtaining the second IP address of each web page reference content from the GSLB, the web page base frame and the second IP address of each web page reference content may be wrapped in an HTTP response returned to the browser.
In particular, it may be wrapped in a custom HTTP header, for example: X-GSLB-INFO img01.excdn. cn,60, a, 223.5.6.7; img02.excdn. cn,60, a,223.5.6.8| 223.5.6.9. Or packaged in web page HTML, for example, < meta name ═ X-GSLB-INFO "content ═ img01.excdn.cn,60, a, 223.5.6.7; img02.excdn. cn,60, a,223.5.6.8|223.5.6.9 "/>.
And, a plurality of parsing results can be divided by using semicolon (;); comma (,) is used to segment multiple fields in the same parsing result, and the sequence of the fields in the above example is: domain name, TTL, record type and analysis result; the plurality of analysis results are divided by vertical dashed lines (|). Any other feasible manner can be adopted, and the method is not limited.
Specifically, the second IP address of the web page basic frame and the second IP address of each web page reference content are packaged into an HTTP response returned to the browser, and after the browser receives the HTTP response, the second IP address of the web page basic frame and each web page reference content may be extracted from the HTTP response by a browser plug-in, an ActiveX plug-in, a client agent, and the like. Moreover, the extracted web page basic frame and the second IP address of each web page reference content can be saved in a browser DNS cache, an operating system DNS cache, or a hosts file, etc. through a browser plug-in, an ActiveX plug-in, a client agent, etc., so that when a subsequent user accesses the same web page, the browser plug-in, the ActiveX plug-in, the client agent, etc. can obtain the second IP address of each web page reference content from the browser DNS cache, the operating system DNS cache, or the hosts file, etc., directly initiate a request to the relevant second IP address, and skip the process of DNS resolution.
Specifically, the browser obtains each webpage reference content from each webpage reference content server corresponding to the second IP address of each webpage reference content, and combines the webpage basic frame with each webpage reference content to obtain a webpage.
According to the method for acquiring the webpage, after the HTTP request carrying the first IP address is acquired, the domain names of all webpage reference contents corresponding to the first IP address are acquired, the domain name resolution request is directly sent to the global load balancing server GSLB, when the webpage contains a plurality of webpage reference contents, the domain name resolution request does not need to be initiated for many times, the time for acquiring the webpage reference contents is short, the efficiency for acquiring the webpage is improved, and the webpage loading speed can be accelerated. The real IP address of the user is used as a scheduling basis, and the scheduling accuracy is greatly improved. The DNS resolution is realized through the network server instead of the traditional client mode, the resolution time between the network server and the GSLB is superior to the time for initiating the resolution by the client under the common condition, and the webpage loading speed can be improved.
As shown in fig. 3, a flowchart of a method for acquiring a web page according to an embodiment of the present application is shown, where the method includes:
s201: and acquiring a first IP address corresponding to the webpage domain name of the pre-access webpage.
S202: and sending an HTTP request carrying the first IP address to a network server.
Specifically, after receiving the HTTP request, the network server queries a web page basic frame corresponding to the first IP address, analyzes the web page basic frame to obtain domain names of all web page reference contents corresponding to the first IP address, and sends a domain name resolution request to the global load balancing server GSLB, where the domain name resolution request carries the domain names of all web page reference contents.
Specifically, after receiving the domain name resolution request, the GSLB parses the domain names of all the web page reference contents, and obtains the IP address of each web page reference content corresponding to the domain name of each web page reference content in the domain names of all the web page reference contents by combining the IP address of the local CDN and the scheduling algorithm of the GSLB.
Specifically, the domain name resolution request also carries a local user end IP address, and accordingly, after receiving the domain name resolution request, the GSLB parses the domain names of all the web page reference contents, and obtains the IP address of each web page reference content corresponding to the domain name of each web page reference content in the domain names of all the web page reference contents by combining the user end IP address and the scheduling algorithm of the GSLB itself
S203: and receiving a webpage basic frame sent by the network server and a second IP address of each webpage reference content obtained by GSLB forwarded by the network server.
S204: and acquiring each webpage reference content from each webpage reference content server corresponding to the second IP address of each webpage reference content, and combining the webpage basic frame with each webpage reference content to obtain the webpage.
Referring to fig. 4, acquiring a first IP address corresponding to a domain name of a pre-visited web page includes:
s201 a: and acquiring the webpage domain name of the pre-visited webpage.
S201 b: inquiring whether a first IP address corresponding to the webpage domain name and a GSLB address are cached locally, if not, executing S201 c; otherwise, S201e is executed.
S201 c: sending a domain name resolution request carrying a webpage domain name to a local DNS, so that the local DNS obtains a first IP address corresponding to the webpage domain name and a GSLB address after receiving the domain name resolution request.
Where the local DNS is typically configured by the operator of the network used by the user.
Specifically, referring to fig. 5, after receiving the domain name resolution request, the local DNS acquires a first IP address corresponding to the web page domain name and a GSLB address, including:
s201c 1: the local DNS queries whether the local DNS caches the first IP address corresponding to the web page domain name and the GSLB address, and if so, executes S201c 2; otherwise, S201c4 is executed.
S201c 2: the local DNS determines whether the cached first IP address corresponding to the web page domain name and the GSLB address are valid, and if yes, performs S201c 3; otherwise, S201c4 is executed.
When the cached first IP address corresponding to the webpage domain name and the caching time of the GSLB address do not exceed a preset valid time threshold, the cached first IP address corresponding to the webpage domain name and the GSLB address are valid, and otherwise, the cached first IP address corresponding to the webpage domain name and the GSLB address are invalid.
S201c 3: the local DNS returns the cached first IP address corresponding to the web page domain name and the GSLB address to the local (specifically, the browser), and then ends.
S201c 4: the local DNS sends a domain name resolution request carrying a webpage domain name to a Root domain name server (Root DNS), and the Root DNS obtains an authorized domain name server.
Specifically, the root domain Name Server generally does not provide a (Address) record resolution service for a specified domain Name, but returns an NS (Name Server) record of the relevant domain Name (e.g., example. cn), where the NS record is a domain Name Server record for specifying which DNS Server the domain Name is to be resolved by, and instructs the local DNS to request resolution from the Server of the relevant NS record.
S201c 5: the local DNS obtains the IP address of the GSLB through the authorized domain name server, and the GSLB analyzes the webpage domain name carried in the domain name resolution request to obtain a first IP address corresponding to the webpage domain name.
Specifically, the authoritative domain name server may designate itself as GSLB, or may designate other servers as GSLB.
The GSLB determines which CDN node is used to optimally access the web page according to the request source IP address (the IP address of the local DNS) or according to the user-side IP address, and uses the IP address of the determined CDN node as the first IP address corresponding to the web page domain name.
S201c 6: and the local DNS returns the IP address of the GSLB obtained by the authorized domain name server and the first IP address corresponding to the webpage domain name obtained by the GSLB to the local, caches the IP address of the GSLB and the first IP address corresponding to the webpage domain name in the local DNS, and then ends.
And caching the IP address of the GSLB and the first IP address corresponding to the webpage domain name in a local DNS for the next same query request.
S201 d: receiving a first IP address corresponding to a web page domain name returned by the local DNS, and a GSLB address, and then executing S202.
Correspondingly, S202 sends an HTTP request carrying the first IP address to the network server; after receiving the HTTP request, the network server queries the web page basic frame corresponding to the first IP address, analyzes the web page basic frame to obtain domain names of all web page reference contents corresponding to the first IP address, and sends a domain name resolution request to the global load balancing server GSLB, including:
sending an HTTP request carrying a first IP address and a GSLB address to a network server; after receiving the HTTP request, the network server queries the webpage basic frame corresponding to the first IP address, analyzes the webpage basic frame to obtain domain names of all webpage reference contents corresponding to the first IP address, and sends a domain name analysis request to the global load balancing server GSLB corresponding to the GSLB address.
S201 e: judging whether a first IP address corresponding to the webpage domain name cached locally and a GSLB address are effective, if so, executing S201 f; otherwise, S201c is executed.
Specifically, the browser first determines whether to cache a record of a first IP address corresponding to the web page domain name in a local browser DNS cache, and if so, determines whether the cached first IP address corresponding to the web page domain name is valid, and if so, executes S201 f; if the first IP address record corresponding to the web page domain name is not cached in the local browser DNS cache, or the cached first IP address corresponding to the web page domain name is invalid, the browser determines, through the operating system, whether the record of the first IP address corresponding to the web page domain name is cached in a hosts file (in Linux operating system/etc/hosts, in Windows operating system% SystemRoot% \ system32\ drivers \ etc \ hosts) of the local operating system, if so, determines whether the cached first IP address corresponding to the web page domain name is valid, and if so, executes S201 f; if the record of the first IP address corresponding to the domain name of the web page is not cached in the hosts file of the native operating system, or the cached first IP address corresponding to the domain name of the web page is invalid, S201c is performed.
When the caching time of the cached first IP address corresponding to the webpage domain name does not exceed a preset effective time threshold, the cached first IP address corresponding to the webpage domain name is effective, and otherwise, the cached first IP address corresponding to the webpage domain name is invalid.
S201 f: a first IP address corresponding to a domain name of a web page, which is locally cached, and a GSLB address are obtained, and then S202 is performed. .
Correspondingly, S202 sends an HTTP request carrying the first IP address to the network server; after receiving the HTTP request, the network server queries the web page basic frame corresponding to the first IP address, analyzes the web page basic frame to obtain domain names of all web page reference contents corresponding to the first IP address, and sends a domain name resolution request to the global load balancing server GSLB, including:
sending an HTTP request carrying a first IP address and a GSLB address to a network server; after receiving the HTTP request, the network server queries the webpage basic frame corresponding to the first IP address, analyzes the webpage basic frame to obtain domain names of all webpage reference contents corresponding to the first IP address, and sends a domain name analysis request to the global load balancing server GSLB corresponding to the GSLB address.
According to the method for acquiring the webpage, when the webpage contains a plurality of webpage reference contents, a domain name resolution request does not need to be initiated for many times, the time for acquiring the webpage reference contents is short, the efficiency for acquiring the webpage is improved, and the webpage loading speed can be accelerated. The real IP address of the user is used as a scheduling basis, and the scheduling accuracy is greatly improved. The DNS resolution is realized through the network server instead of the traditional client mode, the resolution time between the network server and the GSLB is superior to the time for initiating the resolution by the client under the common condition, and the webpage loading speed can be improved.
As shown in the figureShown in fig. 6, which is a schematic block diagram of acquiring a web page according to an embodiment of the present application, a browser launches a normal web page (for example, a normal web page is targeted atwww.example.cn) Completes the DNS resolution process (1a,1 b). And the browser initiates an HTTP request to the network server according to the domain name resolution result returned by the DNS (2). The network server inquires a webpage basic frame according to information such as a configuration file of the network server, webpage content needing service and the like, obtains domain names of all webpage application contents (such as img01.excdn.cn, img02.excdn.cn, static. excdn.cn and the like), initiates a domain name resolution request carrying the domain names of all webpage reference contents to the GSLB by using an EDNS mode, an HTTP mode and the like, and can send the GSLB (3a) to the network server by carrying the real IP address of the user in the domain name resolution request because the real IP address is linked with the network server. GSLB according to the user real IP address transmitted by the network server, combining with its own scheduling algorithm, and returning the analysis result to the network server (3 b). The network server returns the analysis result to the browser (4). The browser directly initiates a request (5a) to a network application content server (such as an image web server) and receives a response (5b) according to the relevant resolution result in the webpage, and does not need to perform multiple DNS resolution of the relevant domain name.
Fig. 7 is a flowchart of a method for domain name resolution according to an embodiment of the present application, where the method includes:
s301: receiving a domain name resolution request, wherein the domain name resolution request carries domain names of all webpage reference contents in the pre-access webpage and a user end IP address of a browser corresponding to the pre-access webpage.
S302: and resolving the domain names of all the webpage reference contents, and obtaining a second IP address of each webpage reference content corresponding to the domain name of each webpage reference content in the domain names of all the webpage reference contents by combining the IP address of the user side and a local self scheduling algorithm.
After obtaining the second IP address of each web page reference content corresponding to the domain name of each web page reference content in the domain names of all the web page reference contents, the method further includes:
sending a second IP address of each webpage reference content corresponding to the domain name of each webpage reference content to a network server, so that the network server sends the second IP address of each webpage reference content and a webpage basic frame corresponding to the first IP address to a browser, wherein the first IP address corresponds to the webpage domain name of the webpage to be accessed; and enabling the browser to acquire the webpage for displaying.
According to the domain name resolution method, when the webpage contains a plurality of webpage quoted contents, a domain name resolution request does not need to be initiated for many times, the time for acquiring the webpage quoted contents is short, the efficiency for acquiring the webpage is improved, and the webpage loading speed can be accelerated. The real IP address of the user is used as a scheduling basis, and the scheduling accuracy is greatly improved. The DNS resolution is realized through the network server instead of the traditional client mode, the resolution time between the network server and the GSLB is superior to the time for initiating the resolution by the client under the common condition, and the webpage loading speed can be improved.
As shown in fig. 8, a network server according to an embodiment of the present application includes:
a first obtaining module 401, configured to obtain a hypertext transfer protocol HTTP request carrying a first network protocol IP address;
the query module 402 is configured to query a webpage basic frame corresponding to the first IP address, and analyze the webpage basic frame to obtain domain names of all webpage reference contents corresponding to the first IP address;
a first sending module 403, configured to send a domain name resolution request to the global load balancing server GSLB, where the domain name resolution request carries domain names of all web page reference contents;
a processing module 404, configured to obtain a second IP address of each web page reference content from the GSLB, where the second IP address of each web page reference content corresponds to a domain name of each web page reference content in domain names of all web page reference contents;
a second sending module 405, configured to send the web page basic frame and the second IP address of each web page reference content to the browser, so that the browser obtains the web page for display.
Further, the first obtaining module 401 includes:
the first acquisition unit is used for acquiring an HTTP request carrying a first IP address and a GSLB address;
accordingly, the first transmitting module 403 includes:
and the first sending unit is used for sending the domain name resolution request to the GSLB corresponding to the GSLB address.
Further, the first sending module 403 includes:
the first query unit is used for querying local GSLB configuration information to obtain a local corresponding GSLB address; the GSLB configuration information comprises a local corresponding GSLB address;
and the second sending unit is used for sending the domain name resolution request to the GSLB corresponding to the GSLB address.
Further, the first sending module 403 includes:
and the third sending unit is used for sending the domain name resolution request to the GSLB by using an EDNS mode or an HTTP mode of the extended domain name server.
Further, the HTTP request is initiated after the browser acquires the first IP address corresponding to the domain name of the web page of the pre-visited web page.
Further, the first sending module further includes:
and the processing unit is used for sending a domain name resolution request to the global load balancing server GSLB, wherein the domain name resolution request carries domain names of all webpage reference contents and a user terminal IP address of a browser initiating the HTTP request, so that after the GSLB receives the domain name resolution request, the domain names of all the webpage reference contents are resolved, and a second IP address of each webpage reference content corresponding to the domain name of each webpage reference content in the domain names of all the webpage reference contents is obtained by combining the user terminal IP address and a scheduling algorithm of the GSLB.
It should be noted that a WEB Server (WEB Server), also called WWW (WORLD WIDE WEB) Server, mainly functions to provide WEB information browsing services. An original Content processor (original Content server), a Content processor (Content server), a GSLB client and a final Content processor (FinalContent server) can be arranged in a network server, the functions of a first acquisition module and a query module for querying a webpage basic frame corresponding to a first IP address are realized by the original Content processor, the function of the query module for analyzing the webpage basic frame to obtain domain names of all webpage reference contents corresponding to the first IP address is realized by the Content processor, the functions of a first sending module and a processing module are realized by the GSLB client, and the function of a second sending module is realized by the final Content processor.
According to the network server, when the webpage contains a plurality of webpage reference contents, a domain name resolution request does not need to be initiated for many times, the time for acquiring the webpage reference contents is short, the efficiency for acquiring the webpage is improved, and the webpage loading speed can be accelerated. The real IP address of the user is used as a scheduling basis, and the scheduling accuracy is greatly improved. The DNS resolution is realized through the network server instead of the traditional client mode, the resolution time between the network server and the GSLB is superior to the time for initiating the resolution by the client under the common condition, and the webpage loading speed can be improved.
As shown in fig. 9, a browser according to an embodiment of the present application includes:
a second obtaining module 501, configured to obtain a first IP address corresponding to a domain name of a pre-visited web page;
a third sending module 502, configured to send an HTTP request carrying the first IP address to the network server; after receiving the HTTP request, the network server queries a webpage basic frame corresponding to the first IP address, analyzes the webpage basic frame to obtain domain names of all webpage reference contents corresponding to the first IP address, and sends a domain name analysis request to the global load balancing server GSLB, wherein the domain name analysis request carries the domain names of all the webpage reference contents;
a first receiving module 503, configured to receive a web page basic frame sent by a web server and a second IP address of each web page reference content obtained by GSLB forwarded by the web server, where the second IP address of each web page reference content corresponds to a domain name of each web page reference content in domain names of all web page reference contents;
a combining module 504, configured to obtain each web page reference content from each web page reference content server corresponding to the second IP address of each web page reference content, and combine the web page basic frame with each web page reference content to obtain a web page.
Further, the second obtaining module 501 includes:
the second acquisition unit is used for acquiring the webpage domain name of the pre-access webpage;
the second query unit is used for querying whether the first IP address corresponding to the webpage domain name and the GSLB address are cached locally;
a fourth sending unit, configured to send a domain name resolution request carrying a web domain name to a local domain name server DNS if the query result of the second querying unit is not cached, so that the local DNS obtains a first IP address corresponding to the web domain name and a GSLB address after receiving the domain name resolution request;
a receiving unit, configured to receive a first IP address corresponding to a web page domain name and a GSLB address, where the first IP address and the GSLB address are returned by the local DNS;
accordingly, the third sending module 502 includes:
a fifth sending unit, configured to send an HTTP request carrying the first IP address and the GSLB address to the network server; after receiving the HTTP request, the network server queries the webpage basic frame corresponding to the first IP address, analyzes the webpage basic frame to obtain domain names of all webpage reference contents corresponding to the first IP address, and sends a domain name analysis request to the global load balancing server GSLB corresponding to the GSLB address.
Further, the second obtaining module 501 further includes:
the judging unit is used for judging whether the first IP address corresponding to the webpage domain name cached locally and the GSLB address are effective or not if the query result of the second querying unit is cached;
a third obtaining unit, configured to obtain the locally cached first IP address corresponding to the web page domain name and the GSLB address if the determination result of the determining unit is valid;
accordingly, the third sending module 502 includes:
a sixth sending unit, configured to send an HTTP request carrying the first IP address and the GSLB address to the network server; after receiving the HTTP request, the network server queries the webpage basic frame corresponding to the first IP address, analyzes the webpage basic frame to obtain domain names of all webpage reference contents corresponding to the first IP address, and sends a domain name analysis request to the global load balancing server GSLB corresponding to the GSLB address.
Further, the second obtaining module 501 further includes:
and the notification unit is used for notifying the fourth sending unit to execute the step of sending the domain name resolution request carrying the webpage domain name to the local DNS if the judgment result of the judgment unit is not valid.
The Browser (Browser) includes browsers such as Internet Explorer, FireFox, Chrome, and the like; command line tools such as curl, wget, etc.; special APP software for mobile phones and computers, and a proxy server such as a question. A GSLB processor (GSLB Parse) and a domain name Cache (DNS Cache) may be set in the browser, the functions of the first receiving module and the combining module are implemented by the GSLB processor, and the first IP address corresponding to the web domain name of the pre-visited web page, which is obtained by the second obtaining module, is cached in the domain name Cache, wherein the functions of the second obtaining module and the third sending module are implemented by a Traditional domain name Client (legacy DNS Client) in a Client Computer (Client Computer) (including a DNS resolution and caching module in a Client operating system). The client computer can adopt Windows, Linux, MacOS, iOS, Android and other operating systems. The browser runs in the client computer.
According to the browser, when the webpage contains a plurality of webpage reference contents, a domain name resolution request does not need to be initiated for many times, the time for acquiring the webpage reference contents is short, the efficiency for acquiring the webpage is improved, and the webpage loading speed can be accelerated. The real IP address of the user is used as a scheduling basis, and the scheduling accuracy is greatly improved. The DNS resolution is realized through the network server instead of the traditional client mode, the resolution time between the network server and the GSLB is superior to the time for initiating the resolution by the client under the common condition, and the webpage loading speed can be improved.
As shown in fig. 10, it is a global load balancing server GSLB according to an embodiment of the present application, where the GSLB includes:
a second receiving module 601, configured to receive a domain name resolution request, where the domain name resolution request carries domain names of all web page reference contents in a pre-visited web page and a user IP address of a browser corresponding to the pre-visited web page;
the parsing module 602 is configured to parse domain names of all the web page reference contents, and obtain, by combining the IP address of the user side and a local scheduling algorithm, a second IP address of each web page reference content corresponding to a domain name of each web page reference content in the domain names of all the web page reference contents.
Further, referring to fig. 11, the GSLB further includes:
a fourth sending module 603, configured to send the second IP address of each web page reference content corresponding to the domain name of each web page reference content to the web server, so that the web server sends the second IP address of each web page reference content and the web page basic frame corresponding to the first IP address to the browser, where the first IP address corresponds to the web page domain name of the pre-visited web page; and enabling the browser to acquire the webpage for displaying.
It should be noted that GSLB implements traffic allocation between servers in different areas on a wide area network (including the internet), and ensures that the client closest to the GSLB is served by using the best server, thereby ensuring access quality. The GSLB is provided with a scheduling Policy database (Policy DB) (a scheduling algorithm is in the scheduling Policy database), and an http dns processor or an EDNS processor, and the functions of the second receiving module, the parsing module, and the fourth sending module may be implemented by the http dns processor or the EDNS processor.
In the GSLB described in this embodiment, when the web page includes a plurality of web page reference contents, a domain name resolution request does not need to be initiated many times, the time required for acquiring the web page reference contents is short, the efficiency of acquiring the web page is improved, and the web page loading speed can be increased. The real IP address of the user is used as a scheduling basis, and the scheduling accuracy is greatly improved. The DNS resolution is realized through the network server instead of the traditional client mode, the resolution time between the network server and the GSLB is superior to the time for initiating the resolution by the client under the common condition, and the webpage loading speed can be improved.
The network server, the browser and the GSLB correspond to the description of the method flow, and reference is made to the description of the method flow for the deficiency, which is not described in detail.
The foregoing description shows and describes several preferred embodiments of the present application, but as aforementioned, it is to be understood that the application is not limited to the forms disclosed herein, but is not to be construed as excluding other embodiments and is capable of use in various other combinations, modifications, and environments and is capable of changes within the scope of the inventive concept as expressed herein, commensurate with the above teachings, or the skill or knowledge of the relevant art. And that modifications and variations may be effected by those skilled in the art without departing from the spirit and scope of the application, which is to be protected by the claims appended hereto.
Claims (25)
1. A method for obtaining a web page, the method comprising:
acquiring a hypertext transfer protocol (HTTP) request carrying a first network protocol (IP) address;
inquiring a webpage basic frame corresponding to the first IP address, and analyzing the webpage basic frame to obtain domain names of all webpage reference contents corresponding to the first IP address;
sending a domain name resolution request to a global load balancing server GSLB, wherein the domain name resolution request carries domain names of all webpage reference contents;
acquiring a second IP address of each webpage reference content from the GSLB, wherein the second IP address of each webpage reference content corresponds to the domain name of each webpage reference content in the domain names of all webpage reference contents;
and sending the webpage basic frame and the second IP address of each webpage reference content to a browser, so that the browser acquires and displays the webpage.
2. The method of claim 1, wherein obtaining the HTTP request carrying the first IP address comprises:
acquiring an HTTP request carrying the first IP address and the GSLB address;
correspondingly, sending a domain name resolution request to the global load balancing server GSLB includes:
and sending a domain name resolution request to the GSLB corresponding to the GSLB address.
3. The method of claim 1, wherein sending a domain name resolution request to a global load balancing server, GSLB, comprises:
inquiring local GSLB configuration information to obtain a local corresponding GSLB address; the GSLB configuration information comprises a local corresponding GSLB address;
and sending a domain name resolution request to the GSLB corresponding to the GSLB address.
4. The method of claim 1, wherein sending a domain name resolution request to a global load balancing server, GSLB, comprises:
and sending a domain name resolution request to the GSLB by using an EDNS mode or an HTTP mode of an extended domain name server.
5. The method of claim 1, wherein the HTTP request is initiated by a browser after obtaining a first IP address corresponding to a web page domain name of a pre-visited web page.
6. The method according to any one of claims 1 to 5, wherein sending a domain name resolution request to a global load balancing server GSLB, wherein the domain name resolution request carries domain names of all web page reference contents, comprises:
sending a domain name resolution request to a global load balancing server GSLB, wherein the domain name resolution request carries domain names of all webpage reference contents and a user terminal IP address of a browser initiating the HTTP request, so that after receiving the domain name resolution request, the GSLB resolves the domain names of all the webpage reference contents, and obtains a second IP address of each webpage reference content corresponding to the domain name of each webpage reference content in the domain names of all the webpage reference contents by combining the user terminal IP address and a scheduling algorithm of the GSLB.
7. A method for obtaining a web page, the method comprising:
acquiring a first IP address corresponding to a webpage domain name of a pre-access webpage;
sending an HTTP request carrying the first IP address to a network server, so that after receiving the HTTP request, the network server queries a webpage basic frame corresponding to the first IP address, analyzes the webpage basic frame to obtain domain names of all webpage reference contents corresponding to the first IP address, and sends a domain name resolution request to a global load balancing server GSLB, wherein the domain name resolution request carries the domain names of all the webpage reference contents;
receiving a webpage basic frame sent by the network server and a second IP address of each webpage reference content obtained by the GSLB forwarded by the network server, wherein the second IP address of each webpage reference content corresponds to the domain name of each webpage reference content in the domain names of all the webpage reference contents;
and acquiring each webpage reference content from each webpage reference content server corresponding to the second IP address of each webpage reference content, and combining the webpage basic frame with each webpage reference content to obtain a webpage.
8. The method of claim 7, wherein obtaining the first IP address corresponding to the web page domain name of the pre-visited web page comprises:
acquiring a webpage domain name of the pre-visited webpage;
inquiring whether a first IP address corresponding to the webpage domain name is cached locally or not and a GSLB address;
if the cache is not available, sending a domain name resolution request carrying the webpage domain name to a local Domain Name Server (DNS), so that the local DNS obtains a first IP address corresponding to the webpage domain name and a GSLB address after receiving the domain name resolution request;
receiving a first IP address corresponding to the webpage domain name and a GSLB address returned by the local DNS;
correspondingly, sending an HTTP request carrying the first IP address to a network server, so that after receiving the HTTP request, the network server queries a web page basic frame corresponding to the first IP address, analyzes the web page basic frame to obtain domain names of all web page reference contents corresponding to the first IP address, and sends a domain name analysis request to a global load balancing server GSLB, including:
and sending an HTTP request carrying the first IP address and the GSLB address to a network server, so that after receiving the HTTP request, the network server inquires a webpage basic frame corresponding to the first IP address, analyzes the webpage basic frame to obtain domain names of all webpage reference contents corresponding to the first IP address, and sends a domain name analysis request to a global load balancing server GSLB corresponding to the GSLB address.
9. The method of claim 8, wherein querying whether to locally cache the first IP address corresponding to the web page domain name, and after the GSLB address, further comprises:
if so, judging whether a first IP address corresponding to the webpage domain name cached locally and a GSLB address are valid;
if the local cache is valid, acquiring a first IP address corresponding to the webpage domain name and a GSLB address of the local cache;
correspondingly, sending an HTTP request carrying the first IP address to a network server, so that after receiving the HTTP request, the network server queries a web page basic frame corresponding to the first IP address, analyzes the web page basic frame to obtain domain names of all web page reference contents corresponding to the first IP address, and sends a domain name analysis request to a global load balancing server GSLB, including:
and sending an HTTP request carrying the first IP address and the GSLB address to a network server, so that after receiving the HTTP request, the network server inquires a webpage basic frame corresponding to the first IP address, analyzes the webpage basic frame to obtain domain names of all webpage reference contents corresponding to the first IP address, and sends a domain name analysis request to a global load balancing server GSLB corresponding to the GSLB address.
10. The method of claim 9, wherein determining whether the first IP address corresponding to the web page domain name cached locally and the GSLB address are valid further comprises:
and if not, executing the step of sending a domain name resolution request carrying the webpage domain name to a local DNS.
11. A method of domain name resolution, the method comprising:
receiving a domain name resolution request, wherein the domain name resolution request carries domain names of all webpage reference contents in a pre-access webpage and a user side IP address of a browser corresponding to the pre-access webpage;
and analyzing the domain names of all the webpage reference contents, and combining the user side IP address and a local self scheduling algorithm to obtain a second IP address of each webpage reference content corresponding to the domain name of each webpage reference content in the domain names of all the webpage reference contents.
12. The method of claim 11, wherein after obtaining the second IP address of each of the web reference content corresponding to the domain name of each of the domain names of all of the web reference content, further comprising:
sending a second IP address of each webpage reference content corresponding to the domain name of each webpage reference content to a network server, so that the network server sends the second IP address of each webpage reference content and a webpage basic frame corresponding to a first IP address to a browser, wherein the first IP address corresponds to the webpage domain name of the pre-accessed webpage; and enabling the browser to acquire the webpage for displaying.
13. A network server, characterized in that the network server comprises:
the first acquisition module is used for acquiring a hypertext transfer protocol (HTTP) request carrying a first network protocol (IP) address;
the query module is used for querying the webpage basic frame corresponding to the first IP address, analyzing the webpage basic frame and obtaining domain names of all webpage reference contents corresponding to the first IP address;
the first sending module is used for sending a domain name resolution request to a global load balancing server GSLB, wherein the domain name resolution request carries domain names of all webpage reference contents;
the processing module is used for acquiring a second IP address of each webpage reference content from the GSLB, wherein the second IP address of each webpage reference content corresponds to the domain name of each webpage reference content in the domain names of all the webpage reference contents;
and the second sending module is used for sending the webpage basic frame and the second IP address of each webpage reference content to a browser so that the browser can acquire and display the webpage.
14. The network server of claim 13, wherein the first obtaining module comprises:
a first obtaining unit, configured to obtain an HTTP request carrying the first IP address and the GSLB address;
accordingly, the first transmitting module comprises:
and the first sending unit is used for sending a domain name resolution request to the GSLB corresponding to the GSLB address.
15. The network server of claim 13, wherein the first sending module comprises:
the first query unit is used for querying local GSLB configuration information to obtain a local corresponding GSLB address; the GSLB configuration information comprises a local corresponding GSLB address;
and the second sending unit is used for sending the domain name resolution request to the GSLB corresponding to the GSLB address.
16. The network server of claim 13, wherein the first sending module comprises:
and the third sending unit is used for sending the domain name resolution request to the GSLB by using an EDNS mode or an HTTP mode.
17. The web server of claim 13, wherein the HTTP request is initiated by the browser after obtaining a first IP address corresponding to a domain name of a web page of the pre-visited web page.
18. The network server of any of claims 13-17, wherein the first sending module further comprises:
and the processing unit is used for sending a domain name resolution request to a global load balancing server GSLB, wherein the domain name resolution request carries domain names of all webpage reference contents and a user terminal IP address of a browser which initiates the HTTP request, so that after the GSLB receives the domain name resolution request, the GSLB resolves the domain names of all the webpage reference contents, and obtains a second IP address of each webpage reference content corresponding to the domain name of each webpage reference content in the domain names of all the webpage reference contents by combining the user terminal IP address and a scheduling algorithm of the GSLB.
19. A browser, the browser comprising:
the second acquisition module is used for acquiring a first IP address corresponding to the webpage domain name of the pre-access webpage;
a third sending module, configured to send an HTTP request carrying the first IP address to a web server, so that after receiving the HTTP request, the web server queries a web page basic frame corresponding to the first IP address, parses the web page basic frame, obtains domain names of all web page reference contents corresponding to the first IP address, and sends a domain name resolution request to a global load balancing server GSLB, where the domain name resolution request carries domain names of all web page reference contents;
a first receiving module, configured to receive a web page basic frame sent by the web server and a second IP address of each web page reference content obtained by the GSLB and forwarded by the web server, where the second IP address of each web page reference content corresponds to a domain name of each web page reference content in domain names of all web page reference contents;
and the combination module is used for acquiring each webpage reference content from each webpage reference content server corresponding to the second IP address of each webpage reference content, and combining the webpage basic frame with each webpage reference content to obtain a webpage.
20. The browser of claim 19, wherein the second obtaining module comprises:
the second acquisition unit is used for acquiring the webpage domain name of the pre-access webpage;
the second query unit is used for querying whether a first IP address corresponding to the webpage domain name and a GSLB address are cached locally;
a fourth sending unit, configured to send a domain name resolution request carrying the web domain name to a local domain name server DNS if the query result of the second querying unit is not cached, so that the local DNS obtains a first IP address corresponding to the web domain name and a GSLB address after receiving the domain name resolution request;
a receiving unit, configured to receive a first IP address corresponding to the web page domain name and a GSLB address, where the first IP address is returned by the local DNS;
accordingly, the third sending module comprises:
a fifth sending unit, configured to send an HTTP request carrying the first IP address and the GSLB address to a network server, so that after receiving the HTTP request, the network server queries a webpage infrastructure corresponding to the first IP address, parses the webpage infrastructure, obtains domain names of all webpage reference contents corresponding to the first IP address, and sends a domain name parsing request to a global load balancing server GSLB corresponding to the GSLB address.
21. The browser of claim 20, wherein the second obtaining module further comprises:
a judging unit, configured to judge whether a first IP address corresponding to the web page domain name cached locally and a GSLB address are valid if the query result of the second querying unit is cached;
a third obtaining unit, configured to obtain a first IP address corresponding to the web page domain name cached locally and a GSLB address if the determination result of the determining unit is valid;
accordingly, the third sending module comprises:
a sixth sending unit, configured to send an HTTP request carrying the first IP address and the GSLB address to a network server, so that after receiving the HTTP request, the network server queries a webpage infrastructure corresponding to the first IP address, parses the webpage infrastructure, obtains domain names of all webpage reference contents corresponding to the first IP address, and sends a domain name parsing request to a global load balancing server GSLB corresponding to the GSLB address.
22. The browser of claim 21, wherein the second obtaining module further comprises:
and a notifying unit, configured to notify the fourth sending unit to execute the step of sending the domain name resolution request carrying the web domain name to the local DNS if the determination result of the determining unit is not valid.
23. A global load balancing server, GSLB, comprising:
the second receiving module is used for receiving a domain name resolution request, wherein the domain name resolution request carries domain names of all webpage reference contents in a pre-access webpage and a user side IP address of a browser corresponding to the pre-access webpage;
and the analysis module is used for analyzing the domain names of all the webpage reference contents and obtaining a second IP address of each webpage reference content corresponding to the domain name of each webpage reference content in the domain names of all the webpage reference contents by combining the IP address of the user side and a local self scheduling algorithm.
24. The GSLB of claim 23, wherein said GSLB further comprises:
a fourth sending module, configured to send the second IP address of each web page reference content corresponding to the domain name of each web page reference content to a web server, so that the web server sends the second IP address of each web page reference content and a web page basic frame corresponding to the first IP address to a browser, where the first IP address corresponds to the web page domain name of the pre-visited web page; and enabling the browser to acquire the webpage for displaying.
25. A system for obtaining a web page, the system comprising at least one of: a web server as claimed in any one of claims 13 to 18, a browser as claimed in any one of claims 19 to 22 and a global load balancing server GSLB as claimed in any one of claims 23 to 24.
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410213336.6A CN105100294B (en) | 2014-05-20 | 2014-05-20 | Obtain method, system, the webserver, browser and the GSLB of webpage |
Publications (2)
Publication Number | Publication Date |
---|---|
HK1213704A1 HK1213704A1 (en) | 2016-07-08 |
HK1213704B true HK1213704B (en) | 2019-07-19 |
Family
ID=
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI656772B (en) | Method, system, web server, browser and GPS for obtaining webpage | |
US10798203B2 (en) | Method and apparatus for reducing network resource transmission size using delta compression | |
US9565265B2 (en) | Method and apparatus for automatically optimizing the loading of images in a cloud-based proxy service | |
EP3175366B1 (en) | Web redirection for content scanning | |
KR101914318B1 (en) | Global traffic management using modified hostname | |
US9088461B2 (en) | Common web accessible data store for client side page processing | |
CN106331149A (en) | Webpage code adapting method applicable to client environment | |
WO2017020597A1 (en) | Resource cache method and apparatus | |
CN106919595B (en) | Cookie mapping method and device and electronic equipment | |
HK1213704B (en) | Method for obtaining web pages, system, network server, browser and gslb server | |
US20200402115A1 (en) | Serving an Online Advertisement Asynchronously | |
CN120455431A (en) | Method, device, equipment, medium and product for acquiring DNS (Domain name System) outlet IP (Internet protocol) | |
HK1239862A1 (en) | Method and device used for cookie mapping and electronic equipment | |
HK1239862A (en) | Method and device used for cookie mapping and electronic equipment | |
HK1239862B (en) | Method and device used for cookie mapping and electronic equipment |