Disclosure of Invention
In view of this, the present invention provides a method for embedding a web page into an access authentication page, where the method includes:
the wireless access point records the network address of an access authentication page of the user terminal which is successfully accessed and authenticated;
embedding the network address of the access authentication page into a response message of the internet access request of the user terminal;
and sending a response message of the internet access request embedded with the access authentication page to the user terminal, so that the user terminal opens a corresponding request webpage according to the response message of the internet access request and displays the access authentication page in the request webpage.
Further, before the wireless access point records the network address of the access authentication page where the user terminal successfully authenticates, the method further includes:
the wireless access point hijacks an access authentication request of a user terminal;
redirecting the response message of the access authentication request to the network address of the access authentication page;
sending the network address of the access authentication page to the user terminal so that the user terminal can open the access authentication page according to the network address of the access authentication page;
the access authentication request refers to a request for confirming whether the access authentication is successful or not, which is sent to the access server by the user terminal on the access authentication page.
Further, after sending the network address of the access authentication page to the user terminal, the method further includes:
and the wireless access point receives an access authentication success message sent by the access server and authorizes the internet access authority of the user terminal.
Further, before embedding the network address of the access authentication page into a response message of the internet access request of the user terminal, the method further includes:
the wireless access point establishes a bidirectional communication link between the user terminal and a network server;
the bidirectional communication link is used for information interaction between the user terminal and the network server by the wireless access point.
Further, the establishing, by the wireless access point, a bidirectional communication link between the user terminal and the network server specifically includes:
the wireless access point hijacks the internet access request of the user terminal and establishes bidirectional communication first end connection with the user terminal;
and sending the internet surfing request to the network server, and establishing a bidirectional communication second end connection with the network server.
Further, after sending the internet surfing request to the network server and establishing a bidirectional communication second end connection with the network server, the method further includes:
the wireless access point receives a response message of the internet surfing request fed back by the network server through the bidirectional communication second end;
and sending a response message of the internet access request embedded with the network address of the access authentication page to the user terminal through the first end of the bidirectional communication connection.
The present invention also provides a wireless access point, including:
the recording module is used for recording the network address of the access authentication page of the user terminal which is successfully accessed and authenticated;
the embedding module is used for embedding the network address of the access authentication page into a response message of the internet surfing request of the user terminal;
the first sending module is used for sending a response message of the internet access request embedded with the access authentication page to the user terminal, so that the user terminal opens a corresponding request webpage according to the response message of the internet access request and displays the access authentication page in the request webpage.
Further, the wireless access point further comprises:
the hijack module is used for hijack the access authentication request of the user terminal before the recording module records the network address of the access authentication page successfully authenticated by the user terminal;
a redirection module, configured to redirect a response packet of the access authentication request to a network address of the access authentication page;
a second sending module, configured to send the network address of the access authentication page to the user terminal, so that the user terminal opens the access authentication page according to the network address of the access authentication page;
the access authentication request refers to a request for confirming whether the access authentication is successful or not, which is sent to the access server by the user terminal on the access authentication page.
Further, the wireless access point further comprises:
a first receiving module, configured to receive an access authentication success message sent by the access server after the second sending module sends the network address of the access authentication page to the user terminal;
and the authorization module is used for authorizing the internet access authority of the user terminal.
Further, the wireless access point further comprises:
the link establishing module is used for establishing a bidirectional communication link between the user terminal and a network server before the embedding module embeds the network address of the access authentication page into a response message of the internet surfing request of the user terminal;
the bidirectional communication link is used for information interaction between the user terminal and the network server by the wireless access point.
Further, the link establishment module includes:
the first hijack establishing submodule is used for hijack the internet access request of the user terminal and establishing bidirectional communication first end connection with the user terminal;
and the first sending and establishing submodule is used for sending the internet surfing request to the network server and establishing bidirectional communication second end connection with the network server.
Further, the wireless access point further comprises:
the second receiving module is used for receiving a response message of the internet surfing request fed back by the network server through the bidirectional communication second end after the second sending and establishing sub-module sends the internet surfing request to the network server and establishes bidirectional communication second end connection with the network server;
and the third sending module is used for sending a response message of the internet access request embedded with the network address of the access authentication page to the user terminal through the first end of the bidirectional communication connection.
Further, the present invention also provides a system for embedding a web page into an access authentication page, wherein the system comprises:
the wireless access point is used for recording the network address of the access authentication page of the user terminal which is successfully accessed and authenticated and hijacking the internet access request sent to the network server by the user terminal; the network address of the access authentication page is embedded into a response message of the internet request of the user terminal, and the response message of the internet request is sent to the user terminal;
the user terminal is used for sending an internet request to a network server and receiving a response message of the internet request sent by the wireless access point so as to open a corresponding request webpage according to the response message of the internet request and display the access authentication page in the request webpage;
and the network server is used for receiving the internet surfing request sent by the user terminal.
Further, the system also comprises an access server,
the wireless access point is used for hijacking an access authentication request of the user terminal before recording the network address of an access authentication page of which the user terminal is successfully authenticated, redirecting a response message of the access authentication request to the network address of the access authentication page and sending the network address of the access authentication page to the user terminal; and the access server is further configured to determine that the network address of the access authentication page is the network address of the access authentication page with successful access authentication after receiving the access authentication success message sent by the access server.
The user terminal is further configured to receive the network address of the access authentication page sent by the wireless access point, and open the access authentication page according to the network address of the access authentication page;
the access server is used for receiving the access authentication request of the user terminal, confirming whether the access authentication is successful according to the access authentication request, and sending an access authentication success message to the wireless access point when confirming that the access authentication is successful.
Further, the wireless access point authorizes the internet access authority of the user terminal after receiving the access authentication success message sent by the access server.
Further, before embedding the network address of the access authentication page into the response message of the internet access request of the user terminal, the wireless access point is further configured to establish a bidirectional communication link between the user terminal and the network server, specifically including: the wireless access point hijacks the internet access request of the user terminal and establishes bidirectional communication first end connection with the user terminal; and sending the internet surfing request to the network server, and establishing bidirectional communication second end connection with the network server.
Further, after sending the internet access request to the network server and establishing a bidirectional communication second end connection with the network server, the wireless access point is further configured to receive a response message of the internet access request fed back by the network server through the bidirectional communication second end; and the response message of the internet access request embedded with the network address of the access authentication page is sent to the user terminal through the first end of the bidirectional communication connection.
The invention records the network address of the access authentication page of the successful access authentication of the user terminal through the wireless access point; embedding the network address of the access authentication page into a response message of the internet access request of the user terminal; and sending a response message of the internet access request embedded with the access authentication page to the user terminal, so that the user terminal opens a corresponding request webpage according to the response message of the internet access request and displays the access authentication page in the request webpage.
Therefore, the access authentication page is embedded into any webpage accessed by the user, and the tedious operation of searching the access authentication page is overcome; the possibility of closing the access authentication success page due to user misoperation is avoided; meanwhile, the behavior of setting a terminal browser by a user is avoided. As long as the user opens and browses any webpage by using the browser, the user can know the own internet surfing condition anytime and anywhere, the user can conveniently click to log out and log in, and the user can surf the internet more conveniently and quickly.
Detailed Description
The technical scheme of the invention records the network address of the access authentication page of the user terminal which is successfully accessed and authenticated through the wireless access point; embedding the network address of the access authentication page into a response message of the internet access request of the user terminal; and sending a response message of the internet access request embedded with the access authentication page to the user terminal, so that the user terminal opens a corresponding request webpage according to the response message of the internet access request and displays the access authentication page in the request webpage.
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to the accompanying drawings by way of examples.
Fig. 1 is a flowchart of an embodiment of a method for embedding a web page into an access authentication page according to the present invention, and the specific flow is as follows:
step S101, a wireless access point records a network address of an access authentication page of a user terminal which is successfully accessed and authenticated;
specifically, only when the access authentication is successful, the wireless access point records the network address of the access authentication page.
Step S102, the network address of the access authentication page is embedded into a response message of the internet access request of the user terminal;
specifically, after receiving an internet access request of a user terminal, a wireless access point inevitably feeds back a response message of the internet access request to the user terminal, and before the feedback, embeds a network address of an access authentication page in the response message of the internet access request; meanwhile, the access authentication page may be placed at a predetermined position of the web page.
And step S103, sending a response message of the internet access request embedded with the access authentication page to the user terminal.
Specifically, the wireless access point sends a response message of the internet access request to the user terminal through a first end (HTTP SocketA) of bidirectional communication;
after receiving a response message of an internet access request embedded with an access authentication page, a user terminal opens a corresponding request webpage according to the response message of the internet access request and displays the access authentication page at a preset position in the request webpage, wherein the access authentication page comprises internet access remaining duration and a log-out login button; in addition, the rest of the web pages display the normally accessed web pages;
therefore, when the user visits any website or browses the webpage, the page information of successful access authentication is displayed at the preset position of the webpage. To minimize line-of-sight interference with the user's network, the Portal success page is placed in a non-conspicuous location, such as the upper right corner.
Before step S101, the method for embedding the access authentication page in the web page according to the present invention is further illustrated in fig. 2, and the specific steps are as follows:
step S201, the wireless access point hijacks an access authentication request of a user terminal;
specifically, the access authentication request refers to a request for confirming whether access authentication is successful or not, which is sent to an access server by the user terminal on the access authentication page;
the wireless access point monitors a local 80 port (an open port) and hijacks an access authentication Request (a first HTTP Request internet access Request) of the user terminal;
before the access authentication request of the user terminal is hijacked, the user terminal associates a certain SSID (service set identifier) of the wireless access point, a wireless local area network is divided into a plurality of sub-networks (each sub-network has one SSID) which need different identity verifications, each sub-network needs independent identity verification, only the user who passes the identity verification can enter the corresponding sub-network, and the unauthorized user is prevented from entering the network.
Step S202, redirecting the response message of the access authentication request to the network address of the access authentication page;
specifically, redirection (Redirect) is to Redirect various network requests to other locations by various methods (e.g., redirection of web page, redirection of domain name, change of routing is also a kind of redirection of data message via path);
the access authentication page is a page designated by the access server, and the network address is a URL (universal resource locator) (WWW) address.
Step S203, the network address of the access authentication page is sent to the user terminal;
specifically, after the user terminal receives the website of the access authentication page, the access authentication page is opened according to the network address of the access authentication page;
after an access authentication page is opened, a user terminal inputs a user name and a password in the access authentication page, an access authentication request is sent to an access server, the access server verifies the user name and the password, and when the verification is passed, the access authentication is indicated to be successful; otherwise, the access authentication is failed;
after the audit, the access server sends the audit result and the internet access duration of the user terminal to the user terminal; when the access result is that the verification is passed, displaying a prompt through the user terminal to allow the user to log in the network server; and when the access result is not approved, prompting the user to re-input the user name and/or the password through the user terminal.
When the verification is passed, the information of successful access authentication is sent to the wireless access point;
the access authentication request refers to a request for confirming whether the access authentication is successful or not, which is sent to the access server by the user terminal on the access authentication page.
Before step S103, the method for embedding the access authentication page in the web page of the present invention is further shown in fig. 2, and the specific steps are as follows:
step S301, the wireless access point receives an access authentication success message sent by the access server;
specifically, only after the access server passes the audit, the access server sends an access authentication success message to the wireless access point; otherwise, the access server does not send the access authentication failure message to the wireless access point.
And step S302, authorizing the internet access authority of the user terminal.
Specifically, the access right refers to a certain subnet SSID (service set identifier) that the user terminal can access the wireless access point, the access duration of the user terminal, and the like.
Before step S102 and after step S101, the method for embedding the access authentication page into the web page of the present invention further includes: the wireless access point establishes a bidirectional communication link between the user terminal and a network server;
wherein the bidirectional communication link is used for information interaction between the user terminal and the network server by the wireless access point.
The method for establishing the bidirectional link is shown in fig. 4, and specifically includes:
step S401, the wireless access point acquires the internet access request of the user terminal and establishes a bidirectional communication first end connection with the user terminal;
specifically, the wireless access point monitors a local 80 port (open port) to hijack the internet access request of the user terminal; and establishing the bidirectional communication first end connection to establish HTTP Socket A connection.
Step S402, the Internet surfing request is sent to the network server, and a bidirectional communication second end connection is established with the network server.
Specifically, the information is forwarded to a network server, such as a Web server, through a WAN port (wide area network interface) of the user terminal; and establishing the bidirectional communication second end connection to establish HTTP Socket B connection.
After step S402, the method for embedding the access authentication page into the web page of the present invention is further shown in fig. 5, and the specific steps are as follows:
step S501, the wireless access point receives a response message of the internet access request fed back by the network server through the bidirectional communication second end;
specifically, a bidirectional communication second end connection is established between the wireless access point and the network server, so that the wireless access point and the network server interact through the bidirectional communication second end.
Step S502, sending the response message of the network access request embedded with the network address of the access authentication page to the user terminal through the first end of the bidirectional communication connection.
Specifically, a bidirectional communication first end connection is established between the wireless access point and the user terminal, so that the wireless access point and the user terminal interact through the bidirectional communication first end.
Fig. 6 is a block diagram of an embodiment of the wireless access point of the present invention, the wireless access point 600 includes a recording module 601, an embedding module 602 and a first transmitting module 603,
a recording module 601, configured to record a network address of an access authentication page where the user terminal successfully accesses the authentication;
specifically, only when the access authentication is successful, the wireless access point records the network address of the access authentication page.
An embedding module 602, configured to embed the network address of the access authentication page in a response message of the internet access request of the user terminal;
specifically, after receiving an internet access request of a user terminal, a wireless access point inevitably feeds back a response message of the internet access request to the user terminal, and before the feedback, embeds a network address of an access authentication page in the response message of the internet access request; meanwhile, the access authentication page may be placed at a predetermined position of the web page.
The first sending module 603 is configured to send a response message of the internet access request embedded with the access authentication page to the user terminal.
Specifically, the wireless access point 600 sends a response message of the internet access request to the user terminal through a first end of bidirectional communication (http socket a);
after receiving a response message of an internet access request embedded with an access authentication page, a user terminal opens a corresponding request webpage according to the response message of the internet access request and displays the access authentication page at a preset position in the request webpage, wherein the access authentication page comprises internet access remaining duration and a log-out login button; in addition, the rest of the web pages display web pages that are normally accessed.
Fig. 7 is a structural diagram of another embodiment of the wireless access point of the present invention, where the wireless access point 600 includes a recording module 601, an embedding module 602, a first sending module 603, a hijacking module 604, a redirection module 605, and a second sending module 606, where the recording module 601, the embedding module 602, and the first sending module 603 are specifically shown in fig. 6;
a hijack module 604, configured to hijack the access authentication request of the user terminal before the recording module 601 records the network address of the access authentication page where the user terminal is successfully authenticated;
specifically, the wireless access point monitors a local 80 port (open port), and hijacks an access authentication Request (first HTTP Request access Request) of the user terminal.
A redirection module 605, configured to redirect the response packet of the access authentication request to the network address of the access authentication page;
specifically, the access authentication page is a page specified by the access server, and the network address is a URL (WWW uniform resource locator) address.
A second sending module 606, configured to send the network address of the access authentication page to the user terminal.
Specifically, after the user terminal receives the website of the access authentication page, the access authentication page is opened according to the network address of the access authentication page;
after an access authentication page is opened, a user terminal inputs a user name and a password in the access authentication page, an access authentication request is sent to an access server, the access server verifies the user name and the password, and when the verification is passed, the access authentication is indicated to be successful; otherwise, the access authentication is failed;
after the audit, the access server sends the audit result and the internet access duration of the user terminal to the user terminal; when the access result is that the verification is passed, displaying a prompt through the user terminal to allow the user to log in the network server; and if the access result is not approved, prompting that the user name and/or password input is wrong through the user terminal, and requesting to input again.
And when the verification is passed, the information of successful access authentication is sent to the wireless access point.
Fig. 8 is a structural diagram of another embodiment of the wireless access point of the present invention, where the wireless access point 600 includes a recording module 601, an embedding module 602, a first sending module 603, a hijacking module 604, a redirection module 605, a second sending module 606, a first receiving module 607, and an authorization module 608, where the recording module 601, the embedding module 602, the first sending module 603, the hijacking module 604, the redirection module 605, and the second sending module 606 are specifically shown in fig. 7;
a first receiving module 607, configured to receive an access authentication success message sent by an access server after the second sending module 606 sends the network address of the access authentication page to the user terminal;
specifically, only after the access server passes the audit, the access server sends an access authentication success message to the wireless access point 600; otherwise, the access server does not send an access authentication failure message to the wireless access point 600.
The authorization module 608 is configured to authorize an internet access right of the user terminal.
Specifically, the access right refers to a certain subnet SSID (service set identifier) that the user terminal can access the wireless access point 600, the access duration of the user terminal, and the like.
Fig. 9 is a structural diagram of another embodiment of a wireless access point of the present invention, where the wireless access point 600 includes a recording module 601, an embedding module 602, a first sending module 603, and a link establishing module 609, where the recording module 601, the embedding module 602, and the first sending module 603 are shown in fig. 6;
a link establishing module 609, configured to establish a bidirectional communication link between the user terminal and a network server before the embedding module 602 embeds the network address of the access authentication page into a response message of the internet access request of the user terminal;
in particular, the bidirectional communication link is used for the wireless access point 600 to perform information interaction between the user terminal and the network server.
Wherein, the specific structure of the link establishing module 609 is as shown in fig. 10, the link establishing module 609 includes a first hijack establishing sub-module 6091 and a first sending establishing sub-module 6092,
a first hijack establishing sub-module 6091 configured to hijack the internet access request of the user terminal and establish a first end connection of bidirectional communication with the user terminal;
specifically, the wireless access point monitors a local 80 port (open port) to hijack the internet access request of the user terminal; and establishing the bidirectional communication first end connection to establish HTTP Socket A connection.
And a first sending and establishing submodule 6092 configured to send the internet access request to the network server, and establish a second end connection of bidirectional communication with the network server.
Specifically, the information is forwarded to a network server, such as a Web server, through a WAN port (wide area network interface) of the user terminal; and establishing the bidirectional communication second end connection to establish HTTP Socket B connection.
Fig. 11 is a block diagram of another embodiment of a wireless access point of the present invention, where the wireless access point 600 includes a recording module 601, an embedding module 602, a first sending module 603, a link establishing module 609, a second receiving module 610, and a third sending module 611, where the recording module 601, the embedding module 602, the first sending module 603, and the link establishing module 609 are shown in fig. 9,
a second receiving module 610, configured to receive, by the second bidirectional communication end, a response packet of the internet access request fed back by the network server after the first sending and establishing sub-module 6092 sends the internet access request to the network server and establishes a second bidirectional communication end connection with the network server;
specifically, the wireless access point 600 establishes a bidirectional communication second end connection with the network server, so the wireless access point and the network server interact through the bidirectional communication second end.
A third sending module 611, configured to send a response packet of the internet access request embedded with the network address of the access authentication page to the user terminal through the bidirectional communication connection first end.
Specifically, a bidirectional communication first-end connection is established between the wireless access point 600 and the user terminal, so the wireless access point 600 and the user terminal interact through the bidirectional communication first-end.
Fig. 12 is a block diagram of an embodiment of a system for embedding a wireless access authentication page into a web page according to the present invention, the system 1200 for embedding a wireless access authentication page into a web page includes a user terminal 1201, a wireless access point 600, an access server 1203 and a web server 1204,
the wireless access point 600 is configured to record a network address of an access authentication page where the access authentication of the user terminal 1201 is successful, and hijack an internet access request sent by the user terminal 1201 to the network server 1204; the network address of the access authentication page is further configured to be embedded into a response message of an internet access request of the user terminal 1201, and the response message of the internet access request is sent to the user terminal 1201;
the user terminal 1201 is configured to send an internet access request to the network server 1204, and receive a response message of the internet access request sent by the wireless access point 600, so as to open a corresponding request webpage according to the response message of the internet access request, and display the access authentication page in the request webpage;
the network server 1204 is configured to receive an internet access request sent by the user terminal 1201.
The access server 1203 is configured to receive an access authentication request of the user terminal 1201, determine whether access authentication is successful according to the access authentication request, and send an access authentication success message to the wireless access point 600 when it is determined that access authentication is successful.
In addition, the wireless access point 600 is further configured to hijack the access authentication request of the user terminal 1201 before recording the network address of the access authentication page where the authentication of the user terminal 1201 is successful, redirect a response message of the access authentication request to the network address of the access authentication page, and send the network address of the access authentication page to the user terminal 1201; and is further configured to determine that the network address of the access authentication page is the network address of the access authentication page with successful access authentication after receiving the access authentication success message sent by the access server 1203.
In addition, the user terminal 1201 is further configured to receive the network address of the access authentication page sent by the wireless access point 600, and open the access authentication page according to the network address of the access authentication page;
in addition, the wireless access point 600 is further configured to authorize the internet access right of the user terminal 1201 after receiving the access authentication success message sent by the access server 1203.
In addition, before embedding the network address of the access authentication page into the response message of the internet access request of the user terminal 1201, the wireless access point 600 is further configured to establish a bidirectional communication link between the user terminal 1201 and the network server 1204, which specifically includes: the wireless access point 600 hijacks the internet access request of the user terminal 1201 and establishes a bidirectional communication first end connection with the user terminal 1201; and sends the internet surfing request to the network server 1204, and establishes a two-way communication second end connection with the network server 1204.
In addition, in the wireless access point 600, the user terminal 1201 sends the internet access request to the network server 1204, and after establishing a bidirectional communication second end connection with the network server 1204, is further configured to receive, through the bidirectional communication second end, a response message of the internet access request fed back by the network server 1204; and is configured to send a response packet of the internet access request embedded with the network address of the access authentication page to the user terminal 1201 through the first end of the bidirectional communication connection.
It should be understood that the functional modules of the wireless access point 600 provided in the present embodiment may be software modules or a combination of software and hardware modules, which can be executed by a processor to implement the functions described above. In addition, the wireless access point 600 may further have other functional modules to implement various specific steps of tedious operations of searching for an access authentication page when a user browses a web page, and reference may be specifically made to the corresponding description of the above method embodiment.
In addition, those skilled in the art will understand that: all or part of the steps of implementing the above method embodiments may be implemented by hardware related to program instructions, the program may be stored in a computer readable storage medium and executed by a processor in the computer readable storage medium, and the processor may execute all or part of the steps including the above method embodiments when the program is executed. Wherein the processor may be implemented as one or more processor chips or may be part of one or more Application Specific Integrated Circuits (ASICs); and the aforementioned storage media may include, but are not limited to, the following types of storage media: flash Memory (Flash Memory), Memory (ROM), Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.