CN103618810A - Method and device for identifying IP address of CDN source station - Google Patents
Method and device for identifying IP address of CDN source station Download PDFInfo
- Publication number
- CN103618810A CN103618810A CN201310632186.8A CN201310632186A CN103618810A CN 103618810 A CN103618810 A CN 103618810A CN 201310632186 A CN201310632186 A CN 201310632186A CN 103618810 A CN103618810 A CN 103618810A
- Authority
- CN
- China
- Prior art keywords
- address
- cdn
- source station
- dns
- domain name
- 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.)
- Granted
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
- Small-Scale Networks (AREA)
Abstract
本发明提供一种CDN源站的IP地址识别方法及装置,解决现有技术中无法获取CDN源站的IP地址的问题。该方法中针对CDN源站的域名,根据历史数据库列表中的各DNS历史数据库,确定各DNS历史数据库中是否存在与所述域名对应的IP地址,当存在与该域名对应的IP地址时,将该IP地址确定为CDN源站的IP地址。由于在本发明实施例中根据DNS历史数据库记录的历史数据,确定各DNS历史数据库中是否存在与CDN源站的域名对应的IP地址,从而确定CDN源站的IP地址,从而实现CDN源站IP地址的识别,为后期的CDN源站的保护提供便利。
The invention provides a method and device for identifying the IP address of a CDN source station, which solves the problem in the prior art that the IP address of the CDN source station cannot be obtained. In this method, for the domain name of the CDN source station, according to each DNS historical database in the historical database list, determine whether there is an IP address corresponding to the domain name in each DNS historical database, and when there is an IP address corresponding to the domain name, set The IP address is determined to be the IP address of the CDN origin site. Since in the embodiment of the present invention, according to the historical data recorded in the DNS historical database, it is determined whether there is an IP address corresponding to the domain name of the CDN source site in each DNS historical database, thereby determining the IP address of the CDN source site, thereby realizing the IP address of the CDN source site. The identification of the address provides convenience for the protection of the CDN source station in the later stage.
Description
技术领域technical field
本发明涉及网络安全技术领域,尤其涉及一种部署有CDN源站的IP地址识别方法及装置。The invention relates to the technical field of network security, in particular to an IP address identification method and device deployed with a CDN source station.
背景技术Background technique
内容分发网络(CDN)是一种新型网络内容服务体系,其基于IP网络而构建,基于内容访问与应用的效率要求和质量要求而提供内容的分发和服务。CDN代表了一种基于网络而构建的高质量、高效率的网络应用服务模式。部署有CDN的源站可以称为CDN源站。采用CDN模式可以不用担心用户,用户在任何时间,任何地点,通过任何网络运营商都能快速打开CDN源站。Content distribution network (CDN) is a new type of network content service system, which is built on the basis of IP network, and provides content distribution and service based on the efficiency and quality requirements of content access and application. CDN represents a high-quality, high-efficiency network application service model built on the basis of the network. An origin site deployed with a CDN may be called a CDN origin site. With the CDN mode, you don’t have to worry about users. Users can quickly open the CDN source station through any network operator at any time and any place.
图1为现有技术中用户、CDN及CDN源站的关联关系示意图,可以同时为CDN源站部署多个CDN,图1中为了简便只标识出了与用户进行交互的CDN。当用户访问CDN源站时,用户的访问请求发送到CDN,经过CDN处理后将该访问请求发送到CDN源站,CDN源站对该访问请求进行处理,处理后CDN源站将响应信息发送到CDN处理,CDN处理后将该响应信息返回给用户。由于用户和CDN源站之间的交互都需要通过CDN,因此对于用户而言,其只能获取经过CDN处理后的信息,而CDN处理后的信息中包含的都是CDN的信息。Figure 1 is a schematic diagram of the relationship among users, CDNs, and CDN origin sites in the prior art. Multiple CDNs can be deployed for CDN origin sites at the same time. For simplicity, only the CDNs that interact with users are identified in Figure 1 . When a user visits the CDN source site, the user's access request is sent to the CDN, and after being processed by the CDN, the access request is sent to the CDN source site, and the CDN source site processes the access request, and after processing, the CDN source site sends the response information to CDN processing, CDN returns the response information to the user after processing. Since the interaction between the user and the CDN source site needs to go through the CDN, the user can only obtain the information processed by the CDN, and the information processed by the CDN contains all the information of the CDN.
由于,用户访问CDN源站时,与CDN源站之间的信息经由CDN处理,而该信息中包含的都是CDN的信息,用户无法从该信息中获取CDN源站的IP地址。而在对CDN源站进行杀毒、防护等保护操作时,为了提高杀毒、防护等保护操作的准确性,需要根据CDN源站的IP地址进行。但现有技术中没有获取CDN源站的IP地址的方法,因此影响了对CDN源站的保护操作。Since, when a user visits the CDN source site, the information between the CDN source site and the CDN source site is processed through the CDN, and the information contains all CDN information, and the user cannot obtain the IP address of the CDN source site from this information. When antivirus and protection operations are performed on the CDN origin site, in order to improve the accuracy of the antivirus and protection operations, it is necessary to perform them according to the IP address of the CDN origin station. However, there is no method for obtaining the IP address of the CDN source station in the prior art, thus affecting the protection operation of the CDN source station.
发明内容Contents of the invention
本发明实施例提供一种CDN源站的IP地址识别方法及装置,解决现有技术中无法获取CDN源站的IP地址的问题。Embodiments of the present invention provide a method and device for identifying an IP address of a CDN source station, which solves the problem in the prior art that the IP address of the CDN source station cannot be obtained.
本发明实施例提供了一种CDN源站的IP地址识别方法,该方法包括:An embodiment of the present invention provides a method for identifying an IP address of a CDN source station, the method comprising:
获取部署有CDN的源站的域名;Obtain the domain name of the origin site where the CDN is deployed;
根据保存的历史数据库列表中的各DNS历史数据库,确定各DNS历史数据库中是否存在与所述域名对应的IP地址;According to each DNS historical database in the preserved historical database list, determine whether there is an IP address corresponding to the domain name in each DNS historical database;
若在DNS历史数据库中存在与该域名对应的IP地址,则将该IP地址确定为所述CDN源站的IP地址。If there is an IP address corresponding to the domain name in the DNS history database, the IP address is determined as the IP address of the CDN source site.
较佳地,在本发明实施例中为了准确的定位出CDN源站,提高该CDN源站的IP地址的识别效率,所述获取部署有CDN的源站的域名之前,还包括:Preferably, in the embodiment of the present invention, in order to accurately locate the CDN source site and improve the identification efficiency of the IP address of the CDN source site, before obtaining the domain name of the source site where the CDN is deployed, it also includes:
向源站发送请求信息;Send request information to the origin site;
判断源站返回的响应信息的消息头中是否携带CDN标识字段;Determine whether the header of the response information returned by the source site carries the CDN identification field;
若所述响应信息的消息头中携带CDN标识字段,则确定所述源站部署有CDN。If the message header of the response information carries a CDN identification field, it is determined that the source station is deployed with a CDN.
较佳地,在本发明实施例中为了提高确定的CDN源站的IP地址的准确性,所述将该IP地址确定为所述CDN源站的IP地址之前,还包括:Preferably, in order to improve the accuracy of the determined IP address of the CDN source station in the embodiment of the present invention, before determining the IP address as the IP address of the CDN source station, it further includes:
访问所述IP地址,获取该IP地址对应的网页内容;Accessing the IP address to obtain the web page content corresponding to the IP address;
判断该网页内容与通过CDN访问该源站对应的网页内容是否相同;Determine whether the content of the web page is the same as the content of the web page corresponding to the source site accessed through the CDN;
若不相同,则确定该IP地址非CDN源站的IP地址。If not, it is determined that the IP address is not the IP address of the CDN origin site.
较佳地,在本发明实施例中为了提高确定的CDN源站的IP地址的准确性,所述将该IP地址确定为所述CDN源站的IP地址之前,所述方法包括:Preferably, in order to improve the accuracy of the determined IP address of the CDN source station in the embodiment of the present invention, before the IP address is determined as the IP address of the CDN source station, the method includes:
向所述IP地址发送请求信息;Send request information to the IP address;
判断该IP地址返回的响应信息的消息头中是否携带CDN标识字段;Determine whether the message header of the response information returned by the IP address carries the CDN identification field;
若该响应信息的消息头中携带CDN标识字段,则确定该IP地址非CDN源站的IP地址。If the message header of the response information carries the CDN identification field, it is determined that the IP address is not the IP address of the CDN source station.
本发明实施例提供了一种CDN源站的IP地址识别装置,所述装置包括:An embodiment of the present invention provides a device for identifying an IP address of a CDN source station, the device comprising:
获取模块,用于获取部署有CDN的源站的域名;Obtaining module, used to obtain the domain name of the source station deployed with CDN;
判断模块,用于根据保存的历史数据库列表中的各DNS历史数据库,确定各DNS历史数据库中是否存在与所述域名对应的IP地址;A judging module, configured to determine whether there is an IP address corresponding to the domain name in each DNS historical database according to each DNS historical database in the saved historical database list;
识别模块,用于当判断模块在确定DNS历史数据库中存在与该域名对应的IP地址时,将该IP地址确定为CDN源站的IP地址。The identifying module is configured to determine the IP address as the IP address of the CDN source station when the judging module determines that the IP address corresponding to the domain name exists in the DNS history database.
较佳地,在本发明实施例中为了提高确定的CDN源站的IP地址的准确性,所述装置还包括:Preferably, in order to improve the accuracy of the determined IP address of the CDN source station in the embodiment of the present invention, the device further includes:
发送模块,用于向源站发送请求信息;A sending module, configured to send request information to the source station;
所述判断模块,用于判断源站返回的响应信息的消息头中是否携带CDN标识字段;The judging module is used to judge whether the message header of the response information returned by the source station carries a CDN identification field;
所述获取模块,具体用于当判断模块判断该响应信息的消息头中携带CDN标识字段时,确定为所述源站部署有CDN。The obtaining module is specifically configured to determine that the source station has deployed a CDN when the judging module judges that the message header of the response information carries a CDN identification field.
较佳地,在本发明实施例中为了提高确定的CDN源站的IP地址的准确性,访问获取模块,用于访问所述IP地址,获取该IP地址对应的网页内容;Preferably, in the embodiment of the present invention, in order to improve the accuracy of the determined IP address of the CDN source site, the access acquisition module is used to access the IP address and acquire the webpage content corresponding to the IP address;
所述判断模块,还用于判断该网页内容与通过CDN访问该源站对应的网页内容是否相同;The judging module is also used to judge whether the content of the web page is the same as the content of the web page corresponding to the source site accessed through the CDN;
所述识别模块,还用于当判断模块判断访问该IP地址的网页内容与通过CDN访问该源站对应的网页内容相同时,通知判断模块进行后续判断步骤,否则,确定该IP地址非CDN源站的IP地址。The identification module is also used to notify the judgment module to perform subsequent judgment steps when the judging module judges that the content of the webpage accessed by the IP address is the same as the content of the webpage corresponding to the source site through the CDN, otherwise, determine that the IP address is not a CDN source The IP address of the station.
较佳地,在本发明实施例中为了提高确定的CDN源站的IP地址的准确性,所述装置还包括:Preferably, in order to improve the accuracy of the determined IP address of the CDN source station in the embodiment of the present invention, the device further includes:
发送模块,用于向源站发送请求信息;A sending module, configured to send request information to the source station;
所述判断模块,还用于判断该IP地址返回的响应信息的消息头中是否携带CDN标识字段;The judging module is also used to judge whether the message header of the response information returned by the IP address carries a CDN identification field;
所述识别模块,还用于当判断模块判断该响应信息的消息头中携带CDN标识字段时,确定该IP地址非CDN源站的IP地址,否则,通知判断模块进行后续判断步骤。The identification module is also used to determine that the IP address is not the IP address of the CDN source station when the judging module judges that the message header of the response information carries a CDN identification field, otherwise, notify the judging module to perform subsequent judging steps.
本发明实施例提供了一种CDN源站的IP地址识别方法及装置,该方法中针对CDN源站的域名,根据历史数据库列表中的各DNS历史数据库,确定各DNS历史数据库中是否存在与所述域名对应的IP地址,当存在与该域名对应的IP地址时,将该IP地址确定为CDN源站的IP地址。由于在本发明实施例中根据DNS历史数据库记录的历史数据,确定各DNS历史数据库中是否存在与CDN源站的域名对应的IP地址,从而确定CDN源站的IP地址,从而实现CDN源站IP地址的识别,为后期的CDN源站的保护提供便利。Embodiments of the present invention provide a method and device for identifying an IP address of a CDN source site. In the method, for the domain name of the CDN source site, according to each DNS historical database in the historical database list, it is determined whether there is an IP address corresponding to the domain name in each DNS historical database. The IP address corresponding to the above domain name, if there is an IP address corresponding to the domain name, determine the IP address as the IP address of the CDN source station. Since in the embodiment of the present invention, according to the historical data recorded in the DNS historical database, it is determined whether there is an IP address corresponding to the domain name of the CDN source site in each DNS historical database, thereby determining the IP address of the CDN source site, thereby realizing the IP address of the CDN source site. The identification of the address provides convenience for the protection of the CDN source station in the later stage.
附图说明Description of drawings
图1为现有技术中用户、CDN及CDN源站的关联关系示意图;FIG. 1 is a schematic diagram of the relationship among users, CDNs and CDN origin stations in the prior art;
图2为本发明实施例提供的一种CDN源站的IP地址识别过程示意图;FIG. 2 is a schematic diagram of an IP address identification process of a CDN source station provided by an embodiment of the present invention;
图3为本发明实施例一提供的一种CDN源站的IP地址识别的详细过程示意图;FIG. 3 is a schematic diagram of a detailed process of identifying an IP address of a CDN source station provided by Embodiment 1 of the present invention;
图4为本发明实施例二提供的一种CDN源站的IP地址识别过程示意图;FIG. 4 is a schematic diagram of an IP address identification process of a CDN origin site provided by Embodiment 2 of the present invention;
图5为本发明实施例三提供的一种CDN源站的IP地址识别过程示意图;FIG. 5 is a schematic diagram of an IP address identification process of a CDN origin site provided by Embodiment 3 of the present invention;
图6为本发明实施例提供的一种CDN源站的IP地址识别装置结构示意图。FIG. 6 is a schematic structural diagram of an IP address identification device for a CDN origin site provided by an embodiment of the present invention.
具体实施方式Detailed ways
为了识别出CDN源站的IP地址,便于后期对CDN源站的保护,本发明实施例提供了一种CDN源站的IP地址识别方法及装置。In order to identify the IP address of the CDN source site and facilitate later protection of the CDN source site, the embodiments of the present invention provide a method and device for identifying the IP address of the CDN source site.
下面结合说明书附图,对本发明实施例进行详细说明。Embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings.
图2为本发明实施例提供的一种CDN源站的IP地址识别过程示意图,该过程包括以下步骤:Fig. 2 is a schematic diagram of an IP address identification process of a CDN source station provided by an embodiment of the present invention, and the process includes the following steps:
S201:获取部署有CDN的源站的域名。S201: Obtain the domain name of the origin site where the CDN is deployed.
针对CDN源站,可以通过搜索引擎确定CDN源站的域名。For the CDN source site, you can use a search engine to determine the domain name of the CDN source site.
S202:根据保存的历史数据库列表中的各DNS历史数据库,确定各DNS历史数据库中是否存在与所述域名对应的IP地址,当DNS历史数据库中存在该域名对应的IP地址时,进行步骤S203,否则,进行步骤S204。S202: According to each DNS historical database in the saved historical database list, determine whether there is an IP address corresponding to the domain name in each DNS historical database, and when there is an IP address corresponding to the domain name in the DNS historical database, proceed to step S203, Otherwise, go to step S204.
在源站建立之初,可能还未为该源站部署CDN,用户可以直接访问源站,此时源站的IP地址及该源站的域名作为一条地址(Address,A)记录保存到了数据库中。后续为该源站部署CDN后,用户只能通过CDN才能访问CDN源站,用户的访问数据记录在了对应的CDN中,但是该CDN源站之前的历史数据虽然过期了,但是这些历史数据将会从源站之前的数据库转移到各DNS历史数据库中。因此通过查找各域名系统(Domain Name System,DNS)历史数据库中记录的信息,可以确定该CDN源站的IP地址。At the beginning of the establishment of the origin site, the CDN may not have been deployed for the origin site, and users can directly access the origin site. At this time, the IP address of the origin site and the domain name of the origin site are saved in the database as an Address (A) record. . After the CDN is deployed for the origin site, users can only access the CDN origin site through the CDN, and the user's access data is recorded in the corresponding CDN. However, although the previous historical data of the CDN source site has expired, these historical data will be deleted. It will be transferred from the previous database of the source site to each DNS historical database. Therefore, the IP address of the CDN source site can be determined by searching the information recorded in the historical databases of each Domain Name System (DNS).
S203:将该IP地址确定为所述CDN源站的IP地址。S203: Determine the IP address as the IP address of the CDN source site.
S204:通过该方法确定CDN源站的IP地址的方法结束。S204: The method for determining the IP address of the CDN source site through this method ends.
由于各DNS历史数据库中保存有一些过期的数据,虽然数据已经过期,但是依然会保存在DNS历史数据库中,因此通过查找各DNS历史数据库中记保存的数据,可以确定CDN源站的IP地址。DNS历史数据库可以采用现有的一些提供开放接口的历史数据库,例如ISC历史数据库,或者在进行实施时,可以根据需要配置相应的DNS历史数据库,记录过期的历史数据,具体实现时,可以根据需要灵活选择。Since some expired data are stored in each DNS historical database, although the data has expired, it will still be stored in the DNS historical database. Therefore, by searching the data stored in each DNS historical database, the IP address of the CDN source site can be determined. The DNS historical database can use some existing historical databases that provide open interfaces, such as the ISC historical database, or during implementation, the corresponding DNS historical database can be configured as needed to record expired historical data. Choose flexibly.
在本发明实施例中根据DNS历史数据库记录的历史数据,确定各DNS历史数据库中是否存在与CDN源站的域名对应的IP地址,从而确定CDN源站的IP地址,从而实现CDN源站IP地址的识别,为后期的CDN源站的保护提供便利。In the embodiment of the present invention, according to the historical data recorded in the DNS historical database, it is determined whether there is an IP address corresponding to the domain name of the CDN source site in each DNS historical database, thereby determining the IP address of the CDN source site, thereby realizing the CDN source site IP address identification, which facilitates the protection of the CDN source station in the later stage.
为了准确的定位出CDN源站,提高CDN源站的识别效率,进而提高CDN源站的IP地址的识别效率,在本发明实施例中需要针对每个源站,判断该源站是否为CDN源站,即判断是否为该源站部署了CDN。具体的获取部署有CDN的源站的域名之前,还包括:In order to accurately locate the CDN source site, improve the identification efficiency of the CDN source site, and then improve the identification efficiency of the IP address of the CDN source site, in the embodiment of the present invention, it is necessary to determine whether the source site is a CDN source for each source site Site, that is, to determine whether a CDN is deployed for the origin site. Before obtaining the domain name of the origin site with CDN deployed, it also includes:
向源站发送请求信息;Send request information to the origin site;
判断源站返回的响应信息的消息头中是否携带CDN标识字段;Determine whether the header of the response information returned by the source site carries the CDN identification field;
若所述响应信息的消息头中携带CDN标识字段,则确定所述源站部署有CDN。If the message header of the response information carries a CDN identification field, it is determined that the source station is deployed with a CDN.
当源站为CDN源站时,发送的请求信息经由CDN发送到CDN源站,并且CDN源站在返回响应信息时,也是将响应信息发送到了CDN,CDN接收到该响应信息中,在该响应信息的消息头中添加CDN标识字段,从而使该响应信息的消息头中携带CDN标识字段。因此当接收到CDN源站返回的响应信息时,判断该响应信息的消息头中是否携带CDN标识字段,可以判断出该源站是否为CDN源站。当判断该源站为CDN源站时,采用本发明实施例提供的CDN源站的IP地址识别方法,识别该CDN源站的IP地址。When the source site is a CDN source site, the sent request information is sent to the CDN source site via the CDN, and when the CDN source site returns the response information, it also sends the response information to the CDN, and the CDN receives the response information, in the response The CDN identification field is added to the message header of the information, so that the message header of the response information carries the CDN identification field. Therefore, when receiving the response information returned by the CDN origin station, it is judged whether the message header of the response information carries the CDN identification field, and whether the origin station is a CDN origin station can be judged. When it is judged that the source site is a CDN source site, the IP address of the CDN source site is identified by using the method for identifying the IP address of the CDN source site provided by the embodiment of the present invention.
图3为本发明实施例一提供的一种CDN源站的IP地址识别的详细过程示意图,该过程包括以下步骤:FIG. 3 is a schematic diagram of a detailed process of identifying the IP address of a CDN source station provided by Embodiment 1 of the present invention. The process includes the following steps:
S301:向源站发送请求信息。S301: Send request information to the source station.
其中,该请求信息可以是任何请求信息,只要源站能够根据该请求信息返回响应信息即可。Wherein, the request information may be any request information, as long as the source station can return response information according to the request information.
S302:判断源站返回的响应信息的消息头中是否携带CDN标识字段,当判断结果为是时,进行步骤S303,否则,进行步骤S307。S302: Judging whether the message header of the response information returned by the origin station carries a CDN identification field, and if the judging result is yes, go to step S303; otherwise, go to step S307.
S303:确定该源站为CDN源站,获取该CDN源站的域名。S303: Determine that the origin site is a CDN origin site, and obtain the domain name of the CDN origin site.
S304:根据保存的历史数据库列表中的各DNS历史数据库,确定各DNS历史数据库中是否存在与所述域名对应的IP地址,当DNS历史数据库中存在该域名对应的IP地址时,进行步骤S305,否则,进行步骤S306。S304: According to each DNS historical database in the saved historical database list, determine whether there is an IP address corresponding to the domain name in each DNS historical database, and when there is an IP address corresponding to the domain name in the DNS historical database, proceed to step S305, Otherwise, go to step S306.
S305:将该IP地址确定为所述CDN源站的IP地址。S305: Determine the IP address as the IP address of the CDN source site.
S306:通过该方法确定CDN源站的IP地址的方法结束。S306: The method for determining the IP address of the CDN source site through this method ends.
S307:该源站非CDN源站,该源站返回的IP地址为其自身的IP地址。S307: The origin station is not a CDN origin station, and the IP address returned by the origin station is its own IP address.
针对已经确定为CDN源站的源站,采用本发明实施例提供的该CDN源站的IP地址识别方法,可以有效的提高CDN源站的IP地址识别效率。For an origin station that has been determined as a CDN origin station, using the method for identifying the IP address of the CDN origin station provided by the embodiment of the present invention can effectively improve the efficiency of identifying the IP address of the CDN origin station.
在本发明实施例中当根据各DNS历史数据库中的A记录,查找确定DNS历史数据库中存在与CDN源站的域名对应的IP地址后,为了防止后续CDN源站更换IP地址,提高确定的CDN源站的IP地址的准确性,所述将该IP地址确定为所述CDN源站的IP地址之前,还包括:In the embodiment of the present invention, after searching and determining that there is an IP address corresponding to the domain name of the CDN source site in the DNS historical database according to the A records in each DNS historical database, in order to prevent the subsequent CDN source site from changing the IP address, the determined CDN The accuracy of the IP address of the source site, before the IP address is determined as the IP address of the CDN source site, it also includes:
访问所述IP地址,获取该IP地址对应的网页内容;Accessing the IP address to obtain the web page content corresponding to the IP address;
判断该网页内容与通过CDN访问该源站对应的网页内容是否相同;Determine whether the content of the web page is the same as the content of the web page corresponding to the source site accessed through the CDN;
若不相同,则确定该IP地址非CDN源站的IP地址。If not, it is determined that the IP address is not the IP address of the CDN origin site.
通过访问该IP地址,获取该IP地址对应的网页内容,根据该网页内容是否与通过CDN访问该源站对应的网页内容是否相同,判断该IP地址是否为CDN源站的IP地址。如果CDN源站后期更换了IP地址,此时该IP地址对应的网页内容与通过CDN访问该源站对应的网页内容不可能相同,相反,如果CDN源站后期未更换IP地址,则该IP地址对应的网页内容与通过CDN访问该源站对应的网页内容应当相同。Obtain the web page content corresponding to the IP address by accessing the IP address, and judge whether the IP address is the IP address of the CDN source site according to whether the web page content is the same as the web page content corresponding to the source site accessed through the CDN. If the IP address of the CDN source station is changed later, the content of the webpage corresponding to the IP address cannot be the same as the content of the webpage corresponding to the origin station accessed through the CDN. On the contrary, if the IP address of the CDN source station is not changed later, the IP address The corresponding web page content should be the same as that corresponding to accessing the origin site through CDN.
图4为本发明实施例二提供的一种CDN源站的IP地址识别过程示意图,该过程包括以下步骤:FIG. 4 is a schematic diagram of an IP address identification process of a CDN source station provided by Embodiment 2 of the present invention, and the process includes the following steps:
S401:获取部署有CDN的源站的域名。S401: Obtain the domain name of the origin site where the CDN is deployed.
S402:根据保存的历史数据库列表中的各DNS历史数据库,确定各DNS历史数据库中是否存在与所述域名对应的IP地址,当DNS历史数据库中存在该域名对应的IP地址时,进行步骤S403,否则,进行步骤S407。S402: According to each DNS historical database in the saved historical database list, determine whether there is an IP address corresponding to the domain name in each DNS historical database, and when there is an IP address corresponding to the domain name in the DNS historical database, proceed to step S403, Otherwise, go to step S407.
S403:访问该IP地址,获取该IP地址对应的网页内容。S403: Access the IP address, and acquire webpage content corresponding to the IP address.
S404:判断该网页内容与通过CDN访问该源站对应的网页内容是否相同,当判断结果为是时,进行步骤S405,否则,进行步骤S406。S404: Determine whether the content of the web page is the same as the content of the web page corresponding to the source site accessed through the CDN, and if the determination result is yes, proceed to step S405; otherwise, proceed to step S406.
S405:将该IP地址确定为所述CDN源站的IP地址。S405: Determine the IP address as the IP address of the CDN source site.
S406:该IP地址非该CDN源站的IP地址。S406: The IP address is not the IP address of the CDN origin site.
S407:通过该方法确定CDN源站的IP地址的方法结束。S407: The method for determining the IP address of the CDN origin site through this method ends.
查到DNS历史数据库中存在与CDN源站的域名对应的IP地址时,通过比较该IP地址的网页内容及通过CDN访问该源站对应的网页内容,判断该IP地址是否为CDN源站的IP地址,进一步提高CDN源站的IP地址识别的准确性。When the IP address corresponding to the domain name of the CDN source site exists in the DNS historical database, it is judged whether the IP address is the IP of the CDN source site by comparing the webpage content of the IP address with the content of the webpage corresponding to the source site accessed through the CDN address, further improving the accuracy of IP address identification of the CDN origin site.
或者,在本发明实施例中当根据各DNS历史数据库中保存的历史数据,确定某一DNS历史数据库中存在与该CDN源站的域名对应的IP地址时,为了进一步提高确定的CDN源站的IP地址的准确性,所述将该IP地址确定为所述CDN源站的IP地址之前,所述方法包括:Or, in the embodiment of the present invention, when it is determined that there is an IP address corresponding to the domain name of the CDN source site in a certain DNS historical database according to the historical data stored in each DNS historical database, in order to further improve the identified CDN source site The accuracy of the IP address. Before the IP address is determined as the IP address of the CDN source station, the method includes:
向所述IP地址发送请求信息;Send request information to the IP address;
判断该IP地址返回的响应信息的消息头中是否携带CDN标识字段;Determine whether the message header of the response information returned by the IP address carries the CDN identification field;
若该响应信息的消息头中携带CDN标识字段,则确定该IP地址非CDN源站的IP地址。If the message header of the response information carries the CDN identification field, it is determined that the IP address is not the IP address of the CDN source station.
采用上述方法可以避免获取的该IP地址为CDN返回的该CDN源站的IP地址,从而进一步提高CDN源站IP地址识别的准确性。Using the above method can avoid that the acquired IP address is the IP address of the CDN source station returned by the CDN, thereby further improving the accuracy of identifying the CDN source station IP address.
上述通过访问该IP地址,获取该IP地址对应的网页内容,根据该网页内容是否与通过CDN访问该源站对应的网页内容相同,从而判断该IP地址是否为CDN源站的IP地址,以及上述通过向CDN源站发送请求,判断响应信息中是否携带CDN标识字段,从而判断该IP地址是否为CDN源站的IP地址的方法可以分别单独使用,也可以结合起来使用。上述两种实施方式结合起来,可以有效的保证识别出的CDN源站的IP地址的准确性。By accessing the IP address above, the content of the web page corresponding to the IP address is obtained, and according to whether the content of the web page is the same as the content of the web page corresponding to the source site accessed through the CDN, it is judged whether the IP address is the IP address of the CDN source site, and the above The method of determining whether the IP address is the IP address of the CDN source site by sending a request to the CDN source site to determine whether the response information carries the CDN identification field can be used separately or in combination. The combination of the above two implementation manners can effectively ensure the accuracy of the identified IP address of the CDN source site.
图5为本发明实施例三提供的一种CDN源站的IP地址识别过程示意图,该过程包括以下步骤:FIG. 5 is a schematic diagram of an IP address identification process of a CDN source station provided by Embodiment 3 of the present invention, and the process includes the following steps:
S501:向源站发送请求信息。S501: Send request information to the source station.
S502:判断源站返回的响应信息的消息头中是否携带CDN标识字段,当判断结果为是时,进行步骤S503,否则,进行步骤S511。S502: Determine whether the message header of the response information returned by the origin station carries a CDN identification field, and if the determination result is yes, proceed to step S503; otherwise, proceed to step S511.
S503:确定该源站为CDN源站,获取该CDN源站的域名。S503: Determine that the origin site is a CDN origin site, and obtain the domain name of the CDN origin site.
S504:根据保存的历史数据库列表中的各DNS历史数据库,确定各DNS历史数据库中是否存在与所述域名对应的IP地址,当DNS历史数据库中存在该域名对应的IP地址时,进行步骤S505,否则,进行步骤S510。S504: According to each DNS historical database in the saved historical database list, determine whether there is an IP address corresponding to the domain name in each DNS historical database, and when there is an IP address corresponding to the domain name in the DNS historical database, proceed to step S505, Otherwise, go to step S510.
S505:访问该IP地址,获取该IP地址对应的网页内容。S505: Access the IP address, and acquire webpage content corresponding to the IP address.
S506:判断该网页内容与通过CDN访问该源站对应的网页内容是否相同,当判断结果为是时,进行步骤S507,否则,进行步骤S509。S506: Determine whether the content of the web page is the same as the content of the web page corresponding to the source site accessed through the CDN, and if the determination result is yes, proceed to step S507; otherwise, proceed to step S509.
S507:向该IP地址发送请求信息,判断该IP地址返回的响应信息的消息头中是否携带CDN标识字段,当判断结果为否时,进行步骤S508,否则,进行步骤S509。S507: Send request information to the IP address, and determine whether the message header of the response information returned by the IP address carries a CDN identification field. If the determination result is no, proceed to step S508; otherwise, proceed to step S509.
S508:将该IP地址确定为CDN源站的IP地址。S508: Determine the IP address as the IP address of the CDN source site.
S509:确定该IP地址非该CDN源站的IP地址。S509: Determine that the IP address is not the IP address of the CDN origin site.
S510:通过该方法确定CDN源站的IP地址的方法结束。S510: The method for determining the IP address of the CDN source site through this method ends.
S511:该源站非CDN源站,该源站返回的IP地址为其自身的IP地址。S511: The origin station is not a CDN origin station, and the IP address returned by the origin station is its own IP address.
由于在本发明实施例中根据DNS历史数据库记录的历史数据,确定各DNS历史数据库中是否存在与CDN源站的域名对应的IP地址,从而确定CDN源站的IP地址,从而实现CDN源站IP地址的识别,为后期的CDN源站的保护提供便利。Since in the embodiment of the present invention, according to the historical data recorded in the DNS historical database, it is determined whether there is an IP address corresponding to the domain name of the CDN source site in each DNS historical database, thereby determining the IP address of the CDN source site, thereby realizing the IP address of the CDN source site. The identification of the address provides convenience for the protection of the CDN source station in the later stage.
图6为本发明实施例提供的一种CDN源站的IP地址识别装置结构示意图,所述装置包括:FIG. 6 is a schematic structural diagram of an IP address identification device for a CDN source station provided by an embodiment of the present invention, and the device includes:
获取模块61,用于获取部署有CDN的源站的域名;Obtaining
判断模块62,用于根据保存的历史数据库列表中的各DNS历史数据库,确定各DNS历史数据库中是否存在与所述域名对应的IP地址;Judging
识别模块63,用于当判断模块在确定DNS历史数据库中存在与该域名对应的IP地址时,将该IP地址确定为CDN源站的IP地址。The identifying
较佳地,在本发明实施例中为了提高确定的CDN源站的IP地址的准确性,所述装置还包括:Preferably, in order to improve the accuracy of the determined IP address of the CDN source station in the embodiment of the present invention, the device further includes:
发送模块64,用于向源站发送请求信息;A sending
所述判断模块62,用于判断源站返回的响应信息的消息头中是否携带CDN标识字段;The judging
所述获取模块61,具体用于当判断模块判断该响应信息的消息头中携带CDN标识字段时,确定为所述源站部署有CDN。The obtaining
较佳地,在本发明实施例中为了提高确定的CDN源站的IP地址的准确性,所述装置还包括:访问获取模块65,用于访问所述IP地址,获取该IP地址对应的网页内容;Preferably, in order to improve the accuracy of the determined IP address of the CDN source site in the embodiment of the present invention, the device further includes: an
所述判断模块62,还用于判断该网页内容与通过CDN访问该源站对应的网页内容是否相同;The judging
所述识别模块63,还用于当判断模块判断访问该IP地址的网页内容与通过CDN访问该源站对应的网页内容相同时,通知判断模块进行后续判断步骤,否则,确定该IP地址非CDN源站的IP地址。The
较佳地,在本发明实施例中为了提高确定的CDN源站的IP地址的准确性,所述装置还包括:Preferably, in order to improve the accuracy of the determined IP address of the CDN source station in the embodiment of the present invention, the device further includes:
发送模块64,用于向源站发送请求信息;A sending
所述判断模块62,还用于判断该IP地址返回的响应信息的消息头中是否携带CDN标识字段;The judging
所述识别模块63,还用于当判断模块判断该响应信息的消息头中携带CDN标识字段时,确定该IP地址非CDN源站的IP地址,否则,通知判断模块62进行后续判断步骤。The
本发明实施例提供了一种CDN源站的IP地址识别方法及装置,该方法中针对CDN源站的域名,根据历史数据库列表中的各DNS历史数据库,确定各DNS历史数据库中是否存在与所述域名对应的IP地址,当存在与该域名对应的IP地址时,将该IP地址确定为CDN源站的IP地址。由于在本发明实施例中根据DNS历史数据库记录的历史数据,确定各DNS历史数据库中是否存在与CDN源站的域名对应的IP地址,从而确定CDN源站的IP地址,从而实现CDN源站IP地址的识别,为后期的CDN源站的保护提供便利。Embodiments of the present invention provide a method and device for identifying an IP address of a CDN source site. In the method, for the domain name of the CDN source site, according to each DNS historical database in the historical database list, it is determined whether there is an IP address corresponding to the domain name in each DNS historical database. The IP address corresponding to the above domain name, if there is an IP address corresponding to the domain name, determine the IP address as the IP address of the CDN source station. Since in the embodiment of the present invention, according to the historical data recorded in the DNS historical database, it is determined whether there is an IP address corresponding to the domain name of the CDN source site in each DNS historical database, thereby determining the IP address of the CDN source site, thereby realizing the IP address of the CDN source site. The identification of the address provides convenience for the protection of the CDN source station in the later stage.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowcharts and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and combinations of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a Means for realizing the functions specified in one or more steps of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart flow or flows and/or block diagram block or blocks.
尽管已描述了本申请的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请范围的所有变更和修改。While preferred embodiments of the present application have been described, additional changes and modifications to these embodiments can be made by those skilled in the art once the basic inventive concept is appreciated. Therefore, the appended claims are intended to be construed to cover the preferred embodiment and all changes and modifications which fall within the scope of the application.
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the application without departing from the spirit and scope of the application. In this way, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201310632186.8A CN103618810B (en) | 2013-11-29 | 2013-11-29 | A kind of IP address recognition methods of CDN source station and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201310632186.8A CN103618810B (en) | 2013-11-29 | 2013-11-29 | A kind of IP address recognition methods of CDN source station and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN103618810A true CN103618810A (en) | 2014-03-05 |
| CN103618810B CN103618810B (en) | 2017-12-26 |
Family
ID=50169514
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201310632186.8A Active CN103618810B (en) | 2013-11-29 | 2013-11-29 | A kind of IP address recognition methods of CDN source station and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN103618810B (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105488065A (en) * | 2014-09-19 | 2016-04-13 | 小米科技有限责任公司 | Webpage access method and device, and terminal |
| CN107347015A (en) * | 2016-05-06 | 2017-11-14 | 阿里巴巴集团控股有限公司 | A kind of recognition methods of content distributing network, apparatus and system |
| CN116846867A (en) * | 2023-07-13 | 2023-10-03 | 西安明赋云计算有限公司 | CDN server source station selection method and system |
| CN119449769A (en) * | 2024-10-21 | 2025-02-14 | 中国移动通信集团广东有限公司 | CDN source station IP address identification method, device and storage medium |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1489069A (en) * | 2002-10-10 | 2004-04-14 | 华为技术有限公司 | Content-oriented load balancing method and device |
| CN101287011A (en) * | 2008-05-26 | 2008-10-15 | 蓝汛网络科技(北京)有限公司 | Method, system and device for responding service request from user in content distributing network |
| CN102196060A (en) * | 2011-06-15 | 2011-09-21 | 北京蓝汛通信技术有限责任公司 | Method and system for selecting source station by Cache server |
-
2013
- 2013-11-29 CN CN201310632186.8A patent/CN103618810B/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1489069A (en) * | 2002-10-10 | 2004-04-14 | 华为技术有限公司 | Content-oriented load balancing method and device |
| CN101287011A (en) * | 2008-05-26 | 2008-10-15 | 蓝汛网络科技(北京)有限公司 | Method, system and device for responding service request from user in content distributing network |
| CN102196060A (en) * | 2011-06-15 | 2011-09-21 | 北京蓝汛通信技术有限责任公司 | Method and system for selecting source station by Cache server |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105488065A (en) * | 2014-09-19 | 2016-04-13 | 小米科技有限责任公司 | Webpage access method and device, and terminal |
| CN107347015A (en) * | 2016-05-06 | 2017-11-14 | 阿里巴巴集团控股有限公司 | A kind of recognition methods of content distributing network, apparatus and system |
| CN116846867A (en) * | 2023-07-13 | 2023-10-03 | 西安明赋云计算有限公司 | CDN server source station selection method and system |
| CN119449769A (en) * | 2024-10-21 | 2025-02-14 | 中国移动通信集团广东有限公司 | CDN source station IP address identification method, device and storage medium |
| CN119449769B (en) * | 2024-10-21 | 2025-11-28 | 中国移动通信集团广东有限公司 | IP address identification method, device and storage medium of CDN source station |
Also Published As
| Publication number | Publication date |
|---|---|
| CN103618810B (en) | 2017-12-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN102982141B (en) | A kind of method and device realizing distributed data base agency | |
| JP2017506034A5 (en) | ||
| CN103152391B (en) | A kind of log-output method and device | |
| JP2011204238A5 (en) | ||
| CN103546517B (en) | Network information push system and method | |
| CN104917794A (en) | A data sharing method, device and system | |
| TW201510761A (en) | Method and apparatus of downloading and installing a client | |
| CN102957622B (en) | Method, device and system for data processing | |
| CN103701817B (en) | Method and device for generating configuration file | |
| RU2016136668A (en) | Caching Encrypted Content | |
| CN103618810B (en) | A kind of IP address recognition methods of CDN source station and device | |
| CN104301454A (en) | Method and device for resolving and redirecting domain names, and intelligent domain name system | |
| CN103595827B (en) | A kind of IP address recognition methods of CDN source station and device | |
| US9665732B2 (en) | Secure Download from internet marketplace | |
| CN104767839A (en) | IP positioning method and device | |
| CN109788050B (en) | A method, system, electronic device and medium for obtaining IP address of source station | |
| WO2018113728A1 (en) | Method and device for determining risk of phishing attack in public wifi network | |
| JP2013522786A5 (en) | ||
| CN104811507B (en) | A kind of IP address acquisition methods and device | |
| WO2016058478A1 (en) | Data acquisition method, device and system | |
| CN104484413A (en) | Method and device for obtaining searching results | |
| CN103856535A (en) | A method and device for acquiring user data | |
| CN103294565A (en) | Method, device and equipment for detecting installed application | |
| WO2015196844A1 (en) | Task assignment method, apparatus, system and server | |
| WO2018149399A1 (en) | Application download counting method, readable storage medium, terminal apparatus and device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C41 | Transfer of patent application or patent right or utility model | ||
| TA01 | Transfer of patent application right |
Effective date of registration: 20161128 Address after: 100015 Chaoyang District Road, Jiuxianqiao, No. 10, building No. 3, floor 15, floor 17, 1701-26, Applicant after: BEIJING QIANXIN TECHNOLOGY Co.,Ltd. Address before: 100088 Beijing city Xicheng District xinjiekouwai Street 28, block D room 112 (Desheng Park) Applicant before: BEIJING QIHOO TECHNOLOGY Co.,Ltd. Applicant before: Qizhi software (Beijing) Co.,Ltd. |
|
| GR01 | Patent grant | ||
| CP01 | Change in the name or title of a patent holder | ||
| CP01 | Change in the name or title of a patent holder |
Address after: 100015 Jiuxianqiao Chaoyang District Beijing Road No. 10, building 15, floor 17, layer 1701-26, 3 Patentee after: QAX Technology Group Inc. Address before: 100015 Jiuxianqiao Chaoyang District Beijing Road No. 10, building 15, floor 17, layer 1701-26, 3 Patentee before: BEIJING QIANXIN TECHNOLOGY Co.,Ltd. |