Portal page acquisition method, wireless AP and Portal server
Technical Field
The invention relates to the technical field of communication, in particular to a Portal page acquisition method, a wireless AP and a Portal server.
Background
With the increase of wireless network coverage areas, mobile terminals such as mobile phones and the like are connected with wireless networks to access the internet more and more. Portal (Portal) authentication is one of popular technologies for wireless network access authentication, and when a user accesses a certain wireless network, a Portal page is automatically popped up to prompt the user to input account information so as to complete access authentication.
However, when the number of users accessing simultaneously is large, the pressure of the Portal server is undoubtedly increased, so that the performance of Portal authentication is directly affected, and especially when the pictures in the Portal page are very exquisite, a large burden is also caused on the network bandwidth, which becomes an important factor affecting the user experience.
At present, the above problems are generally solved by adding hardware, such as erecting an independent Portal server or forming a cluster of multiple Portal servers. Of course, the problem of broadband bottleneck occurring when the broadband Portal page is issued can be solved by increasing the network bandwidth, but the solutions will undoubtedly increase the cost and consume too much network resources. When the network size and the user quantity are particularly large, the Portal server and the broadband tend to be multiplied, and the network topology and the architecture become more complex with the increasing cost pressure.
Disclosure of Invention
In view of the above problems, the present invention provides a Portal page acquisition method, a wireless AP (Access Point) and a Portal server, which effectively solve the technical problem that the authentication performance is affected in the acquisition process of media files in the Portal page in the prior art.
The technical scheme provided by the invention is as follows:
a Portal page acquisition method comprises a plurality of wireless APs in the same local area network, wherein each wireless AP caches media files in a Portal page, and the wireless APs are respectively in communication connection with a Portal server, and the Portal page acquisition method comprises the following steps:
s1, any wireless AP in the wireless local area network receives the internet access request sent by the terminal;
s2, the wireless AP redirecting the internet access request to obtain a Resource Locator (URL), and sending the Resource Locator to the terminal;
s3Portal server receives the page request sent by the terminal according to the URL and sends the Portal page to the terminal, wherein the domain name of the media file in the Portal page is a preset domain name, and the preset domain name of the media file is different from the domain name of the Portal page;
s4, the wireless AP receives the media file request sent by the terminal according to the preset domain name, and sends the cached media file to the terminal, and completes the issuing of the Portal page.
Further preferably, before step S1, the method further includes: s01 Portal server sends the media files in Portal page to each wireless AP in LAN for buffer storage; or the like, or, alternatively,
the plurality of wireless APs are respectively in communication connection with the cloud controller, and before step S1, the method includes: and the S02 cloud controller transmits the media files in the Portal page to each wireless AP in the local area network for caching.
Further preferably, the step S2 specifically includes:
s21, the wireless AP connected with the terminal receives the internet surfing request sent by the wireless AP;
s22, the wireless AP obtains URL according to the internet request redirection and sends the URL to the terminal;
the S23 terminal generates a page request according to the received URL and sends the page request to the Portal server.
Further preferably, the step S3 specifically includes:
s31 Portal server receives the page request sent by the terminal;
s32, the Portal server modifies the domain name of the media file in the Portal page into a preset domain name;
s33 Portal server sends Portal page, domain name of Portal page and preset domain name of media file to terminal.
Further preferably, the step S4 specifically includes:
s411, the terminal sends a domain name resolution request to the wireless AP according to the received preset domain name of the media file;
s421 the wireless AP receives the domain name resolution request and returns the IP address of the wireless AP to the terminal;
s431 the terminal sends the media file request to the wireless AP according to the received IP address;
s441, the wireless AP receives the media file request and sends the cached media file to a terminal;
and the S451 terminal receives the media file and displays the media file in a Portal page to realize acquisition of the Portal page.
Further preferably, the step S4 specifically includes:
s412, the terminal sends a domain name resolution request to the wireless AP according to a preset domain name of a received media file, wherein a Portal page comprises a plurality of media files, and a Portal server returns the preset domain names corresponding to the media files;
s422, the wireless AP receives the domain name resolution request and returns the IP address of the wireless AP to the terminal;
s432, the terminal sends media file requests to the wireless AP in sequence according to the received IP address;
s442 the wireless AP sequentially receives the media file requests and sequentially sends the cached media files to the terminal;
and S452, the terminal receives the media files in sequence and displays the media files in a Portal page to acquire the Portal page.
The invention also provides a wireless AP, the wireless AP is in communication connection with a Portal server, and the wireless AP comprises:
the caching module is used for caching the media files in the Portal page sent by the Portal server;
the first request receiving module is used for receiving an internet surfing request sent by the terminal and receiving a media file request sent by the terminal;
the redirection module is used for obtaining a URL (uniform resource locator) according to the redirection of the internet surfing request received by the first request receiving module;
and the first information sending module is used for sending the URL obtained by redirection of the redirection module to the terminal and sending the media file cached in the cache module to the terminal according to the media file request received by the first request receiving module.
Further preferably, the wireless AP is in communication connection with a cloud controller, and the cache module is configured to cache a media file in a Portal page delivered by the cloud controller.
Further preferably, the first request receiving module is further configured to receive a domain name resolution request sent by a terminal;
the first information sending module is further configured to return the own IP address to the terminal according to the domain name resolution request received by the first request receiving module.
The invention also provides a Portal server, which is respectively connected with the wireless AP and the terminal, and comprises:
the second request receiving module is used for receiving a page request sent by the terminal;
the domain name modification module is used for modifying the domain name of the media file in the Portal page into a preset domain name;
and the second information sending module is used for sending the Portal page, the domain name of the Portal page and the preset domain name of the media file to the terminal together.
Compared with the prior art, the invention has the beneficial effects that:
in the method for acquiring the Portal page, provided by the invention, the media files (particularly, files such as pictures and videos occupying large space) in the Portal page are sent to each wireless AP in the local area network through the Portal server or the cloud controller on the premise of not increasing additional Portal servers and other hardware equipment. When the terminal accesses any wireless AP in the local area network, the Portal server sends a Portal page to the terminal, and meanwhile, corresponding media files are obtained from the wireless AP connected with the terminal, so that the whole Portal page is obtained. Therefore, when a large-scale user accesses the local area network, the Portal server is not required to send complete Portal pages to each terminal one by one, and only the webpage frame is required to be sent, so that the user load capacity of the Portal server is greatly reduced, meanwhile, the network bandwidth pressure of the Portal server is reduced, the loading rate of the Portal pages is improved, and the user experience is improved.
Drawings
The foregoing features, technical features, advantages and embodiments are further described in the following detailed description of the preferred embodiments, which is to be read in connection with the accompanying drawings.
FIG. 1 is a schematic flow chart of an embodiment of a Portal page acquisition method in the present invention;
FIG. 2 is a schematic flow chart of another embodiment of a Portal page retrieval method according to the present invention;
FIG. 3 is a diagram of a wireless AP according to the present invention;
FIG. 4 is a schematic diagram of a Portal server according to the present invention.
The reference numbers illustrate:
100-wireless AP, 110-cache module, 120-first request receiving module, 130-redirection module, 140-first information sending module, 200-Portal server, 210-second request receiving module, 220-domain name modification module and 230-second information sending module.
Detailed Description
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following description will be made with reference to the accompanying drawings. It is obvious that the drawings in the following description are only some examples of the invention, and that for a person skilled in the art, other drawings and embodiments can be derived from them without inventive effort.
As shown in fig. 1, a schematic flow chart of an embodiment of a method for acquiring a Portal page according to the present invention is provided, and specifically, a local area network includes a plurality of wireless APs, each wireless AP caches a media file in a Portal page, and the plurality of wireless APs are in communication connection with a Portal server. As can be seen from the figure, the acquiring method includes: s1, any wireless AP in the wireless local area network receives the internet access request sent by the terminal; s2, the wireless AP redirects the request to obtain a resource locator and sends the resource locator to the terminal; s3Portal server receives the page request sent by the terminal according to the resource locator and sends the Portal page to the terminal, wherein the domain name of the media file in the Portal page is a preset domain name, and the preset domain name of the media file is different from the domain name of the Portal page; s4 the wireless AP receives the media file request sent by the terminal according to the preset domain name, and sends the cached media file to the terminal, and completes the issue of the Portal page.
Specifically, in this embodiment, after a terminal associates an SSID (Service Set Identifier) of a certain wireless AP in a local area network, the wireless AP associated with the terminal immediately requests the terminal to perform Portal authentication, and hijacks a first HTTP (Hyper Text Transfer Protocol) internet access request (sent via an 80 port) sent by the terminal. And then, the wireless AP redirects to obtain the URL according to the HTTP internet request and feeds the URL back to the terminal.
And the terminal generates a page request according to the received URL and sends the page request to the Portal server. After receiving a page request sent by a terminal, a Portal server modifies the domain name of a media file in a Portal page into a preset domain name; and then, the Portal page, the domain name of the Portal page and the preset domain name of the media file are sent to the terminal together. Com, and the preset domain name is not registered formally.
The terminal displays a Portal page (the Portal page only has a page frame and does not display a media file therein), finds that the preset domain name of the media file is different from the domain name of the Portal page, and immediately sends a domain name resolution request to the wireless AP according to the received preset domain name of the media file; the wireless AP receives the domain name resolution request and returns the IP address of the wireless AP to the terminal; then, the terminal further sends a media file request to the wireless AP according to the received IP address; after receiving the media file request, the wireless AP sends the cached media file to the terminal; and finally, the terminal receives the media file and displays the media file in a Portal page to realize acquisition of the Portal page.
It is known that typically more than one media file is included in a Portal page, e.g., multiple picture files are included in a Portal page, or picture files, video files, etc. are included at the same time. Based on the above, in the Portal server, the domain name of each media file is uniformly modified into a preset domain name. Therefore, the terminal sends a domain name resolution request to the wireless AP according to the received preset domain name; the wireless AP receives the domain name resolution request and returns the IP address of the wireless AP to the terminal. Then, the terminal sends media file requests to the wireless AP in sequence according to the received IP address of the wireless AP; the wireless AP receives the media file request and sequentially sends the locally cached media files to the terminal; and finally, displaying in a Portal page in the terminal to realize the acquisition of the media files in the Portal page. It should be noted that, in this order, the terminal sends another media file request after receiving one media file sent by the wireless AP, so as to obtain another media file, and so on, until the wireless AP sends all the media files in the Portal page to the terminal.
In one example, the Portal page includes 2 media files, and the Portal server receives the page request to uniformly modify the domain name of each media file of 2 into ABCDE. Com sends domain name resolution request to wireless AP according to received ABCDE; the wireless AP receives the domain name resolution request and returns the IP address of the wireless AP to the terminal. Then, the terminal firstly sends a media file request of a first media file to the wireless AP based on the IP address, and the wireless AP sends the corresponding media file to the terminal; then, the terminal sends a media file request of the second media file to the wireless AP based on the IP address, and the wireless AP sends the corresponding media file to the terminal.
The present embodiment is obtained by modifying the above embodiment, and as shown in fig. 2, the acquisition method in the present embodiment includes: s01 Portal server sends the media files in Portal page to each wireless AP in LAN for buffer storage; s1, any wireless AP in the wireless local area network receives the internet access request sent by the terminal; s2, the wireless AP redirects the request to obtain a resource locator and sends the resource locator to the terminal; s3Portal server receives the page request sent by the terminal according to the resource locator and sends the Portal page to the terminal, wherein the domain name of the media file in the Portal page is a preset domain name, and the preset domain name of the media file is different from the domain name of the Portal page; s4 the wireless AP receives the media file request sent by the terminal according to the preset domain name, and sends the cached media file to the terminal, and completes the issue of the Portal page.
In another embodiment, if a plurality of wireless APs are respectively connected to the cloud controller in a communication manner, the acquiring method includes: s02, the cloud controller sends the media files in the Portal page to each wireless AP in the local area network for caching; s1, any wireless AP in the wireless local area network receives the internet access request sent by the terminal; s2, the wireless AP redirects the request to obtain a resource locator and sends the resource locator to the terminal; s3Portal server receives the page request sent by the terminal according to the resource locator and sends the Portal page to the terminal, wherein the domain name of the media file in the Portal page is a preset domain name, and the preset domain name of the media file is different from the domain name of the Portal page; s4 the wireless AP receives the media file request sent by the terminal according to the preset domain name, and sends the cached media file to the terminal, and completes the issue of the Portal page.
Specifically, in the above embodiment, after the wireless AP is powered on, the Portal server or the cloud controller stores media files, such as picture files and video files, in the Portal page, which occupy a large space. Before a Portal server or a cloud controller issues media files, whether the size of each media file in a Portal page exceeds a preset value or not is judged, if yes, the media files are issued to a wireless AP for caching, and if not, the media files are not issued. The size of the occupied space is determined by practical situations, for example, in an example, a media file with a space of more than 100M (megabyte) is sent to the wireless AP for buffering; for another example, in an example, the media file occupying a space larger than 300M is sent to the wireless AP for buffering, and in other examples, the value may be set to 500M, 800M, or more, which is not limited herein.
As shown in fig. 3, which is a schematic diagram of an embodiment of the wireless AP provided by the present invention, the wireless AP100 is communicatively connected to a Portal server, and as can be seen from the figure, the wireless AP100 includes: the system comprises a cache module 110, a first request receiving module 120, a redirecting module 130 and a first information sending module 140, wherein the redirecting module 130 is respectively connected with the first request receiving module 120 and the first information sending module 140, and the first information sending module 140 is respectively connected with the cache module 110, the first request receiving module 120 and the redirecting module 130. The caching module is used for caching media files in a Portal page sent by a Portal server; the first request receiving module is used for receiving an internet surfing request sent by the terminal and receiving a media file request sent by the terminal; the redirection module is used for obtaining a resource locator according to the redirection of the internet surfing request received by the first request receiving module; the first information sending module is used for sending the resource locator obtained by the redirection of the redirection module to the terminal, and is used for sending the media file cached in the caching module to the terminal according to the media file request received by the first request receiving module.
Furthermore, in the above embodiment, the Portal server 200 or the cloud controller can be used to store the media files, such as picture files, video files, etc., in the Portal pages, which occupy a large space. Before a Portal server or a cloud controller issues media files, whether the size of each media file in a Portal page exceeds a preset value or not is judged, if yes, the media files are issued to a wireless AP for caching, and if not, the media files are not issued. The size of the occupied space is determined by practical situations, for example, in an example, a media file with a space of more than 100M (megabyte) is sent to the wireless AP for buffering; for another example, in an example, the media file occupying a space larger than 300M is sent to the wireless AP for buffering, and in other examples, the value may be set to 500M, 800M, or more, which is not limited herein.
Specifically, in this embodiment, after the terminal associates with the SSID of a certain wireless AP in the local area network, the wireless AP100 associated with the terminal immediately requests the terminal to perform Portal authentication, and hijacks the first HTTP internet access request sent by the terminal through the first request receiving module 120. Then, the redirection module 130 redirects the HTTP internet request to obtain a URL, and feeds the URL back to the terminal through the first information sending module 140.
And the terminal generates a page request according to the received URL of the IP address and sends the page request to the Portal server. After receiving a page request sent by a terminal, a Portal server modifies the domain name of a media file in a Portal page into a preset domain name; and then, the Portal page, the domain name of the Portal page and the preset domain name of the media file are sent to the terminal together. Com, and the preset domain name is not registered formally.
The terminal displays a Portal page, finds that the preset domain name of the media file is different from the domain name of the Portal page, and immediately sends a domain name resolution request to the wireless AP according to the received preset domain name of the media file; the first request receiving module 120 in the wireless AP receives the domain name resolution request and returns its own IP address to the terminal through the first information sending module 140; then, the terminal further sends a media file request to the wireless AP according to the received IP address; after the first request receiving module 120 in the wireless AP receives the media file request, the first information sending module 140 sends the media file cached in the caching module 110 to the terminal; and finally, the terminal receives the media file and displays the media file in a Portal page to realize acquisition of the Portal page.
It is known that typically more than one media file is included in a Portal page, e.g., multiple picture files are included in a Portal page, or picture files, video files, etc. are included at the same time. Based on the above, in the Portal server, the domain name of each media file is uniformly modified into a preset domain name. Therefore, the terminal sends a domain name resolution request to the wireless AP according to the received preset domain name; the wireless AP receives the domain name resolution request and returns the IP address of the wireless AP to the terminal. Then, the terminal sends media file requests to the wireless AP in sequence according to the received IP address of the wireless AP; the wireless AP receives the media file request and sequentially sends the locally cached media files to the terminal; and finally, displaying in a Portal page in the terminal to realize the acquisition of the media files in the Portal page.
As shown in fig. 4, a schematic diagram of a Portal server 200 provided by the present invention, the Portal server 200 is connected to a wireless AP and a terminal, and as can be seen from the figure, the Portal server 200 includes: the second request receiving module 210, the domain name modifying module 220, and the second information sending module 230, wherein the domain name modifying module 220 is connected to the second request receiving module 210 and the second information sending module 230, respectively.
Specifically, in this embodiment, after the terminal associates with the SSID of a certain wireless AP in the local area network, the wireless AP associated with the terminal immediately requests the terminal to perform Portal authentication, and hijacks the first HTTP internet access request sent by the terminal. Then, the wireless AP redirects to obtain a URL according to the HTTP internet request, and inserts the IP address of the wireless AP into the URL; then, the URL into which the own IP address is inserted is fed back to the terminal.
And the terminal generates a page request according to the received URL and sends the page request to the Portal server. After a second request receiving module 210 in the Portal server receives a page request sent by a terminal, a domain name of a media file in a Portal page is modified into a preset domain name through a domain name modifying module 220; and then the Portal page, the domain name of the Portal page and the preset domain name of the media file are transmitted to the terminal through the second information transmitting module 230. Com, and the preset domain name is not registered formally.
The terminal displays a Portal page (the Portal page only has a page frame and does not display a media file therein), finds that the preset domain name of the media file is different from the domain name of the Portal page, and immediately sends a domain name resolution request to the wireless AP according to the received preset domain name of the media file; the wireless AP receives the domain name resolution request and returns the IP address of the wireless AP to the terminal; then, the terminal further sends a media file request to the wireless AP according to the received IP address; after receiving the media file request, the wireless AP sends the cached media file to the terminal; and finally, the terminal receives the media file and displays the media file in a Portal page to realize acquisition of the Portal page.
It should be noted that the above embodiments can be freely combined as necessary. The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.