[go: up one dir, main page]

CN106899703B - A kind of IP address correction method and device - Google Patents

A kind of IP address correction method and device Download PDF

Info

Publication number
CN106899703B
CN106899703B CN201510958936.XA CN201510958936A CN106899703B CN 106899703 B CN106899703 B CN 106899703B CN 201510958936 A CN201510958936 A CN 201510958936A CN 106899703 B CN106899703 B CN 106899703B
Authority
CN
China
Prior art keywords
address
access request
dotting
client
real
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510958936.XA
Other languages
Chinese (zh)
Other versions
CN106899703A (en
Inventor
陈胜益
潘青
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201510958936.XA priority Critical patent/CN106899703B/en
Publication of CN106899703A publication Critical patent/CN106899703A/en
Application granted granted Critical
Publication of CN106899703B publication Critical patent/CN106899703B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5053Lease time; Renewal aspects

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明实施例提供了一种IP地址修正方法和装置。所述方法包括:在在一客户端访问服务器时,获取对应由所述客户端发送的访问请求的第一IP地址;所述第一IP地址由访问请求通过正常路由路径获得;通过距离发起所述访问请求的客户端最近的内容分发网络服务器,获取打点IP地址;所述打点IP地址由所述客户端根据所述访问请求向内容分发网络服务器发送打点请求获得;对所述打点IP地址和所述第一IP地址进行匹配计算,修正所述访问请求的真实IP地址。取得了可以对获取的第一IP地址进行修正,使修正后的IP地址可以更契合发起访问请求的客户端所在地域,降低误扣费的几率,降低了广告投放者的费用损失。

Figure 201510958936

Embodiments of the present invention provide an IP address correction method and device. The method includes: when a client accesses the server, obtaining a first IP address corresponding to an access request sent by the client; the first IP address is obtained from the access request through a normal routing path; The recent content distribution network server of the client of the access request, obtains the management IP address; The management IP address is obtained by the client sending the management request to the content distribution network server according to the access request; The first IP address performs matching calculation, and corrects the real IP address of the access request. The obtained first IP address can be corrected, so that the corrected IP address can be more suitable for the location of the client that initiates the access request, thereby reducing the probability of erroneously deducting fees and reducing the cost loss of the advertiser.

Figure 201510958936

Description

IP address correction method and device
Technical Field
The present invention relates to the field of software technologies, and in particular, to an IP address correction method and an IP address correction apparatus.
Background
With the rapid development of communication networks in recent years, the distribution of related information through networks has become an important information distribution manner. The operation platform can provide corresponding network service for the publishing of the network information, count the number of clicks of the corresponding network information by acquiring the IP address of the user accessing the network information, and charge corresponding fees for the publisher of the network information.
Generally, an operation platform takes an advertisement platform as an example, network information is published regionally, for example, an advertisement publisher publishes a certain network advertisement in the shanghai, and only if a user in the shanghai visits the network advertisement, the advertisement platform can deduct advertisement publishing cost from an account of the advertisement publisher for the visit. When users in other regions, such as Beijing users, access the network advertisement, the advertisement platform cannot deduct the advertisement putting cost from the account of the advertisement putting person, otherwise, the deduction violates the advertisement putting purpose of the advertisement putting person, and deducts the cost additionally.
However, in practical applications, since the network advertisement delivered by the advertisement platform in the web server may be relayed by other ISPs (Internet Service providers), when the user clicks the network advertisement through the ISP, the route of the client corresponding to the user is changed, and the first IP address acquired by the web server from the relayed access request is the IP address of the nearest relayed ISP, not the IP address of the client. If the fee is deducted from the click according to the IP address, a false deduction may be generated. For example, in the foregoing example, the advertisement publisher delivers the network advertisement in shanghai, and the client initiating the access request is originally beijing, and the closest ISP is the IP address in shanghai through the ISP relay, so that the first IP address obtained by the web server from the access request is the IP address in shanghai, and at this time, the advertisement platform considers that the access is the access in shanghai, and therefore the fee is deducted, thereby generating a fee deduction error, and causing a fee loss of the advertisement publisher.
Disclosure of Invention
In view of the above problems, the present invention has been made to provide an IP address correction method and a corresponding IP address correction apparatus that overcome or at least partially solve the above problems.
According to an aspect of the present invention, there is provided an IP address correction method, including:
when a client accesses a server, acquiring a first IP address corresponding to an access request sent by the client; the first IP address is obtained by an access request through a normal routing path;
acquiring a dotting IP address through a content distribution network server closest to a client initiating the access request; the dotting IP address is obtained by the client sending a dotting request to a content distribution network server according to the access request;
and performing matching calculation on the dotting IP address and the first IP address, and correcting the real IP address of the access request.
Preferably, when a client accesses a server, the step of obtaining a first IP address corresponding to an access request sent by the client includes:
acquiring a first IP address and a global identification from a received access request and recording; the global identification is written into the access request by the client when the access request is sent.
Preferably, the step of obtaining a dotting IP address through a content distribution network server closest to a client initiating the access request includes:
and acquiring and recording a dotting IP address and a global identification of the access request through a content distribution network server closest to a client initiating the access request.
Preferably, the step of performing matching calculation on the dotting IP address and the first IP address to correct the real IP address of the access request includes:
searching each dotting IP address and each first IP address under the same global identification;
matching calculation is carried out on the dotting IP address and the first IP address, and whether the access request corresponding to the first IP address is transferred or not is judged;
and if the access request corresponding to the first IP address is transferred, correcting the real IP address of the access request according to the dotting IP address.
Preferably, the step of performing matching calculation on the dotting IP address and the first IP address and determining whether the access request corresponding to the first IP address is forwarded includes:
judging whether each first IP address under the global identification is the same as each dotting IP address;
and if the first IP addresses under the global identification are different from the dotting IP addresses, determining that the access request corresponding to the first IP address is transferred.
Preferably, the step of correcting the real IP address of the access request according to the dotting IP address includes:
judging whether the number of the same dotting IP addresses in all the dotting IP addresses exceeds a threshold value or not;
and if the number of the same dotting IP addresses in all the dotting IP addresses exceeds a threshold value, taking the dotting IP addresses exceeding the threshold value as the real IP addresses of the access request.
Preferably, the step of performing matching calculation on the dotting IP address and the first IP address and determining whether the access request corresponding to the first IP address is forwarded includes:
judging whether each first IP address under the global identification is partially different from each dotting IP address or not;
and if the first IP addresses under the global identification are different from the dotting IP addresses, determining that the access requests corresponding to the parts of the first IP addresses different from the dotting IP addresses are transferred.
Preferably, the step of correcting the real IP address of the access request according to the dotting IP address includes:
and correcting the real IP address of the access request to be the IP address of the same part of the first IP address as each dotting IP address aiming at the access request corresponding to the part of the first IP address different from each dotting IP address.
Preferably, after the step of performing matching calculation on the dotting IP and the first IP address and correcting the real IP address of the access request, the method further includes:
and aiming at the access request with the corrected real IP address, retrieving and/or delivering network advertisement data based on the real IP address according to the real IP address.
Preferably, after the step of performing matching calculation on the dotting IP and the first IP address and correcting the real IP address of the access request, the method further includes:
and recommending personalized information corresponding to the real IP address according to the real IP address aiming at the access request with the real IP address corrected.
According to another aspect of the present invention, there is provided an IP address correction apparatus including:
the first IP address acquisition module is suitable for acquiring a first IP address corresponding to an access request sent by a client when the client accesses a server; the first IP address is obtained by an access request through a normal routing path;
a dotting IP address obtaining module, adapted to obtain a dotting IP address through a content distribution network server closest to a client initiating the access request; the dotting IP address is obtained by the client sending a dotting request to a content distribution network server according to the access request;
and the real IP address correction module is suitable for performing matching calculation on the dotting IP address and the first IP address and correcting the real IP address of the access request.
Preferably, the first IP address obtaining module includes:
the first IP address acquisition submodule is suitable for acquiring and recording a first IP address and a global identifier from the received access request; the global identification is written into the access request by the client when the access request is sent.
Preferably, the dotting IP address obtaining module includes:
and the dotting IP address acquisition submodule is suitable for acquiring and recording the dotting IP address and the global identification of the access request through a content distribution network server closest to the client initiating the access request.
Preferably, the dotting IP address obtaining module includes:
and the dotting IP address acquisition submodule is suitable for acquiring and recording the dotting IP address and the global identification of the access request through a content distribution network server closest to the client initiating the access request.
Preferably, the access request judgment sub-module includes:
the first IP address and dotting IP address judgment submodule is suitable for judging whether each first IP address under the global identification is the same as each dotting IP address;
and the access request transfer sub-module is suitable for determining that the access request corresponding to the first IP address is transferred when each first IP address under the global identification is different from each dotting IP address.
Preferably, the real IP address modification sub-module includes:
the dotting IP address number judgment submodule is suitable for judging whether the number of the same dotting IP addresses in all the dotting IP addresses exceeds a threshold value or not;
and the real IP address replacing submodule is suitable for taking the dotting IP address exceeding the threshold value as the real IP address of the access request when the number of the same dotting IP addresses exceeds the threshold value in all the dotting IP addresses.
Preferably, the access request transfer judgment sub-module includes:
a partial first IP address and dotting IP address judgment submodule which is suitable for judging whether each first IP address under the global identification is partially different from each dotting IP address or not;
and the partial access request transfer sub-module is suitable for determining that the access request corresponding to the part of the first IP address different from each dotting IP address is transferred when each first IP address under the global identification is different from each dotting IP address.
Preferably, the real IP address modification sub-module includes:
and the partial real IP address correction submodule is suitable for correcting the real IP address of the access request into the IP address of the same part of the first IP address as each dotting IP address aiming at the access request corresponding to the part of the first IP address different from each dotting IP address.
Preferably, after the real IP address modification module, the method further includes:
and the retrieval and delivery module is suitable for retrieving and/or delivering the network advertisement data based on the real IP address according to the real IP address aiming at the access request with the corrected real IP address.
Preferably, after the real IP address modification module, the method further includes:
and the personalized information recommendation module is suitable for recommending personalized information corresponding to the real IP address according to the real IP address aiming at the access request with the real IP address corrected.
According to another aspect of the present invention, there is also disclosed an IP address correction apparatus including:
a memory loaded with a plurality of executable instructions;
a processor executing the plurality of executable instructions; the plurality of instructions includes a method of performing the steps of:
when a client accesses a server, acquiring a first IP address corresponding to an access request sent by the client; the first IP address is obtained by an access request through a normal routing path;
acquiring a dotting IP address through a content distribution network server closest to a client initiating the access request; the dotting IP address is obtained by the client sending a dotting request to a content distribution network server according to the access request;
and performing matching calculation on the dotting IP address and the first IP address, and correcting the real IP address of the access request.
The IP address correction method and the device disclosed by the embodiment of the invention carry out matching calculation on the dotting IP address corresponding to the client access request and the first IP address by acquiring the first IP address corresponding to the client access request and the dotting IP address corresponding to the client access request of the content distribution network server closest to the client, thereby correcting the real IP address corresponding to the access request, solving the problems that in the prior art, the acquired first IP address is inaccurate after the access request of the client is transferred by a plurality of ISP, therefore, the problem that the cost of the advertisement releaser is lost due to the fact that the fee is deducted by mistake is solved, the obtained first IP address can be corrected, the corrected IP address can be matched with the region where the client initiating the access request is located, the probability of fee deduction by mistake is reduced, and the cost loss of the advertisement releaser is reduced.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart illustrating steps of an IP address correction method according to an embodiment of the present invention;
fig. 1A is a schematic architecture of an IP address correction method according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating steps of an IP address correction method according to an embodiment of the present invention;
fig. 3 is a block diagram of an IP address correction apparatus according to an embodiment of the present invention;
fig. 4 is a block diagram of an IP address correction apparatus according to an embodiment of the present invention; and
fig. 5 is a block diagram of an IP address correction device according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Example one
Referring to fig. 1, a flowchart illustrating steps of an embodiment of an IP address correction method according to an embodiment of the present invention is shown, which may specifically include the following steps:
step S110: when a client accesses a server, acquiring a first IP address corresponding to an access request sent by the client; the first IP address is obtained by the access request over a normal routing path.
The embodiment of the invention can be applied to the correction of the IP address which is acquired by the web server and aims at the client access request.
The first IP address is an IP address corresponding to the access request of the client, which is obtained by the web server when the web server receives the access request sent by the client. The client sends the access request to the web server. The IP address of the web server may be obtained according to a local DNS (Domain Name System) server, and the access request may be sent to the web server according to the IP address of the web server.
The network advertisement delivered by the advertisement server in the web server may be relayed by other ISPs (internet Service providers), and in the process of sending an access request to the web server by the client, the routing of the client initiating the access may be changed, which may cause the access request of the client to be changed accordingly. For example, referring to fig. 1A, which is a schematic architecture diagram of an IP address correction method provided by an embodiment of the present invention, a real IP address of a client access request is IP-1, and after the client access request is relayed, a change may occur, for example, N times of relays occur in fig. 1A, and then a first IP address acquired by a web server and corresponding to the client access request is an IP address IP-N of an ISPN. In the process of sending the access request to the web server by the client, one or more times of transfer may occur, so that the first IP address corresponding to the access request of the client, which is acquired by the web server, is inaccurate. And the Web server takes the acquired final IP address corresponding to the client access request as the first IP address of the client access request.
The web server can return data corresponding to the client access request to the client according to the first IP address of the client and the client access request, and forward the first IP address corresponding to the client access request to the advertisement server for recording and counting, so that the click rate of each network advertisement issued in the web server is obtained, and corresponding fees are deducted for the issuer of each network information.
Step S120: acquiring a dotting IP address through a content distribution network server closest to a client initiating the access request; and the dotting IP address is obtained by sending a dotting request to a content distribution network server by the client according to the access request.
when the Web server receives an access request of a client, the Web server can issue a dotting notification to the client according to a first IP address of the access request of the client, and after receiving the dotting notification, the client obtains an IP address of a CDN server (Content Delivery Network) with a geographical position closest to the client through a DNS server, and sends a dotting request corresponding to the access request of the client to the CDN server according to the IP address of the CDN server.
After receiving a dotting request corresponding to the client access request, the CDN server may obtain an IP address corresponding to the client access request, where the IP address is a dotting IP address corresponding to the client access request, and the dotting IP address is obtained when the client sends a dotting request to the CDN server according to the access request.
Correspondingly, after the CDN server closest to the client obtains the dotting IP address corresponding to the client access request, the dotting IP address corresponding to the client access request may be sent to the advertisement server, so that the advertisement server records and stores the dotting IP address of each client access request.
In practical application, a dotting collection server can be arranged between the CDN server and the advertisement server, and the dotting collection server receives a dotting IP address sent by the CDN server and then sends the dotting IP address to the advertisement server. Referring to fig. 1A, the dotting collection server collects a dotting IP address corresponding to a client access request acquired in the CDN server, and transmits the collected IP address to the advertisement server.
In the embodiment of the invention, a client sends a dotting request of an HTTPS (Hyper Text Transfer Protocol over Secure Socket Layer) to a CDN server, and a local CDN server can analyze the HTTPS request after deploying HTTPS service so as to obtain a dotting IP address. And for the CDN server of the third party, before the HTTPS request is analyzed, the encrypted part in the dotting request of the HTTPS is sent to an identity authentication server for identity authentication, and after the identity authentication server passes the authentication, the CDN server is allowed to analyze the dotting request so as to obtain the dotting IP address.
Preferably, step S120 includes:
sub-step a11, the content distribution network server receives the dotting request initiated by the client and corresponding to the access request, and authenticates the dotting request through the authentication server.
when the Web server receives an access request of a client, the Web server can issue a dotting notification to the client according to a first IP address of the access request of the client, and after receiving the dotting notification, the client obtains an IP address of a CDN (Content Delivery Network) server closest to the client through a DNS (domain name system) server, and sends a dotting request corresponding to the access request of the client to the CDN server according to the IP address of the CDN server.
After receiving a dotting request corresponding to the client access request, the CDN server may obtain an IP address corresponding to the client access request, where the IP address is the dotting IP address corresponding to the client access request.
In practical application, since the dotting request is sent according to an HTTPS (Hyper Text Transfer Protocol over Secure Socket Layer) request format required by a web server, the HTTPS request can be analyzed after an HTTPS service is deployed on a local CDN server, and a dotting IP address is obtained.
In addition, before parsing an HTTPS request, a CDN server of a third party needs to send an encrypted part in a dotting request of the HTTPS to an authentication server on the same side as a web server to authenticate a dotting request of a guest, verify authenticity of an access request of a client, and ensure security of data in the dotting request in a transmission process, so that the CDN server can normally read information in the dotting request, and at present, a commonly used authentication method may include: in practical applications, a person skilled in the art can select a reasonable authentication method according to actual needs, and the present invention is not limited thereto.
And after the authentication of the client dotting request by the authentication server passes, sending a result of passing the authentication of the client dotting request to the CDN server closest to the client.
Preferably, the sub-step a11 may include:
substep A111: and after receiving an HTTPS (hypertext transfer protocol secure) dotting request which is initiated by the client and corresponds to the access request, the content distribution network server forwards the authentication information in the HTTPS dotting request to an authentication server.
In this embodiment of the present invention, the dotting request corresponding to the access request may include: HTTPS (hypertext Transfer Protocol over Secure Socket layer) dotting request, which can be used for compressing and decompressing data, provides an information security channel, ensures data transmission security, and can also confirm authenticity of a client corresponding to an access request.
The HTTPS dotting request requires a client to perform a handshake with the CDN server to establish cryptographic information for both sides to encrypt and transmit data before transmission from the client to the CDN server.
After the CDN server closest to the client receives the HTTPS dotting request corresponding to the client access request, the authentication information in the HTTPS dotting request may be forwarded to the authentication server to perform authentication of the identity information for the HTTPS dotting request.
Preferably, the sub-step a111 may include:
sub-step A1111: and after receiving the HTTPS dotting request initiated by the client, the content distribution network server forwards the client certificate in the HTTPS dotting request and the data encrypted by the public key to an identity authentication server.
In the embodiment of the present invention, the HTTPS dotting request may include: the client certificate and the data encrypted by the public key can be used for verifying the authenticity of the client, and the data encrypted by the public key aims to ensure the safety of the HTTPS dotting request in the transmission process.
In practical application, after the client sends the HTTPS request to the CDN server, the CDN server forwards a new HTTPS request generated by an encryption portion thereof to the authentication server, and the authentication server performs encryption on the encryption portion of the new HTTPS request.
Correspondingly, the specific process of the handshake between the client and the third-party CDN server may include the following steps:
step S1: the client sends a connection request to the CDN server; the connection request includes information such as a client certificate;
step S2: the CDN server forwards information such as certificates in the connection request to the identity authentication server;
step S3: the identity authentication server authenticates information such as a client certificate; and if the authentication is passed, returning the identity information of the authentication server to the CDN server in the form of a certificate, wherein the certificate can comprise: website addresses, encrypted public keys, and issuing authorities for certificates, etc.; if the verification fails, returning the information of the verification failure;
step S4: if the CDN server receives the information of the verification failure, the connection of the client side is refused; if the CDN server receives information such as the certificate and the like, returning the certificate to the client; then the CDN server establishes a Secure channel, i.e., an SSL (Secure Sockets Layer) protocol channel, with the client;
step S5: after receiving a certificate sent by a CDN server, a client verifies the legality of the certificate, when the certificate is legal, the client generates a string of random number passwords and encrypts information in an HTTPS (hypertext transfer protocol secure protocol) dotting request and the client certificate by using an encryption public key in the certificate;
step S6: the client sends the encrypted HTTPS dotting request to the CDN server;
step S7: the CDN server generates a new HTTPS request by the client certificate in the received encrypted HTTPS dotting request and data encrypted by the public key and forwards the new HTTPS request to the identity authentication server;
step S8; and the identity authentication server extracts a client certificate and data encrypted by a public key from a new HTTPS request sent by the CDN for authentication, and then returns an authentication result to the CDN server.
For example, referring to fig. 1A, an authentication server in the figure is an authentication server in the embodiment of the present invention, the authentication server receives a client certificate and data encrypted by a public key in an encrypted HTTPS dotting request sent by a CDN server, and verifies the validity of the client certificate, and when the client certificate is legal, decrypts the data encrypted by the public key.
Sub-step A112: the identity authentication server authenticates identity authentication information in the HTTPS dotting request; and if the verification is passed, informing the HTTPS of the verification passing of the point-making request to the content distribution server.
And when the authentication information in the HTTPS dotting request passes the authentication, the authentication server informs the CDN server that the authentication of the HTTPS dotting request passes, otherwise, informs the CDN server that the authentication of the HTTPS dotting request does not pass.
Preferably, the sub-step a112 may include:
sub-step a 1121: and the identity authentication server judges whether the client certificate is legal or not and whether the data encrypted by the public key can be decrypted or not according to the locally stored server certificate and the private key in the certificate.
In the embodiment of the invention, after the authentication server receives the authentication information of the HTTPS dotting request sent by the CDN server, the legitimacy of the client certificate in the authentication information can be verified according to the server certificate stored in the authentication server, and whether the data encrypted by the public key in the authentication information can be decrypted according to the private key in the server certificate for verification.
And after the authentication information in the HTTPS dotting request is authenticated by the authentication server, returning an authentication result to the CDN server.
Substep A113: and if the content distribution server receives a result of passing the verification returned by the identity verification server, extracting a dotting IP address corresponding to the access request from the dotting request and sending the dotting IP address to the advertisement server.
After the CDN server receives the result of passing the authentication corresponding to the dotting request returned by the authentication server, the CDN server may perform domain name resolution on the client corresponding to the dotting request according to the local DNS server to obtain a dotting IP address of the client, where the dotting IP address of the client is the dotting IP address corresponding to the client access request, and send the dotting IP address of the client access request to the advertisement server for statistics.
Step S130: and performing matching calculation on the dotting IP address and the first IP address, and correcting the real IP address of the access request.
In the embodiment of the present invention, after receiving the dotting IP address and the first IP address corresponding to the client access request, the advertisement server may use a certain calculation method to determine whether the client access request is relayed or not, and if so, perform corresponding correction, as shown in fig. 1A, the advertisement server may be provided with corresponding correction service to determine whether the first IP address corresponding to the client access request is the real IP address of the client access request or not. For example, each first IP address corresponding to the client access request is compared with each dotting IP address to determine whether each dotting IP address is the same as each first IP address, if so, the client access request is not relayed, and if not, the access request is relayed, and the first IP address corresponding to the client access request stored in the web server is correspondingly corrected.
The specific matching calculation method will be described in detail in embodiment two, and will not be described in detail here.
In the embodiment of the invention, the real IP address corresponding to the client access request can be obtained after the obtained IP address corresponding to the client access request is correspondingly corrected, so that the problem of the IP address stored in the server after the client access request is changed is solved, and the server can obtain the IP address which is more matched with the area where the client is located.
Preferably, after the step S130, the method may further include:
step S140: and aiming at the access request with the corrected real IP address, retrieving and/or delivering network advertisement data based on the real IP address according to the real IP address.
In the embodiment of the invention, after the real IP address corresponding to the client access request is corrected in the advertisement server, the web server can retrieve the network advertisement data issued in the advertisement system based on the real IP address and deliver the network advertisement data based on the real IP address to the client corresponding to the real IP address.
Correspondingly, after the real IP address corresponding to the client access request is corrected in the advertisement server, corresponding fees can be deducted according to the account of the publisher issuing the network advertisement corresponding to the client access request in the advertisement system, and the charging standards of the network advertisements corresponding to different regions are different. For example, when a user in a certain region a accesses a network advertisement delivered by an advertisement deliverer a in the region a, a corresponding fee is incurred for the advertisement deliverer a of the network advertisement, the fee for the access is deducted from an advertisement account of the advertisement deliverer a, and a user in another region does not incur a fee after accessing the network advertisement delivered by the advertisement deliverer a in the region a. For example, when the advertisement publisher a launches the network advertisement a for the user in beijing, and the user in shanghai visits the network advertisement a launched in beijing, the fee deduction cannot be made for the advertisement publisher a of the network advertisement, that is, the fee for the visit cannot be deducted from the advertisement account of the advertisement publisher a.
The embodiment of the invention corrects the first IP address corresponding to the access request into the real IP address, and then can deduct the fee from the advertisement account of the advertisement releaser by using the real IP address for the corresponding access request according to the real IP address. For example, if the real IP address of an access request is shanghai and the access request accesses the network advertisement delivered by advertiser a in beijing, the advertisement server does not deduct the cost of advertisement delivery from the advertisement account of advertiser a for the access. Therefore, the method can avoid the error fee deduction to the advertisement placer of the network advertisement and reduce the cost loss of the network advertisement placer.
Preferably, after the step S130, the method may further include:
step S150: and recommending personalized information corresponding to the real IP address according to the real IP address aiming at the access request with the real IP address corrected.
In the embodiment of the present invention, after the real IP address corresponding to the access request is corrected, the network information published in the region where the client is located may be recommended to the client corresponding to the real IP address, for example, the region where the client corresponding to the real IP address of the access request is located is shanghai, the network advertisement published in shanghai may be recommended to the client, and the like. And then can maximize utilization network information resource, improve the popularization of network information. Of course, the personalized information may also include information related to the region to which the real IP address belongs, such as news information, rental house information, and the like of the region.
The embodiment of the invention obtains the first IP address of the client-side access request sent by the client-side to the server and the dotting IP address of the content distribution network server closest to the client-side access request, and performs matching calculation on the dotting IP address of the client-side access request and the first IP address, so that the obtained first IP address can be corrected, the corrected IP address can be more in line with the region where the client-side initiating the access request is located, the probability of false fee deduction is reduced, and the cost loss of an advertisement publisher is reduced.
Example two
Referring to fig. 2, a flowchart illustrating steps of an embodiment of an IP address correction method according to an embodiment of the present invention is shown, which may specifically include the following steps:
step S210: acquiring a first IP address and a global identification from a received access request and recording; the global identification is written into the access request by the client when the access request is sent.
In the embodiment of the invention, the global identifier can be a unique identifier for identifying the client access request in the whole process of sending the client access request, different clients have different global identifiers, the global identifier is associated and bound with the client access request in the whole process of sending the access request by the client to obtain data corresponding to the access request, the global identifier and an IP address corresponding to the client access request can be correspondingly stored when the access request of the client is obtained, and the first IP address corresponding to the client access request of the access request can be directly found according to the global identifier when the IP address corresponding to the client access request is judged in the future.
The global identification is written into the access request before the access request is sent to the client, and then the access request is sent to the web server together with the access request.
In practical applications, the global identifier is the global identifier assigned to the user when the user accesses the web server for the first time. For example, when a user accesses a web server with his user ID, the web server assigns a unique global identity to the user. Of course, if the user accesses the web server in the form of a guest, the device information of the client of the user, such as hardware information such as a physical address, etc., may be obtained, and the hardware information is unique, and then the web server assigns a unique global identifier to the device information.
Step S220: and acquiring and recording a dotting IP address and a global identification of the access request through a content distribution network server closest to a client initiating the access request.
In the embodiment of the invention, when the web server receives the client access request, the web server can issue the dotting notification to the client according to the first IP address corresponding to the client access request so as to notify the client to dotte on the CDN server closest to the client. A DNS server local to a client may locate an access request of the client to a CDN server closest to the client, where the client dotting request may include: and the global identifier is written into the dotting request before the client sends the dotting request to the CDN server, and is sent to the CDN server together with the dotting request.
The CDN server performs dotting on the CDN server according to a dotting request of the client, and acquires an IP address of a client access request corresponding to the dotting request, wherein the IP address is the dotting IP address corresponding to the client access request. Correspondingly, the CDN server may bind the global identifier corresponding to the client and the dotting IP address corresponding to the client access request, and send the binding to the dotting collection server, and the dotting collection server may send the collected dotting IP address corresponding to the client access request to the advertisement server for statistics and recording.
Therefore, when the global identifier corresponding to a certain client is obtained, the dotting IP addresses corresponding to all the access requests of the client can be obtained.
Step S230: and searching each dotting IP address and each first IP address under the same global identification.
In the embodiment of the invention, the advertisement server can search and acquire each dotting IP address and each first IP address corresponding to the client access request under the same global identifier when acquiring the global identifier corresponding to the client access request according to the binding relationship between the global identifier and the client access request.
Step S240: and performing matching calculation on the dotting IP address and the first IP address, and judging whether the access request corresponding to the first IP address is transferred.
After acquiring each dotting IP address and each first IP address corresponding to the client access request under the same global identifier, the advertisement server calculates the dotting IP address and the first IP address corresponding to the client access request according to a preset calculation mode to judge whether the access request corresponding to the first IP address is transferred, and when the access request corresponding to the first IP address is transferred, step S250 is executed.
Preferably, the step S240 may include:
substep S2402: judging whether each first IP address under the global identification is the same as each dotting IP address or not, and if the first IP addresses under all the identifications are not the same as the dotting IP addresses, executing a substep S2404;
substep S2404: and determining that the access request corresponding to the first IP address is transferred.
The embodiment of the invention can be applied to the situation of judging whether all the access requests corresponding to the clients are transferred.
The first IP addresses and the dotting IP addresses corresponding to the access requests of the clients are obtained according to the global identifier corresponding to the access requests of the clients, and then the first IP addresses and the dotting IP addresses corresponding to the access requests of a certain client are correspondingly matched according to the global identifier. Further judging whether the matched first IP addresses are the same as the dotting IP addresses or not, and determining that the access requests of the client corresponding to the first IP addresses are transferred when the matched first IP addresses are not the same as the dotting IP addresses; and when the matched first IP addresses are the same as the dotting IP addresses, determining that the access request of the client corresponding to the first IP addresses is not transferred. For example, for an access request of a certain client a, the first IP addresses corresponding to the access requests of the client a obtained are IP2 and IP3, and the dotting IP address corresponding to the access request of the client a has 2 IP1, which indicates that the access request of the client a is relayed, otherwise indicates that the access request of the client a is not relayed. For another example, if the first IP address of 10 access requests corresponding to the client a has 10 respective IPs 2 and the dotting IP address has 10 IPs 1, the dotting IP address is different from the first IP address, and the relay of the 10 access requests is confirmed.
Certainly, in practical application, whether the dotting IP address and the first IP address belong to the same region or not can be judged, and if the dotting IP address and the first IP address belong to the same region, it can be considered that the access request of the first IP address is not relayed; if the access requests do not belong to the same region, the access requests of the first IP address can be considered to be relayed.
According to the embodiment of the invention, the one-to-one matching judgment is carried out according to whether the first IP addresses corresponding to the client access requests are the same as the dotting IP addresses, so that whether the client access requests are transferred is judged, and the first IP addresses of inaccurate corresponding client access requests in the web server can be avoided as much as possible.
Preferably, the step S240 may further include:
substep S2406: judging whether each first IP address under the global identification is partially different from each dotting IP address or not; if the first IP addresses under the global identification are different from the dotting IP addresses, executing a substep S2406;
substep S2408: and determining that the access request corresponding to the part of the first IP address different from each dotting IP address is relayed.
The embodiment of the invention can be applied to correspondingly judging whether part of the access requests of the corresponding clients are transferred.
After acquiring each first IP address and each dotting IP address corresponding to each client access request, the embodiment of the invention respectively matches each first IP address and each dotting IP address corresponding to different client access requests one by one according to the global identification corresponding to each client access request, compares the dotting IP address successfully matched with the first IP address to judge whether the first IP address and the dotting IP address corresponding to each client access request are the same, if so, indicates that part or all of the client access requests are not transferred, and if not, indicates that the client access requests are transferred. And according to the matching judgment mode, respectively matching and judging the dotting IP addresses and the first IP addresses corresponding to the access requests of the clients one by one so as to judge whether partial transfer of the access requests occurs. For example, the global identifiers corresponding to the access request of the client a are respectively: m and N, the first IP addresses which can obtain the access request of the corresponding client A according to M are IP1, IP2 and IP1, and dotting IP addresses IP1, IP1 and IP 1; comparing the first IP address corresponding to the access request of the client a with the dotting IP address, it can be known that the first IP address is a relay of the access request of the client a corresponding to the IP 2.
Correspondingly, for the condition that whether the access requests of the clients are transferred or not, the first IP address corresponding to the access request of each client and each dotting IP address can be matched and compared one by one according to the global identifier corresponding to the access request of each client in the above manner, so as to determine how many access requests of each client are transferred.
It can be understood that, when the number of the first IP addresses corresponding to the client access requests stored in the advertisement server is large, the method may be adopted to match the first IP addresses corresponding to the access requests with the dotting IP addresses one by one, so as to determine the number of the access requests that have a transfer in a certain client access request, and further correct the inaccurate IP addresses stored in the advertisement server, so as to reduce the number of the inaccurate IP addresses stored in the advertisement server.
According to the embodiment of the invention, according to the global identification of each client access request, the first IP addresses corresponding to each client access request are matched and judged with the dotting IP addresses, so that whether the transfer of part of the access requests occurs is determined, and the first IP address corresponding to a certain client access request can be verified in a matched manner, so that a large amount of verification time can be saved.
Step S250: and correcting the real IP address of the access request according to the dotting IP address.
When it is determined that the IP address corresponding to the access request is relayed, the first IP address corresponding to the access request stored in the web server may be replaced with the dotting IP address corresponding to the access request, that is, the correction of the IP address where the access request occurs is completed.
Preferably, in case of substep S2402-substep S2404, the step S250 may include:
substep S2502: judging whether the number of the same dotting IP addresses in all the dotting IP addresses exceeds a threshold value or not; if the number of the same dotting IP addresses in all the dotting IP addresses exceeds a threshold value, executing a substep S2504;
substep S2504: and taking the dotted IP address exceeding the threshold value as the real IP address of the access request.
The embodiment of the invention can be used for judging the same dotting IP address corresponding to a plurality of access requests of a certain client.
In the process that a client access request is sent to a CDN server closest to the client, a phenomenon of client access request transfer may occur, which may cause a change in a dotting IP address of the access request, and further, the dotting IP addresses obtained by the CDN server closest to the client corresponding to the access request of the same client may be different. For example, when an access request is sent to a client a, the real IP address corresponding to the access request of the client is IP-1, and IP-1 and IP-2 may occur when a hit IP address corresponding to the access request of the client is obtained at a CDN server closest to the client.
In the embodiment of the invention, the dotting IP addresses corresponding to the access requests of the same client are the same dotting IP addresses, under the condition that the dotting IP addresses of the access requests corresponding to the client are different, the embodiment of the invention judges whether the number of the same IP addresses corresponding to the access requests of the client exceeds the preset threshold value by presetting the threshold value, and when one IP address exceeds the threshold value, the IP address is taken as the real IP address corresponding to the access request. In the embodiment of the invention, the dotting IP addresses are correspondingly counted according to the number of the first IP addresses. For example, the preset threshold is 80% of the total number of dotted IP addresses. As in the previous example, the web server obtains 200 IP-N IP addresses, and dotting the IP addresses as: there are 180 IP-1, 15 IP-2 and 5 IP-3. The advertisement server determines that 200 corresponding access requests are all relayed according to substeps S2402-S2404, and calculates that IP-1 occupies 90% of the same dotting IP address according to the dotting IP address, and then the IP-1 can be used as a real IP address corresponding to the client access request.
Accordingly, in practical applications, a person skilled in the art can set the threshold value according to actual needs, and the present invention is not limited to this.
And when the same dotting IP addresses corresponding to the client access requests are calculated to be different, using the dotting IP addresses exceeding the threshold value in the same dotting IP addresses as the real IP addresses of the client access requests.
According to the method and the device for obtaining the dotting IP address, the same dotting IP address for obtaining the corresponding client access request is judged, so that the dotting IP address for obtaining the corresponding client access request is accurate, and the number of inaccurate dotting IP addresses stored by a system is reduced.
Preferably, in the case of sub-step S2406 to sub-step S2408, the step S250 may further include:
substep S2506: and correcting the real IP address of the access request to be the IP address of the same part of the first IP address as each dotting IP address aiming at the access request corresponding to the part of the first IP address different from each dotting IP address.
The embodiment of the invention can be used for the condition of sending the access request aiming at a certain client. After acquiring each first IP address corresponding to the client access request, comparing and judging each first IP address with each dotting IP address corresponding to the client access request, wherein each dotting IP address is the same, the first IP address which is the same as each dotting IP address in each first IP address is the real IP address corresponding to the client access request, and the part of the first IP address which is different from each dotting IP address is corrected into the IP address which is the same as each dotting IP address in the first IP address, namely the inaccurate IP address of the access request is corrected.
For example, the web server receives 200 access requests, corresponding to 100 IP-1 and 100 IP-N in the first IP address. And the dotting IP addresses obtained from the dotting collection server have 200 IP-1, then the advertisement server determines that 100 access requests of IP-N are relayed according to substep S2406-substep S2408, and then corrects the first IP address of the 100 access requests to IP-1.
The embodiment of the invention obtains the first IP address corresponding to the client access request and the dotting IP address corresponding to the client access request of the content distribution network server nearest to the client, performs matching calculation on the dotting IP address corresponding to the client access request and the first IP address, and designs a series of matching calculation methods, so that the inaccurate IP address can be corrected to a large extent, the real IP address corresponding to the access request is corrected, the obtained first IP address can be corrected, the corrected IP address can be more in line with the region where the client initiating the access request is located, the probability of mistaken fee deduction is reduced, and the cost loss of an advertiser is reduced.
For simplicity of explanation, the method embodiments are described as a series of acts or combinations, but those skilled in the art will appreciate that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently with other steps in accordance with the embodiments of the invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
EXAMPLE III
Referring to fig. 3, a block diagram of an embodiment of an IP address correction apparatus according to an embodiment of the present invention is shown, which may specifically include the following modules:
a first IP address obtaining module 310, adapted to obtain a first IP address corresponding to an access request sent by a client when the client accesses a server; the first IP address is obtained by the access request over a normal routing path.
A dotting IP address obtaining module 320 adapted to obtain a dotting IP address through a content distribution network server closest to a client initiating the access request; and the dotting IP address is obtained by sending a dotting request to a content distribution network server by the client according to the access request.
And the real IP address correction module 330 is adapted to perform matching calculation on the dotting IP address and the first IP address to correct the real IP address of the access request.
Preferably, after the real IP address modification module 330, the method further includes:
and the retrieval and delivery module 340 is suitable for retrieving and/or delivering the network advertisement data based on the real IP address according to the real IP address aiming at the access request with the corrected real IP address.
Preferably, after the real IP address modification module 330, the method further includes:
and the personalized information recommending module 350 is adapted to recommend personalized information corresponding to the real IP address according to the real IP address for the access request with the real IP address corrected.
Example four
Referring to fig. 4, a block diagram of an embodiment of an IP address correction apparatus according to an embodiment of the present invention is shown, which may specifically include the following modules:
a first IP address obtaining module 410, adapted to obtain a first IP address corresponding to an access request sent by a client when the client accesses a server; the first IP address is obtained by the access request over a normal routing path.
Preferably, the first IP address obtaining module 410 includes:
a first IP address obtaining sub-module 4102, adapted to obtain and record a first IP address and a global identifier from the received access request; the global identification is written into the access request by the client when the access request is sent.
A dotting IP address obtaining module 420 adapted to obtain a dotting IP address through a content distribution network server closest to a client initiating the access request; and the dotting IP address is obtained by sending a dotting request to a content distribution network server by the client according to the access request.
Preferably, the dotting IP address obtaining module 420 includes:
a dotting IP address obtaining sub-module 4202, adapted to obtain and record the dotting IP address and the global identifier of the access request through the content distribution network server closest to the client initiating the access request.
And a real IP address correction module 430, adapted to perform matching calculation on the dotting IP address and the first IP address, and correct the real IP address of the access request.
Preferably, the real IP address modification module 430 includes:
the IP address searching submodule 4302 is suitable for searching each dotting IP address and each first IP address under the same global identification;
the access request transfer judgment sub-module 4304 is adapted to perform matching calculation on the dotting IP address and the first IP address, and judge whether the access request corresponding to the first IP address is transferred;
and the real IP address correction submodule 4306 is adapted to correct the real IP address of the access request according to the dotting IP address when the access request corresponding to the first IP address is forwarded.
Preferably, the access request judgment sub-module 4304 includes:
a first IP address and dotting IP address determining submodule 43042 adapted to determine whether each first IP address under the global identifier is the same as each dotting IP address;
and the access request transfer sub-module 43044 is adapted to determine that the access request corresponding to the first IP address is transferred when each first IP address under the global identifier is different from each dotting IP address.
The real IP address correction submodule 4306 includes:
a dotting IP address number judgment sub-module 43062 adapted to judge whether the number of the same dotting IP address exceeds a threshold value in each dotting IP address;
and the real IP address replacing submodule 43064 is adapted to, when the number of the same dotting IP addresses in each dotting IP address exceeds the threshold, use the dotting IP addresses exceeding the threshold as the real IP addresses of the access request.
Preferably, the access request transfer judgment sub-module 4304 includes:
a partial first IP address and dotting IP address judgment sub-module 43046 adapted to judge whether each first IP address under the global identifier is partially different from each dotting IP address;
the partial access request relay module 43048 is adapted to determine that an access request corresponding to a portion of the first IP address different from each dotting IP address is relayed when each first IP address under the global identifier is different from each dotting IP address.
Preferably, the real IP address modification sub-module 4306 includes:
and the partial real IP address correction submodule 43066 is adapted to correct, for the access request corresponding to the portion of the first IP address different from each dotting IP address, the real IP address of the access request to be the IP address of the same portion of the first IP address as each dotting IP address.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
EXAMPLE five
Referring to fig. 5, a block diagram of an embodiment of an IP address modification apparatus 500 according to an embodiment of the present invention is shown, which may specifically include:
a memory 510 loaded with a plurality of executable instructions;
a processor 520 that executes the plurality of executable instructions; the plurality of instructions includes a method of performing the steps of:
when a client accesses a server, acquiring a first IP address corresponding to an access request sent by the client; the first IP address is obtained by an access request through a normal routing path;
acquiring a dotting IP address through a content distribution network server closest to a client initiating the access request; the dotting IP address is obtained by the client sending a dotting request to a content distribution network server according to the access request;
and performing matching calculation on the dotting IP address and the first IP address, and correcting the real IP address of the access request.
Preferably, the executable instructions of the embodiments of the present invention may further include methods of the foregoing steps, which are not limited by the embodiments of the present invention.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in an IP address correction apparatus according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.

Claims (17)

1.一种IP地址修正方法,包括:1. A method for correcting an IP address, comprising: 在一客户端访问服务器时,获取对应由所述客户端发送的访问请求的第一IP地址和全局标识;所述第一IP地址由访问请求通过正常路由路径获得,所述全局标识为所述客户端第一次访问所述服务器时,所述服务器为所述客户端分配得到的,所述全局标识为所述客户端访问请求发送的整个过程中标识所述客户端的访问请求的唯一标识,不同的客户端对应不同的全局标识;When a client accesses the server, obtain the first IP address and the global identifier corresponding to the access request sent by the client; the first IP address is obtained by the access request through a normal routing path, and the global identifier is the When the client accesses the server for the first time, the server is assigned to the client, and the global identifier is the unique identifier that identifies the client's access request during the entire process of sending the client's access request, Different clients correspond to different global identifiers; 通过与所述客户端距离最近的内容分发网络服务器,获取打点IP地址和所述全局标识;所述打点IP地址由所述客户端根据所述访问请求向所述内容分发网络服务器发送打点请求获得,所述打点IP地址为所述打点请求对应的所述访问请求的IP地址;Obtain the dosing IP address and the global identifier through the content distribution network server closest to the client; the dosing IP address is obtained by the client sending a dosing request to the content distribution network server according to the access request , the management IP address is the IP address of the access request corresponding to the management request; 对所述打点IP地址和所述第一IP地址进行匹配计算,修正所述访问请求的真实IP地址;Matching calculation is carried out to the dotting IP address and the first IP address, and the real IP address of the access request is revised; 其中,所述对所述打点IP地址和所述第一IP地址进行匹配计算,修正所述访问请求的真实IP地址,包括:Wherein, the matching calculation is performed on the dotting IP address and the first IP address, and the real IP address of the access request is corrected, including: 查找同一全局标识下的各打点IP地址和各第一IP地址;Find each IP address and each first IP address under the same global identifier; 对所述打点IP地址和第一IP地址进行匹配计算,判断第一IP地址对应的访问请求是否发生中转;Matching calculation is carried out to the dotting IP address and the first IP address, and it is judged whether the access request corresponding to the first IP address is transferred; 如果所述第一IP地址对应的访问请求发生中转,则根据打点IP地址,修正所述访问请求的真实IP地址。If the access request corresponding to the first IP address is transited, the real IP address of the access request is corrected according to the dotted IP address. 2.根据权利要求1所述的方法,其特征在于,所述在一客户端访问服务器时,获取对应由所述客户端发送的访问请求的第一IP地址的步骤包括:2. The method according to claim 1, wherein when a client accesses the server, the step of acquiring the first IP address corresponding to the access request sent by the client comprises: 从接收到的访问请求中,获取第一IP地址和所述全局标识并进行记录;所述全局标识由客户端在发送访问请求时写入所述访问请求中。From the received access request, the first IP address and the global identifier are obtained and recorded; the global identifier is written into the access request by the client when sending the access request. 3.根据权利要求1所述的方法,其特征在于,所述对所述打点IP地址和第一IP地址进行匹配计算,判断第一IP地址对应的访问请求是否发生中转的步骤,包括:3. method according to claim 1, is characterized in that, the described management IP address and the first IP address are matched and calculated, and the step of judging whether the corresponding access request of the first IP address is transferred, comprises: 判断所述全局标识下的各第一IP地址与各打点IP地址是否相同;Judging whether each first IP address under the global identifier is the same as each dotting IP address; 如果所述全局标识下的各第一IP地址与各打点IP地址不相同,则确定第一IP地址对应的访问请求发生中转。If each first IP address under the global identifier is different from each dotting IP address, it is determined that the access request corresponding to the first IP address is transferred. 4.根据权利要求3所述的方法,其特征在于,所述根据打点IP地址,修正所述访问请求的真实IP地址的步骤,包括:4. method according to claim 3, is characterized in that, described according to dotting IP address, the step of revising the real IP address of described access request, comprises: 判断各打点IP地址中,同一种打点IP地址的个数是否超过阈值;Judging whether the number of IP addresses of the same type of dotting IP address exceeds the threshold; 如果各打点IP地址中,同一种打点IP地址的个数超过阈值,则以超过阈值的打点IP地址作为所述访问请求的真实IP地址。If the number of the same dotting IP addresses in each dotting IP address exceeds the threshold, the dotting IP address exceeding the threshold is used as the real IP address of the access request. 5.根据权利要求1所述的方法,其特征在于,所述对所述打点IP地址和第一IP地址进行匹配计算,判断第一IP地址对应的访问请求是否发生中转的步骤,包括:5. method according to claim 1, is characterized in that, the described management IP address and the first IP address are matched and calculated, and the step of judging whether the corresponding access request of the first IP address is transferred, comprises: 判断所述全局标识下的各第一IP地址与各打点IP地址是否部分不同;Judging whether each first IP address under the global identifier is partially different from each dotting IP address; 如果所述全局标识下的各第一IP地址与各打点IP地址部分不同,则确定第一IP地址中与各打点IP地址不同的部分所对应的访问请求发生中转。If each first IP address under the global identifier is partially different from each dotting IP address, it is determined that the access request corresponding to the part of the first IP address that is different from each dotting IP address is transferred. 6.根据权利要求5所述的方法,其特征在于,所述根据打点IP地址,修正所述访问请求的真实IP地址的步骤,包括:6. method according to claim 5, is characterized in that, described according to dotting IP address, the step of revising the real IP address of described access request, comprises: 针对第一IP地址中与各打点IP地址不同的部分所对应的访问请求,修正所述访问请求的真实IP地址为第一IP地址中与各打点IP地址相同部分的IP地址。For the access request corresponding to the part of the first IP address that is different from the IP addresses of each dotting, modify the real IP address of the access request to be the IP address of the same part of the first IP address and the IP addresses of each dotting. 7.根据权利要求1所述的方法,其特征在于,在所述对所述打点IP和所述第一IP地址进行匹配计算,修正所述访问请求的真实IP地址的步骤之后,还包括:7. method according to claim 1, is characterized in that, after described doing matching calculation to described dotting IP and described first IP address, after the step of revising the real IP address of described access request, also comprises: 针对修正了真实IP地址后的访问请求,根据真实IP地址,检索和/或者投放基于真实IP地址的网络广告数据。For the access request after correcting the real IP address, according to the real IP address, retrieve and/or deliver the network advertisement data based on the real IP address. 8.根据权利要求1所述的方法,其特征在于,在所述对所述打点IP和所述第一IP地址进行匹配计算,修正所述访问请求的真实IP地址的步骤之后,还包括:8. method according to claim 1, is characterized in that, after described doing matching calculation to described dotting IP and described first IP address, after the step of revising the real IP address of described access request, also comprises: 针对修正了真实IP地址后的访问请求,根据真实IP地址,推荐与所述真实IP地址对应的个性化信息。For the access request after correcting the real IP address, according to the real IP address, personalized information corresponding to the real IP address is recommended. 9.一种IP地址修正装置,包括:9. An IP address correction device, comprising: 第一IP地址获取模块,适于在一客户端访问服务器时,获取对应由所述客户端发送的访问请求的第一IP地址和全局标识;所述第一IP地址由访问请求通过正常路由路径获得,所述全局标识为所述客户端第一次访问所述服务器时,所述服务器为所述客户端分配得到的,所述全局标识为所述客户端访问请求发送的整个过程中标识所述客户端的访问请求的唯一标识,不同的客户端对应不同的全局标识;The first IP address obtaining module is adapted to obtain the first IP address and the global identifier corresponding to the access request sent by the client when a client accesses the server; the first IP address is passed through the normal routing path by the access request Obtained, the global identifier is assigned by the server to the client when the client accesses the server for the first time, and the global identifier is the identifier in the entire process of sending the client access request. The unique identifier of the client's access request, different clients correspond to different global identifiers; 打点IP地址获取模块,适于通过与所述客户端距离最近的内容分发网络服务器,获取打点IP地址和全局标识;所述打点IP地址由所述客户端根据所述访问请求向所述内容分发网络服务器发送打点请求获得,所述打点IP地址为所述打点请求对应的所述访问请求的IP地址;Dot IP address acquisition module, suitable for obtaining Dot IP address and global identification through the content distribution network server closest to the client distance; described Dot IP address is distributed to the content by the client according to the access request The network server sends a management request to obtain, and the management IP address is the IP address of the access request corresponding to the management request; 真实IP地址修正模块,适于对所述打点IP地址和所述第一IP地址进行匹配计算,修正所述访问请求的真实IP地址;A real IP address correction module, adapted to perform matching calculation on the dotting IP address and the first IP address, and correct the real IP address of the access request; 其中,所述真实IP地址修正模块,包括:Wherein, the real IP address correction module includes: IP地址查找模块子模块,适于查找同一全局标识下的各打点IP地址和各第一IP地址;The IP address lookup module submodule is suitable for looking up each dotted IP address and each first IP address under the same global identifier; 访问请求中转判断子模块,适于对所述打点IP地址和第一IP地址进行匹配计算,判断第一IP地址对应的访问请求是否发生中转;An access request relay judgment submodule, adapted to perform matching calculation on the management IP address and the first IP address, and determine whether the access request corresponding to the first IP address is relayed; 真实IP地址修正子模块,适于如果所述第一IP地址对应的访问请求发生中转,则根据打点IP地址,修正所述访问请求的真实IP地址。The real IP address correction submodule is adapted to correct the real IP address of the access request according to the dotted IP address if the access request corresponding to the first IP address is transferred. 10.根据权利要求9所述的装置,其特征在于,所述第一IP地址获取模块包括:10. The device according to claim 9, wherein the first IP address acquisition module comprises: 第一IP地址获取子模块,适于从接收到的访问请求中,获取第一IP地址和全局标识并进行记录;所述全局标识由客户端在发送访问请求时写入所述访问请求中。The first IP address obtaining submodule is adapted to obtain and record the first IP address and the global identifier from the received access request; the global identifier is written into the access request by the client when sending the access request. 11.根据权利要求9所述的装置,其特征在于,所述访问请求判断子模块包括:11. The device according to claim 9, wherein the access request judgment submodule comprises: 第一IP地址与打点IP地址判断子模块,适于判断所述全局标识下的各第一IP地址与各打点IP地址是否相同;The first IP address and the dosing IP address judgment submodule is suitable for judging whether each first IP address under the global identification is identical with each dotting IP address; 访问请求中转子模块,适于在所述全局标识下的各第一IP地址与各打点IP地址不相同时,则确定第一IP地址对应的访问请求发生中转。The rotor module in the access request is adapted to determine that the access request corresponding to the first IP address is transited when each first IP address under the global identifier is different from each dotting IP address. 12.根据权利要求11所述的装置,其特征在于,所述真实IP地址修正子模块包括:12. The device according to claim 11, wherein the real IP address correction submodule comprises: 打点IP地址个数判断子模块,适于判断各打点IP地址中,同一种打点IP地址的个数是否超过阈值;The sub-module for judging the number of dosing IP addresses is suitable for judging whether the number of the same dotting IP addresses in each dotting IP address exceeds the threshold; 真实IP地址替换子模块,适于在各打点IP地址中,同一种打点IP地址的个数超过阈值时,以超过阈值的打点IP地址作为所述访问请求的真实IP地址。The real IP address replacement sub-module is suitable for taking the dotted IP address exceeding the threshold as the real IP address of the access request when the number of the dotted IP addresses of the same kind in each dotted IP address exceeds the threshold. 13.根据权利要求9所述的装置,其特征在于,所述访问请求中转判断子模块包括:13. The device according to claim 9, wherein the access request relay judgment submodule comprises: 部分第一IP地址与打点IP地址判断子模块,适于判断所述全局标识下的各第一IP地址与各打点IP地址是否部分不同;Part of the first IP address and the dotting IP address judgment submodule, suitable for judging whether each first IP address under the described global identification and each dotting IP address are partially different; 部分访问请求中转子模块,适于在所述全局标识下的各第一IP地址与各打点IP地址部分不同时,则确定第一IP地址中与各打点IP地址不同的部分所对应的访问请求发生中转。The rotor module in the partial access request is adapted to determine the access request corresponding to the part of the first IP address that is different from the part of the IP address in the first IP address when each first IP address under the global identification is partially different from each dotting IP address A transfer occurs. 14.根据权利要求13所述的装置,其特征在于,所述真实IP地址修正子模块包括:14. The apparatus according to claim 13, wherein the real IP address correction submodule comprises: 部分真实IP地址修正子模块,适于针对第一IP地址中与各打点IP地址不同的部分所对应的访问请求,修正所述访问请求的真实IP地址为第一IP地址中与各打点IP地址相同部分的IP地址。Part of the real IP address correction submodule, is suitable for the access request corresponding to the part different from each dotting IP address in the first IP address, and revising the real IP address of the access request is the first IP address and each dotting IP address. The same part of the IP address. 15.根据权利要求9所述的装置,其特征在于,在所述真实IP地址修正模块之后,还包括:15. The device according to claim 9, characterized in that, after the real IP address correction module, further comprising: 检索投放模块,适于针对修正了真实IP地址后的访问请求,根据真实IP地址,检索和/或者投放基于真实IP地址的网络广告数据。The retrieval and delivery module is suitable for retrieving and/or delivering online advertisement data based on the real IP address according to the real IP address for the access request after the real IP address is corrected. 16.根据权利要求9所述的装置,其特征在于,在所述真实IP地址修正模块之后,还包括:16. The device according to claim 9, characterized in that, after the real IP address correction module, further comprising: 个性化信息推荐模块,适于针对修正了真实IP地址后的访问请求,根据真实IP地址,推荐与所述真实IP地址对应的个性化信息。The personalized information recommendation module is suitable for recommending personalized information corresponding to the real IP address according to the real IP address for the access request after the real IP address is corrected. 17.一种IP地址修正设备,包括:17. An IP address correction device, comprising: 存储器,加载有多条可执行指令;memory, loaded with multiple executable instructions; 处理器,执行所述多条可执行指令;所述多条指令包括执行以下步骤的方法:The processor executes the multiple executable instructions; the multiple instructions include a method for performing the following steps: 在一客户端访问服务器时,获取对应由所述客户端发送的访问请求的第一IP地址和全局标识;所述第一IP地址由访问请求通过正常路由路径获得,所述全局标识为所述客户端第一次访问所述服务器时,所述服务器为所述客户端分配得到的,所述全局标识为所述客户端访问请求发送的整个过程中标识所述客户端的访问请求的唯一标识,不同的客户端对应不同的全局标识;When a client accesses the server, obtain the first IP address and the global identifier corresponding to the access request sent by the client; the first IP address is obtained by the access request through a normal routing path, and the global identifier is the When the client accesses the server for the first time, the server is assigned to the client, and the global identifier is the unique identifier that identifies the client's access request during the entire process of sending the client's access request, Different clients correspond to different global identifiers; 通过与所述客户端距离最近的内容分发网络服务器,获取打点IP地址和全局标识;所述打点IP地址由所述客户端根据所述访问请求向所述内容分发网络服务器发送打点请求获得,所述打点IP地址为所述打点请求对应的所述访问请求的IP地址;Obtain the dosing IP address and the global identifier through the content distribution network server closest to the client; the dosing IP address is obtained by the client sending a dotting request to the content distribution network server according to the access request, so The dosing IP address is the IP address of the access request corresponding to the dosing request; 对所述打点IP地址和所述第一IP地址进行匹配计算,修正所述访问请求的真实IP地址;Matching calculation is carried out to the dotting IP address and the first IP address, and the real IP address of the access request is revised; 其中,所述对所述打点IP地址和所述第一IP地址进行匹配计算,修正所述访问请求的真实IP地址,包括:Wherein, the matching calculation is performed on the dotting IP address and the first IP address, and the real IP address of the access request is corrected, including: 查找同一全局标识下的各打点IP地址和各第一IP地址;Find each IP address and each first IP address under the same global identifier; 对所述打点IP地址和第一IP地址进行匹配计算,判断第一IP地址对应的访问请求是否发生中转;Matching calculation is carried out to the dotting IP address and the first IP address, and it is judged whether the access request corresponding to the first IP address is transferred; 如果所述第一IP地址对应的访问请求发生中转,则根据打点IP地址,修正所述访问请求的真实IP地址。If the access request corresponding to the first IP address is transited, the real IP address of the access request is corrected according to the dotted IP address.
CN201510958936.XA 2015-12-17 2015-12-17 A kind of IP address correction method and device Active CN106899703B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510958936.XA CN106899703B (en) 2015-12-17 2015-12-17 A kind of IP address correction method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510958936.XA CN106899703B (en) 2015-12-17 2015-12-17 A kind of IP address correction method and device

Publications (2)

Publication Number Publication Date
CN106899703A CN106899703A (en) 2017-06-27
CN106899703B true CN106899703B (en) 2021-08-20

Family

ID=59189777

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510958936.XA Active CN106899703B (en) 2015-12-17 2015-12-17 A kind of IP address correction method and device

Country Status (1)

Country Link
CN (1) CN106899703B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110545335A (en) * 2018-05-29 2019-12-06 阿里巴巴集团控股有限公司 Internet protocol address acquisition method, server and system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102638483A (en) * 2011-02-15 2012-08-15 中国移动通信集团公司 Method, device and system for determining content distribution nodes

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7991910B2 (en) * 2008-11-17 2011-08-02 Amazon Technologies, Inc. Updating routing information based on client location
CN101567852B (en) * 2009-05-20 2011-08-24 中兴通讯股份有限公司 Method and device for switching the network address of IP message
CN102394944B (en) * 2011-09-16 2014-01-29 北京新媒传信科技有限公司 Method and equipment for correcting IP (Internet Protocol) address in Web access
CN102299969B (en) * 2011-09-16 2014-04-16 北京新媒传信科技有限公司 Web accessing method, layer seven switching equipment and service network
CN103167052B (en) * 2011-12-16 2015-08-19 北京思博途信息技术有限公司 A kind of method and system of Automatic Optimal IP regional information storehouse
CN103716282B (en) * 2012-09-28 2017-10-10 北京新媒传信科技有限公司 A kind of method and system in amendment IP storehouses
US9998354B2 (en) * 2013-09-24 2018-06-12 Netflix, Inc. Server selection for content distribution
CN104168341B (en) * 2014-08-15 2018-01-19 北京百度网讯科技有限公司 The localization method and CDN dispatching methods and device of IP address
CN104717304B (en) * 2015-03-31 2018-04-03 北京科技大学 A kind of CDN P2P content optimizations select system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102638483A (en) * 2011-02-15 2012-08-15 中国移动通信集团公司 Method, device and system for determining content distribution nodes

Also Published As

Publication number Publication date
CN106899703A (en) 2017-06-27

Similar Documents

Publication Publication Date Title
CN106899548B (en) A kind of IP address correction method and device
CN109242467B (en) Block chain-based networking method and device, computer equipment and storage medium
CN101771532B (en) Method, device and system for realizing resource sharing
US9166969B2 (en) Session certificates
CN111127013B (en) Block chain-based decentralization data transaction method, device, equipment and medium
CN109492424B (en) Data asset management method, data asset management device, and computer-readable medium
US9124571B1 (en) Network authentication method for secure user identity verification
US8595815B2 (en) System and method for selectively granting access to digital content
CN105577612B (en) Identity authentication method, third-party server, merchant server and user terminal
CN110995446B (en) Evidence verification method, device, server and storage medium
CN104640114B (en) A kind of verification method and device of access request
CN106657014B (en) Method, device and system for accessing data
US9843573B2 (en) Determining website secure certificate status via partner browser plugin
CN108259457B (en) WEB authentication method and device
CN108390878B (en) Method and device for verifying network request security
JP6178112B2 (en) Authentication server, authentication system and program
US20150149768A1 (en) System and method for automated customer verification
CN106899703B (en) A kind of IP address correction method and device
CN119814363B (en) User authentication methods, apparatus, and devices based on content delivery networks
CN106888200B (en) Identification association method, information sending method and device
US20080028207A1 (en) Method & system for selectively granting access to digital content
KR101259574B1 (en) System and Method of User and Device Integrated Authentication
CN110049067B (en) Transmission method and device of session key and computer-readable storage medium
KR102036813B1 (en) Method and system for processing welfare point based on blockchain
JP2011191995A (en) Download device and content sales system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240103

Address after: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.