CN103078968A - Domain name querying method, IP (Internet Protocol) grouping method, device and equipment - Google Patents

Domain name querying method, IP (Internet Protocol) grouping method, device and equipment Download PDF

Info

Publication number
CN103078968A
CN103078968A CN2013100272302A CN201310027230A CN103078968A CN 103078968 A CN103078968 A CN 103078968A CN 2013100272302 A CN2013100272302 A CN 2013100272302A CN 201310027230 A CN201310027230 A CN 201310027230A CN 103078968 A CN103078968 A CN 103078968A
Authority
CN
China
Prior art keywords
address
domain name
family
point
address field
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
Application number
CN2013100272302A
Other languages
Chinese (zh)
Other versions
CN103078968B (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201310027230.2A priority Critical patent/CN103078968B/en
Publication of CN103078968A publication Critical patent/CN103078968A/en
Application granted granted Critical
Publication of CN103078968B publication Critical patent/CN103078968B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a domain name querying method, an IP (Internet Protocol) grouping method, device and equipment, belonging to the technical field of networks. The method comprises the following steps of: acquiring a first IP address; querying whether the first IP address is contained in a global IP resource pool, wherein the global IP resource pool comprises at least one IP group and a domain name corresponding to each IP group, and each IP group is determined by at least one IP address; and when the first IP address is queried, taking the domain name corresponding to the IP group to which the queried first IP address belongs as a domain name of the first IP address. According to the technical scheme provided by the invention, when the domain name of the IP address is queried, the domain name of the first IP address can be determined according to the group to which the determined IP address in the global IP resource pool belongs and the domain name corresponding to the group by providing the preset global IP resource pool, and thus the querying performance of the domain name can be improved and querying delay is shortened.

Description

Domain name inquiry method, IP divide family's method, device and equipment
Technical field
The present invention relates to networking technology area, particularly a kind of domain name inquiry method, IP divide family's method, device and equipment.
Background technology
The Internet caching solution (Internet Cache Solution) is that special flow buffering towards carrier class operator and bandwidth operator accelerates solution, be used for HTTP(Hypertext Transport Protocol, HTTP), Online Video, P2P(Peer to Peer, point-to-point) etc. the buffer memory of large flow application.Nearly all the Internet caching system all uses the static name white list that the upstream data bag of access is processed, if the domain-name information that the upstream data bag carries and white list mate then continue the flow process of managing business, if do not mate, then abandons the upstream data bag.And for quite a few websites such as net dish, Online Videos, its IP(Internet Protocol, net association) address is dynamic change, do not have domain-name information in its upstream data bag.Therefore, static white list can't adapt to this fast-changing IP address, causes caching system effectively to identify and to process this class website, and the buffer memory effect significantly reduces.
In the prior art, generally inquire about the domain-name information of upstream data bag by the mode of real-time online inquiry, the IP address real-time query outer net data source entrained according to the upstream data bag is to obtain corresponding domain-name information.
In realizing process of the present invention, the inventor finds that there is following problem at least in prior art:
The mode of real-time online inquiry provides inquiry service to worldwide, therefore for unique user, handling property is very limited, and for caching system, in case there is time-delay in the data-bag interacting of online query, just lose the chance that the upstream data bag is redirected, caused redirected efficient lower.
Summary of the invention
In order to solve the problem of prior art, the embodiment of the invention provides a kind of domain name inquiry method, IP minute family's method, device and equipment.Described technical scheme is as follows:
First aspect, the embodiment of the invention provide a kind of domain name inquiry method, and described method comprises:
Obtain an IP address;
Whether comprise a described IP address in the inquiry global I P resource pool, described global I P resource pool comprises domain name corresponding at least one IP family and each IP family, and each IP family is determined by at least one IP address;
When inquiring a described IP address, the domain name that the IP family under the IP address that inquires is corresponding is as the domain name of a described IP address.
In conjunction with first aspect, in the first possibility implementation of the embodiment of the invention, whether comprise a described IP address in the inquiry global I P resource pool, described global I P resource pool comprises domain name corresponding at least one IP family and each IP family, each IP family is determined by at least one IP address, comprises afterwards:
When not inquiring a described IP address, according to neighbourship degree, determine the IP address field that a described IP address is affiliated;
Choose a plurality of IP address of a described IP address field;
Inquire about the domain name of a plurality of IP address of a described IP address field;
According to the domain name of described a plurality of IP address, obtain domain name corresponding to IP family and IP family that described a plurality of IP address is determined.
In conjunction with the first possibility implementation of the embodiment of the invention, in the second possibility implementation of the embodiment of the invention, choose a plurality of IP address of a described IP address field, comprising:
Choose the IP address of central point, coboundary point, lower boundary point and the random site point of a described IP address field, described coboundary point is IP address corresponding to maximum in the described IP address field, described lower boundary point is IP address corresponding to minimum value in the described IP address field, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is a plurality of IP address of selecting at random in a described IP address field.
In conjunction with the first possibility implementation of the embodiment of the invention, in the third possibility implementation of the embodiment of the invention, according to the domain name of described a plurality of IP address, obtain domain name corresponding to IP family and IP family that a described IP address field is determined, comprising:
When the domain name homogeneous phase of described a plurality of IP address simultaneously, mapping relations between a described IP family and the domain name as an IP family, and are set up in described a plurality of IP address;
Or, when comprising the 2nd IP address in described a plurality of IP address, adjust described neighbourship degree, and point is determined the 2nd IP address field centered by described the 2nd IP address, continuation is carried out above-mentioned minute family's process to described the 2nd IP address field, and the domain name of other IP addresses in the domain name of described the 2nd IP address and the described IP address field is different.
The third possibility implementation in conjunction with the embodiment of the invention, in the 4th kind of possibility implementation of the embodiment of the invention, when the domain name homogeneous phase while of described a plurality of IP address, with described a plurality of IP address as an IP family, and set up mapping relations between a described IP family and the domain name, comprising:
Use the hash Hash table, described a plurality of IP address is saved as an IP family as key assignments;
Mapping relations between the domain name of setting up a described IP family and inquiring.
Second aspect, the embodiment of the invention also provide a kind of IP minute family's method, and described method comprises:
According to neighbourship degree, determine the IP address field that an IP address is affiliated;
Choose a plurality of IP address of a described IP address field;
Inquire about the domain name of a plurality of IP address of a described IP address field;
According to the domain name of described a plurality of IP address, obtain domain name corresponding to IP family and IP family that described a plurality of IP address is determined.
In conjunction with second aspect, in the first of the embodiment of the invention possibility implementation, choose a plurality of IP address of a described IP address field, comprising:
Choose the IP address of central point, coboundary point, lower boundary point and the random site point of a described IP address field, described coboundary point is IP address corresponding to maximum in the described IP address field, described lower boundary point is IP address corresponding to minimum value in the described IP address field, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is a plurality of IP address of selecting at random in a described IP address field.
In conjunction with second aspect, in the second of the embodiment of the invention possibility implementation, according to the domain name of described a plurality of IP address, obtain domain name corresponding to IP family and IP family that described a plurality of IP address is determined, comprising:
When the domain name homogeneous phase of described a plurality of IP address simultaneously, mapping relations between a described IP family and the domain name as an IP family, and are set up in described a plurality of IP address;
Or, when comprising the 2nd IP address in described a plurality of IP address, adjust described neighbourship degree, and point is determined the 2nd IP address field centered by described the 2nd IP address, continuation is carried out above-mentioned minute family's process to described the 2nd IP address field, and the domain name of other IP addresses in the domain name of described the 2nd IP address and the described IP address field is different.
The second possibility implementation in conjunction with the embodiment of the invention, in the third possibility implementation of the embodiment of the invention, when the domain name homogeneous phase while of described a plurality of IP address, with described a plurality of IP address as an IP family, and set up mapping relations between a described IP family and the domain name, comprising:
Use the hash Hash table, described a plurality of IP address is saved as an IP family as key assignments;
Mapping relations between the domain name of setting up a described IP family and inquiring.
The third aspect, the embodiment of the invention provide a kind of inquiry of the domain name device, and described device comprises:
The first acquisition module is used for obtaining an IP address;
Enquiry module is used for inquiry global I P resource pool and whether comprises a described IP address, and described global I P resource pool comprises domain name corresponding at least one IP family and each IP family, and each IP family is determined by at least one IP address;
Domain name is returned module, is used for when inquiring a described IP address, and the domain name that the IP family that inquires is corresponding is as the domain name of a described IP address.
In conjunction with the third aspect, in the first of the embodiment of the invention possibility implementation, described device also comprises:
The address field determination module is used for when not inquiring a described IP address, according to neighbourship degree, determines the IP address field that a described IP address is affiliated;
Choose module, be used for choosing a plurality of IP address of a described IP address field;
The inquiry of the domain name module is for the domain name of a plurality of IP address of inquiring about a described IP address field;
The second acquisition module is used for the domain name according to described a plurality of IP address, obtains domain name corresponding to IP family and IP family that described a plurality of IP address is determined.
The first possibility implementation in conjunction with the embodiment of the invention, in the second possibility implementation of the embodiment of the invention, the described module of choosing is specifically for the central point of choosing a described IP address field, the coboundary point, the IP address of lower boundary point and random site point, described coboundary point is IP address corresponding to maximum in the described IP address field, described lower boundary point is IP address corresponding to minimum value in the described IP address field, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is a plurality of IP address of selecting at random in a described IP address field.
In conjunction with the first possibility implementation of the embodiment of the invention, in the third possibility implementation of the embodiment of the invention, described the second acquisition module comprises:
Determining unit, be used for when the domain name homogeneous phase of described a plurality of IP address simultaneously, mapping relations between a described IP family and the domain name as an IP family, and are set up in described a plurality of IP address;
Or, divide the family unit, be used for when described a plurality of IP address comprises the 2nd IP address, adjust described neighbourship degree, and point is determined the 2nd IP address field centered by described the 2nd IP address, continuation is carried out above-mentioned minute family's process to described the 2nd IP address field, and the domain name of other IP addresses in the domain name of described the 2nd IP address and the described IP address field is different.
In conjunction with the third possibility implementation of the embodiment of the invention, in the 4th kind of possibility implementation of the embodiment of the invention, described determining unit comprises:
Preserve subelement, be used for using the hash Hash table, described a plurality of IP address is saved as an IP family as key assignments;
Relation is set up subelement, for the mapping relations between the domain name of setting up a described IP family and inquiring.
Fourth aspect, the embodiment of the invention also provide a kind of IP minute family's device, and described device comprises:
The address field determination module is used for according to neighbourship degree, determines the IP address field that an IP address is affiliated;
Choose module, be used for choosing a plurality of IP address of a described IP address field;
Enquiry module is for the domain name of a plurality of IP address of inquiring about a described IP address field;
Acquisition module is used for the domain name according to described a plurality of IP address, obtains domain name corresponding to IP family and IP family that described a plurality of IP address is determined.
In conjunction with fourth aspect, in the first possibility implementation of the embodiment of the invention, the described IP address of choosing concrete central point, coboundary point, lower boundary point and the random site point for choosing a described IP address field of module, described coboundary point is IP address corresponding to maximum in the described IP address field, described lower boundary point is IP address corresponding to minimum value in the described IP address field, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is a plurality of IP address of selecting at random in a described IP address field.
In conjunction with fourth aspect, in the second of the embodiment of the invention possibility implementation, described acquisition module comprises:
Determining unit, be used for when the domain name homogeneous phase of described a plurality of IP address simultaneously, mapping relations between a described IP family and the domain name as an IP family, and are set up in described a plurality of IP address;
Or, divide the family unit, be used for when described a plurality of IP address comprises the 2nd IP address, adjust described neighbourship degree, and point is determined the 2nd IP address field centered by described the 2nd IP address, continuation is carried out above-mentioned minute family's process to described the 2nd IP address field, and the domain name of other IP addresses in the domain name of described the 2nd IP address and the described IP address field is different.
In conjunction with the second possibility implementation of the embodiment of the invention, in the third possibility implementation of the embodiment of the invention, described determining unit comprises:
Preserve subelement, be used for using the hash Hash table, described a plurality of IP address is saved as an IP family as key assignments;
Relation is set up subelement, for the mapping relations between the domain name of setting up a described IP family and inquiring.
The 5th aspect, the embodiment of the invention provide a kind of inquiry of the domain name equipment, and described equipment comprises:
Processor, memory, described processor and memory coupling,
Described processor is used for obtaining an IP address;
Whether described processor also comprises a described IP address for the global I P resource pool of inquiring about described memory, and described global I P resource pool comprises domain name corresponding at least one IP family and each IP family, and each IP family is determined by at least one IP address;
Described processor also is used for when inquiring a described IP address, and the domain name that the IP family under the IP address that inquires is corresponding is as the domain name of a described IP address.
In conjunction with the 5th aspect, in the first of the embodiment of the invention possibility implementation, described processor also is used for according to neighbourship degree, determining the IP address field that a described IP address is affiliated when not inquiring a described IP address; Choose a plurality of IP address of a described IP address field; Inquire about the domain name of a plurality of IP address of a described IP address field; According to the domain name of described a plurality of IP address, obtain domain name corresponding to IP family and IP family that described a plurality of IP address is determined.
In conjunction with the 5th aspect, in the second possibility implementation of the embodiment of the invention, described processor also is used for choosing the IP address of central point, coboundary point, lower boundary point and the random site point of a described IP address field, described coboundary point is IP address corresponding to maximum in the described IP address field, described lower boundary point is IP address corresponding to minimum value in the described IP address field, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is a plurality of IP address of selecting at random in a described IP address field.
In conjunction with the 5th aspect, in the third possibility implementation of the embodiment of the invention, described processor also be used for when the domain name homogeneous phase of described a plurality of IP address simultaneously, mapping relations between a described IP family and the domain name as an IP family, and are set up in described a plurality of IP address; Or, when comprising the 2nd IP address in described a plurality of IP address, adjust described neighbourship degree, and point is determined the 2nd IP address field centered by described the 2nd IP address, continuation is carried out above-mentioned minute family's process to described the 2nd IP address field, and the domain name of other IP addresses in the domain name of described the 2nd IP address and the described IP address field is different.
In conjunction with the third possibility implementation of the embodiment of the invention, in the 4th kind of possibility implementation of the embodiment of the invention, described memory is used for using the hash Hash table, and described a plurality of IP address is saved as an IP family as key assignments; Mapping relations between the domain name of setting up a described IP family and inquiring.
The 6th aspect, the embodiment of the invention also provide a kind of IP minute family's equipment, and described equipment comprises:
Processor, memory, described processor and memory coupling,
Described processor is used for according to neighbourship degree, determines the IP address field that an IP address is affiliated;
Described processor also is used for choosing a plurality of IP address of a described IP address field;
Described processor also is used for inquiring about the domain name of a plurality of IP address of a described IP address field;
Described processor also is used for the domain name according to described a plurality of IP address, obtains domain name corresponding to IP family and IP family that described a plurality of IP address is determined.
In conjunction with the 6th aspect, in the first possibility implementation of the embodiment of the invention, described processor also is used for choosing the IP address of central point, coboundary point, lower boundary point and the random site point of a described IP address field, described coboundary point is IP address corresponding to maximum in the described IP address field, described lower boundary point is IP address corresponding to minimum value in the described IP address field, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is a plurality of IP address of selecting at random in a described IP address field.
In conjunction with the 6th aspect, in the second possibility implementation of the embodiment of the invention, described processor also be used for when the domain name homogeneous phase of described a plurality of IP address simultaneously, mapping relations between a described IP family and the domain name as an IP family, and are set up in described a plurality of IP address; Or, when comprising the 2nd IP address in described a plurality of IP address, adjust described neighbourship degree, and point is determined the 2nd IP address field centered by described the 2nd IP address, continuation is carried out above-mentioned minute family's process to described the 2nd IP address field, and the domain name of other IP addresses in the domain name of described the 2nd IP address and the described IP address field is different.
In conjunction with the second possibility implementation of the embodiment of the invention, in the third possibility implementation of the embodiment of the invention, described memory is used for using the hash Hash table, and described a plurality of IP address is saved as an IP family as key assignments; Mapping relations between the domain name of setting up a described IP family and inquiring.
The domain name inquiry method that the embodiment of the invention provides, IP minute family's method, device and equipment are by obtaining an IP address; Whether comprise a described IP address in the inquiry global I P resource pool, described global I P resource pool comprises domain name corresponding at least one IP family and each IP family, and each IP family is determined by at least one IP address; When inquiring a described IP address, the domain name that the IP family under the IP address that inquires is corresponding is as the domain name of a described IP address.Adopt technical scheme provided by the invention, by the global I P that sets in advance resource pool is provided, so that when carrying out the inquiry of the domain name of IP address, can according to the family under the pre-determined IP address in this global I P resource pool with and corresponding domain name, determine the domain name of an IP address, can improve the performance of inquiry of the domain name, reduce inquiry time delay.
Description of drawings
In order to be illustrated more clearly in the technical scheme in the embodiment of the invention, the accompanying drawing of required use was done to introduce simply during the below will describe embodiment, apparently, accompanying drawing in the following describes only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the flow chart of a kind of domain name inquiry method of providing of the embodiment of the invention;
Fig. 2 is the flow chart of a kind of IP minute family's method providing of the embodiment of the invention;
Fig. 3 is the flow chart of a kind of domain name inquiry method of providing of the embodiment of the invention;
Fig. 4 is the structural representation of a kind of inquiry of the domain name device of providing of the embodiment of the invention;
Fig. 5 is the structural representation of a kind of IP minute family's device providing of the embodiment of the invention;
Fig. 6 is the block diagram of a kind of inquiry of the domain name equipment of providing of the embodiment of the invention;
Fig. 7 is the block diagram of a kind of IP minute family's equipment providing of the embodiment of the invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
Fig. 1 is the flow chart of a kind of domain name inquiry method of providing of the embodiment of the invention, and referring to Fig. 1, described method comprises:
101: obtain an IP address;
Wherein, an IP address refers to the IP to be checked address of carrying in embodiments of the present invention, by the IP inquiry of the domain name request that analysis receives, obtain an IP address, so that inquire about the domain name of a described IP address in the IP inquiry of the domain name request that receives.
102: whether comprise a described IP address in the inquiry global I P resource pool, described global I P resource pool comprises domain name corresponding at least one IP family and each IP family, and each IP family is determined by at least one IP address;
Global I P resource pool has specifically been preserved each IP family, domain name corresponding at least one IP address and this IP family corresponding to IP family, can know IP family under it by the IP address, can know the domain name that it is corresponding by IP family.
Wherein, the scanning global I P resource pool in this step 102 can be realized by all IP addresses that traversal has been stored.
Wherein, described IP family refers to have the set of one group of IP address of same domain name, when the domain name homogeneous phase while of described a plurality of IP address, can think that described a plurality of IP address belongs to same IP family, be that described IP family determines that by described a plurality of IP address domain name is domain name corresponding to described IP family.
In embodiments of the present invention, after obtaining an IP address, scanning global I P resource pool is inquired about and whether has been stored a described IP address and affiliated IP family thereof in the described global I P resource pool, so that inquire about domain name corresponding to a described IP address in global I P resource pool.
103: when inquiring a described IP address, the domain name that the IP family under the IP address that inquires is corresponding is as the domain name of a described IP address;
In embodiments of the present invention, when inquiring a described IP address, IP family and the corresponding domain name thereof under the described IP address stored in explanation in global I P resource pool, inquire about domain name corresponding to described IP family, and this domain name is returned as the domain name of a described IP address.
In embodiments of the present invention, only comprise that take this global I P resource pool an IP address describes as example, at this moment, the one IP address is a node of its corresponding IP family, then can know IP family under it according to an IP address, can know corresponding domain name according to the IP family under it, this domain name is returned as the domain name of a described IP address.
The embodiment of the invention is with in the Internet caching system, when not having domain-name information in the upstream data bag, it is example, when not having domain-name information in the upstream data bag, the Internet caching system need to be inquired about the domain name of IP address, so that the website is effectively identified and processed.
The method that the embodiment of the invention provides is by obtaining an IP address; Whether comprise a described IP address in the inquiry global I P resource pool, described global I P resource pool comprises domain name corresponding at least one IP family and each IP family, and each IP family is determined by at least one IP address; When inquiring a described IP address, the domain name that the IP family under the IP address that inquires is corresponding is as the domain name of a described IP address.Adopt technical scheme provided by the invention, by the global I P that sets in advance resource pool is provided, so that when carrying out the inquiry of the domain name of IP address, can according to the family under the pre-determined IP address in this global I P resource pool with and corresponding domain name, determine the domain name of an IP address, can improve the performance of inquiry of the domain name, reduce inquiry time delay.
Alternatively, on the basis of technical scheme embodiment illustrated in fig. 1, whether this step 102 " comprises a described IP address in the inquiry global I P resource pool; described global I P resource pool comprises domain name corresponding at least one IP family and each IP family; each IP family is determined by at least one IP address ", and afterwards, described method also comprises step 104:
104: when not inquiring a described IP address, according to neighbourship degree, determine the IP address field that a described IP address is affiliated;
In embodiments of the present invention, when not inquiring a described IP address, the domain name corresponding to IP family and described IP family of not storing under the described IP address is described in global I P resource pool, inquire about unsuccessful this moment, returns and inquire about unsuccessfully.
Wherein, the IP address field refers to the address field that is comprised of a plurality of contiguous ip address on the IP address coordinate axle, and the IP address number that should comprise in each IP address field is determined by neighbourship degree.Wherein, each coordinate address of IP address coordinate axle can be used for representing the IP address, and the distance between the coordinate address can be referred to as the distance of IP address, and for example the distance on reference axis can be 255 between 192.168.1.1 and the 192.168.2.1.
Wherein, described neighbourship degree represents two distances between the IP address, when the distance between two IP addresses on the IP address coordinate axle in this neighbourship degree, then all the IP addresses between these two IP addresses might belong to same domain name, neighbourship degree can be a given initial distance, can determine the address field of appropriate length according to neighbourship degree, so that determine fast the IP address field under the IP address.
Particularly, the coordinate at zero point of secondary IP address reference axis begins, and according to neighbourship degree, the IP address in the IP address coordinate axle is divided into a plurality of IP address fields, and the IP address field under the described IP address is defined as an IP address field.
For example, neighbourship degree is 10, and the coordinate at zero point of secondary IP address reference axis begins, same IP address field is thought to belong in per 10 IP addresses, therefore IP address coordinate axle is divided into a lot of address fields, wherein, the address field at place, a described IP address is called an IP address field.
In the embodiment of the invention, can be when not inquiring a described IP address, according to neighbourship degree, determine the IP address field that a described IP address is affiliated, return at the same time inquiry and unsuccessfully order, needn't wait for that namely actual result namely directly returns inquiry and unsuccessfully order; It can also be an IP address field of after not inquiring a described IP address, directly determining according to neighbourship degree under the described IP address, do not return any order this moment, return real processing results etc. after the subsequent processes end, the embodiment of the invention is not done restriction to concrete processing mode again.
105: a plurality of IP address of choosing a described IP address field;
In this aspect embodiment, choose a plurality of IP address of a described IP address field at random or according to preset rules, this a plurality of IP address is used for representing a described IP address field.
For example, the lower boundary point of a described IP address field is A, and coboundary point is B, and a plurality of IP address of choosing a described IP address field is exactly between A and B to choose IP address C, D, E, a plurality of IP addresses such as F, G.
106: the domain name of inquiring about a plurality of IP address of a described IP address field;
Particularly, whether nslookup online query service is available, when the domain name online query is served when unavailable, it is unavailable to return domain name online query service, finish inquiry, but when the domain name online query service time spent, respectively the domain name online query is carried out in described a plurality of IP address, when getting access to the domain name of described a plurality of IP address, verify further whether the domain name of described a plurality of IP address is all identical.
107: according to the domain name of described a plurality of IP address, obtain domain name corresponding to IP family and IP family that described a plurality of IP address is determined.
Wherein, when the IP family that described a plurality of IP address is determined refers to that the domain name when a plurality of IP address of choosing in the described IP address field is identical, think that then described a plurality of IP address belongs to same family, this IP family determines that by described a plurality of IP address the domain name of described a plurality of IP address is exactly domain name corresponding to this IP family;
Particularly, when the domain name homogeneous phase while of described a plurality of IP address, determine that described a plurality of IP address belongs to same IP family, and the domain name of described a plurality of IP address is defined as domain name corresponding to IP family, the domain name corresponding stored that described a plurality of IP address, described IP family and IP family is corresponding is in global I P resource pool, to upgrade global I P resource pool.
The method that the embodiment of the invention provides is by obtaining an IP address; Whether comprise a described IP address in the inquiry global I P resource pool, described global I P resource pool comprises domain name corresponding at least one IP family and each IP family, and each IP family is determined by at least one IP address; When inquiring a described IP address, the domain name that the IP family under the IP address that inquires is corresponding is as the domain name of a described IP address.Adopt technical scheme provided by the invention, by the global I P that sets in advance resource pool is provided, so that when carrying out the inquiry of the domain name of IP address, can according to the family under the pre-determined IP address in this global I P resource pool with and corresponding domain name, determine the domain name of an IP address, can improve the performance of inquiry of the domain name, reduce inquiry time delay.Further, when the domain name online query is served unavailable or broken, still can carry out inquiry of the domain name by global I P resource pool.
Preferably, on the basis of technical scheme embodiment illustrated in fig. 1, step 105 " is chosen a plurality of IP address of a described IP address field " and being comprised: the central point of choosing a described IP address field, the coboundary point, the IP address of lower boundary point and random site point, described coboundary point is IP address corresponding to maximum in the described IP address field, described lower boundary point is IP address corresponding to minimum value in the described IP address field, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is a plurality of IP address of selecting at random in a described IP address field.
In embodiments of the present invention, when choosing a plurality of IP address of a described IP address field, described a plurality of IP can choose the address at random.Preferably, in order to guarantee to inquire quickly and accurately the domain name of a described IP address, from a whole described IP address field, evenly choose a plurality of IP address, wherein said a plurality of IP address can comprise central point, coboundary point and the lower boundary point of IP address field, and described central point is the equidistant IP address to up-and-down boundary point.Distance to up-and-down boundary point equates to refer to that this point is equal as far as possible to the distance of up-and-down boundary point herein.
Wherein, the number of random site point can determine that preferably, the ratio of choosing is 10% by comprising IP address number in the IP address field, and the number of namely choosing random site point is to comprise 10% of IP address number in the described IP address field.
Further alternatively, on the basis of technical scheme embodiment illustrated in fig. 1, step 107 " according to the domain name of described a plurality of IP address, is obtained domain name corresponding to IP family and IP family that described a plurality of IP address is determined " and is comprised 107a or 107b:
107a: when the domain name homogeneous phase of described a plurality of IP address simultaneously, mapping relations between a described IP family and the domain name as an IP family, and are set up in described a plurality of IP address;
In embodiments of the present invention, the domain name homogeneous phase of a plurality of IP address of choosing in a described IP address field simultaneously, can think that described a plurality of IP address is to belong to same IP family, IP family under described a plurality of IP address is an IP family, and the domain name of described a plurality of IP address is domain name corresponding to a described IP family;
After determining domain name corresponding to a described IP family and a described IP family, set up the mapping relations between a described IP family and the domain name, be stored in the global I P resource pool.
For instance, a plurality of IP address of choosing in the described IP address field is A, B, C, D, five IP addresses of E, inquire about respectively the domain name of five IP addresses, the domain name of supposing five IP addresses is identical, be 123.com, then A, B, C, D, five IP addresses of E can be used as an IP family, i.e. a described IP family, and domain name corresponding to this family is 123.com.
107b: when comprising the 2nd IP address in described a plurality of IP address, adjust described neighbourship degree, and point is determined the 2nd IP address field centered by described the 2nd IP address, continuation is carried out above-mentioned minute family's process to described the 2nd IP address field, and the domain name of other IP addresses in the domain name of described the 2nd IP address and the described IP address field is different.
Wherein, the different domain names that refer to by more described a plurality of IP address of domain name of other IP addresses in the domain name of described the 2nd IP address and the described IP address field, determine to exist in described a plurality of IP address its domain name IP address different from the domain name of other IP addresses, this IP address is referred to as the 2nd IP address, namely comprises the 2nd IP address in described a plurality of IP address;
When comprising the 2nd IP address in described a plurality of IP address, described a plurality of IP can not think to belong in the address same IP family, and need to further divide family this moment to described a plurality of IP address;
In embodiments of the present invention, when comprising the 2nd IP address in described a plurality of IP address, reduce original neighbourship degree, point centered by described the 2nd IP address, according to current neighbourship degree, in a described IP address field, determine the 2nd IP address field more among a small circle, so that in more accurate scope, further divide family.
Wherein, family's process referred to repeat step 104-107 in described further minute, until the domain name homogeneous phase of a plurality of IP address of choosing in the final IP address field of determining is simultaneously, a plurality of IP address of choosing is defined as an IP family, the domain name that it is corresponding is defined as domain name corresponding to described IP family.
For instance, described neighbourship degree is 20, a plurality of IP address of choosing in the described IP address field is A, B, C, D, E, inquire about respectively A, B, C, D, the domain name of E, suppose that Query Result is A, B, C, the domain name of E is 123.com, the domain name of D is abc.com, then the IP address D is described the 2nd IP address, at this moment, can not think A, B, C, D, E belongs to same family, and reducing original neighbourship degree is 10, centered by the IP address D, repeat step 104-107, reselecting a plurality of IP address is F, G, D, H, I inquires about respectively F, G, H, the domain name of I is if the result of inquiry is F, G, D, H, the domain name of I is abc.com, F then, G, D, H, I can think and belong to same IP family that the domain name of this family is exactly abc.com.
The method that the embodiment of the invention provides is by obtaining an IP address; Whether comprise a described IP address in the inquiry global I P resource pool, described global I P resource pool comprises domain name corresponding at least one IP family and each IP family, and each IP family is determined by at least one IP address; When inquiring a described IP address, the domain name that the IP family under the IP address that inquires is corresponding is as the domain name of a described IP address.Adopt technical scheme provided by the invention, by the global I P that sets in advance resource pool is provided, so that when carrying out the inquiry of the domain name of IP address, can according to the family under the pre-determined IP address in this global I P resource pool with and corresponding domain name, determine the domain name of an IP address, can improve the performance of inquiry of the domain name, reduce inquiry time delay.
Alternatively, on the basis of technical scheme embodiment illustrated in fig. 1, step 107a " when the domain name homogeneous phase of described a plurality of IP address simultaneously, with described a plurality of IP address as an IP family, and set up mapping relations between a described IP family and the domain name " comprise step () and (two):
Step (one): use the hash Hash table, described a plurality of IP address is saved as an IP family as key assignments;
In embodiments of the present invention, bind with described a plurality of IP address and by the IP family that described a plurality of IP address is determined, that is to say the key assignments of described a plurality of IP address as the hash Hash table, be used for index the one IP family.
Those skilled in the art can know that the hash Hash table is the data structure that directly conducts interviews according to key assignments (Key value).
Step (two): set up a described IP family and the domain name that inquires between mapping relations.
In embodiments of the present invention, with domain name corresponding stored corresponding to a described IP family and a described IP family, be updated in the global I P resource pool, for the next time inquiry of the domain name of IP address.
The method that the embodiment of the invention provides on the basis of above-described embodiment, by using the hash Hash table, saves as an IP family with described a plurality of IP address as key assignments; Mapping relations between the domain name of setting up a described IP family and inquiring, can constantly update and enlarge global I P resource pool, in order to when carrying out the IP address lookup, can satisfy by the global I P resource pool that constantly enlarges the requirement of inquiry, can provide the High Performance Data Query service ability when simplifying storage overhead.
Above-mentioned all optional technical schemes can adopt any combination to form optional embodiment of the present invention, give unnecessary details no longer one by one at this.
Fig. 2 is the flow chart of a kind of IP minute family's method providing of the embodiment of the invention, and referring to Fig. 2, described method comprises:
201: according to neighbourship degree, determine the IP address field that an IP address is affiliated;
Wherein, a described IP address can get access to, and the IP address that does not inquire in global I P resource pool also can be that in the global I P resource pool any do not stored the IP address of its domain name.
In embodiments of the present invention, the coordinate at zero point by the secondary IP address reference axis begins, and according to neighbourship degree, the IP address in the IP address coordinate axle is divided into a plurality of IP address fields, and the IP address field under the described IP address is defined as an IP address field.
202: a plurality of IP address of choosing a described IP address field;
203: the domain name of inquiring about a plurality of IP address of a described IP address field;
Particularly, whether nslookup online query service is available, when the domain name online query is served when unavailable, it is unavailable to return domain name online query service, finish inquiry, but when the domain name online query service time spent, respectively the domain name online query is carried out in described a plurality of IP address, when getting access to the domain name of described a plurality of IP address, verify further whether the domain name of described a plurality of IP address is all identical.
204: according to the domain name of described a plurality of IP address, obtain domain name corresponding to IP family and IP family that described a plurality of IP address is determined.
Particularly, when the domain name homogeneous phase while of described a plurality of IP address, determine that described a plurality of IP address belongs to same IP family, and the domain name of described a plurality of IP address is defined as domain name corresponding to IP family, the domain name corresponding stored that described a plurality of IP address, described IP family and IP family is corresponding is in global I P resource pool, to upgrade global I P resource pool.
The method that the embodiment of the invention provides by according to neighbourship degree, is determined the IP address field that an IP address is affiliated; Choose a plurality of IP address of a described IP address field; Inquire about the domain name of a plurality of IP address of a described IP address field; According to the domain name of described a plurality of IP address, obtain domain name corresponding to IP family and IP family that described a plurality of IP address is determined.Adopt technical scheme provided by the invention, by the global I P that sets in advance resource pool is provided, so that when carrying out IP address minute family, can according to the domain name of a plurality of IP address of the described IP address field of inquiry, obtain domain name corresponding to IP family and IP family that described a plurality of IP address is determined.Can in global I P resource pool, carry out IP minute family, improve minute family's speed and an accuracy, for the inquiry of the domain name of IP address provides existing IP address domain name resource, improve the performance of inquiry of the domain name, reduce inquiry time delay.
Alternatively, on the basis of technical scheme embodiment illustrated in fig. 2, step 202 " is chosen a plurality of IP address of a described IP address field " and being comprised: the central point of choosing a described IP address field, the coboundary point, the IP address of lower boundary point and random site point, described coboundary point is IP address corresponding to maximum in the described IP address field, described lower boundary point is IP address corresponding to minimum value in the described IP address field, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is a plurality of IP address of selecting at random in a described IP address field.
In embodiments of the present invention, when choosing a plurality of IP address of a described IP address field, described a plurality of IP can choose the address at random.Preferably, in order to guarantee to inquire quickly and accurately the domain name of a described IP address, from a whole described IP address field, evenly choose a plurality of IP address, wherein said a plurality of IP address can comprise central point, coboundary point and the lower boundary point of IP address field, and described central point is the equidistant IP address to up-and-down boundary point.Distance to up-and-down boundary point equates to refer to that this point is equal as far as possible to the distance of up-and-down boundary point herein.
Wherein, the number of random site point can determine that preferably, the ratio of choosing is 10% by comprising IP address number in the IP address field, and the number of namely choosing random site point is to comprise 10% of IP address number in the described IP address field.
Further, in embodiments of the present invention, according to the difference to the Query Result of the domain name of described a plurality of IP address, step 204 " according to the domain name of described a plurality of IP address, is obtained domain name corresponding to IP family and IP family that described a plurality of IP address is determined " and is comprised 204a or 204b:
204a: when the domain name homogeneous phase of described a plurality of IP address simultaneously, mapping relations between a described IP family and the domain name as an IP family, and are set up in described a plurality of IP address;
In embodiments of the present invention, the domain name homogeneous phase of a plurality of IP address of choosing in a described IP address field simultaneously, can think that described a plurality of IP address is to belong to same IP family, IP family under described a plurality of IP address is an IP family, and the domain name of described a plurality of IP address is domain name corresponding to a described IP family;
After determining domain name corresponding to a described IP family and a described IP family, set up the mapping relations between a described IP family and the domain name, be stored in the global I P resource pool.
204b: when comprising the 2nd IP address in described a plurality of IP address, adjust described neighbourship degree, and point is determined the 2nd IP address field centered by described the 2nd IP address, continuation is carried out above-mentioned minute family's process to described the 2nd IP address field, and the domain name of other IP addresses in the domain name of described the 2nd IP address and the described IP address field is different;
When comprising the 2nd IP address in described a plurality of IP address, described a plurality of IP can not think to belong in the address same IP family, and need to further divide family this moment to described a plurality of IP address;
In embodiments of the present invention, when comprising the 2nd IP address in described a plurality of IP address, reduce original neighbourship degree, point centered by described the 2nd IP address, according to current neighbourship degree, in a described IP address field, determine the 2nd IP address field more among a small circle, so that in more accurate scope, further divide family.
Wherein, family's process referred to repeat step 201-204 in described minute, until the domain name homogeneous phase of a plurality of IP address of choosing in the final IP address field of determining is simultaneously, a plurality of IP address of choosing is defined as an IP family, the domain name that it is corresponding is defined as domain name corresponding to described IP family.
The method that the embodiment of the invention provides by according to neighbourship degree, is determined the IP address field that an IP address is affiliated; Choose a plurality of IP address of a described IP address field; Inquire about the domain name of a plurality of IP address of a described IP address field; According to the domain name of described a plurality of IP address, obtain domain name corresponding to IP family and IP family that described a plurality of IP address is determined.Adopt technical scheme provided by the invention, by the global I P that sets in advance resource pool is provided, so that when carrying out IP address minute family, can according to the domain name of a plurality of IP address of the described IP address field of inquiry, obtain domain name corresponding to IP family and IP family that described a plurality of IP address is determined.Can in global I P resource pool, carry out IP minute family, improve minute family's speed and an accuracy, for the inquiry of the domain name of IP address provides existing IP address domain name resource, improve the performance of inquiry of the domain name, reduce inquiry time delay.
Alternatively, on the basis of technical scheme embodiment illustrated in fig. 2, step 204a " when the domain name homogeneous phase of described a plurality of IP address simultaneously; with described a plurality of IP address as an IP family, and set up mapping relations between a described IP family and the domain name " comprise step () and step (two):
Step (one): use the hash Hash table, described a plurality of IP address is saved as an IP family as key assignments;
In embodiments of the present invention, binding with described a plurality of IP address and by the IP family that described a plurality of IP address is determined, namely is with the key assignments of described a plurality of IP address as the hash Hash table, is used for index the one IP family.Those skilled in the art can know that the hash Hash table is the data structure that directly conducts interviews according to key assignments (Key value).
Step (two): set up a described IP family and the domain name that inquires between mapping relations.
In embodiments of the present invention, with domain name corresponding stored corresponding to a described IP family and a described IP family, be updated in the global I P resource pool, for the next time inquiry of the domain name of IP address.
The method that the embodiment of the invention provides on the basis of above-described embodiment, by using the hash Hash table, saves as an IP family with described a plurality of IP address as key assignments; Mapping relations between the domain name of setting up a described IP family and inquiring, can constantly update and enlarge global I P resource pool, in order to when carrying out the IP address lookup, can satisfy by the global I P resource pool that constantly enlarges the requirement of inquiry, can provide the High Performance Data Query service ability when simplifying storage overhead.
Above-mentioned all optional technical schemes can adopt any combination to form optional embodiment of the present invention, give unnecessary details no longer one by one at this.
Fig. 3 is the flow chart of a kind of domain name inquiry method of providing of the embodiment of the invention, and referring to Fig. 3, described method comprises:
301: obtain an IP address;
The embodiment of the invention is with in the Internet caching system, the dynamic change of IP address, when not having domain-name information in the upstream data bag, it is example, the Internet caching system is according to an IP address of upstream data bag at this moment, trigger IP inquiry of the domain name request, by analyzing this IP inquiry of the domain name request, obtain an IP address of carrying in the IP inquiry of the domain name request.
302: whether comprise a described IP address in the inquiry global I P resource pool, described global I P resource pool comprises domain name corresponding at least one IP family and each IP family, and each IP family is determined by at least one IP address;
303: whether inquire a described IP address, if so, enter step 304; If not, then return and inquire about unsuccessfully, simultaneously the asynchronous step 305 that enters;
Wherein, described " if not; then return and inquire about unsuccessfully; the asynchronous step 305 that enters of while " can be when not inquiring a described IP address, entering step 305 processes, return at the same time inquiry and unsuccessfully order, needn't wait for that namely actual result can directly return inquiry and unsuccessfully order;
In embodiments of the present invention, can also be when not inquiring a described IP address, enter step 305, do not return any order this moment, will wait for after subsequent processes finishes and return real processing results again.Need to prove that the embodiment of the invention is not done restriction to concrete processing mode.
304: return domain name corresponding to IP family that inquires, processing finishes;
305: according to neighbourship degree, determine the IP address field that a described IP address is affiliated;
306: choose the IP address of central point, coboundary point, lower boundary point and random site point of a described IP address field as a plurality of IP address;
307: whether nslookup online query service is available, if unavailable, then enters step 308; If available, enter step 309;
308: it is unavailable to return domain name online query service, finishes inquiry;
309: respectively the domain name online query is carried out in described a plurality of IP address;
310: whether the domain name of described a plurality of IP address is all identical, if all identical, directly enters step 312; Otherwise enter step 311;
311: with domain name is different from the domain name of other IP addresses in the described IP address field IP address as the 2nd IP address, adjust neighbourship degree, point is determined the 2nd IP address field centered by described the 2nd IP address, continues further to divide family's process at described the 2nd IP address field;
When in a plurality of IP address that in minute family's process, occurs choosing, the situation of the IP address with different domain names being arranged, then execution in step 311, until the domain name homogeneous phase of a plurality of IP address of choosing in the final IP address field of determining simultaneously, a plurality of IP address of choosing is defined as an IP family, and the domain name that it is corresponding is defined as domain name corresponding to described IP family.
312: use the hash Hash table, described a plurality of IP address is saved as an IP family as key assignments;
313: set up a described IP family and the domain name that inquires between mapping relations.
The method that the embodiment of the invention provides is by obtaining an IP address; Whether comprise a described IP address in the inquiry global I P resource pool, described global I P resource pool comprises domain name corresponding at least one IP family and each IP family, and each IP family is determined by at least one IP address; When inquiring a described IP address, the domain name that the IP family under the IP address that inquires is corresponding is as the domain name of a described IP address.Adopt technical scheme provided by the invention, by the global I P that sets in advance resource pool is provided, so that when carrying out the inquiry of the domain name of IP address, can according to the family under the pre-determined IP address in this global I P resource pool with and corresponding domain name, determine the domain name of an IP address, can improve the performance of inquiry of the domain name, reduce inquiry time delay.
Fig. 4 is the structural representation of a kind of inquiry of the domain name device of providing of the embodiment of the invention.Referring to Fig. 4, described device comprises:
The first acquisition module 41 is used for obtaining an IP address;
Enquiry module 42 is used for inquiry global I P resource pool and whether comprises a described IP address, and described global I P resource pool comprises domain name corresponding at least one IP family and each IP family, and each IP family is determined by at least one IP address;
Domain name is returned module 43, is used for when inquiring a described IP address, and the domain name that the IP family that inquires is corresponding is as the domain name of a described IP address.
Alternatively, described device also comprises:
Address field determination module 44 is used for when not inquiring a described IP address, according to neighbourship degree, determines the IP address field that a described IP address is affiliated;
Choose module 45, be used for choosing a plurality of IP address of a described IP address field;
Inquiry of the domain name module 46 is for the domain name of a plurality of IP address of inquiring about a described IP address field;
The second acquisition module 47 is used for the domain name according to described a plurality of IP address, obtains domain name corresponding to IP family and IP family that described a plurality of IP address is determined.
Alternatively, the described module of choosing is for the IP address of central point, coboundary point, lower boundary point and the random site point of choosing a described IP address field, described coboundary point is IP address corresponding to maximum in the described IP address field, described lower boundary point is IP address corresponding to minimum value in the described IP address field, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is a plurality of IP address of selecting at random in a described IP address field.
Described the second acquisition module 47 comprises:
Determining unit 471, be used for when the domain name homogeneous phase of described a plurality of IP address simultaneously, mapping relations between a described IP family and the domain name as an IP family, and are set up in described a plurality of IP address;
Or, divide family unit 472, be used for when described a plurality of IP address comprises the 2nd IP address, adjust described neighbourship degree, and point is determined the 2nd IP address field centered by described the 2nd IP address, continuation is carried out above-mentioned minute family's process to described the 2nd IP address field, and the domain name of other IP addresses in the domain name of described the 2nd IP address and the described IP address field is different.
Described determining unit 471 comprises:
Preserve subelement 4711, be used for using the hash Hash table, described a plurality of IP address is saved as an IP family as key assignments;
Relation is set up subelement 4712, for the mapping relations between the domain name of setting up a described IP family and inquiring.
The device that the embodiment of the invention provides is by obtaining an IP address; Whether comprise a described IP address in the inquiry global I P resource pool, described global I P resource pool comprises domain name corresponding at least one IP family and each IP family, and each IP family is determined by at least one IP address; When inquiring a described IP address, the domain name that the IP family under the IP address that inquires is corresponding is as the domain name of a described IP address.Adopt technical scheme provided by the invention, by the global I P that sets in advance resource pool is provided, so that when carrying out the inquiry of the domain name of IP address, can according to the family under the pre-determined IP address in this global I P resource pool with and corresponding domain name, determine the domain name of an IP address, can improve the performance of inquiry of the domain name, reduce inquiry time delay.
Fig. 5 is the structural representation of a kind of IP minute family's device providing of the embodiment of the invention.Referring to Fig. 5, described device comprises:
Address field determination module 51 is used for according to neighbourship degree, determines the IP address field that an IP address is affiliated;
Choose module 52, be used for choosing a plurality of IP address of a described IP address field;
Enquiry module 53 is for the domain name of a plurality of IP address of inquiring about a described IP address field;
Acquisition module 54 is used for the domain name according to described a plurality of IP address, obtains domain name corresponding to IP family and IP family that described a plurality of IP address is determined.
Alternatively, the described IP address of choosing module 52 concrete central point, coboundary point, lower boundary point and random site points for choosing a described IP address field, described coboundary point is IP address corresponding to maximum in the described IP address field, described lower boundary point is IP address corresponding to minimum value in the described IP address field, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is a plurality of IP address of selecting at random in a described IP address field.
Alternatively, described acquisition module 54 comprises:
Determining unit 541, be used for when the domain name homogeneous phase of described a plurality of IP address simultaneously, mapping relations between a described IP family and the domain name as an IP family, and are set up in described a plurality of IP address;
Or, divide family unit 542, be used for when described a plurality of IP address comprises the 2nd IP address, adjust described neighbourship degree, and point is determined the 2nd IP address field centered by described the 2nd IP address, continuation is carried out above-mentioned minute family's process to described the 2nd IP address field, and the domain name of other IP addresses in the domain name of described the 2nd IP address and the described IP address field is different.
Alternatively, described determining unit 541 comprises:
Preserve subelement 5411, be used for using the hash Hash table, described a plurality of IP address is saved as an IP family as key assignments;
Relation is set up subelement 5412, for the mapping relations between the domain name of setting up a described IP family and inquiring.
The device that the embodiment of the invention provides by according to neighbourship degree, is determined the IP address field that an IP address is affiliated; Choose a plurality of IP address of a described IP address field; Inquire about the domain name of a plurality of IP address of a described IP address field; According to the domain name of described a plurality of IP address, obtain domain name corresponding to IP family and IP family that described a plurality of IP address is determined.Adopt technical scheme provided by the invention, by the global I P that sets in advance resource pool is provided, so that when carrying out IP address minute family, can according to the domain name of a plurality of IP address of the described IP address field of inquiry, obtain domain name corresponding to IP family and IP family that described a plurality of IP address is determined.Can in global I P resource pool, carry out IP minute family, improve minute family's speed and an accuracy, for the inquiry of the domain name of IP address provides existing IP address domain name resource, improve the performance of inquiry of the domain name, reduce inquiry time delay.
Need to prove: the inquiry of the domain name device that above-described embodiment provides when inquiry of the domain name and the IP that provides minute family's device when IP minute family, only the division with above-mentioned each functional module is illustrated, in the practical application, can as required the above-mentioned functions distribution be finished by different functional modules, the internal structure of the equipment of being about to is divided into different functional modules, to finish all or part of function described above.In addition, the inquiry of the domain name device that above-described embodiment provides and IP minute family's device and domain name inquiry method embodiment and IP minute family's embodiment of the method belong to same design, and its specific implementation process sees embodiment of the method for details, repeats no more here.
Fig. 6 is the block diagram of a kind of inquiry of the domain name equipment of providing of the embodiment of the invention.Referring to Fig. 6, described equipment comprises:
Processor 61 is used for obtaining an IP address;
Whether described processor 61 also comprises a described IP address for the global I P resource pool of inquiring about described memory, and described global I P resource pool comprises domain name corresponding at least one IP family and each IP family, and each IP family is determined by at least one IP address;
Described processor 61 also is used for when inquiring a described IP address, and the domain name that the IP family under the IP address that inquires is corresponding is as the domain name of a described IP address.
Described processor 61 also is used for according to neighbourship degree, determining the IP address field that a described IP address is affiliated when not inquiring a described IP address; Choose a plurality of IP address of a described IP address field; Inquire about the domain name of a plurality of IP address of a described IP address field; According to the domain name of described a plurality of IP address, obtain domain name corresponding to IP family and IP family that described a plurality of IP address is determined.
Described processor 61 also is used for choosing the IP address of central point, coboundary point, lower boundary point and the random site point of a described IP address field, described coboundary point is IP address corresponding to maximum in the described IP address field, described lower boundary point is IP address corresponding to minimum value in the described IP address field, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is a plurality of IP address of selecting at random in a described IP address field.
Described processor 61 also be used for when the domain name homogeneous phase of described a plurality of IP address simultaneously, mapping relations between a described IP family and the domain name as an IP family, and are set up in described a plurality of IP address; Or, when comprising the 2nd IP address in described a plurality of IP address, adjust described neighbourship degree, and point is determined the 2nd IP address field centered by described the 2nd IP address, continuation is carried out above-mentioned minute family's process to described the 2nd IP address field, and the domain name of other IP addresses in the domain name of described the 2nd IP address and the described IP address field is different.
Memory 62 is used for using the hash Hash table, and described a plurality of IP address is saved as an IP family as key assignments; Mapping relations between the domain name of setting up a described IP family and inquiring.
Fig. 7 is the block diagram of a kind of IP minute family's equipment providing of the embodiment of the invention.Referring to Fig. 7, described equipment comprises:
Processor 71 is used for according to neighbourship degree, determines the IP address field that an IP address is affiliated;
Described processor 71 also is used for choosing a plurality of IP address of a described IP address field;
Described processor 71 also is used for inquiring about the domain name of a plurality of IP address of a described IP address field;
Described processor 71 also is used for the domain name according to described a plurality of IP address, obtains domain name corresponding to IP family and IP family that described a plurality of IP address is determined.
Described processor 71 also is used for choosing the IP address of central point, coboundary point, lower boundary point and the random site point of a described IP address field, described coboundary point is IP address corresponding to maximum in the described IP address field, described lower boundary point is IP address corresponding to minimum value in the described IP address field, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is a plurality of IP address of selecting at random in a described IP address field.
Described processor 71 also be used for when the domain name homogeneous phase of described a plurality of IP address simultaneously, mapping relations between a described IP family and the domain name as an IP family, and are set up in described a plurality of IP address; Or, when comprising the 2nd IP address in described a plurality of IP address, adjust described neighbourship degree, and point is determined the 2nd IP address field centered by described the 2nd IP address, continuation is carried out above-mentioned minute family's process to described the 2nd IP address field, and the domain name of other IP addresses in the domain name of described the 2nd IP address and the described IP address field is different.
Memory 72 is used for using the hash Hash table, and described a plurality of IP address is saved as an IP family as key assignments; Mapping relations between the domain name of setting up a described IP family and inquiring.
The all or part of step that one of ordinary skill in the art will appreciate that realization above-described embodiment can be finished by hardware, also can come the relevant hardware of instruction to finish by program, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be read-only memory, disk or CD etc.
The above only is preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (27)

1. a domain name inquiry method is characterized in that, described method comprises:
Obtain an IP address;
Whether comprise a described IP address in the inquiry global I P resource pool, described global I P resource pool comprises domain name corresponding at least one IP family and each IP family, and each IP family is determined by at least one IP address;
When inquiring a described IP address, the domain name that the IP family under the IP address that inquires is corresponding is as the domain name of a described IP address.
2. method according to claim 1, it is characterized in that whether comprise a described IP address in the inquiry global I P resource pool, described global I P resource pool comprises domain name corresponding at least one IP family and each IP family, each IP family is determined by at least one IP address, also comprises afterwards:
When not inquiring a described IP address, according to neighbourship degree, determine the IP address field that a described IP address is affiliated;
Choose a plurality of IP address of a described IP address field;
Inquire about the domain name of a plurality of IP address of a described IP address field;
According to the domain name of described a plurality of IP address, obtain domain name corresponding to IP family and IP family that described a plurality of IP address is determined.
3. method according to claim 2 is characterized in that, chooses a plurality of IP address of a described IP address field, comprising:
Choose the IP address of central point, coboundary point, lower boundary point and the random site point of a described IP address field, described coboundary point is IP address corresponding to maximum in the described IP address field, described lower boundary point is IP address corresponding to minimum value in the described IP address field, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is a plurality of IP address of selecting at random in a described IP address field.
4. method according to claim 2 is characterized in that, according to the domain name of described a plurality of IP address, obtains domain name corresponding to IP family and IP family that a described IP address field is determined, comprising:
When the domain name homogeneous phase of described a plurality of IP address simultaneously, mapping relations between a described IP family and the domain name as an IP family, and are set up in described a plurality of IP address;
Or, when comprising the 2nd IP address in described a plurality of IP address, adjust described neighbourship degree, and point is determined the 2nd IP address field centered by described the 2nd IP address, continuation is carried out above-mentioned minute family's process to described the 2nd IP address field, and the domain name of other IP addresses in the domain name of described the 2nd IP address and the described IP address field is different.
5. method according to claim 4 is characterized in that, when the domain name homogeneous phase of described a plurality of IP address simultaneously, mapping relations between a described IP family and the domain name as an IP family, and are set up in described a plurality of IP address, comprising:
Use the hash Hash table, described a plurality of IP address is saved as an IP family as key assignments;
Mapping relations between the domain name of setting up a described IP family and inquiring.
6. an IP divides family's method, it is characterized in that, described method comprises:
According to neighbourship degree, determine the IP address field that an IP address is affiliated;
Choose a plurality of IP address of a described IP address field;
Inquire about the domain name of a plurality of IP address of a described IP address field;
According to the domain name of described a plurality of IP address, obtain domain name corresponding to IP family and IP family that described a plurality of IP address is determined.
7. method according to claim 6 is characterized in that, chooses a plurality of IP address of a described IP address field, comprising:
Choose the IP address of central point, coboundary point, lower boundary point and the random site point of a described IP address field, described coboundary point is IP address corresponding to maximum in the described IP address field, described lower boundary point is IP address corresponding to minimum value in the described IP address field, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is a plurality of IP address of selecting at random in a described IP address field.
8. method according to claim 6 is characterized in that, according to the domain name of described a plurality of IP address, obtains domain name corresponding to IP family and IP family that described a plurality of IP address is determined, comprising:
When the domain name homogeneous phase of described a plurality of IP address simultaneously, mapping relations between a described IP family and the domain name as an IP family, and are set up in described a plurality of IP address;
Or, when comprising the 2nd IP address in described a plurality of IP address, adjust described neighbourship degree, and point is determined the 2nd IP address field centered by described the 2nd IP address, continuation is carried out above-mentioned minute family's process to described the 2nd IP address field, and the domain name of other IP addresses in the domain name of described the 2nd IP address and the described IP address field is different.
9. method according to claim 8 is characterized in that, when the domain name homogeneous phase of described a plurality of IP address simultaneously, mapping relations between a described IP family and the domain name as an IP family, and are set up in described a plurality of IP address, comprising:
Use the hash Hash table, described a plurality of IP address is saved as an IP family as key assignments;
Mapping relations between the domain name of setting up a described IP family and inquiring.
10. an inquiry of the domain name device is characterized in that, described device comprises:
The first acquisition module is used for obtaining an IP address;
Enquiry module is used for inquiry global I P resource pool and whether comprises a described IP address, and described global I P resource pool comprises domain name corresponding at least one IP family and each IP family, and each IP family is determined by at least one IP address;
Domain name is returned module, is used for when inquiring a described IP address, and the domain name that the IP family that inquires is corresponding is as the domain name of a described IP address.
11. device according to claim 10 is characterized in that, described device also comprises:
The address field determination module is used for when not inquiring a described IP address, according to neighbourship degree, determines the IP address field that a described IP address is affiliated;
Choose module, be used for choosing a plurality of IP address of a described IP address field;
The inquiry of the domain name module is for the domain name of a plurality of IP address of inquiring about a described IP address field;
The second acquisition module is used for the domain name according to described a plurality of IP address, obtains domain name corresponding to IP family and IP family that described a plurality of IP address is determined.
12. device according to claim 11, it is characterized in that, the described IP address of choosing concrete central point, coboundary point, lower boundary point and the random site point for choosing a described IP address field of module, described coboundary point is IP address corresponding to maximum in the described IP address field, described lower boundary point is IP address corresponding to minimum value in the described IP address field, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is a plurality of IP address of selecting at random in a described IP address field.
13. device according to claim 11 is characterized in that, described the second acquisition module comprises:
Determining unit, be used for when the domain name homogeneous phase of described a plurality of IP address simultaneously, mapping relations between a described IP family and the domain name as an IP family, and are set up in described a plurality of IP address;
Or, divide the family unit, be used for when described a plurality of IP address comprises the 2nd IP address, adjust described neighbourship degree, and point is determined the 2nd IP address field centered by described the 2nd IP address, continuation is carried out above-mentioned minute family's process to described the 2nd IP address field, and the domain name of other IP addresses in the domain name of described the 2nd IP address and the described IP address field is different.
14. device according to claim 13 is characterized in that, described determining unit comprises:
Preserve subelement, be used for using the hash Hash table, described a plurality of IP address is saved as an IP family as key assignments;
Relation is set up subelement, for the mapping relations between the domain name of setting up a described IP family and inquiring.
15. an IP divides family's device, it is characterized in that, described device comprises:
The address field determination module is used for according to neighbourship degree, determines the IP address field that an IP address is affiliated;
Choose module, be used for choosing a plurality of IP address of a described IP address field;
Enquiry module is for the domain name of a plurality of IP address of inquiring about a described IP address field;
Acquisition module is used for the domain name according to described a plurality of IP address, obtains domain name corresponding to IP family and IP family that described a plurality of IP address is determined.
16. device according to claim 15, it is characterized in that, the described IP address of choosing concrete central point, coboundary point, lower boundary point and the random site point for choosing a described IP address field of module, described coboundary point is IP address corresponding to maximum in the described IP address field, described lower boundary point is IP address corresponding to minimum value in the described IP address field, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is a plurality of IP address of selecting at random in a described IP address field.
17. device according to claim 15 is characterized in that, described acquisition module comprises:
Determining unit, be used for when the domain name homogeneous phase of described a plurality of IP address simultaneously, mapping relations between a described IP family and the domain name as an IP family, and are set up in described a plurality of IP address;
Or, divide the family unit, be used for when described a plurality of IP address comprises the 2nd IP address, adjust described neighbourship degree, and point is determined the 2nd IP address field centered by described the 2nd IP address, continuation is carried out above-mentioned minute family's process to described the 2nd IP address field, and the domain name of other IP addresses in the domain name of described the 2nd IP address and the described IP address field is different.
18. device according to claim 17 is characterized in that, described determining unit comprises:
Preserve subelement, be used for using the hash Hash table, described a plurality of IP address is saved as an IP family as key assignments;
Relation is set up subelement, for the mapping relations between the domain name of setting up a described IP family and inquiring.
19. an inquiry of the domain name equipment is characterized in that, comprising: processor, memory, described processor and memory coupling,
Described processor is used for obtaining an IP address;
Whether described processor also comprises a described IP address for the global I P resource pool of inquiring about described memory, and described global I P resource pool comprises domain name corresponding at least one IP family and each IP family, and each IP family is determined by at least one IP address;
Described processor also is used for when inquiring a described IP address, and the domain name that the IP family under the IP address that inquires is corresponding is as the domain name of a described IP address.
20. equipment according to claim 19 is characterized in that, described processor also is used for according to neighbourship degree, determining the IP address field that a described IP address is affiliated when not inquiring a described IP address; Choose a plurality of IP address of a described IP address field; Inquire about the domain name of a plurality of IP address of a described IP address field; According to the domain name of described a plurality of IP address, obtain domain name corresponding to IP family and IP family that described a plurality of IP address is determined.
21. equipment according to claim 20, it is characterized in that, described processor also is used for choosing the IP address of central point, coboundary point, lower boundary point and the random site point of a described IP address field, described coboundary point is IP address corresponding to maximum in the described IP address field, described lower boundary point is IP address corresponding to minimum value in the described IP address field, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is a plurality of IP address of selecting at random in a described IP address field.
22. equipment according to claim 20 is characterized in that, described processor also be used for when the domain name homogeneous phase of described a plurality of IP address simultaneously, mapping relations between a described IP family and the domain name as an IP family, and are set up in described a plurality of IP address; Or, when comprising the 2nd IP address in described a plurality of IP address, adjust described neighbourship degree, and point is determined the 2nd IP address field centered by described the 2nd IP address, continuation is carried out above-mentioned minute family's process to described the 2nd IP address field, and the domain name of other IP addresses in the domain name of described the 2nd IP address and the described IP address field is different.
23. equipment according to claim 22 is characterized in that, described memory is used for using the hash Hash table, and described a plurality of IP address is saved as an IP family as key assignments; Mapping relations between the domain name of setting up a described IP family and inquiring.
24. an IP divides family's equipment, it is characterized in that, comprising: processor, memory, described processor and memory coupling,
Described processor is used for according to neighbourship degree, determines the IP address field that an IP address is affiliated;
Described processor also is used for choosing a plurality of IP address of a described IP address field;
Described processor also is used for inquiring about the domain name of a plurality of IP address of a described IP address field;
Described processor also is used for the domain name according to described a plurality of IP address, obtains domain name corresponding to IP family and IP family that described a plurality of IP address is determined.
25. equipment according to claim 24, it is characterized in that, described processor also is used for choosing the IP address of central point, coboundary point, lower boundary point and the random site point of a described IP address field, described coboundary point is IP address corresponding to maximum in the described IP address field, described lower boundary point is IP address corresponding to minimum value in the described IP address field, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is a plurality of IP address of selecting at random in a described IP address field.
26. equipment according to claim 24 is characterized in that, described processor also be used for when the domain name homogeneous phase of described a plurality of IP address simultaneously, mapping relations between a described IP family and the domain name as an IP family, and are set up in described a plurality of IP address; Or, when comprising the 2nd IP address in described a plurality of IP address, adjust described neighbourship degree, and point is determined the 2nd IP address field centered by described the 2nd IP address, continuation is carried out above-mentioned minute family's process to described the 2nd IP address field, and the domain name of other IP addresses in the domain name of described the 2nd IP address and the described IP address field is different.
27. equipment according to claim 26 is characterized in that, described memory is used for using the hash Hash table, and described a plurality of IP address is saved as an IP family as key assignments; Mapping relations between the domain name of setting up a described IP family and inquiring.
CN201310027230.2A 2013-01-22 2013-01-22 Domain name inquiry method, IP divide race's method, device and equipment Expired - Fee Related CN103078968B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310027230.2A CN103078968B (en) 2013-01-22 2013-01-22 Domain name inquiry method, IP divide race's method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310027230.2A CN103078968B (en) 2013-01-22 2013-01-22 Domain name inquiry method, IP divide race's method, device and equipment

Publications (2)

Publication Number Publication Date
CN103078968A true CN103078968A (en) 2013-05-01
CN103078968B CN103078968B (en) 2015-12-02

Family

ID=48155370

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310027230.2A Expired - Fee Related CN103078968B (en) 2013-01-22 2013-01-22 Domain name inquiry method, IP divide race's method, device and equipment

Country Status (1)

Country Link
CN (1) CN103078968B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106790744A (en) * 2016-12-01 2017-05-31 上海云盾信息技术有限公司 IP dispatching methods and system
CN109657108A (en) * 2018-09-03 2019-04-19 长安通信科技有限责任公司 A kind of storage of domain name asset data and querying method and system
CN110798545A (en) * 2019-11-05 2020-02-14 中国人民解放军国防科技大学 Web-based domain name data acquisition method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101800746A (en) * 2010-02-04 2010-08-11 成都市华为赛门铁克科技有限公司 Method, device and system for detecting domain name of control host machine in botnets
CN102025793A (en) * 2010-01-22 2011-04-20 ***通信集团北京有限公司 Domain name resolution method and system and DNS in IP network
CN102055817A (en) * 2010-12-30 2011-05-11 中国人民解放军信息工程大学 Method for gathering homologous address beam and homologous gathering network route system
CN102457588A (en) * 2011-12-20 2012-05-16 北京瑞汛世纪科技有限公司 Method and device for implementing rDNS
CN102523196A (en) * 2011-11-21 2012-06-27 北京神州绿盟信息安全科技股份有限公司 Information identification method, device and system
CN102882991A (en) * 2012-09-29 2013-01-16 北京奇虎科技有限公司 Browser and domain name resolution method thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102025793A (en) * 2010-01-22 2011-04-20 ***通信集团北京有限公司 Domain name resolution method and system and DNS in IP network
CN101800746A (en) * 2010-02-04 2010-08-11 成都市华为赛门铁克科技有限公司 Method, device and system for detecting domain name of control host machine in botnets
CN102055817A (en) * 2010-12-30 2011-05-11 中国人民解放军信息工程大学 Method for gathering homologous address beam and homologous gathering network route system
CN102523196A (en) * 2011-11-21 2012-06-27 北京神州绿盟信息安全科技股份有限公司 Information identification method, device and system
CN102457588A (en) * 2011-12-20 2012-05-16 北京瑞汛世纪科技有限公司 Method and device for implementing rDNS
CN102882991A (en) * 2012-09-29 2013-01-16 北京奇虎科技有限公司 Browser and domain name resolution method thereof

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106790744A (en) * 2016-12-01 2017-05-31 上海云盾信息技术有限公司 IP dispatching methods and system
CN106790744B (en) * 2016-12-01 2020-09-15 上海云盾信息技术有限公司 IP scheduling method and system
CN109657108A (en) * 2018-09-03 2019-04-19 长安通信科技有限责任公司 A kind of storage of domain name asset data and querying method and system
CN110798545A (en) * 2019-11-05 2020-02-14 中国人民解放军国防科技大学 Web-based domain name data acquisition method

Also Published As

Publication number Publication date
CN103078968B (en) 2015-12-02

Similar Documents

Publication Publication Date Title
US9779113B2 (en) Systems and methods for improving domain name system traffic routing
CN107395683B (en) Method for selecting return path and server
CN103281409B (en) Based on mobile Internet domain name analytic method and the dns server of Transmission Control Protocol
US11546446B2 (en) System and method for facilitating routing
US9686229B2 (en) Identifying an efficient destination server
CN107104921B (en) DDoS attack defense method and device
US10530738B2 (en) DNS resolution replay for bare domain names that map to “A” records
US20230128125A1 (en) Systems and methods for processing requests for content of a content distribution network
JP6373021B2 (en) Apparatus and method for processing differently configured longest prefix match tables
CN102868550B (en) Total network flow scheduler and method for querying domain name resolution record by using total network flow scheduler
US8688681B1 (en) Identifying internet protocol addresses for internet hosting entities
US20230022183A1 (en) Systems and methods for processing requests for content of a content distribution network
CN103491201A (en) Domain name resolution method and domain name server
CN107896257A (en) Method, apparatus, equipment and the medium of deploying client subsystem function
CN109451089A (en) A kind of access method, device, computer equipment and computer storage medium
CN103078968A (en) Domain name querying method, IP (Internet Protocol) grouping method, device and equipment
CN107040617B (en) Data processing method and device
CN107493309B (en) File writing method and device in distributed system
US20230041395A1 (en) Method and Device for Processing Routing Table Entries
CN104780235A (en) IP attribution inquiry method and device and server
CN111049941A (en) DNS scheduling method, domain name server and computer readable storage medium
CN102143207B (en) Content acquisition method and redirecting node
CN111447291B (en) DNS-based scheduling method and system and electronic equipment
KR20150113375A (en) Computing apparatus for data distribution service and method for operating thereof
CN114520784A (en) Dynamic content accelerated access method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20151202

Termination date: 20190122

CF01 Termination of patent right due to non-payment of annual fee