The content of the invention
The present invention solves the technical problem of provide a kind of method for accessing network and network access equipment, management clothes
Business device, the data message that can be interacted between management terminal device and network.
In order to solve the above technical problems, one aspect of the present invention is:A kind of method for accessing network is provided,
The inquiry of the domain name request message sent including receiving terminal apparatus, wherein, domain name inquiry request message carries the terminal
The domain name for the targeted website that equipment is accessed;Domain name inquiry request message is forwarded to domain name system DNS server;Receive institute
Dns server is stated according to domain name inquiry request message, the inquiry of the domain name successful respond message of return, wherein, domain name
Successful inquiring response message carries IP address corresponding to the domain name of the targeted website;By domain name successful inquiring response message
IP address corresponding to the domain name of the targeted website of middle carrying is revised as the IP address of management server;Will be described amended
Inquiry of the domain name successful respond message returns to the terminal device, so that the terminal device sends webpage to the targeted website
During request message, entrained purpose IP addresses are the IP address of management server in the web-page requests message.
Wherein, the web-page requests include HTTP request message, Hyper text transfer security protocol
HTTPS request message or based on transmission control protocol application layer protocol SPDY request messages.
In order to solve the above technical problems, another technical solution used in the present invention is:A kind of side for accessing network is provided
Method, including:Data message transmitted by receiving terminal apparatus;Judge whether the data message is the terminal device to target
What website was sent, the web-page requests message for requested webpage content;If the data message is web-page requests message, by institute
State the IP address that purpose IP address in data message is revised as management server;Amended number is forwarded to the management server
According to message, so that URL address of the management server in the amended data message, is asked to the targeted website
Web page contents are sought, and the web page contents for asking to obtain are returned to the terminal device.
In order to solve the above technical problems, another technical scheme that the present invention uses is:A kind of side for accessing network is provided
Method, including web-page requests message is received, wherein, web-page requests message is set comprising purpose IP address, source IP address and the terminal
The URL addresses of the standby targeted website accessed, the purpose IP address are the IP address of management server, and the source IP address is
The IP address of terminal device;Parse the web-page requests message, according to the URL addresses carried in the web-page requests message to
Dns server sends domain name inquiry request message, to ask the IP address of the targeted website;The dns server is received to return
The inquiry of the domain name successful respond message returned, wherein, domain name successful inquiring response message carries the domain name of the targeted website
Corresponding IP address;Purpose IP address in the web-page requests message is revised as to the IP address of the targeted website, with institute
State the IP address that the source IP address in web-page requests message is revised as management server, and to after the forwarding modification of the targeted website
Web-page requests message;Receive the web-page requests response that the targeted website returns according to the amended web-page requests message
Message;Purpose IP address in the web-page requests response message is revised as to the IP address of the terminal device, and to the end
End equipment forwards the web-page requests response message.
Wherein, methods described also includes:According to the web-page requests message or/and web-page requests response message, institute is obtained
State the content that terminal device is accessed;The content accessed according to the terminal device, analyze the use of the using terminal equipment
The behavioural habits at family, and according to the behavioural habits to terminal device advertisement.
In order to solve the above technical problems, the also technical scheme that the present invention uses is:A kind of network access equipment is provided,
Including the first receiving module, the inquiry of the domain name request message sent for receiving terminal apparatus, wherein, domain name inquiry request
Message carries the domain name for the targeted website that the terminal device is accessed;First sending module, for forwarding institute to dns server
State inquiry of the domain name request message;Second receiving module, for receiving the dns server according to domain name inquiry request report
Text, the inquiry of the domain name successful respond message of return, wherein, domain name successful inquiring response message carries the targeted website
IP address corresponding to domain name;Modified module, for the targeted website that will be carried in domain name successful inquiring response message
Domain name corresponding to IP address be revised as the IP address of management server;Second sending module, for by the amended domain
Name successful inquiring response message returns to the terminal device, is asked so that the terminal device sends webpage to the targeted website
When asking, entrained purpose IP addresses are the IP address of management server in the web-page requests.
Wherein, the web-page requests include HTTP request, HTTPS request or SPDY requests.
In order to solve the above technical problems, the also technical scheme that the present invention uses is:A kind of network access equipment is provided,
Including receiving module, for the data message transmitted by receiving terminal apparatus;Judge module, for judging that the data message is
No is web-page requests message of the terminal device to targeted website requested webpage content;Modified module, in the judgement
Module determines the data message when being web-page requests message, and purpose IP address in the data message is revised as into management clothes
The IP address of business device;Sending module, for forwarding the amended data message to the management server, so that the pipe
URL address of the server in the amended data message is managed, to the targeted website requested webpage content, and to institute
State terminal device and return to the web page contents that request obtains.
In order to solve the above technical problems, one aspect of the present invention is:A kind of management server is provided, including
First receiving module, for receiving web-page requests message, wherein, the web-page requests message is with including purpose IP address, source IP
Location and the URL addresses of targeted website, the purpose IP address are the IP address of management server, and the source IP address sets for terminal
Standby IP address;Sending module, for parsing the web-page requests message, according to the URL carried in the web-page requests message
Address sends domain name inquiry request message to dns server, to ask IP address corresponding to the domain name of the targeted website;Second
Receiving module, the inquiry of the domain name successful respond message returned for receiving the dns server according to inquiry of the domain name request message,
Wherein, domain name successful inquiring response message carries IP address corresponding to the domain name of the targeted website;First modification is sent
Module, for the purpose IP addresses in the web-page requests message to be revised as to the IP address of the targeted website, the webpage
Source IP address in request message is revised as the IP address of management server, and forwards amended webpage to the targeted website
Request message;3rd receiving module, for receiving the targeted website according to the amended web-page requests message return
Web-page requests response message, wherein, web-page requests response message carries web page contents;Second modification sending module, for by institute
The IP addresses that purpose IP address in web-page requests response message is revised as the terminal device are stated, and are turned to the terminal device
Send out web-page requests response message described.
Wherein, management server also includes:Acquisition module, for according to the web-page requests message and web-page requests response
Message, obtain the content that the terminal device is accessed;Pushing module is analyzed, in being accessed according to the terminal device
Hold, analyze the behavioural habits of the user of the using terminal equipment, and according to the behavioural habits to terminal device advertisement.
The beneficial effects of the invention are as follows:The situation of prior art is different from, inventive network access device is receiving DNS
Server to terminal device return to domain name successful inquiring response message when, the target that will be carried in inquiry of the domain name successful respond message
IP address corresponding to the domain name of website is revised as the IP addresses of management server, or, terminal device is being received to target network
Stand when sending web-page requests message, purpose IP address in web-page requests message is revised as to the IP address of management server, so that
Terminal device and the data message interacted of targeted website, are required to be forwarded by management server, and then can be to end
End equipment is managed with the data message interacted of targeted website, generates Web portal platform.
Embodiment
The present invention is described in detail with embodiment below in conjunction with the accompanying drawings.
Referring to Fig. 1, network access system 10 includes terminal device 101, network access equipment 102, DNS servers
103rd, management server 104 and targeted website 105.Terminal device 101 accesses network by network access equipment 102, in this hair
In bright embodiment, network access equipment 102 can be cable router, or wireless router, such as:WIFI routers.
When terminal device 101 is by the form access target website 105 of domain name, such as:In browsing for terminal device 101
The domain name of www.XX.com targeted website 105 is inputted on device, then needs first to translate domain names into as IP address, terminal device 101
Domain name inquiry request message is sent to dns server 103, wherein, inquiry of the domain name request message reaches network access equipment at first
102, the inquiry of the domain name request message that the receiving terminal apparatus 101 of network access equipment 102 is sent, wherein, inquiry of the domain name request report
The domain name for the targeted website 105 that literary carried terminal equipment is accessed.Network access equipment 102 forwards the domain to dns server 103
Name inquiry request message.Dns server 103 is examined after inquiry of the domain name request message is received according to inquiry of the domain name request message
IP address corresponding to the domain name of rope targeted website 105, and after IP address corresponding to the domain name of targeted website 105 is retrieved, to terminal
Equipment 101 returns to domain name successful inquiring response message, wherein, inquiry of the domain name successful respond message carries the targeted website 105
Domain name corresponding to IP address.
Inquiry of the domain name successful respond message first passes through network access equipment 102 into the transmit process of terminal device 101,
Terminal device 101 is arrived again.After network access equipment 102 receives inquiry of the domain name successful respond message, inquiry of the domain name is successfully answered
IP address corresponding to answering the domain name of the website carried in message is revised as the IP address of management server 104, and network insertion
Amended inquiry of the domain name successful respond message is returned to terminal device 101 by equipment 102.Terminal device 101 connects modification
Inquiry of the domain name successful respond message afterwards, know domain name mapping success equivalent to, terminal device, then terminal device 101 is to target
Network sends web-page requests message, with the content of requested webpage, wherein, entrained purpose IP addresses in web-page requests message,
In embodiment of the present invention, because the domain name addresses of targeted website 105 is replaced the IP address of management server 104, then webpage
Entrained purpose IP address is the IP address of management server 104 in request message;Web-page requests message includes HTTP request
Message, HTTPS request message and SPDY request messages.
Due to the IP address that the purpose IP address in web-page requests message is management server 104, therefore, web-page requests report
Text can be transferred to up to management server 104, wherein, web-page requests the message also IP address of carried terminal equipment 101 and terminal are set
The URL addresses of standby 101 targeted websites 105 accessed.After management server 104 receives reception web-page requests message, it can solve
Web-page requests message is analysed, obtains the URL addresses of targeted website and the IP address of terminal device 101, and according to web-page requests report
The URL addresses carried in text send domain name inquiry request message to dns server 103, with the mesh corresponding to request URL address
Mark the IP address of website 105.Management server 104 is after the IP address of targeted website 105 is received, by web-page requests message
Purpose IP address be revised as the IP address of targeted website 105, the source IP address in web-page requests message is revised as management service
The IP address of device, and forward amended web-page requests message to targeted website 105.Targeted website 105 receives amended
After web-page requests message, web-page requests response message is returned to according to amended web-page requests message, wherein, web-page requests response
Message carries web page contents.
After management server 104 receives web-page requests response message, by purpose IP address in web-page requests response message
It is revised as the IP address of terminal device 101, and to the converting web page request response message of terminal device 101.Because web-page requests should
The purpose IP address for answering message is the IP address of terminal device 101, then web-page requests response message is transferred to up to terminal device
101。
Seen from the above description:The number of the terminal device 101 and network interaction of network is accessed by network access equipment 102
According to message, the forwarding by management server 104 is required to, so that management server 104 is the network of terminal device 101
Entrance, the data message that management server 104 can interact between management terminal device 101 and network, collection terminal equipment 101
User data, and according to user data, accurately advertisement pushing is carried out, or, there is provided personalized recommendation function etc., such as:
The content that management server 104 is accessed according to web-page requests message and web-page requests response message, acquisition terminal device 101,
And the content accessed according to terminal device 101, the behavioural habits of the user of analysis using terminal equipment, and according to behavioural habits
To terminal device advertisement.
In other alternate embodiments, network access equipment 102 is when receiving inquiry of the domain name successful respond message, no
The IP address that targeted website is carried in inquiry of the domain name successful respond message is changed, web-page requests are sent being connected to terminal device 101
During message, then change the purpose IP address carried in web-page requests message.Then network access equipment 102 receives terminal device
During data message transmitted by 101, judge whether data message is that terminal device is sent to targeted website 105, for asking
The web-page requests message of web page contents, in embodiments of the present invention, web-page requests message include HTTP request message, HTTPS
Request message or SPDY request messages.If data message is web-page requests message, purpose IP in data message is repaiied address
The IP address of management server 104 is changed to, and amended data message is forwarded to management server 104, wherein, it is amended
The data message also IP address of carried terminal equipment 101 and the URL addresses of the targeted website accessed.
After management server 104 receives amended web-page requests message, web-page requests message that can be after analytic modification,
Obtain the IP address of terminal device 101 and the URL addresses of targeted website.Management server 104 can be according to URL addresses, to DNS
Server 103 obtains IP address corresponding to targeted website.And according to the IP address of targeted website into targeted website requested webpage
Hold, and the web page contents for asking to obtain are returned to terminal device 101, wherein, 104 specific processing method of management server can
Refering to foregoing description, no longer repeat one by one herein.
In order to allow reader to more fully understand present disclosure, the citing of above two embodiment is illustrated below.
Example 1:Network access equipment is WIFI routers, and WIFI routers include IP bags routing module and DNS successful responds
Frame IP address modified module, management server are WIFI Internet portal platforms, and WIFI Internet portals platform please including webpage
Ask reception and forwarding module and web-page requests response result receives and forwarding module.
IP bags routing module is responsible for being sent to end-user browses device the IP bags of network and network issues the IP of user terminal
Bag is route;DNS successful respond frame IP address modified modules are responsible for identifying the DNS that dns server returns to terminal device
Successful query acknowledgement frame, the domain name in DNS successful query acknowledgement frames is corresponded into the IP address of IP address field, and to be revised as wifi mutual
The IP address of intranet portal platform.Web-page requests receive and forwarding module is responsible for the web-page requests message that receiving terminal apparatus is sent
(such as Http requests, Https requests, SPDY requests), according to the url of web-page requests message, web-page requests message is transmitted to
Targeted website corresponding to url;Web-page requests response result receives and forwarding module is responsible for the net that real-time reception targeted website returns
Page request-reply result message (such as Http request-replies result, Https request-replies result, SPDY request-replies result),
Web-page requests response result message is transmitted to terminal device.
Comprise the following steps that, as shown in Figure 2:
Step S1:Terminal device sends DNS query request to dns server.
Step S2:Dns server returns to domain name successful inquiring response message.
Step S3:When inquiry of the domain name successful respond message passes through wifi routers, wifi routers identify that the domain name is looked into
Successful respond message is ask, and the IP address of IP address field corresponding to the domain name in message is revised as wifi Internet portals and put down
The IP address of platform.Here inquiry of the domain name response message is the message of response after successful inquiry, inquires about the response message of failure
(such as url corresponds to domain name and is not present) does not deal with.
Certainly, those skilled in the art can also be set right to specific domain name or IP addresses institute in WIFI routers
The inquiry of the domain name successful respond message answered, the purpose IP address in the inquiry of the domain name successful respond message is not changed, so that terminal
When accessing targeted website corresponding to the domain name or the IP address, web-page requests message is not sent to equipment transmitted by terminal device
Management server, but direct routing reaches targeted website, such as:In WIFI configuration files, configure specific domain name or
IP address list, if the IP address corresponding to domain name or domain name in inquiry of the domain name successful respond message is included in above-mentioned list
In, then WIFI routers do not change the inquiry of the domain name successful respond message.Step S4:Wifi routers will substituted for IP address
DNS query successful respond frame return to terminal device.
Step S5:Terminal device sends web-page requests message (such as Http requests, Https to wifi Internet portals platform
Request, SPDY requests etc.).
Step S6:The web-page requests message that wifi Internet portal platform receiving terminal apparatus is sent, according to web-page requests
The url of message, web-page requests message is transmitted to targeted website corresponding to url;
Step S7:(such as Http request-replies, Https request-replies, SPDY please for the web-page requests response message that website returns
Ask response etc.) to wifi Internet portal platforms.
Step S8:Web-page requests response message is transmitted to terminal device by wifi Internet portals platform.
Example 2:Network access equipment is WIFI routers, and WIFI routers include IP bags routing module and web-page requests are corresponding
IP bags purpose IP address modified module, management server is WIFI Internet portal platforms, WIFI Internet portal platforms
Received and forwarding module and the reception of web-page requests response result and forwarding module including web-page requests.
IP bags routing module is responsible for being sent to end-user browses device the IP bags of network and network issues the IP of user terminal
Bag is route;The IP address modified module of IP bags corresponding to web-page requests is responsible for identifying the webpage sent to terminal device
Request message (such as Http requests, Https requests, SPDY requests), by the purpose of all IP bags corresponding to web-page requests message
IP address is substituted for the IP address of wifi Internet portal platforms.
Web-page requests receive and forwarding module be responsible for web-page requests message that receiving terminal apparatus sends (such as Http requests,
Https requests, SPDY requests etc.), according to the url of web-page requests message, web-page requests message is transmitted to target corresponding to url
Website;Web-page requests response result receives and forwarding module is responsible for the web-page requests response result that real-time reception targeted website returns
Message (such as Http request-replies result, Https request-replies result, SPDY request-replies result), by web-page requests response
As a result message is transmitted to terminal device.
Detailed process is as follows, as shown in Figure 3:
Step S11:Terminal device sends Http requests to targeted website.
Step S12:Wifi routers identified from IP bags terminal device web-page requests message (such as Http request,
Https requests, SPDY requests etc.), the purpose IP address of all IP bags corresponding to all web-page requests messages of terminal device is replaced
Change the IP address of wifi Internet portal platforms into.
Certainly, those skilled in the art can also be set right to specific domain name or IP addresses institute in WIFI routers
The web-page requests message answered, the purpose IP address in the web-page requests message is not changed, so that web-page requests message is not sent to pipe
Server is managed, but direct routing reaches targeted website, such as:In WIFI configuration files, specific domain name or IP are configured
Address list, if the domain name or purpose IP address in web-page requests message are included in above-mentioned list, WIFI routers are not
Change the web-page requests message.
Step S13:Web-page requests message is sent to wifi Internet portal platforms.
Step S14:The web-page requests message that wifi Internet portal platform receiving terminal apparatus is sent, according to web-page requests
The url of message, web-page requests message is transmitted to targeted website corresponding to url;
Step S15:Web-page requests response message (such as the Http request-replies result, Https request-replies that website returns
As a result, SPDY request-replies etc.) give wifi Internet portal platforms.
Step S16:Web-page requests response result message is transmitted to terminal device by wifi Internet portals platform.
In embodiments of the present invention, network access equipment receive dns server to terminal device return domain name look into
When asking successful respond message, IP address corresponding to the domain name of the targeted website carried in inquiry of the domain name successful respond message is changed
For the IP address of management server, or, when receiving terminal device and sending web-page requests message to targeted website, by webpage
Purpose IP address is revised as the IP address of management server in request message, so that the number interacted of terminal device and targeted website
According to message, be required to be forwarded by management server, so can be to terminal device with targeted website the data interacted
Message is managed.
Referring to Fig. 4, network access equipment 21 includes the first receiving module 211, the first sending module 212, second receives
Module 213, the sending module 215 of modified module 214 and second.
Terminal device 22 accesses network, all numbers interacted between terminal device 22 and network by network access equipment 21
According to message, the forwarding by network access equipment 21 is required to.If terminal device 22 is being visited by domain name access targeted website
Before asking targeted website, it is also necessary to domain name inquiry request message is sent to dns server 23, with the domain name pair of request target website
The IP address answered.
The inquiry of the domain name request message that the receiving terminal apparatus 22 of first receiving module 211 is sent, wherein, inquiry of the domain name request
The domain name for the website that message carried terminal equipment is accessed.First sending module 212 please to dns server forwarding inquiry of the domain name
Seek message.After dns server 23 receives inquiry of the domain name request message, according to inquiry of the domain name request message searched targets website
IP address corresponding to domain name, and after IP address is retrieved, return to domain name successful inquiring response message, wherein, inquiry of the domain name into
Work(response message carries IP address corresponding to the domain name of targeted website.
Second receiving module 213 receives the inquiry of the domain name successful respond message that dns server 23 returns.Modified module 214
IP address corresponding to the domain name of the website carried in inquiry of the domain name successful respond message is revised as to the IP address of management server.
Amended inquiry of the domain name successful respond message is returned to terminal device 22 by the second sending module 215.Terminal device 22, which connects, to be repaiied
To amended inquiry of the domain name successful respond message, equivalent to terminal device 22 knows domain name mapping success.Terminal device 22 to
Objective network sends web-page requests message, with the content of requested webpage, wherein, entrained purpose IP in web-page requests message
Location, it is because the domain name addresses of targeted website 105 is replaced the IP address of management server, then entrained in web-page requests message
Purpose IP address is the IP address of management server.Then web-page requests message transmissions reach management server, by management server
To targeted website requested webpage content, and web page contents are returned to terminal device 22 after web page contents are obtained, so that eventually
The data message of end equipment 22 and network interaction is required to forward by management server.
In embodiments of the present invention, network access equipment receive dns server to terminal device return domain name look into
When asking successful respond message, IP address corresponding to the domain name of the targeted website carried in inquiry of the domain name successful respond message is changed
For the IP address of management server, so that terminal device and the data message interacted of targeted website, are required to take by managing
Business device is forwarded, and then terminal device can be managed with the data message interacted of targeted website.
Referring to Fig. 5, network access equipment 25 includes processor 251, memory 252, network adapter 253 and bus
254.Processor 251, memory 252 and network adapter 253 are connected with bus 254.
Processor 251 is used for the inquiry of the domain name request message sent by the receiving terminal apparatus 27 of network adapter 253, its
In, domain name inquiry request message carries the domain name for the targeted website that the terminal device is accessed;Pass through network adapter
253 forward domain name inquiry request message to dns server 26;Dns server is received according to institute by network adapter 253
State inquiry of the domain name request message, the inquiry of the domain name successful respond message of return, wherein, domain name successful inquiring response message is taken
IP address corresponding to domain name with the targeted website;By the website carried in domain name successful inquiring response message
IP address corresponding to domain name is revised as the IP address of management server;By network adapter 253 by the amended domain name
Successful inquiring response message returns to the terminal device, so that the terminal device sends web-page requests to the targeted website
During message, entrained purpose IP address is the IP address of management server in the web-page requests message.
Wherein, web-page requests message includes HTTP request message, HTTPS request message and SPDY request messages.
The aforesaid operations that processor 251 performs can be stored in memory 252 in the form of one section of program, located
When reason device 251 needs to perform aforesaid operations, this section of program is called in into processor 251 and performed.
Referring to Fig. 6, network access equipment 31 includes receiving module 311, judge module 312, modified module 313 and sent
Module 314.
Data message transmitted by the receiving terminal apparatus 32 of receiving module 314.Whether judge module 312 judges data message
Web-page requests message for from terminal device 32 to targeted website requested webpage content.If data message is inquiry of the domain name request report
Text, then network access equipment 31 directly forward the inquiry of the domain name request message.It is net to determine data message in judge module 312
During page request message, purpose IP address in data message is revised as the IP address of management server 33 by modified module 313.If sentence
It is other messages that disconnected module 312, which determines data message, then network access equipment 31 directly forwards the message, wherein, network connects
When entering the message that the reception network side of equipment 31 sends over, the message directly is forwarded to terminal device 32, such as:Terminal device 32
By domain name access network, it is necessary to first be set to IP address corresponding to the domain name of dns server request target website, then network insertion
Standby 31 directly forward inquiry of the domain name request message and inquiry of the domain name successful respond message.
Sending module 314 forwards amended data message to management server 33, wherein amended data message is taken
The IP address of tape terminal equipment and the URL addresses of targeted website.After management server 33 receives data message, after modification
Data message in URL addresses, return to the obtained webpage of request to targeted website requested webpage content, and to terminal device 32
Content, forward, and then make so that the data message interacted between terminal device 32 and network is required to management server 33
Obtain Web portal of the management server 33 as terminal device 32.In embodiments of the present invention, web-page requests message includes
HTTP request messages, HTTPS request message and SPDY request messages.
In embodiments of the present invention, network access equipment is receiving terminal device to targeted website transmission web-page requests
During message, purpose IP address in web-page requests message is revised as to the IP address of management server, so that terminal device and target
The data message of the interaction of website, it is required to be forwarded by management server, and then can be to terminal device and target network
The data message for the interaction stood is managed, and generates Web portal platform.
Referring to Fig. 7, network access equipment 35 includes processor 351, memory 352, network adapter 353 and bus
354.Processor 351, memory 352 and network adapter 353 are connected with bus 354.
Processor 351 is used for by the data message transmitted by the receiving terminal apparatus 36 of network adapter 353;Described in judgement
Whether data message is that the terminal device 36 is sent to targeted website, the web-page requests message for requested webpage content;
If the data message is web-page requests message, purpose IP address in the data message is revised as management server 37
IP address;The amended data message is forwarded to the management server 37 by network adapter 353, so that the pipe
URL address of the server 37 in the amended data message is managed, to the targeted website requested webpage content, and to
The terminal device 36 returns to the web page contents for asking to obtain.In embodiments of the present invention, web-page requests message includes
HTTP request message, HTTPS request message and SPDY request messages.
The aforesaid operations that processor 351 performs can be stored in memory 352 in the form of one section of program, located
When reason device 351 needs to perform aforesaid operations, this section of program is called in into processor 351 and performed.
Referring to Fig. 8, management server 41 includes the first receiving module 411, sending module 412, the second receiving module
413rd, the first modification sending module 414, the 3rd receiving module 415 and the second modification sending module 416.
The purpose IP address in web-page requests message transmitted by terminal device 42 is the IP address of management server 41,
Or the web-page requests message transmitted by terminal device 42, after network access equipment is changed, the mesh in web-page requests message
IP address be revised as the IP address of management server 41, therefore, web-page requests message can be routed to up to management server 41.
First receiving module 411 receives web-page requests message, wherein, web-page requests message includes purpose IP addresses, source IP
Address and the URL addresses of targeted website, purpose IP address are the IP addresses of management server 41, and source IP address is terminal device
IP address.Sending module 412 sends inquiry of the domain name according to the URL addresses carried in web-page requests message to dns server 43
Request message, with IP address corresponding to the domain name of request target website.Second receiving module 413 receives the basis of dns server 43
The inquiry of the domain name successful respond message that inquiry of the domain name request message returns, wherein, inquiry of the domain name successful respond message carries target
IP address corresponding to the domain name of website.
Purpose IP address in web-page requests message with being revised as the IP of targeted website by the first modification sending module 414
Location, the source IP address in web-page requests message is revised as the IP address of management server 41, and forwards and change to targeted website 44
Web-page requests message afterwards.After targeted website 44 receives web-page requests message, web-page requests are returned to according to web-page requests message
Response message, wherein, web-page requests response message carries web page contents.
3rd receiving module 415 receives the web-page requests response that targeted website returns according to amended web-page requests message
Message.Purpose IP address in web-page requests response message with being revised as the IP of terminal device 42 by the second modification sending module 416
Location, and to the converting web page request response message of terminal device 42.
Further, management server 41 also includes acquisition module (not shown) and analysis pushing module (not shown).Obtain
Modulus root tuber obtains the content that terminal device 42 is accessed according to web-page requests message and/or web-page requests response message.Analysis
The content that pushing module is accessed according to terminal device 42, the behavioural habits of the user of analysis using terminal equipment 42, and according to
Behavioural habits are to the advertisement of terminal device 42.
In embodiments of the present invention, the data message interacted between terminal device and network is required to pass through management service
The forwarding of device so that Web portal of the management server as terminal device, further, management server can also analysing terminal set
The data message of the standby interaction between network, obtains the behavioural habits for the user for making terminal device, and then can carry out accurately
Advertisement pushing.
Referring to Fig. 9, management server 45 includes processor 451, memory 452, network adapter 453 and bus
454.Processor 451, memory 452 and network adapter 453 are connected with bus 454.
Processor 451 is used to receive web-page requests message by network adapter 453, wherein, the web-page requests message
The URL addresses for the targeted website that the IP address and terminal device 46 of carried terminal equipment are accessed;According in web-page requests message
The URL addresses of carrying send domain name inquiry request message to dns server 47, to ask the target corresponding to the URL addresses
The IP address of website;The inquiry of the domain name successful respond message of the return of dns server 47 is received by network adapter 453,
Wherein, domain name successful inquiring response message carries IP address corresponding to the domain name of the targeted website;Please by the webpage
The purpose IP address in message is asked to be revised as the IP address of the targeted website, with the source IP address in the web-page requests message
The IP address of management server 45 is revised as, and amended webpage is forwarded to the targeted website by network adapter 453
Request message;Receive what the targeted website returned according to the amended web-page requests message by network adapter 453
Web-page requests response message;Destination address in the web-page requests response message is revised as to the IP address of the terminal device,
And the web-page requests response message is forwarded to the terminal device 46 by network adapter 453.
The aforesaid operations that processor 451 performs can be stored in memory 452 in the form of one section of program, located
When reason device 451 needs to perform aforesaid operations, this section of program is called in into processor 451 and performed.
Referring to Fig. 10, a kind of method for accessing network includes:
Step S501:The inquiry of the domain name request message that receiving terminal apparatus is sent, wherein, inquiry of the domain name request message carries
The domain name for the targeted website that terminal device is accessed;
The domain name of targeted website and the IP address of targeted website correspond.
Step S502:Inquiry of the domain name request message is forwarded to dns server;
IP address corresponding to dns server management domain name and domain name.
Step S503:Dns server is received according to inquiry of the domain name request message, the inquiry of the domain name successful respond report of return
Text, wherein, inquiry of the domain name successful respond message carries IP address corresponding to the domain name of targeted website;
Step S504:IP address corresponding to the domain name of the website carried in inquiry of the domain name successful respond message is revised as pipe
Manage the IP address of server;
IP address corresponding to domain name is revised as to the IP address of management server, equivalent to, by the domain name of targeted website with
The IP address of management server is corresponding, during by the domain name access targeted website of targeted website, then the domain name solution of targeted website
The IP address of analysis is the IP address of management server, and data message is sent directly to management server.
Step S505:Amended inquiry of the domain name successful respond message is returned into terminal device so that terminal device to
When targeted website sends web-page requests message, in web-page requests message entrained purpose IP address for management server IP
Location;
Web-page requests include HTTP request message, HTTPS request message or SPDY request messages.
In embodiments of the present invention, network access equipment receive dns server to terminal device return domain name look into
When asking successful respond message, IP address corresponding to the domain name of the targeted website carried in inquiry of the domain name successful respond message is changed
For the IP address of management server, so that terminal device and the data message interacted of targeted website, are required to take by managing
Business device is forwarded, and then terminal device can be managed with the data message interacted of targeted website.
Figure 11 is referred to, a kind of method for accessing network includes:
Step S601:Data message transmitted by receiving terminal apparatus;
Terminal device accesses network by network access equipment, then the terminal device pass through network access equipment access to be somebody's turn to do
The equipment of network.
Step S602:Judge whether data message is that terminal device is sent to targeted website, for requested webpage content
Web-page requests message, if data message is web-page requests message, into step S604, otherwise into step S603;
Web-page requests message refers to for the message of targeted website requested webpage content, wherein, inquiry of the domain name request report
Text and inquiry of the domain name successful respond message etc. are not belonging to web-page requests message.
Step S603:Forwarding data packets;
Step S604:Purpose IP address in data message is revised as to the IP address of management server;
Purpose IP address in data message is revised as the IP address of management server, then data message can be forwarded to management
Server.
Step S605:Amended data message is forwarded to management server, so that management server is according to amended
URL addresses in data message, returned to targeted website requested webpage content, and to terminal device in the webpage for asking to obtain
Hold;
Web-page requests include HTTP request message, HTTPS request message or SPDY request messages.
In embodiments of the present invention, network access equipment is receiving terminal device to targeted website transmission web-page requests
During message, purpose IP address in web-page requests message is revised as to the IP address of management server, so that terminal device and target
The data message of the interaction of website, it is required to be forwarded by management server, and then can be to terminal device and target network
The data message for the interaction stood is managed, and generates Web portal platform.
Figure 12 is referred to, a kind of method for accessing network includes:
Step S701:Receive web-page requests message, wherein, web-page requests message include purpose IP address, source IP address and
The URL addresses for the targeted website that the terminal device is accessed, the purpose IP address is the IP address of management server, described
Source IP address is the IP address of terminal device;
Web-page requests include HTTP request message, HTTPS request message or SPDY request messages.
Step S702:Domain name inquiry request report is sent to dns server according to the URL addresses carried in web-page requests message
Text, with the IP address of request target website;
URL addresses carry the domain name of targeted website, then can according to the IP of the domain Name acquisition targeted website of targeted website
Location.
Step S703:The inquiry of the domain name successful respond message that dns server returns is received, wherein, inquiry of the domain name is successfully answered
Answer message and carry IP address corresponding to the domain name of targeted website;
Step S704:Purpose IP address in web-page requests message is revised as to the IP address of targeted website, please with webpage
Ask the source IP address in message to be revised as the IP address of management server, and amended web-page requests report is forwarded to targeted website
Text;
Management server gets the IP address of targeted website, can send web-page requests to targeted website.
Step S705:Receive the web-page requests response message that targeted website returns according to amended web-page requests message;
Web-page requests response message carries asked web page contents.
Step S706:Destination address in web-page requests response message is revised as to the IP address of terminal device, and to terminal
Device forwards web-page requests response message.
After destination address is revised as the IP address of terminal device in web-page requests response message, web-page requests response message
It can be routed to up to terminal device.
Further, management server can also the data message that is interacted with website of analysing terminal equipment, know terminal device
User access habits, and according to access habits advertisement, carry out personalized function recommendation etc., then method also includes:
According to web-page requests message and/or web-page requests response message, the content that the terminal device is accessed is obtained;Set according to terminal
The standby content accessed, analyzes the behavioural habits of the user of the using terminal equipment, and according to behavioural habits to terminal device
Advertisement.
In embodiments of the present invention, the data message interacted between terminal device and network is required to pass through management service
The forwarding of device so that Web portal of the management server as terminal device, further, management server can also analysing terminal set
The data message of the standby interaction between network, obtains the behavioural habits for the user for making terminal device, and then can carry out accurately
Advertisement pushing.
Embodiments of the present invention are the foregoing is only, are not intended to limit the scope of the invention, it is every to utilize this
The equivalent structure or equivalent flow conversion that description of the invention and accompanying drawing content are made, or directly or indirectly it is used in other correlations
Technical field, it is included within the scope of the present invention.