CN103078968B - Domain name inquiry method, IP divide race's method, device and equipment - Google Patents

Domain name inquiry method, IP divide race's method, device and equipment Download PDF

Info

Publication number
CN103078968B
CN103078968B CN201310027230.2A CN201310027230A CN103078968B CN 103078968 B CN103078968 B CN 103078968B CN 201310027230 A CN201310027230 A CN 201310027230A CN 103078968 B CN103078968 B CN 103078968B
Authority
CN
China
Prior art keywords
address
domain name
race
addresses
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.)
Expired - Fee Related
Application number
CN201310027230.2A
Other languages
Chinese (zh)
Other versions
CN103078968A (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

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a kind of domain name inquiry method, IP point race's method, device and equipment, belong to networking technology area.The method comprises: obtain an IP address; Whether comprise a described IP address in inquiry global I P resource pool, described global I P resource pool comprises domain name corresponding at least one IP race and each IP race, and each IP race is determined by least one IP address; When inquiring a described IP address, using the domain name of domain name corresponding for the IP race belonging to the IP address that inquires as a described IP address.Adopt technical scheme provided by the invention, by providing the global I P resource pool pre-set, make when carrying out the inquiry of the domain name of IP address, can the domain name of race belonging to IP address pre-determined in this global I P resource pool and its correspondence, determine the domain name of an IP address, the performance of inquiry of the domain name can be improved, reduce inquiry time delay.

Description

Domain name inquiry method, IP divide race'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 race's method, device and equipment.
Background technology
The Internet caching solution (InternetCacheSolution) accelerates solution towards the flow buffering of carrier class operator and bandwidth operator specially, for HTTP(HypertextTransportProtocol, HTTP), Online Video, P2P(PeertoPeer, point-to-point) etc. large discharge application buffer memory.Nearly all the Internet caching system all uses the upstream data bag of static name white list to access to process, if the domain-name information that upstream data bag carries mates with white list, continues processing service flow journey, if do not mated, then abandons upstream data bag.And for quite a few websites such as net dish, Online Videos, its IP(InternetProtocol, net association) address is dynamic change, do not have domain-name information in its upstream data bag.Therefore, static white list cannot adapt to this fast-changing IP address, and cause caching system effectively to identify this kind of website and to process, buffer memory effect significantly reduces.
In prior art, the mode of generally being inquired about by real-time online inquires about the domain-name information of upstream data bag, the IP address real-time query outer net data source entrained by upstream data bag, to obtain corresponding domain-name information.
Realizing in process of the present invention, inventor finds that prior art at least exists following problem:
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, once there is time delay in the data-bag interacting of online query, just lose the chance that upstream data bag is redirected, cause redirected efficiency lower.
Summary of the invention
In order to solve the problem of prior art, embodiments provide a kind of domain name inquiry method, IP point race's method, device and equipment.Described technical scheme is as follows:
First aspect, embodiments provides a kind of domain name inquiry method, and described method comprises:
Obtain an IP address;
Whether comprise a described IP address in inquiry global I P resource pool, described global I P resource pool comprises domain name corresponding at least one IP race and each IP race, and each IP race is determined by least one IP address;
When inquiring a described IP address, using the domain name of domain name corresponding for the IP race belonging to the IP address that inquires as a described IP address.
In conjunction with first aspect, in the first possibility implementation of the embodiment of the present invention, a described IP address whether is comprised in inquiry global I P resource pool, described global I P resource pool comprises domain name corresponding at least one IP race and each IP race, each IP race is determined by least one IP address, comprises afterwards:
When not inquiring a described IP address, according to neighbourship degree, determine the IP address field belonging to a described IP address;
Choose multiple IP addresses of a described IP address field;
Inquire about the domain name of multiple IP addresses of a described IP address field;
According to the domain name of described multiple IP address, obtain domain name corresponding to the IP race that determines described multiple IP address and IP race.
In conjunction with the first possibility implementation of the embodiment of the present invention, in the second possibility implementation of the embodiment of the present invention, choose multiple IP addresses of a described IP address field, comprising:
Choose the IP address of the central point of a described IP address field, coboundary point, lower boundary point and random site point, described coboundary point is the IP address that in a described IP address field, maximum is corresponding, described lower boundary point is the IP address that in a described IP address field, minimum value is corresponding, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is multiple IP addresses of Stochastic choice in a described IP address field.
May implementation in conjunction with the first of the embodiment of the present invention, the third of the embodiment of the present invention may in implementation, according to the domain name of described multiple IP address, obtains domain name corresponding to IP race that a described IP address field determines and IP race, comprising:
When the domain name homogeneous phase of described multiple IP address while, using described multiple IP address as an IP race, and set up the mapping relations between a described IP race and domain name;
Or, when described multiple IP address comprises the 2nd IP address, adjust described neighbourship degree, and point determines the 2nd IP address field centered by described 2nd IP address, continue to carry out above-mentioned point race's process to described 2nd IP address field, the domain name of described 2nd IP address is different from the domain name of other IP addresses in a described IP address field.
In conjunction with the third possibility implementation of the embodiment of the present invention, in 4th kind of possibility implementation of the embodiment of the present invention, when the domain name homogeneous phase of described multiple IP address while, using described multiple IP address as an IP race, and the mapping relations set up between a described IP race and domain name, comprising:
Use hash Hash table, described multiple IP address is saved as an IP race as key assignments;
Set up the mapping relations between a described IP race and the domain name inquired.
Second aspect, the embodiment of the present invention additionally provides a kind of IP point of race's method, and described method comprises:
According to neighbourship degree, determine the IP address field belonging to an IP address;
Choose multiple IP addresses of a described IP address field;
Inquire about the domain name of multiple IP addresses of a described IP address field;
According to the domain name of described multiple IP address, obtain domain name corresponding to the IP race that determines described multiple IP address and IP race.
In conjunction with second aspect, in the first possibility implementation of the embodiment of the present invention, choose multiple IP addresses of a described IP address field, comprising:
Choose the IP address of the central point of a described IP address field, coboundary point, lower boundary point and random site point, described coboundary point is the IP address that in a described IP address field, maximum is corresponding, described lower boundary point is the IP address that in a described IP address field, minimum value is corresponding, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is multiple IP addresses of Stochastic choice in a described IP address field.
In conjunction with second aspect, the second of the embodiment of the present invention may in implementation, according to the domain name of described multiple IP address, obtains domain name corresponding to the IP race that determines described multiple IP address and IP race, comprising:
When the domain name homogeneous phase of described multiple IP address while, using described multiple IP address as an IP race, and set up the mapping relations between a described IP race and domain name;
Or, when described multiple IP address comprises the 2nd IP address, adjust described neighbourship degree, and point determines the 2nd IP address field centered by described 2nd IP address, continue to carry out above-mentioned point race's process to described 2nd IP address field, the domain name of described 2nd IP address is different from the domain name of other IP addresses in a described IP address field.
In conjunction with the second possibility implementation of the embodiment of the present invention, in the third possibility implementation of the embodiment of the present invention, when the domain name homogeneous phase of described multiple IP address while, using described multiple IP address as an IP race, and the mapping relations set up between a described IP race and domain name, comprising:
Use hash Hash table, described multiple IP address is saved as an IP race as key assignments;
Set up the mapping relations between a described IP race and the domain name inquired.
The third aspect, embodiments provide a kind of inquiry of the domain name device, described device comprises:
First acquisition module, for obtaining an IP address;
Whether enquiry module, comprise a described IP address for inquiring about in global I P resource pool, and described global I P resource pool comprises domain name corresponding at least one IP race and each IP race, and each IP race is determined by least one IP address;
Domain name returns module, for when inquiring a described IP address, using the domain name of domain name corresponding for the IP race that inquires as a described IP address.
In conjunction with the third aspect, in the first possibility implementation of the embodiment of the present invention, described device also comprises:
Address field determination module, for when not inquiring a described IP address, according to neighbourship degree, determines the IP address field belonging to a described IP address;
Choose module, for choosing multiple IP addresses of a described IP address field;
Inquiry of the domain name module, for inquiring about the domain name of multiple IP addresses of a described IP address field;
Second acquisition module, for the domain name according to described multiple IP address, obtains domain name corresponding to the IP race that determines described multiple IP address and IP race.
In conjunction with the first possibility implementation of the embodiment of the present invention, in the second possibility implementation of the embodiment of the present invention, described module of choosing is specifically for choosing the central point of a described IP address field, coboundary point, the IP address of lower boundary point and random site point, described coboundary point is the IP address that in a described IP address field, maximum is corresponding, described lower boundary point is the IP address that in a described IP address field, minimum value is corresponding, described central point is the equidistant IP address to up-and-down boundary point, described random site point is multiple IP addresses of Stochastic choice in a described IP address field.
In conjunction with the first possibility implementation of the embodiment of the present invention, in the third possibility implementation of the embodiment of the present invention, described second acquisition module comprises:
Determining unit, for the domain name homogeneous phase when described multiple IP address simultaneously, using described multiple IP address as an IP race, and sets up the mapping relations between a described IP race and domain name;
Or, divide race's unit, for when described multiple IP address comprises the 2nd IP address, adjust described neighbourship degree, and point determines the 2nd IP address field centered by described 2nd IP address, continue to carry out above-mentioned point race's process to described 2nd IP address field, the domain name of described 2nd IP address is different from the domain name of other IP addresses in a described IP address field.
In conjunction with the third possibility implementation of the embodiment of the present invention, in the 4th kind of possibility implementation of the embodiment of the present invention, described determining unit comprises:
Preserving subelement, for using hash Hash table, described multiple IP address being saved as an IP race as key assignments;
Relation sets up subelement, for setting up the mapping relations between a described IP race and the domain name inquired.
Fourth aspect, the embodiment of the present invention additionally provides a kind of IP point of race's device, and described device comprises:
Address field determination module, for according to neighbourship degree, determines the IP address field belonging to an IP address;
Choose module, for choosing multiple IP addresses of a described IP address field;
Enquiry module, for inquiring about the domain name of multiple IP addresses of a described IP address field;
Acquisition module, for the domain name according to described multiple IP address, obtains domain name corresponding to the IP race that determines described multiple IP address and IP race.
In conjunction with fourth aspect, in the first possibility implementation of the embodiment of the present invention, described module of choosing is specifically for choosing the IP address of the central point of a described IP address field, coboundary point, lower boundary point and random site point, described coboundary point is the IP address that in a described IP address field, maximum is corresponding, described lower boundary point is the IP address that in a described IP address field, minimum value is corresponding, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is multiple IP addresses of Stochastic choice in a described IP address field.
In conjunction with fourth aspect, in the second possibility implementation of the embodiment of the present invention, described acquisition module comprises:
Determining unit, for the domain name homogeneous phase when described multiple IP address simultaneously, using described multiple IP address as an IP race, and sets up the mapping relations between a described IP race and domain name;
Or, divide race's unit, for when described multiple IP address comprises the 2nd IP address, adjust described neighbourship degree, and point determines the 2nd IP address field centered by described 2nd IP address, continue to carry out above-mentioned point race's process to described 2nd IP address field, the domain name of described 2nd IP address is different from the domain name of other IP addresses in a described IP address field.
In conjunction with the second possibility implementation of the embodiment of the present invention, in the third possibility implementation of the embodiment of the present invention, described determining unit comprises:
Preserving subelement, for using hash Hash table, described multiple IP address being saved as an IP race as key assignments;
Relation sets up subelement, for setting up the mapping relations between a described IP race and the domain name inquired.
5th aspect, embodiments provide a kind of inquiry of the domain name equipment, described equipment comprises:
Processor, memory, described processor is coupled with memory,
Described processor is for obtaining an IP address;
Described processor also for inquire about described memory global I P resource pool in whether comprise a described IP address, described global I P resource pool comprises domain name corresponding at least one IP race and each IP race, and each IP race is determined by least one IP address;
Described processor also for when inquiring a described IP address, using the domain name of domain name corresponding for the IP race belonging to the IP address that inquires as a described IP address.
In conjunction with the 5th aspect, in the first possibility implementation of the embodiment of the present invention, described processor, also for when not inquiring a described IP address, according to neighbourship degree, determines the IP address field belonging to a described IP address; Choose multiple IP addresses of a described IP address field; Inquire about the domain name of multiple IP addresses of a described IP address field; According to the domain name of described multiple IP address, obtain domain name corresponding to the IP race that determines described multiple IP address and IP race.
In conjunction with the 5th aspect, in the second possibility implementation of the embodiment of the present invention, described processor is also for choosing the IP address of the central point of a described IP address field, coboundary point, lower boundary point and random site point, described coboundary point is the IP address that in a described IP address field, maximum is corresponding, described lower boundary point is the IP address that in a described IP address field, minimum value is corresponding, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is multiple IP addresses of Stochastic choice in a described IP address field.
In conjunction with the 5th aspect, in the third possibility implementation of the embodiment of the present invention, described processor also for the domain name homogeneous phase when described multiple IP address simultaneously, using described multiple IP address as an IP race, and sets up the mapping relations between a described IP race and domain name; Or, when described multiple IP address comprises the 2nd IP address, adjust described neighbourship degree, and point determines the 2nd IP address field centered by described 2nd IP address, continue to carry out above-mentioned point race's process to described 2nd IP address field, the domain name of described 2nd IP address is different from the domain name of other IP addresses in a described IP address field.
In conjunction with the third possibility implementation of the embodiment of the present invention, in the 4th kind of possibility implementation of the embodiment of the present invention, described multiple IP address, for using hash Hash table, is saved as an IP race as key assignments by described memory; Set up the mapping relations between a described IP race and the domain name inquired.
6th aspect, the embodiment of the present invention additionally provides a kind of IP point of race's equipment, and described equipment comprises:
Processor, memory, described processor is coupled with memory,
Described processor is used for according to neighbourship degree, determines the IP address field belonging to an IP address;
Described processor is also for choosing multiple IP addresses of a described IP address field;
Described processor is also for inquiring about the domain name of multiple IP addresses of a described IP address field;
Described processor, also for the domain name according to described multiple IP address, obtains domain name corresponding to the IP race that determines described multiple IP address and IP race.
In conjunction with the 6th aspect, in the first possibility implementation of the embodiment of the present invention, described processor is also for choosing the IP address of the central point of a described IP address field, coboundary point, lower boundary point and random site point, described coboundary point is the IP address that in a described IP address field, maximum is corresponding, described lower boundary point is the IP address that in a described IP address field, minimum value is corresponding, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is multiple IP addresses of Stochastic choice in a described IP address field.
In conjunction with the 6th aspect, in the second possibility implementation of the embodiment of the present invention, described processor also for the domain name homogeneous phase when described multiple IP address simultaneously, using described multiple IP address as an IP race, and sets up the mapping relations between a described IP race and domain name; Or, when described multiple IP address comprises the 2nd IP address, adjust described neighbourship degree, and point determines the 2nd IP address field centered by described 2nd IP address, continue to carry out above-mentioned point race's process to described 2nd IP address field, the domain name of described 2nd IP address is different from the domain name of other IP addresses in a described IP address field.
In conjunction with the second possibility implementation of the embodiment of the present invention, in the third possibility implementation of the embodiment of the present invention, described multiple IP address, for using hash Hash table, is saved as an IP race as key assignments by described memory; Set up the mapping relations between a described IP race and the domain name inquired.
The domain name inquiry method that the embodiment of the present invention provides, IP point of race's method, device and equipment, by obtaining an IP address; Whether comprise a described IP address in inquiry global I P resource pool, described global I P resource pool comprises domain name corresponding at least one IP race and each IP race, and each IP race is determined by least one IP address; When inquiring a described IP address, using the domain name of domain name corresponding for the IP race belonging to the IP address that inquires as a described IP address.Adopt technical scheme provided by the invention, by providing the global I P resource pool pre-set, make when carrying out the inquiry of the domain name of IP address, can the domain name of race belonging to IP address pre-determined in this global I P resource pool and its correspondence, determine the domain name of an IP address, the performance of inquiry of the domain name can be improved, reduce inquiry time delay.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the flow chart of a kind of domain name inquiry method that the embodiment of the present invention provides;
Fig. 2 is the flow chart of a kind of IP point of race's method that the embodiment of the present invention provides;
Fig. 3 is the flow chart of a kind of domain name inquiry method that the embodiment of the present invention provides;
Fig. 4 is the structural representation of a kind of inquiry of the domain name device that the embodiment of the present invention provides;
Fig. 5 is the structural representation of a kind of IP point of race's device that the embodiment of the present invention provides;
Fig. 6 is the block diagram of a kind of inquiry of the domain name equipment that the embodiment of the present invention provides;
Fig. 7 is the block diagram of a kind of IP point of race's equipment that the embodiment of the present invention provides.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Fig. 1 is the flow chart of a kind of domain name inquiry method that the embodiment of the present invention provides, and see Fig. 1, described method comprises:
101: obtain an IP address;
Wherein, an IP address refers to the IP address to be checked of carrying in the IP inquiry of the domain name request received, and in embodiments of the present invention, by analyzing the IP inquiry of the domain name request received, obtains an IP address, so that inquire about the domain name of a described IP address.
102: whether comprise a described IP address in inquiry global I P resource pool, described global I P resource pool comprises domain name corresponding at least one IP race and each IP race, and each IP race is determined by least one IP address;
Global I P resource pool specifically saves domain name corresponding at least one IP address corresponding to each IP race, IP race and this IP race, can know the IP race belonging to it, can be known the domain name of its correspondence by IP race by IP address.
Wherein, all IP addresses that the scanning global I P resource pool in this step 102 has stored by traversal realize.
Wherein, described IP race refers to the set of one group of IP address with same domain name, when the domain name homogeneous phase of described multiple IP address while, can think that described multiple IP address belongs to same IP race, namely described IP race is determined by described multiple IP address, and domain name is domain name corresponding to described IP race.
In embodiments of the present invention, after obtaining an IP address, scanning global I P resource pool, inquires about in described global I P resource pool and whether has stored a described IP address and affiliated IP race thereof, 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, using the domain name of domain name corresponding for the IP race belonging to the IP address that inquires as a described IP address;
In embodiments of the present invention, when inquiring a described IP address, the domain name having stored IP race belonging to a described IP address and correspondence thereof in global I P resource pool is described, inquires about the domain name that described IP race is corresponding, the domain name of this domain name as a described IP address is returned.
In embodiments of the present invention, only comprise an IP address for this global I P resource pool to be described, now, one IP address is a node of its corresponding IP race, then can know the IP race belonging to it according to an IP address, corresponding domain name can be known in IP race belonging to it, the domain name of this domain name as a described IP address is returned.
The embodiment of the present invention is with in the Internet caching system, be example when there is no domain-name information in upstream data bag, when not having domain-name information in upstream data bag, the Internet caching system needs the domain name of inquiring about IP address, effectively to identify website and to process.
The method that the embodiment of the present invention provides, by obtaining an IP address; Whether comprise a described IP address in inquiry global I P resource pool, described global I P resource pool comprises domain name corresponding at least one IP race and each IP race, and each IP race is determined by least one IP address; When inquiring a described IP address, using the domain name of domain name corresponding for the IP race belonging to the IP address that inquires as a described IP address.Adopt technical scheme provided by the invention, by providing the global I P resource pool pre-set, make when carrying out the inquiry of the domain name of IP address, can the domain name of race belonging to IP address pre-determined in this global I P resource pool and its correspondence, determine the domain name of an IP address, the performance of inquiry of the domain name can be improved, reduce inquiry time delay.
Alternatively, on the basis of technical scheme embodiment illustrated in fig. 1, after whether this step 102 " comprises a described IP address in inquiry global I P resource pool; described global I P resource pool comprises domain name corresponding at least one IP race and each IP race; each IP race is determined by least one IP address ", described method also comprises step 104:
104: when not inquiring a described IP address, according to neighbourship degree, determine the IP address field belonging to a described IP address;
In embodiments of the present invention, when not inquiring a described IP address, illustrating in global I P resource pool, not storing domain name corresponding to IP race belonging to a described IP address and described IP race, now inquiring about unsuccessful, return and inquire about unsuccessfully.
Wherein, IP address field refers to the address field that IP address coordinate axle is made up of multiple contiguous ip address, 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 IP address, and the distance between coordinate address can be referred to as the distance of IP address, and such as, distance between 192.168.1.1 and 192.168.2.1 in reference axis can be 255.
Wherein, described neighbourship degree represents the distance between two IP addresses, when the distance on IP address coordinate axle between two IP addresses is within this neighbourship degree, all IP addresses then between these two IP addresses likely belong to same domain name, neighbourship degree can be a given initial distance, the address field of appropriate length can be determined, so that determine the IP address field belonging to IP address fast according to neighbourship degree.
Particularly, the coordinate at zero point of secondary IP address reference axis starts, and according to neighbourship degree, the IP address in IP address coordinate axle is divided into multiple IP address field, and the IP address field belonging to a described IP address is defined as an IP address field.
Such as, neighbourship degree is 10, and the coordinate at zero point of secondary IP address reference axis starts, every 10 IP addresses are thought to belong to same IP address field, therefore IP address coordinate axle is divided into a lot of address fields, wherein, the address field at a described place, IP address is called an IP address field.
In the embodiment of the present invention, can being when not inquiring a described IP address, according to neighbourship degree, determining the IP address field belonging to a described IP address, return inquiry at the same time unsuccessfully to order, namely need not wait for that namely actual result directly returns inquiry and unsuccessfully order; Can also be directly determine the IP address field belonging to a described IP address according to neighbourship degree after not inquiring a described IP address, now do not return any order, return real processing results again after terminating etc. subsequent processes, the embodiment of the present invention does not limit concrete processing mode.
105: the multiple IP addresses choosing a described IP address field;
In this aspect embodiment, random or choose multiple IP addresses of a described IP address field according to preset rules, the plurality of IP address is used for representing a described IP address field.
Such as, the lower boundary point of a described IP address field is A, and coboundary point is B, and the multiple IP addresses choosing a described IP address field are exactly between A and B choose multiple IP addresses such as IP address C, D, E, F, G.
106: the domain name of inquiring about multiple IP addresses of a described IP address field;
Particularly, whether nslookup online query service can be used, when domain name online query service is unavailable, return domain name online query service unavailable, terminate inquiry, when domain name online query service is available, respectively domain name online query is carried out to described multiple IP address, when getting the domain name of described multiple IP address, whether the domain name of the described multiple IP address of checking is all identical further.
107: according to the domain name of described multiple IP address, obtain domain name corresponding to the IP race that determines described multiple IP address and IP race.
Wherein, the IP race that described multiple IP address is determined refers to when the domain name of the multiple IP addresses chosen in a described IP address field is identical, then think that described multiple IP address belongs to same race, this IP race is determined by described multiple IP address, and the domain name of described multiple IP address is exactly domain name corresponding to this IP race;
Particularly, when the domain name homogeneous phase of described multiple IP address while, determine that described multiple IP address belongs to same IP race, and the domain name of described multiple IP address is defined as domain name corresponding to IP race, by domain name corresponding stored corresponding to described multiple IP address, described IP race and IP race in global I P resource pool, to upgrade global I P resource pool.
The method that the embodiment of the present invention provides, by obtaining an IP address; Whether comprise a described IP address in inquiry global I P resource pool, described global I P resource pool comprises domain name corresponding at least one IP race and each IP race, and each IP race is determined by least one IP address; When inquiring a described IP address, using the domain name of domain name corresponding for the IP race belonging to the IP address that inquires as a described IP address.Adopt technical scheme provided by the invention, by providing the global I P resource pool pre-set, make when carrying out the inquiry of the domain name of IP address, can the domain name of race belonging to IP address pre-determined in this global I P resource pool and its correspondence, determine the domain name of an IP address, the performance of inquiry of the domain name can be improved, reduce inquiry time delay.Further, when domain name online query service is unavailable or break, still inquiry of the domain name can be carried out by global I P resource pool.
Preferably, on the basis of technical scheme embodiment illustrated in fig. 1, step 105 " is chosen multiple IP addresses of a described IP address field " and being comprised: the central point choosing a described IP address field, coboundary point, the IP address of lower boundary point and random site point, described coboundary point is the IP address that in a described IP address field, maximum is corresponding, described lower boundary point is the IP address that in a described IP address field, minimum value is corresponding, described central point is the equidistant IP address to up-and-down boundary point, described random site point is multiple IP addresses of Stochastic choice in a described IP address field.
In embodiments of the present invention, when choosing multiple IP address of a described IP address field, described multiple IP address can random selecting.Preferably, in order to ensure the domain name inquiring a described IP address quickly and accurately, multiple IP address is evenly chosen from a whole described IP address field, wherein said multiple IP address can comprise the central point of IP address field, coboundary point and lower boundary point, and described central point is the equidistant IP address to up-and-down boundary point.The distance arriving up-and-down boundary point is herein equal refers to that this point is equal as far as possible to the distance of up-and-down boundary point.
Wherein, the number of random site point can determine by comprising in an IP address field IP address number, and preferably, the ratio of choosing is 10%, and the number namely choosing random site point is comprise 10% of IP address number in a 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 multiple IP address, obtains domain name corresponding to the IP race that determines described multiple IP address and IP race " and comprises 107a or 107b:
107a: when the domain name homogeneous phase of described multiple IP address while, using described multiple IP address as an IP race, and sets up the mapping relations between a described IP race and domain name;
In embodiments of the present invention, when the domain name homogeneous phase of the multiple IP addresses chosen in a described IP address field while, can think that described multiple IP address belongs to same IP race, IP race belonging to described multiple IP address is an IP race, and the domain name of described multiple IP address is domain name corresponding to a described IP race;
After determining domain name corresponding to a described IP race and a described IP race, set up the mapping relations between a described IP race and domain name, be stored in global I P resource pool.
For example, the multiple IP addresses chosen in a described IP address field are A, B, C, D, E five IP addresses, inquire about the domain name of five IP addresses respectively, suppose that the domain name of five IP addresses is identical, be 123.com, then A, B, C, D, E five IP addresses can be used as an IP race, i.e. a described IP race, and domain name corresponding to this race is 123.com.
107b: when described multiple IP address comprises the 2nd IP address, adjust described neighbourship degree, and point determines the 2nd IP address field centered by described 2nd IP address, continue to carry out above-mentioned point race's process to described 2nd IP address field, the domain name of described 2nd IP address is different from the domain name of other IP addresses in a described IP address field.
Wherein, the domain name domain name that refer to by more described multiple IP address different from the domain name of other IP addresses in a described IP address field of described 2nd IP address, determine to there is its domain name IP address different from the domain name of other IP addresses in described multiple IP address, this IP address is referred to as the 2nd IP address, and namely described multiple IP address comprises the 2nd IP address;
When described multiple IP address comprises the 2nd IP address, described multiple IP address can not be thought to belong to same IP race, now needs described multiple IP address point race further;
In embodiments of the present invention, when described multiple IP address comprises the 2nd IP address, reduce original neighbourship degree, point centered by described 2nd IP address, according to current neighbourship degree, the 2nd IP address field is more among a small circle determined, so that divide race further in more accurate scope in a described IP address field.
Wherein, described further point of race's process refers to and repeats step 104-107, until the domain name homogeneous phase of the multiple IP addresses chosen in the IP address field finally determined simultaneously, the multiple IP addresses chosen are defined as an IP race, the domain name of its correspondence are defined as domain name corresponding to described IP race.
For example, described neighbourship degree is 20, the multiple IP addresses chosen in a described IP address field are A, B, C, D, E, inquire about A respectively, 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 IP address D is described 2nd IP address, now, can not think A, B, C, D, E belongs to same race, reducing original neighbourship degree is 10, centered by IP address D, repeat step 104-107, reselecting multiple IP address is F, G, D, H, I, inquire about F respectively, G, H, the domain name of I, if the result of inquiry is F, G, D, H, the domain name of I is abc.com, then F, G, D, H, I can think and belongs to same IP race, the domain name of this race is exactly abc.com.
The method that the embodiment of the present invention provides, by obtaining an IP address; Whether comprise a described IP address in inquiry global I P resource pool, described global I P resource pool comprises domain name corresponding at least one IP race and each IP race, and each IP race is determined by least one IP address; When inquiring a described IP address, using the domain name of domain name corresponding for the IP race belonging to the IP address that inquires as a described IP address.Adopt technical scheme provided by the invention, by providing the global I P resource pool pre-set, make when carrying out the inquiry of the domain name of IP address, can the domain name of race belonging to IP address pre-determined in this global I P resource pool and its correspondence, determine the domain name of an IP address, the performance of inquiry of the domain name can be improved, 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 multiple IP address while, using described multiple IP address as an IP race, and sets up the mapping relations between a described IP race and domain name " and comprises step () and (two):
Step (one): use hash Hash table, described multiple IP address is saved as an IP race as key assignments;
In embodiments of the present invention, described multiple IP address and the IP race that determined by described multiple IP address are bound, that is to say the key assignments of described multiple IP address as hash Hash table, be used for index the one IP race.
Those skilled in the art can be known, hash Hash table is the data structure directly conducted interviews according to key assignments (Keyvalue).
Step (two): set up the mapping relations between a described IP race and the domain name inquired.
In embodiments of the present invention, by domain name corresponding stored corresponding to a described IP race and a described IP race, be updated in global I P resource pool, for the inquiry of the domain name of IP address next time.
The method that the embodiment of the present invention provides, on the basis of above-described embodiment, by using hash Hash table, saves as an IP race using described multiple IP address as key assignments; Set up the mapping relations between a described IP race and the domain name inquired, can constantly update and expand global I P resource pool, the requirement of inquiry can be met by the global I P resource pool constantly expanded when carrying out IP address lookup, while simplifying storage overhead, High Performance Data Query service ability can be provided.
Above-mentioned all alternatives, can adopt and combine arbitrarily formation optional embodiment of the present invention, this is no longer going to repeat them.
Fig. 2 is the flow chart of a kind of IP point of race's method that the embodiment of the present invention provides, and see Fig. 2, described method comprises:
201: according to neighbourship degree, determine the IP address field belonging to an IP address;
Wherein, a described IP address can get, the IP address do not inquired in global I P resource pool, also can be the IP address that any one in global I P resource pool does not store its domain name.
In embodiments of the present invention, started by the coordinate at zero point of secondary IP address reference axis, according to neighbourship degree, the IP address in IP address coordinate axle is divided into multiple IP address field, the IP address field belonging to a described IP address is defined as an IP address field.
202: the multiple IP addresses choosing a described IP address field;
203: the domain name of inquiring about multiple IP addresses of a described IP address field;
Particularly, whether nslookup online query service can be used, when domain name online query service is unavailable, return domain name online query service unavailable, terminate inquiry, when domain name online query service is available, respectively domain name online query is carried out to described multiple IP address, when getting the domain name of described multiple IP address, whether the domain name of the described multiple IP address of checking is all identical further.
204: according to the domain name of described multiple IP address, obtain domain name corresponding to the IP race that determines described multiple IP address and IP race.
Particularly, when the domain name homogeneous phase of described multiple IP address while, determine that described multiple IP address belongs to same IP race, and the domain name of described multiple IP address is defined as domain name corresponding to IP race, by domain name corresponding stored corresponding to described multiple IP address, described IP race and IP race in global I P resource pool, to upgrade global I P resource pool.
The method that the embodiment of the present invention provides, by according to neighbourship degree, determines the IP address field belonging to an IP address; Choose multiple IP addresses of a described IP address field; Inquire about the domain name of multiple IP addresses of a described IP address field; According to the domain name of described multiple IP address, obtain domain name corresponding to the IP race that determines described multiple IP address and IP race.Adopt technical scheme provided by the invention, by providing the global I P resource pool pre-set, make when carrying out IP address point race, can according to the domain name of multiple IP addresses of the described IP address field of inquiry, obtain domain name corresponding to the IP race that determines described multiple IP address and IP race.Can carry out IP point of race in global I P resource pool, improve point race's speed and an accuracy, the inquiry of the domain name for IP address provides existing IP address domain name resource, improves the performance of inquiry of the domain name, reduces inquiry time delay.
Alternatively, on the basis of technical scheme embodiment illustrated in fig. 2, step 202 " is chosen multiple IP addresses of a described IP address field " and being comprised: the central point choosing a described IP address field, coboundary point, the IP address of lower boundary point and random site point, described coboundary point is the IP address that in a described IP address field, maximum is corresponding, described lower boundary point is the IP address that in a described IP address field, minimum value is corresponding, described central point is the equidistant IP address to up-and-down boundary point, described random site point is multiple IP addresses of Stochastic choice in a described IP address field.
In embodiments of the present invention, when choosing multiple IP address of a described IP address field, described multiple IP address can random selecting.Preferably, in order to ensure the domain name inquiring a described IP address quickly and accurately, multiple IP address is evenly chosen from a whole described IP address field, wherein said multiple IP address can comprise the central point of IP address field, coboundary point and lower boundary point, and described central point is the equidistant IP address to up-and-down boundary point.The distance arriving up-and-down boundary point is herein equal refers to that this point is equal as far as possible to the distance of up-and-down boundary point.
Wherein, the number of random site point can determine by comprising in an IP address field IP address number, and preferably, the ratio of choosing is 10%, and the number namely choosing random site point is comprise 10% of IP address number in a described IP address field.
Further, in embodiments of the present invention, according to the difference of the Query Result of the domain name to described multiple IP address, step 204 " according to the domain name of described multiple IP address, obtains domain name corresponding to the IP race that determines described multiple IP address and IP race " and comprises 204a or 204b:
204a: when the domain name homogeneous phase of described multiple IP address while, using described multiple IP address as an IP race, and sets up the mapping relations between a described IP race and domain name;
In embodiments of the present invention, when the domain name homogeneous phase of the multiple IP addresses chosen in a described IP address field while, can think that described multiple IP address belongs to same IP race, IP race belonging to described multiple IP address is an IP race, and the domain name of described multiple IP address is domain name corresponding to a described IP race;
After determining domain name corresponding to a described IP race and a described IP race, set up the mapping relations between a described IP race and domain name, be stored in global I P resource pool.
204b: when described multiple IP address comprises the 2nd IP address, adjust described neighbourship degree, and point determines the 2nd IP address field centered by described 2nd IP address, continue to carry out above-mentioned point race's process to described 2nd IP address field, the domain name of described 2nd IP address is different from the domain name of other IP addresses in a described IP address field;
When described multiple IP address comprises the 2nd IP address, described multiple IP address can not be thought to belong to same IP race, now needs described multiple IP address point race further;
In embodiments of the present invention, when described multiple IP address comprises the 2nd IP address, reduce original neighbourship degree, point centered by described 2nd IP address, according to current neighbourship degree, the 2nd IP address field is more among a small circle determined, so that divide race further in more accurate scope in a described IP address field.
Wherein, described point of race's process refers to and repeats step 201-204, until the domain name homogeneous phase of the multiple IP addresses chosen in the IP address field finally determined simultaneously, the multiple IP addresses chosen are defined as an IP race, the domain name of its correspondence are defined as domain name corresponding to described IP race.
The method that the embodiment of the present invention provides, by according to neighbourship degree, determines the IP address field belonging to an IP address; Choose multiple IP addresses of a described IP address field; Inquire about the domain name of multiple IP addresses of a described IP address field; According to the domain name of described multiple IP address, obtain domain name corresponding to the IP race that determines described multiple IP address and IP race.Adopt technical scheme provided by the invention, by providing the global I P resource pool pre-set, make when carrying out IP address point race, can according to the domain name of multiple IP addresses of the described IP address field of inquiry, obtain domain name corresponding to the IP race that determines described multiple IP address and IP race.Can carry out IP point of race in global I P resource pool, improve point race's speed and an accuracy, the inquiry of the domain name for IP address provides existing IP address domain name resource, improves the performance of inquiry of the domain name, reduces 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 multiple IP address while; using described multiple IP address as an IP race, and set up the mapping relations between a described IP race and domain name " comprises step () and step (two):
Step (one): use hash Hash table, described multiple IP address is saved as an IP race as key assignments;
In embodiments of the present invention, being bound in described multiple IP address and the IP race that determined by described multiple IP address, is namely using the key assignments of described multiple IP address as hash Hash table, is used for index the one IP race.Those skilled in the art can be known, hash Hash table is the data structure directly conducted interviews according to key assignments (Keyvalue).
Step (two): set up the mapping relations between a described IP race and the domain name inquired.
In embodiments of the present invention, by domain name corresponding stored corresponding to a described IP race and a described IP race, be updated in global I P resource pool, for the inquiry of the domain name of IP address next time.
The method that the embodiment of the present invention provides, on the basis of above-described embodiment, by using hash Hash table, saves as an IP race using described multiple IP address as key assignments; Set up the mapping relations between a described IP race and the domain name inquired, can constantly update and expand global I P resource pool, the requirement of inquiry can be met by the global I P resource pool constantly expanded when carrying out IP address lookup, while simplifying storage overhead, High Performance Data Query service ability can be provided.
Above-mentioned all alternatives, can adopt and combine arbitrarily formation optional embodiment of the present invention, this is no longer going to repeat them.
Fig. 3 is the flow chart of a kind of domain name inquiry method that the embodiment of the present invention provides, and see Fig. 3, described method comprises:
301: obtain an IP address;
The embodiment of the present invention is with in the Internet caching system, the dynamic change of IP address, be example when there is no domain-name information in upstream data bag, now the Internet caching system is according to an IP address of upstream data bag, 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 IP inquiry of the domain name request.
302: whether comprise a described IP address in inquiry global I P resource pool, described global I P resource pool comprises domain name corresponding at least one IP race and each IP race, and each IP race is determined by 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 asynchronously enter step 305;
Wherein, described " if not; then return and inquire about unsuccessfully; simultaneously asynchronously enter step 305 " can be when not inquiring a described IP address, enter step 305 to process, return inquiry at the same time unsuccessfully to order, namely need not wait for that actual result can directly return inquiry and unsuccessfully order;
In embodiments of the present invention, can also being when not inquiring a described IP address, entering step 305, now not return any order, after wait subsequent processes being terminated, return real processing results again.It should be noted that, the embodiment of the present invention does not limit concrete processing mode.
304: return the domain name that the IP race that inquires is corresponding, process terminates;
305: according to neighbourship degree, determine the IP address field belonging to a described IP address;
306: choose the IP address of the central point of a described IP address field, coboundary point, lower boundary point and random site point as multiple IP address;
307: whether nslookup online query service can be used, if unavailable, then enters step 308; If available, enter step 309;
308: return domain name online query service unavailable, terminate inquiry;
309: respectively domain name online query is carried out to described multiple IP address;
310: whether the domain name of described multiple IP address is all identical, if all identical, directly enters step 312; Otherwise enter step 311;
311: using IP addresses different from the domain name of other IP addresses for domain name in a described IP address field as the 2nd IP address, adjustment neighbourship degree, centered by described 2nd IP address, point determines the 2nd IP address field, to continue on described 2nd IP address field point race's process further;
When having the situation of the IP address with different domain name in the multiple IP addresses occurring choosing in point race's process, then perform step 311, until the domain name homogeneous phase of the multiple IP addresses chosen in the IP address field finally determined simultaneously, the multiple IP addresses chosen are defined as an IP race, the domain name of its correspondence are defined as domain name corresponding to described IP race.
312: use hash Hash table, described multiple IP address is saved as an IP race as key assignments;
313: set up the mapping relations between a described IP race and the domain name inquired.
The method that the embodiment of the present invention provides, by obtaining an IP address; Whether comprise a described IP address in inquiry global I P resource pool, described global I P resource pool comprises domain name corresponding at least one IP race and each IP race, and each IP race is determined by least one IP address; When inquiring a described IP address, using the domain name of domain name corresponding for the IP race belonging to the IP address that inquires as a described IP address.Adopt technical scheme provided by the invention, by providing the global I P resource pool pre-set, make when carrying out the inquiry of the domain name of IP address, can the domain name of race belonging to IP address pre-determined in this global I P resource pool and its correspondence, determine the domain name of an IP address, the performance of inquiry of the domain name can be improved, reduce inquiry time delay.
Fig. 4 is the structural representation of a kind of inquiry of the domain name device that the embodiment of the present invention provides.See Fig. 4, described device comprises:
First acquisition module 41, for obtaining an IP address;
Whether enquiry module 42, comprise a described IP address for inquiring about in global I P resource pool, and described global I P resource pool comprises domain name corresponding at least one IP race and each IP race, and each IP race is determined by least one IP address;
Domain name returns module 43, for when inquiring a described IP address, using the domain name of domain name corresponding for the IP race that inquires as a described IP address.
Alternatively, described device also comprises:
Address field determination module 44, for when not inquiring a described IP address, according to neighbourship degree, determines the IP address field belonging to a described IP address;
Choose module 45, for choosing multiple IP addresses of a described IP address field;
Inquiry of the domain name module 46, for inquiring about the domain name of multiple IP addresses of a described IP address field;
Second acquisition module 47, for the domain name according to described multiple IP address, obtains domain name corresponding to the IP race that determines described multiple IP address and IP race.
Alternatively, described module of choosing is for choosing the IP address of the central point of a described IP address field, coboundary point, lower boundary point and random site point, described coboundary point is the IP address that in a described IP address field, maximum is corresponding, described lower boundary point is the IP address that in a described IP address field, minimum value is corresponding, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is multiple IP addresses of Stochastic choice in a described IP address field.
Described second acquisition module 47 comprises:
Determining unit 471, for the domain name homogeneous phase when described multiple IP address simultaneously, using described multiple IP address as an IP race, and sets up the mapping relations between a described IP race and domain name;
Or, divide race's unit 472, for when described multiple IP address comprises the 2nd IP address, adjust described neighbourship degree, and point determines the 2nd IP address field centered by described 2nd IP address, continue to carry out above-mentioned point race's process to described 2nd IP address field, the domain name of described 2nd IP address is different from the domain name of other IP addresses in a described IP address field.
Described determining unit 471 comprises:
Preserving subelement 4711, for using hash Hash table, described multiple IP address being saved as an IP race as key assignments;
Relation sets up subelement 4712, for setting up the mapping relations between a described IP race and the domain name inquired.
The device that the embodiment of the present invention provides, by obtaining an IP address; Whether comprise a described IP address in inquiry global I P resource pool, described global I P resource pool comprises domain name corresponding at least one IP race and each IP race, and each IP race is determined by least one IP address; When inquiring a described IP address, using the domain name of domain name corresponding for the IP race belonging to the IP address that inquires as a described IP address.Adopt technical scheme provided by the invention, by providing the global I P resource pool pre-set, make when carrying out the inquiry of the domain name of IP address, can the domain name of race belonging to IP address pre-determined in this global I P resource pool and its correspondence, determine the domain name of an IP address, the performance of inquiry of the domain name can be improved, reduce inquiry time delay.
Fig. 5 is the structural representation of a kind of IP point of race's device that the embodiment of the present invention provides.See Fig. 5, described device comprises:
Address field determination module 51, for according to neighbourship degree, determines the IP address field belonging to an IP address;
Choose module 52, for choosing multiple IP addresses of a described IP address field;
Enquiry module 53, for inquiring about the domain name of multiple IP addresses of a described IP address field;
Acquisition module 54, for the domain name according to described multiple IP address, obtains domain name corresponding to the IP race that determines described multiple IP address and IP race.
Alternatively, described module 52 of choosing is specifically for choosing the IP address of the central point of a described IP address field, coboundary point, lower boundary point and random site point, described coboundary point is the IP address that in a described IP address field, maximum is corresponding, described lower boundary point is the IP address that in a described IP address field, minimum value is corresponding, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is multiple IP addresses of Stochastic choice in a described IP address field.
Alternatively, described acquisition module 54 comprises:
Determining unit 541, for the domain name homogeneous phase when described multiple IP address simultaneously, using described multiple IP address as an IP race, and sets up the mapping relations between a described IP race and domain name;
Or, divide race's unit 542, for when described multiple IP address comprises the 2nd IP address, adjust described neighbourship degree, and point determines the 2nd IP address field centered by described 2nd IP address, continue to carry out above-mentioned point race's process to described 2nd IP address field, the domain name of described 2nd IP address is different from the domain name of other IP addresses in a described IP address field.
Alternatively, described determining unit 541 comprises:
Preserving subelement 5411, for using hash Hash table, described multiple IP address being saved as an IP race as key assignments;
Relation sets up subelement 5412, for setting up the mapping relations between a described IP race and the domain name inquired.
The device that the embodiment of the present invention provides, by according to neighbourship degree, determines the IP address field belonging to an IP address; Choose multiple IP addresses of a described IP address field; Inquire about the domain name of multiple IP addresses of a described IP address field; According to the domain name of described multiple IP address, obtain domain name corresponding to the IP race that determines described multiple IP address and IP race.Adopt technical scheme provided by the invention, by providing the global I P resource pool pre-set, make when carrying out IP address point race, can according to the domain name of multiple IP addresses of the described IP address field of inquiry, obtain domain name corresponding to the IP race that determines described multiple IP address and IP race.Can carry out IP point of race in global I P resource pool, improve point race's speed and an accuracy, the inquiry of the domain name for IP address provides existing IP address domain name resource, improves the performance of inquiry of the domain name, reduces inquiry time delay.
It should be noted that: the inquiry of the domain name device that above-described embodiment provides when inquiry of the domain name and the IP provided point of race's device when IP point of race, only be illustrated with the division of above-mentioned each functional module, in practical application, can distribute as required and by above-mentioned functions and be completed by different functional modules, internal structure by equipment is divided into different functional modules, to complete all or part of function described above.In addition, the inquiry of the domain name device that above-described embodiment provides and IP point of race's device and domain name inquiry method embodiment and IP point of race's embodiment of the method belong to same design, and its specific implementation process refers to embodiment of the method, repeats no more here.
Fig. 6 is the block diagram of a kind of inquiry of the domain name equipment that the embodiment of the present invention provides.See Fig. 6, described equipment comprises:
Processor 61, for obtaining an IP address;
Described processor 61 also for inquire about described memory global I P resource pool in whether comprise a described IP address, described global I P resource pool comprises domain name corresponding at least one IP race and each IP race, and each IP race is determined by least one IP address;
Described processor 61 also for when inquiring a described IP address, using the domain name of domain name corresponding for the IP race belonging to the IP address that inquires as a described IP address.
Described processor 61, also for when not inquiring a described IP address, according to neighbourship degree, determines the IP address field belonging to a described IP address; Choose multiple IP addresses of a described IP address field; Inquire about the domain name of multiple IP addresses of a described IP address field; According to the domain name of described multiple IP address, obtain domain name corresponding to the IP race that determines described multiple IP address and IP race.
Described processor 61 is also for choosing the IP address of the central point of a described IP address field, coboundary point, lower boundary point and random site point, described coboundary point is the IP address that in a described IP address field, maximum is corresponding, described lower boundary point is the IP address that in a described IP address field, minimum value is corresponding, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is multiple IP addresses of Stochastic choice in a described IP address field.
Described processor 61 also for the domain name homogeneous phase when described multiple IP address simultaneously, using described multiple IP address as an IP race, and sets up the mapping relations between a described IP race and domain name; Or, when described multiple IP address comprises the 2nd IP address, adjust described neighbourship degree, and point determines the 2nd IP address field centered by described 2nd IP address, continue to carry out above-mentioned point race's process to described 2nd IP address field, the domain name of described 2nd IP address is different from the domain name of other IP addresses in a described IP address field.
Memory 62, for using hash Hash table, saves as an IP race using described multiple IP address as key assignments; Set up the mapping relations between a described IP race and the domain name inquired.
Fig. 7 is the block diagram of a kind of IP point of race's equipment that the embodiment of the present invention provides.See Fig. 7, described equipment comprises:
Processor 71, for according to neighbourship degree, determines the IP address field belonging to an IP address;
Described processor 71 is also for choosing multiple IP addresses of a described IP address field;
Described processor 71 is also for inquiring about the domain name of multiple IP addresses of a described IP address field;
Described processor 71, also for the domain name according to described multiple IP address, obtains domain name corresponding to the IP race that determines described multiple IP address and IP race.
Described processor 71 is also for choosing the IP address of the central point of a described IP address field, coboundary point, lower boundary point and random site point, described coboundary point is the IP address that in a described IP address field, maximum is corresponding, described lower boundary point is the IP address that in a described IP address field, minimum value is corresponding, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is multiple IP addresses of Stochastic choice in a described IP address field.
Described processor 71 also for the domain name homogeneous phase when described multiple IP address simultaneously, using described multiple IP address as an IP race, and sets up the mapping relations between a described IP race and domain name; Or, when described multiple IP address comprises the 2nd IP address, adjust described neighbourship degree, and point determines the 2nd IP address field centered by described 2nd IP address, continue to carry out above-mentioned point race's process to described 2nd IP address field, the domain name of described 2nd IP address is different from the domain name of other IP addresses in a described IP address field.
Memory 72, for using hash Hash table, saves as an IP race using described multiple IP address as key assignments; Set up the mapping relations between a described IP race and the domain name inquired.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be read-only memory, disk or CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (24)

1. a domain name inquiry method, is characterized in that, described method comprises:
Obtain an IP address;
Whether comprise a described IP address in inquiry global I P resource pool, described global I P resource pool comprises domain name corresponding at least one IP race and each IP race, and each IP race is determined by least one IP address;
When inquiring a described IP address, using the domain name of domain name corresponding for the IP race belonging to the IP address that inquires as a described IP address;
When not inquiring a described IP address, according to neighbourship degree, determine the IP address field belonging to a described IP address;
Choose multiple IP addresses of a described IP address field;
Inquire about the domain name of multiple IP addresses of a described IP address field;
According to the domain name of described multiple IP address, obtain domain name corresponding to the IP race that determines described multiple IP address and IP race;
According to the domain name of described multiple IP address, obtain domain name corresponding to the IP race that determines described multiple IP address and IP race, comprising:
When the domain name homogeneous phase of described multiple IP address while, using described multiple IP address as an IP race, and set up the mapping relations between a described IP race and domain name.
2. method according to claim 1, is characterized in that, chooses multiple IP addresses of a described IP address field, comprising:
Choose the IP address of the central point of a described IP address field, coboundary point, lower boundary point and random site point, described coboundary point is the IP address that in a described IP address field, maximum is corresponding, described lower boundary point is the IP address that in a described IP address field, minimum value is corresponding, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is multiple IP addresses of Stochastic choice in a described IP address field.
3. method according to claim 1, is characterized in that, according to the domain name of described multiple IP address, obtains domain name corresponding to the IP race that determines described multiple IP address and IP race, comprising:
When described multiple IP address comprises the domain name two IP address different from the domain name of other IP addresses, adjust described neighbourship degree, and point determines the 2nd IP address field centered by described 2nd IP address;
Choose multiple IP addresses of described 2nd IP address field;
Inquire about the domain name of multiple IP addresses of described 2nd IP address field;
When the domain name homogeneous phase of the described multiple IP addresses chosen while, using the described multiple IP addresses chosen as an IP race, and set up the mapping relations between IP race and the described domain name inquired determined described multiple IP address; Or,
When the described multiple IP addresses chosen comprise the domain name IP address different from the domain name of other IP addresses, continue the described neighbourship degree of adjustment, until the domain name homogeneous phase of the multiple IP addresses chosen in the IP address field finally determined simultaneously, the multiple IP addresses chosen are defined as an IP race, and the mapping relations between the IP race that described in setting up, multiple IP addresses of choosing are determined and the domain name of the described multiple IP addresses chosen.
4. method according to claim 3, is characterized in that, when the domain name homogeneous phase of described multiple IP address while, using described multiple IP address as an IP race, and sets up the mapping relations between a described IP race and domain name, comprising:
Use hash Hash table, described multiple IP address is saved as an IP race as key assignments;
Set up the mapping relations between a described IP race and the domain name inquired.
5. IP divides race's method, it is characterized in that, described method comprises:
According to neighbourship degree, determine the IP address field belonging to an IP address;
Choose multiple IP addresses of a described IP address field;
Inquire about the domain name of multiple IP addresses of a described IP address field;
According to the domain name of described multiple IP address, obtain domain name corresponding to the IP race that determines described multiple IP address and IP race;
According to the domain name of described multiple IP address, obtain domain name corresponding to the IP race that determines described multiple IP address and IP race, comprising:
When the domain name homogeneous phase of described multiple IP address while, using described multiple IP address as an IP race, and set up the mapping relations between a described IP race and domain name.
6. method according to claim 5, is characterized in that, chooses multiple IP addresses of a described IP address field, comprising:
Choose the IP address of the central point of a described IP address field, coboundary point, lower boundary point and random site point, described coboundary point is the IP address that in a described IP address field, maximum is corresponding, described lower boundary point is the IP address that in a described IP address field, minimum value is corresponding, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is multiple IP addresses of Stochastic choice in a described IP address field.
7. method according to claim 5, is characterized in that, according to the domain name of described multiple IP address, obtains domain name corresponding to the IP race that determines described multiple IP address and IP race, comprising:
When described multiple IP address comprises the domain name two IP address different from the domain name of other IP addresses, adjust described neighbourship degree, and point determines the 2nd IP address field centered by described 2nd IP address;
Choose multiple IP addresses of described 2nd IP address field;
Inquire about the domain name of multiple IP addresses of described 2nd IP address field;
When the domain name homogeneous phase of the described multiple IP addresses chosen while, using the described multiple IP addresses chosen as an IP race, and set up the mapping relations between IP race and the described domain name inquired determined described multiple IP address; Or,
When the described multiple IP addresses chosen comprise the domain name IP address different from the domain name of other IP addresses, continue the described neighbourship degree of adjustment, until the domain name homogeneous phase of the multiple IP addresses chosen in the IP address field finally determined simultaneously, the multiple IP addresses chosen are defined as an IP race, and the mapping relations between the IP race that described in setting up, multiple IP addresses of choosing are determined and the domain name of the described multiple IP addresses chosen.
8. method according to claim 7, is characterized in that, when the domain name homogeneous phase of described multiple IP address while, using described multiple IP address as an IP race, and sets up the mapping relations between a described IP race and domain name, comprising:
Use hash Hash table, described multiple IP address is saved as an IP race as key assignments;
Set up the mapping relations between a described IP race and the domain name inquired.
9. an inquiry of the domain name device, is characterized in that, described device comprises:
First acquisition module, for obtaining an IP address;
Whether enquiry module, comprise a described IP address for inquiring about in global I P resource pool, and described global I P resource pool comprises domain name corresponding at least one IP race and each IP race, and each IP race is determined by least one IP address;
Domain name returns module, for when inquiring a described IP address, using the domain name of domain name corresponding for the IP race that inquires as a described IP address;
Address field determination module, for when not inquiring a described IP address, according to neighbourship degree, determines the IP address field belonging to a described IP address;
Choose module, for choosing multiple IP addresses of a described IP address field;
Inquiry of the domain name module, for inquiring about the domain name of multiple IP addresses of a described IP address field;
Second acquisition module, for the domain name according to described multiple IP address, obtains domain name corresponding to the IP race that determines described multiple IP address and IP race;
Described second acquisition module comprises:
Determining unit, for the domain name homogeneous phase when described multiple IP address simultaneously, using described multiple IP address as an IP race, and sets up the mapping relations between a described IP race and domain name.
10. device according to claim 9, it is characterized in that, described module of choosing is specifically for choosing the IP address of the central point of a described IP address field, coboundary point, lower boundary point and random site point, described coboundary point is the IP address that in a described IP address field, maximum is corresponding, described lower boundary point is the IP address that in a described IP address field, minimum value is corresponding, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is multiple IP addresses of Stochastic choice in a described IP address field.
11. devices according to claim 9, is characterized in that, described second acquisition module comprises:
Point race's unit, during for comprising the domain name two IP address different from the domain name of other IP addresses when described multiple IP address, adjusts described neighbourship degree, and puts centered by described 2nd IP address and determine the 2nd IP address field; Choose multiple IP addresses of described 2nd IP address field; Inquire about the domain name of multiple IP addresses of described 2nd IP address field; When the domain name homogeneous phase of the described multiple IP addresses chosen while, using the described multiple IP addresses chosen as an IP race, and set up the mapping relations between IP race and the described domain name inquired determined described multiple IP address; Or, when the described multiple IP addresses chosen comprise the domain name IP address different from the domain name of other IP addresses, continue the described neighbourship degree of adjustment, until the domain name homogeneous phase of the multiple IP addresses chosen in the IP address field finally determined simultaneously, the multiple IP addresses chosen are defined as an IP race, and the mapping relations between the IP race that described in setting up, multiple IP addresses of choosing are determined and the domain name of the described multiple IP addresses chosen.
12. devices according to claim 11, is characterized in that, described determining unit comprises:
Preserving subelement, for using hash Hash table, described multiple IP address being saved as an IP race as key assignments;
Relation sets up subelement, for setting up the mapping relations between a described IP race and the domain name inquired.
13. 1 kinds of IP divide race's device, it is characterized in that, described device comprises:
Address field determination module, for according to neighbourship degree, determines the IP address field belonging to an IP address;
Choose module, for choosing multiple IP addresses of a described IP address field;
Enquiry module, for inquiring about the domain name of multiple IP addresses of a described IP address field;
Acquisition module, for the domain name according to described multiple IP address, obtains domain name corresponding to the IP race that determines described multiple IP address and IP race;
Described acquisition module comprises:
Determining unit, for the domain name homogeneous phase when described multiple IP address simultaneously, using described multiple IP address as an IP race, and sets up the mapping relations between a described IP race and domain name.
14. devices according to claim 13, it is characterized in that, described module of choosing is specifically for choosing the IP address of the central point of a described IP address field, coboundary point, lower boundary point and random site point, described coboundary point is the IP address that in a described IP address field, maximum is corresponding, described lower boundary point is the IP address that in a described IP address field, minimum value is corresponding, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is multiple IP addresses of Stochastic choice in a described IP address field.
15. devices according to claim 13, is characterized in that, described acquisition module comprises:
Point race's unit, during for comprising the domain name two IP address different from the domain name of other IP addresses when described multiple IP address, adjusts described neighbourship degree, and puts centered by described 2nd IP address and determine the 2nd IP address field; Choose multiple IP addresses of described 2nd IP address field; Inquire about the domain name of multiple IP addresses of described 2nd IP address field; When the domain name homogeneous phase of the described multiple IP addresses chosen while, using the described multiple IP addresses chosen as an IP race, and set up the mapping relations between IP race and the described domain name inquired determined described multiple IP address; Or, when the described multiple IP addresses chosen comprise the domain name IP address different from the domain name of other IP addresses, continue the described neighbourship degree of adjustment, until the domain name homogeneous phase of the multiple IP addresses chosen in the IP address field finally determined simultaneously, the multiple IP addresses chosen are defined as an IP race, and the mapping relations between the IP race that described in setting up, multiple IP addresses of choosing are determined and the domain name of the described multiple IP addresses chosen.
16. devices according to claim 15, is characterized in that, described determining unit comprises:
Preserving subelement, for using hash Hash table, described multiple IP address being saved as an IP race as key assignments;
Relation sets up subelement, for setting up the mapping relations between a described IP race and the domain name inquired.
17. 1 kinds of inquiry of the domain name equipment, is characterized in that, comprising: processor, memory, and described processor is coupled with memory,
Described processor is for obtaining an IP address;
Described processor also for inquire about described memory global I P resource pool in whether comprise a described IP address, described global I P resource pool comprises domain name corresponding at least one IP race and each IP race, and each IP race is determined by least one IP address;
Described processor also for when inquiring a described IP address, using the domain name of domain name corresponding for the IP race belonging to the IP address that inquires as a described IP address;
Described processor, also for when not inquiring a described IP address, according to neighbourship degree, determines the IP address field belonging to a described IP address; Choose multiple IP addresses of a described IP address field; Inquire about the domain name of multiple IP addresses of a described IP address field; According to the domain name of described multiple IP address, obtain domain name corresponding to the IP race that determines described multiple IP address and IP race;
Described processor also for the domain name homogeneous phase when described multiple IP address simultaneously, using described multiple IP address as an IP race, and sets up the mapping relations between a described IP race and domain name.
18. equipment according to claim 17, it is characterized in that, described processor is also for choosing the IP address of the central point of a described IP address field, coboundary point, lower boundary point and random site point, described coboundary point is the IP address that in a described IP address field, maximum is corresponding, described lower boundary point is the IP address that in a described IP address field, minimum value is corresponding, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is multiple IP addresses of Stochastic choice in a described IP address field.
19. equipment according to claim 17, it is characterized in that, described processor is also for comprising the domain name two IP address different from the domain name of other IP addresses during when described multiple IP address, adjust described neighbourship degree, and point determines the 2nd IP address field centered by described 2nd IP address; Choose multiple IP addresses of described 2nd IP address field; Inquire about the domain name of multiple IP addresses of described 2nd IP address field; When the domain name homogeneous phase of the described multiple IP addresses chosen while, using the described multiple IP addresses chosen as an IP race, and set up the mapping relations between IP race and the described domain name inquired determined described multiple IP address; Or, when the described multiple IP addresses chosen comprise the domain name IP address different from the domain name of other IP addresses, continue the described neighbourship degree of adjustment, until the domain name homogeneous phase of the multiple IP addresses chosen in the IP address field finally determined simultaneously, the multiple IP addresses chosen are defined as an IP race, and the mapping relations between the IP race that described in setting up, multiple IP addresses of choosing are determined and the domain name of the described multiple IP addresses chosen.
20. equipment according to claim 19, is characterized in that, described multiple IP address, for using hash Hash table, is saved as an IP race as key assignments by described memory; Set up the mapping relations between a described IP race and the domain name inquired.
21. 1 kinds of IP divide race's equipment, it is characterized in that, comprising: processor, memory, and described processor is coupled with memory,
Described processor is used for according to neighbourship degree, determines the IP address field belonging to an IP address;
Described processor is also for choosing multiple IP addresses of a described IP address field;
Described processor is also for inquiring about the domain name of multiple IP addresses of a described IP address field;
Described processor, also for the domain name according to described multiple IP address, obtains domain name corresponding to the IP race that determines described multiple IP address and IP race;
Described processor also for the domain name homogeneous phase when described multiple IP address simultaneously, using described multiple IP address as an IP race, and sets up the mapping relations between a described IP race and domain name.
22. equipment according to claim 21, it is characterized in that, described processor is also for choosing the IP address of the central point of a described IP address field, coboundary point, lower boundary point and random site point, described coboundary point is the IP address that in a described IP address field, maximum is corresponding, described lower boundary point is the IP address that in a described IP address field, minimum value is corresponding, described central point is the equidistant IP address to up-and-down boundary point, and described random site point is multiple IP addresses of Stochastic choice in a described IP address field.
23. equipment according to claim 21, it is characterized in that, described processor is also for comprising the domain name two IP address different from the domain name of other IP addresses during when described multiple IP address, adjust described neighbourship degree, and point determines the 2nd IP address field centered by described 2nd IP address; Choose multiple IP addresses of described 2nd IP address field; Inquire about the domain name of multiple IP addresses of described 2nd IP address field; When the domain name homogeneous phase of the described multiple IP addresses chosen while, using the described multiple IP addresses chosen as an IP race, and set up the mapping relations between IP race and the described domain name inquired determined described multiple IP address; Or, when the described multiple IP addresses chosen comprise the domain name IP address different from the domain name of other IP addresses, continue the described neighbourship degree of adjustment, until the domain name homogeneous phase of the multiple IP addresses chosen in the IP address field finally determined simultaneously, the multiple IP addresses chosen are defined as an IP race, and the mapping relations between the IP race that described in setting up, multiple IP addresses of choosing are determined and the domain name of the described multiple IP addresses chosen.
24. equipment according to claim 23, is characterized in that, described multiple IP address, for using hash Hash table, is saved as an IP race as key assignments by described memory; Set up the mapping relations between a described IP race and the domain name inquired.
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 CN103078968A (en) 2013-05-01
CN103078968B true 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)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106790744B (en) * 2016-12-01 2020-09-15 上海云盾信息技术有限公司 IP scheduling method and system
CN109657108B (en) * 2018-09-03 2021-10-15 长安通信科技有限责任公司 Domain name asset data storage and query method and system
CN110798545B (en) * 2019-11-05 2020-08-18 中国人民解放军国防科技大学 Web-based domain name data acquisition method

Citations (4)

* 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
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

Family Cites Families (2)

* 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
CN102882991B (en) * 2012-09-29 2016-03-30 北京奇虎科技有限公司 A kind of browser and carry out the method for domain name mapping

Patent Citations (4)

* 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
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

Also Published As

Publication number Publication date
CN103078968A (en) 2013-05-01

Similar Documents

Publication Publication Date Title
AU2016280163B2 (en) Managing dynamic IP address assignments
CN103051740B (en) Domain name analytic method, dns server and domain name analysis system
CN103888358B (en) Routing method, device, system and gateway equipment
JP6373021B2 (en) Apparatus and method for processing differently configured longest prefix match tables
CN103701957A (en) Domain name server (DNS) recursive method and system thereof
US10459729B2 (en) Map tables for hardware tables
CN103281409A (en) Domain name resolution method of mobile internet and DNS server based on TCP protocol
CN104113447A (en) Method, device and system for monitoring domain name resolution pollution
CN105991660B (en) System for resource sharing among multiple cloud storage systems
US8688681B1 (en) Identifying internet protocol addresses for internet hosting entities
CN105306609A (en) Network loading processing method and device
CN104144223B (en) A kind of data capture method and device
CN103078968B (en) Domain name inquiry method, IP divide race's method, device and equipment
CN103825919A (en) Method, device and system for data resource caching
WO2014101821A1 (en) Local partitioning in a distributed communication system
CN109788050B (en) Method, system, electronic device and medium for acquiring IP address of source station
CN107040617B (en) Data processing method and device
US20230041395A1 (en) Method and Device for Processing Routing Table Entries
CN108347465B (en) Method and device for selecting network data center
US10819775B2 (en) Systems and methods for server failover and load balancing
CN107547690A (en) Port assignment method, apparatus, NAT device and storage medium in NAT
CN104780235A (en) IP attribution inquiry method and device and server
CN107547382B (en) Neighbor relation discovery method and device
CN114520784A (en) Dynamic content accelerated access method and device
CN109391707B (en) Domain name resolution method, device, equipment and storage medium

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