disclosure of Invention
The invention provides a method and a system for accessing a network, which can solve the problem that a user needs to log in again to access the network due to data loss in caches such as Cookie and Session.
In order to achieve the purpose, the invention adopts the following technical scheme:
In a first aspect, the present invention provides a method for accessing a network, the method comprising:
A terminal site page program acquires original NAS information from a Network Access Server (NAS), wherein the original NAS information at least comprises terminal information and NAS equipment information;
the terminal site page program updates original NAS information according to a request source address to obtain updated NAS information, wherein the request source address is used for representing a page which a terminal requests to access, and the updated NAS information at least comprises terminal information, NAS equipment information and the request source address;
The terminal site page program sends the updated NAS information to a Portal server so that the terminal site page program can acquire user authentication information corresponding to the updated NAS information conveniently;
The site push server receives a site request message sent by the terminal site page program, wherein the site request message carries the user authentication information and the updated NAS information;
And the site pushing server pushes the site to the terminal according to the user authentication information and the updated NAS information.
In a second aspect, the present invention provides a method of accessing a network, the method comprising:
The Portal server receives updated NAS information sent by a terminal site page program, wherein the updated NAS information at least comprises terminal information, NAS equipment information and a request source address;
the Portal server determines user authentication information of the terminal according to the terminal information and the NAS device information;
and the Portal server sends a message of redirecting to a site push server to the terminal so that the terminal can request the site from the site push server, wherein the message of redirecting to the site push server carries the address of the site push server, the updated NAS information and the user authentication information.
In a third aspect, the present invention provides a system for accessing a network, where the system includes a terminal site page program, a network access server NAS, a terminal, a Portal server, and a site push server, where the terminal site page program is configured to obtain original NAS information from a NAS, where the original NAS information at least includes terminal information and NAS device information;
The terminal site page program is further configured to update original NAS information according to a request source address to obtain updated NAS information, where the request source address is used to indicate a page that the terminal requests to access, and the updated NAS information at least includes terminal information, NAS device information, and a request source address;
The terminal site page program is further configured to send the updated NAS information to a Portal server, so that the terminal site page program can obtain user authentication information corresponding to the updated NAS information;
The site push server is configured to receive a site request message sent by the terminal site page program, where the site request message carries the user authentication information and the updated NAS information;
And the site pushing server is further used for pushing the site to the terminal according to the user authentication information and the updated NAS information.
Compared with the prior art that network service is provided for users through the terminal information, NAS equipment information and user authentication information stored in caches of Cookie, Session and the like, the method and the system for accessing the network provided by the invention can obtain the terminal information and the NAS equipment information through the NAS and obtain the user authentication information through the Portal server, so that the network service can be still provided for the users after cache data of the Cookie, the Session and the like are lost. Meanwhile, the user does not need to perform login operation on the terminal in the process of acquiring the information, so that complicated input operation is avoided, and convenient, quick and non-sensory network pushing is realized. Therefore, the method and the device can solve the problem that the user needs to log in again to access the network due to the loss of data in the caches of Cookie, Session and the like.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
an embodiment of the present invention provides a method for accessing a network, and as shown in fig. 1, a flow of the method includes:
101. The terminal site page program obtains the original NAS information from the network access server NAS.
The NAS is a network access server such as an AC, an ISG, or the like, and is configured to manage basic information of the access terminal and the NAS device. The original NAS information is an original parameter pushed to a Portal server by the NAS, and at least comprises terminal information and NAS equipment information. The terminal information includes a Media Access Control (MAC) address and an Internet Protocol (IP) address of the terminal, and the NAS device information includes a device name of the NAS, a Service Set Identifier (SSID) accessed by the terminal, and an MAC address of the NAS.
In order to reduce data transmission, after the terminal passes authentication, the site push server stores user authentication information, terminal information and NAS device information corresponding to the terminal in a cache. When the terminal accesses the network again, the site push server detects whether the data in the cache is lost; if the data in the cache is not lost, the site push server pushes corresponding user customization information to the terminal according to the user authentication information; otherwise, the terminal site page program acquires the original NAS information from the network access server NAS.
the cache may be a Cookie or a Session, and the embodiment of the present invention takes a Cookie loss as an example for description, and is also applicable to a case where the site push server stores the above information in a Session. And when the cache is Cookie, the site push server detects whether the Cookie is lost, and when the cache is Session, the site push server detects whether the Session is lost.
cookies are small text files that are stored by a Web server on a user's browser (website page program) or client and may contain information about the user that the website can access whenever the user links to the server. In the embodiment of the invention, the Cookie is a small text file stored on a browser or a client of the terminal by the site push server, and stores data such as terminal information, NAS (network attached storage) equipment information, user authentication information and the like. Therefore, when the Cookie is lost, the site push server can continue to push the site to the terminal used by the user only when the site push server needs to acquire the terminal information, the NAS device information, and the user authentication information.
it should be noted that, the site push server obtains the original NAS information from the NAS, and specifically may be: and the site push server acquires the original NAS information from the NAS interface.
102. and the terminal site page program updates the original NAS information according to the request source address to obtain updated NAS information.
The updated NAS information at least comprises terminal information, NAS device information and a request source address, wherein the request source address is used for indicating a page which the terminal requests to access.
the site push server needs to acquire the terminal information, the NAS device information and the user authentication information to push the site to the terminal. In the prior art, the site push server obtains the information from the Cookie. After the Cookie is lost, the site push server can only push the site to the terminal after acquiring the information from other equipment.
in order to ensure that the user does not feel the cookie loss in the whole process of continuing the operation, after the site push server obtains the terminal information, the NAS device information and the user authentication information, the terminal needs to be redirected to the site push server. At this time, the station push server already acquires the required information and can push the station to the terminal. Because the site needs to request the source address when pushing the site to the terminal, in the embodiment of the invention, the site push server can store the request source address when the site request response fails, and use the request source address to replace the site push server address in the original NAS information, so that the Portal server can inform the terminal of the request source address when sending the redirection message to the terminal.
103. And the terminal site page program sends the updated NAS information to the Portal server.
104. and the terminal site page program acquires the user authentication information corresponding to the updated NAS information.
The user authentication information is used for representing an advertisement push strategy appointed according to the internet access behavior, account information and the like of the user.
105. And the site push server receives a site request message sent by a terminal site page program.
The site request message carries user authentication information and updated NAS information.
106. And the site pushing server pushes the site to the terminal according to the user authentication information and the updated NAS information.
Compared with the prior art that network service is provided for users through terminal information, NAS equipment information and user authentication information stored in caches of Cookie, Session and the like, the method for accessing the network provided by the embodiment of the invention can obtain the terminal information and the NAS equipment information through the NAS and obtain the user authentication information through the Portal server, so that the network service can be still provided for the users after cache data of the Cookie, the Session and the like are lost. Meanwhile, the user does not need to perform login operation on the terminal in the process of acquiring the information, so that complicated input operation is avoided, and convenient, quick and non-sensory network pushing is realized. Therefore, the method and the device can solve the problem that the user needs to log in again to access the network due to the loss of data in the caches of Cookie, Session and the like.
an embodiment of the present invention provides a method for accessing a network, and as shown in fig. 2, the method is applied to a site push system, where the site push system includes a terminal, a Portal server, and a site push server, and the method specifically includes:
201. And after the terminal passes the authentication, the site push server stores user authentication information, terminal information and NAS (network attached storage) equipment information corresponding to the terminal in the Cookie.
in the embodiment of the present invention, a cache is taken as a Cookie for explanation. In order to facilitate the terminal to access the network and reduce the signaling interaction between the network devices, in the embodiment of the present invention, after the terminal passes the authentication, the station-specific push server needs to store the user authentication information, the terminal information, and the access network device information corresponding to the terminal in the Cookie. Meanwhile, after the Cookie is lost and the website push server acquires the information again, the website push server stores the newly acquired information in the Cookie.
202. And when detecting that the Cookie corresponding to the terminal is lost, the terminal site page program acquires the original NAS information from the NAS.
The original NAS information at least comprises terminal information and NAS equipment information.
203. and the terminal site page program updates the original NAS information according to the request source address to obtain updated NAS information.
the updated NAS information at least comprises terminal information, NAS equipment information and a request source address.
204. and the terminal site page program sends the updated NAS information to the Portal server.
205. And after receiving the updated NAS information sent by the terminal site page program, the Portal server determines the user authentication information of the terminal according to the terminal information and the NAS device information.
After receiving the updated NAS information, the Portal server sends a request source address to the terminal, so that the terminal can request access to sites which fail to be accessed before again; the user authentication information can be searched through the terminal information and the NAS device information.
206. and the Portal server sends a message redirected to the site push server to the terminal.
The message redirected to the site push server carries the address of the site push server, the updated NAS information and the user authentication information.
The sending, by the Portal server, the message redirected to the site push server to the terminal may specifically be: and the Portal server sends the URL redirected to the site push server to the terminal.
207. The terminal is redirected to the site push server.
208. And the site push server pushes a terminal site page program corresponding to the request source address to the terminal.
209. And requesting the terminal site page program corresponding to the source address to request corresponding user customization information from the site push server.
210. And the site push server pushes the user customization information to the terminal according to the user authentication information.
Compared with the prior art that network service is provided for users through terminal information, NAS equipment information and user authentication information stored in caches of Cookie, Session and the like, the method for accessing the network provided by the embodiment of the invention can obtain the terminal information and the NAS equipment information through the NAS and obtain the user authentication information through the Portal server, so that the network service can be still provided for the users after cache data of the Cookie, the Session and the like are lost. Meanwhile, the user does not need to perform login operation on the terminal in the process of acquiring the information, so that complicated input operation is avoided, and convenient, quick and non-sensory network pushing is realized. Therefore, the method and the device can solve the problem that the user needs to log in again to access the network due to the loss of data in the caches of Cookie, Session and the like.
An embodiment of the present invention provides a method for accessing a network, and as shown in fig. 3, the method is applied to a site push system, where the site push system includes a terminal, a NAS, a Portal server, a Remote user dialing authentication (Radius) server, and a site push server, and the method specifically includes:
301. And intercepting the site request message sent by the terminal by the NAS.
302. And when the NAS device detects that the terminal is not authenticated, sending a message redirected to a Portal server to the terminal.
The message redirected to the Portal server carries terminal information, NAS equipment information, a request source address and a Portal server address.
303. The terminal is redirected to a Portal server.
304. and the Portal server sends a message redirected to the site push server to the terminal.
The message redirected to the site push server carries terminal information, NAS equipment information and user authentication information;
305. The terminal is redirected to the site push server.
306. And when the site push server detects that the terminal is not authenticated, pushing a login authentication page to the terminal.
307. And the terminal sends an authentication request to the site push server.
308. and the site push server sends an authentication request to the Portal server.
309. portal server, Radius server and NAS authenticate.
The Radius server is a server used for authentication, authorization and accounting between a NAS that needs to authenticate its forgiveness and a shared authentication server. The Portal server requests the NAS for authorization after receiving the authentication request sent by the site push server, the NAS requests the Radius server for authentication, authorization and accounting services, and the Portal server is informed after the NAS authentication is passed.
310. And the Portal server sends an authentication request response to the site push server.
311. And the site push server sends an authentication request response to the terminal and pushes the site out.
312. And the site push server stores the user authentication information, the terminal information and the NAS equipment information corresponding to the terminal in the Cookie.
313. And when detecting that the Cookie corresponding to the terminal is lost, the terminal site page program acquires the original NAS information from the NAS.
The original NAS information at least comprises terminal information and NAS equipment information.
314. And the terminal site page program updates the original NAS information according to the request source address to obtain updated NAS information.
the updated NAS information at least comprises terminal information, NAS equipment information and a request source address.
315. And the terminal site page program sends the updated NAS information to the Portal server.
316. And the Portal server determines the user authentication information of the terminal according to the terminal information and the NAS device information.
317. And the Portal server sends a message redirected to the site push server to the terminal.
the message redirected to the site push server carries the address of the site push server, the updated NAS information and the user authentication information.
318. The terminal is redirected to the site push server.
319. and the site push server pushes a terminal site page program corresponding to the request source address to the terminal.
320. And requesting the terminal site page program corresponding to the source address to request corresponding user customization information from the site push server.
321. and the site push server pushes the user customization information to the terminal according to the user authentication information.
Compared with the prior art that network service is provided for users through terminal information, NAS equipment information and user authentication information stored in caches of Cookie, Session and the like, the method for accessing the network provided by the embodiment of the invention can obtain the terminal information and the NAS equipment information through the NAS and obtain the user authentication information through the Portal server, so that the network service can be still provided for the users after cache data of the Cookie, the Session and the like are lost. Meanwhile, the user does not need to perform login operation on the terminal in the process of acquiring the information, so that complicated input operation is avoided, and convenient, quick and non-sensory network pushing is realized. Therefore, the method and the device can solve the problem that the user needs to log in again to access the network due to the loss of data in the caches of Cookie, Session and the like.
An embodiment of the present invention further provides a system 40 for accessing a network, as shown in fig. 4, where the system 40 includes a terminal site page program 41, a NAS42, a terminal 43, a Portal server 44, and a site push server 45, where the terminal site page program 41 is configured to obtain original NAS information from a NAS42, where the original NAS information at least includes terminal information and NAS device information.
The terminal site page program 41 is further configured to update the original NAS information according to the request source address to obtain updated NAS information, where the request source address is used to indicate a page that the terminal requests to access, and the updated NAS information at least includes the terminal information, NAS device information, and the request source address.
The terminal site page program 41 is further configured to send the updated NAS information to the Portal server 44, so that the terminal site page program can obtain the user authentication information corresponding to the updated NAS information.
And the site push server 45 is configured to receive a site request message sent by the terminal site page program 41, where the site request message carries the user authentication information and the updated NAS information.
the site push server 45 is further configured to push the site to the terminal 43 according to the user authentication information and the updated NAS information.
In an implementation manner of the embodiment of the present invention, the site push server 45 is specifically configured to push the terminal site page program 41 corresponding to the request source address to the terminal 43.
The terminal site page program 41 is specifically configured to request the site push server 45 for the corresponding user customization information.
The site push server 45 is specifically configured to push the user customization information to the terminal 43 according to the user authentication information.
In an implementation manner of the embodiment of the present invention, the site push server 45 is further configured to store, in the cache, the user authentication information, the terminal information, and the NAS device information corresponding to the terminal after the terminal passes the authentication.
In one implementation manner of the embodiment of the present invention, the site push server 45 is further configured to push the terminal site page program 41 to the terminal 43.
the terminal site page program 41 is further configured to request the corresponding user customization information from the site push server.
The site push server 45 is further configured to detect whether the data in the cache is lost, and when the site push server 45 detects that the data in the cache is not lost, push corresponding user customization information to the terminal 43 according to the user authentication information.
the terminal site page program 41 is further configured to obtain the original NAS information from the NAS42 when the site push server 45 detects that the data in the cache is lost.
in one implementation of the embodiment of the present invention, the Portal server 44 is configured to: receiving updated NAS information sent by the terminal site page program 41, where the updated NAS information at least includes terminal information, NAS device information, and a request source address;
determining user authentication information of the terminal according to the terminal information and the NAS device information;
And sending a message redirected to the site push server to the terminal 43, so that the terminal requests the site page program from the site push server, where the message redirected to the site push server carries the address of the site push server, the updated NAS information, and the user authentication information.
Compared with the prior art that network service is provided for users through the terminal information, NAS equipment information and user authentication information stored in caches of Cookie, Session and the like, the network access system provided by the invention can obtain the terminal information and the NAS equipment information through the NAS and obtain the user authentication information through the Portal server, so that the network service can be still provided for the users after cache data of the Cookie, the Session and the like are lost. Meanwhile, the user does not need to perform login operation on the terminal in the process of acquiring the information, so that complicated input operation is avoided, and convenient, quick and non-sensory network pushing is realized. Therefore, the method and the device can solve the problem that the user needs to log in again to access the network due to the loss of data in the caches of Cookie, Session and the like.
the embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus embodiment, since it is substantially similar to the method embodiment, it is relatively simple to describe, and reference may be made to some descriptions of the method embodiment for relevant points.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware that is related to instructions of a computer program, and the program can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
the above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.