An embodiment of the disclosure relates to the field of a HyperText Transfer Protocol (HTTP) service application of a mobile user, and in particular to a method for sending information and a gateway.
With the establishment of high speed 3G/4G networks, plus influence of multiple factors such as a trend of PC like mobile terminals and sensitivity and prompt response of a content and service provider to demands of a market, mobile communications are heading rapidly towards a mobile internet era. However, a problem keeping bugging the internet content and service provider is that when no proxy is set for a subscriber, some important user information of a mobile terminal such as a Mobile Subscriber International ISDN (MSISDN) number of the user cannot be acquired, leading to failure in locating the user by the internet content and service provider, such that no personalized content and service can be specifically provided to the subscriber. In addition, some fee businesses cannot be carried out also due to lack of the user information. With regard to this problem, quite a few methods have been proposed by researchers, none of which with much practicability or feasibility though, since all the methods proposed involves transformation of a mobile internet architecture, or transformation of content and traffic flows.
In view of this, embodiments of the disclosure provide a method for sending information and a gateway, solving the problem that an internet content and service provider fails to acquire user online information of a mobile terminal user.
To achieve the purpose above, a technical solution of an embodiment of the disclosure is implemented as follows.
An embodiment of the disclosure provides a method for sending information, which includes:
In the method above, the method may further include: before monitoring the DNS domain name inquiring message by the gateway,
In the method above, the acquiring the user online information by the gateway may include:
In the method above, the acquiring the user log information by the gateway may include:
In the method above, the monitoring the DNS domain name inquiring message and forging the DNS server returning domain name parsing response by the gateway may include:
In the method above, the inquiring the user online information according to the user HTTP request by the gateway may include:
In the method above, the inquiring the user online information according to the user HTTP request by the gateway may include:
In the method above, the sending the user HTTP request including the HTTP header information to the internet content and service provider may include:
An embodiment of the disclosure further provides a gateway, which includes: a user online-offline message interface module, an inquiring interface module, a message processing module, and a traffic processing module; wherein
In the gateway above, the gateway may further include:
With the method for sending information and the gateway provided by embodiments of the disclosure, a gateway acquires user online information; the gateway monitors a DNS domain name inquiring message, forges a DNS server returning domain name parsing response, and sends the forged response to a core network element or a user terminal browser; the gateway receives a user HyperText Transfer Protocol (HTTP) request returned by the core network element or the user terminal browser; and the gateway inquires the user online information according to the user HTTP request, adds the user online information in the user HTTP request by taking the user online information as HTTP header information, and sends the user HTTP request including the HTTP header information to an internet content and service provider, such that the internet content and service provider can obtain user online information of a mobile terminal user, thereby providing personalized content and service for the user better.
According to various embodiments of the disclosure, a gateway acquires user online information; the gateway monitors a Domain Name System (DNS) domain name inquiring message, forges a DNS server returning domain name parsing response, and sends the forged response to a core network element or a user terminal browser; the gateway receives a user HyperText Transfer Protocol (HTTP) request returned by the core network element or the user terminal browser; and the gateway inquires the user online information according to the user HTTP request, adds the user online information in the user HTTP request by taking the user online information as HTTP header information, and sends the user HTTP request including the HTTP header information to an internet content and service provider.
The disclosure will be further illustrated in detail with reference to the drawings and specific embodiments hereinafter.
An embodiment of the disclosure provides a method for sending information,
Step 101: a gateway acquires user online information.
Specifically, an embodiment of the disclosure is illustrated taking an HTTP header information transparent gateway as an example. As shown in
If receiving a user offline message sent by the core network element, then the HTTP header information transparent gateway deletes the locally stored user online information; in the embodiment, the user online message and the user offline message are born using a Remote Authentication Dial In User Service (RADIUS) protocol.
Step 102: the gateway acquires user log information.
Specifically, as shown in
Step 103: the gateway monitors a DNS domain name inquiring message, forges a DNS server returning domain name parsing response, and sends the forged response to a core network element or a user terminal browser.
Specifically, multiple domain names of the content and service provider including additional HTTP header information are configured by a configuring interface on the HTTP header information transparent gateway; as shown in
The HTTP header information transparent gateway compares the domain name accessed by the user with multiple configured domain names; if the domain name accessed by the user is included in the multiple domain names, then there is a successful match; then the HTTP header information transparent gateway copies the DNS domain name inquiring message, and forges the DNS server returning domain name parsing response, in which an IP address parsed from the domain name is set as an IP address of the HTTP header information transparent gateway itself.
The HTTP header information transparent gateway may learn the IP address from which the DNS domain name inquiring message comes according to the DNS domain name inquiring message; as either the core network element or the user terminal browser may send the DNS domain name inquiring message; the HTTP header information transparent gateway sends the forged DNS server returning domain name parsing response to the source of the DNS domain name inquiring message, namely to the core network element or the user terminal browser; here, as the HTTP header information transparent gateway is closer to the core network element or the user terminal browser than a DNS server in terms of a location in the network, the HTTP header information transparent gateway may return the DNS server returning domain name parsing response earlier than the DNS server.
Step 104: the core network element or the user terminal browser sends a user HTTP request to the gateway according to the received DNS server returning domain name parsing response.
Specifically, after the core network element or the user terminal browser receives the DNS server returning domain name parsing response sent by the HTTP header information transparent gateway, as the IP address parsed from a domain name therein is the IP address of the HTTP header information transparent gateway, the core network element or the user terminal browser sends the user HTTP request to the HTTP header information transparent gateway according to the IP address of the HTTP header information transparent gateway.
Step 105: the gateway inquires the user online information according to the user HTTP request, and adds the user online information in the user HTTP request by taking the user online information as HTTP header information.
Specifically, the HTTP header information transparent gateway receives the user HTTP request sent by the core network element or the user terminal browser via an HTTP message receiving interface, and searches the locally stored user online information for user online information corresponding to a user IP address and a request period in the user HTTP request, so as to obtain information such as a user IP address, a user MSISDN number, a user online time, a user International Mobile Subscriber Identification Number (IMSI), and a user location, and the like.
Alternatively, when a user IP address is a public network IP address of the user and a public network port number of the user obtained after NAT, the HTTP header information transparent gateway finds log information corresponding to the public network IP address of the user and the public network port number of the user in the locally stored log information according to the public network IP address of the user and the public network port number of the user, acquires the user IP address in the log information, and searches for user online information corresponding to the user IP address and the request period, so as to obtain information such as a user IP address, a user MSISDN number, a user online time, a user International Mobile Subscriber Identification Number (IMSI), and a user location, and the like.
The HTTP header information transparent gateway adds the inquired user online information in the user HTTP request by taking the user online information as HTTP header information.
Step 106: the gateway sends the user HTTP request including the HTTP header information to an internet content and service provider.
Specifically, the HTTP header information transparent gateway obtains an IP address of the domain name in the user request through inquiring the DNS, and sends the user HTTP request including the HTTP header information to the internet content and service provider according to the IP address.
Here, as the user IP address and the user port number are included in the user online information sent from the HTTP header information transparent gateway to the internet content and service provider, the internet content and service provider may returns a response to the user without using the HTTP header information transparent gateway.
In an embodiment of the disclosure, as the HTTP header information transparent gateway monitors, by port mirroring or beam splitting, the inquiring interface connecting the HTTP header information transparent gateway to the DNS, no change needs to be made to an existing networking architecture of the mobile internet; as the HTTP header information transparent gateway accesses the mobile internet by means of bypass, a failure in the HTTP header information transparent gateway will not affect the use of the mobile internet; as the HTTP header information transparent gateway accesses the mobile internet by means of transparent proxy, user online information that cannot be included in the user HTTP request can be included in the internet content and service provider without any transformation of the mobile terminal user or the internet content and service provider; in addition to the ability of processing HTTP header information, it is also possible to perform traffic control on a user HTTP request configured with no proxy. For example, the HTTP header information transparent gateway is configured with a domain name black/white list, and monitors a DNS port; for a domain name falling in the black list, the HTTP header information transparent gateway forges the DNS server returning domain name parsing response, directing the address parsed from the domain name to the HTTP header information transparent gateway; and the user HTTP request is forwarded to the HTTP header information transparent gateway, which returns an access prohibited response to the user, thereby achieving control over the domain name black list.
To implement the aforementioned method, an embodiment of the disclosure further provide a gateway,
The gateway further includes:
The user online-offline message interface module 41 acquiring the user online information may include: a user online message is received from the core network element via a user online-offline message interface; the user online information is acquired from the user online message and is stored locally, wherein the user online information includes information such as a user IP address, a user MSISDN number, a user online time, a user International Mobile Subscriber Identification Number (IMSI), and a user location.
The log message interface module 45 acquiring the user log information may include: a log message sent by an exit firewall from a private network to a public network is received, and log information obtained after Network Address Translation (NAT) of a user IP address is acquired from the log message, wherein the log information includes: a user IP address, a user port number, a user public network IP address, a user public network port number, a session ID, and a session beginning time.
The inquiring interface module 42 monitoring the DNS domain name inquiring message and the message processing module 43 forging a DNS server returning domain name parsing response may include: the DNS domain name inquiring message is monitored; a domain name accessed by the user is acquired from an monitored DNS parsing request; the domain name accessed by the user is compared with multiple pre-configured domain names; if the domain name accessed by the user matches one of the pre-configured domain names, the DNS server returning domain name parsing response is forged, and an IP address parsed from the domain name in the domain name parsing response is set as an IP address of the HTTP header information transparent gateway itself.
The traffic processing module 44 inquiring the user online information according to the user HTTP request may include:
The traffic processing module 44 inquiring the user online information according to the user HTTP request may include:
When a user IP address is a public network IP address of the user and a public network port number of the user obtained after NAT, log information corresponding to the public network IP address of the user and the public network port number of the user is found in the log information stored in the management module according to the public network IP address of the user and the public network port number of the user, the user IP address is acquired in the log information, and user online information corresponding to the user IP address and the request period is found.
The traffic processing module 44 sending the user HTTP request including the HTTP header information to an internet content and service provider may include: an IP address of the domain name in the user request is obtained through inquiring the DNS, and the user HTTP request including the HTTP header information is sent to the internet content and service provider according to the IP address.
What described are merely preferred embodiments of the disclosure, and are not intended to limit the scope of the disclosure. Any modification, equivalent replacement, improvement, and the like made within the spirit and principle of the disclosure should be included in the scope of the disclosure.
Number | Date | Country | Kind |
---|---|---|---|
201110167899.2 | Jun 2011 | CN | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/CN2012/071943 | 3/5/2012 | WO | 00 | 12/18/2013 |