CN111935327B - Domain name assignment method, device, equipment and computer readable storage medium - Google Patents
Domain name assignment method, device, equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN111935327B CN111935327B CN202010111056.XA CN202010111056A CN111935327B CN 111935327 B CN111935327 B CN 111935327B CN 202010111056 A CN202010111056 A CN 202010111056A CN 111935327 B CN111935327 B CN 111935327B
- Authority
- CN
- China
- Prior art keywords
- domain name
- available
- available domain
- conversion value
- access terminal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 63
- 238000006243 chemical reaction Methods 0.000 claims abstract description 161
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 25
- 230000015654 memory Effects 0.000 claims description 20
- 238000004364 calculation method Methods 0.000 claims description 10
- 238000001514 detection method Methods 0.000 claims description 5
- 238000013519 translation Methods 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 6
- 238000004891 communication Methods 0.000 description 5
- 238000004590 computer program Methods 0.000 description 4
- 239000004973 liquid crystal related substance Substances 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000012546 transfer Methods 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 235000014510 cooky Nutrition 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000001413 cellular effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000001151 other effect Effects 0.000 description 1
- 238000004064 recycling Methods 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/30—Managing network names, e.g. use of aliases or nicknames
- H04L61/3015—Name registration, generation or assignment
- H04L61/3025—Domain name generation or assignment
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application discloses a domain name assignment method, a device, equipment and a computer readable storage medium. The domain name assignment method comprises the following steps: receiving an access request from an access terminal, wherein the access request comprises an identification of the access terminal; converting the identifier through a preset algorithm to obtain a conversion value of the identifier; searching for the available domain name corresponding to the identified conversion value in the corresponding relation between the available domain name and the conversion value; and distributing the available domain name corresponding to the identified conversion value to the access terminal. The embodiment of the invention can ensure that the same domain name is allocated when the same access terminal accesses the same website for a plurality of times, ensure the efficiency of domain name allocation and reduce the cache consumption.
Description
Technical Field
The present disclosure relates to the field of computers, and in particular, to a domain name assignment method, device, apparatus, and computer readable storage medium.
Background
With the development of internet technology, network users can access websites in different environments. For example, a user may access a website through a browser, wechat, or other enterprise APP (Application). In some network environments, some domain names may be masked; some domain names are masked by a particular network environment after a period of use. To avoid situations where the available domain names are masked by a particular network environment or after a period of use, resulting in a website that cannot be accessed, different domain names may be set for the same website. Thus, when one domain name is masked, normal access to the web site can also be made through other domain names, without causing all access to be affected.
However, if different domain names are set for the same website, there is a problem of how to assign domain names to different users.
Disclosure of Invention
To solve at least one problem in the prior art, embodiments of the present application provide a domain name assignment method, apparatus, device, and computer readable storage medium.
In a first aspect, an embodiment of the present application provides an access method, including:
receiving an access request from an access terminal, wherein the access request comprises an identification of the access terminal;
converting the identifier through a preset algorithm to obtain a conversion value of the identifier;
searching the available domain name corresponding to the identified conversion value in the corresponding relation between the available domain name and the conversion value;
and allocating the available domain name corresponding to the identified conversion value to the access terminal.
In one embodiment, the identifier of the access terminal is an IP address of the access terminal, and the converting the identifier by a preset algorithm to obtain a converted value of the identifier includes:
calculating the hash code of the IP address by using a hash algorithm;
calculating the absolute value of the remainder obtained by dividing the hash code by the total number of conversion values;
the absolute value is taken as the identified conversion value.
In one embodiment, before searching for the available domain name corresponding to the identified conversion value, the method further comprises:
and setting the corresponding relation between the available domain name and the conversion value.
In one embodiment, setting the correspondence between the available domain name and the converted value includes:
a list of domain names is created, each conversion value in the list of domain names corresponding to an available domain name.
In one embodiment, establishing the domain name list further comprises:
if the number of the available domain names is smaller than the total number of the conversion values in the domain name list, arranging the available domain names;
establishing a corresponding relation between the arranged available domain names and each conversion value in sequence;
when the available domain name is used up and the residual conversion value which does not have the corresponding relation with the available domain name exists, the arranged available domain name and the residual conversion value are sequentially in the corresponding relation.
In one embodiment, the access request further comprises a website for requesting access; the domain name assignment method further comprises the following steps:
one or more available domain names included in the web address are obtained.
In one embodiment, the domain name assignment method further includes:
detecting a masked domain name from the available domain names;
if there is an unmasked new domain name other than the available domain name, replacing the masked domain name with the new domain name;
if no new domain name exists, the masked domain name is replaced with an unmasked domain name from among the available domain names.
In a second aspect, an embodiment of the present application provides a domain name assigning apparatus, including:
an access request receiving module: the method comprises the steps of receiving an access request from an access terminal, wherein the access request comprises an identification of the access terminal;
and a conversion module: the method comprises the steps of converting a mark through a preset algorithm to obtain a conversion value of the mark;
and (3) a searching module: the method comprises the steps of searching an available domain name corresponding to an identified conversion value in the corresponding relation between the available domain name and the conversion value;
the distribution module: for assigning the available domain name corresponding to the identified translation value to the access terminal.
In one embodiment, the identification of the access terminal is an IP address of the access terminal, and the conversion module includes:
hash calculation unit: a hash code for calculating an IP address using a hash algorithm;
absolute value calculation unit: for calculating an absolute value of a remainder obtained by dividing the hash code by the total number of converted values;
the absolute value calculation unit is further configured to: the absolute value is taken as the identified conversion value.
In one embodiment, the domain name assigning device further includes:
the corresponding relation setting module is used for: for setting the correspondence between the available domain name and the converted value.
In one embodiment, the correspondence setting module is further configured to:
a list of domain names is created, each conversion value in the list of domain names corresponding to an available domain name.
In one embodiment, the correspondence setting module further includes:
an arrangement unit: for ranking the available domain names if the number of available domain names is less than the total number of conversion values in the domain name list;
the corresponding unit: the method comprises the steps of establishing a corresponding relation between the arranged available domain names and each conversion value in sequence;
the corresponding unit is also for: when the available domain name is used up and the residual conversion value which does not have the corresponding relation with the available domain name exists, the arranged available domain name and the residual conversion value are sequentially in the corresponding relation.
In one embodiment, the access request further comprises a website for requesting access; the domain name assignment device further includes:
available domain name acquisition module: for retrieving one or more available domain names included in the web site.
In one implementation, the apparatus of the embodiment of the present application further includes:
and a detection module: for detecting a masked domain name from among the available domain names;
a first replacement module: for replacing the masked domain name with the new domain name if there is an unmasked new domain name other than the available domain name;
a second replacement module: for replacing the masked domain name with an unmasked domain name of the available domain names if no new domain name exists.
In a third aspect, an embodiment of the present application provides an electronic device, including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the access methods provided by any one of the embodiments of the present application.
In a fourth aspect, embodiments of the present application provide a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform an access method provided by any one of the embodiments of the present application.
One embodiment of the above application has the following advantages or benefits: according to the method, the device and the system, the conversion value corresponding to the identification of the access terminal is obtained through calculation of the identification of the access terminal, then the corresponding relation between the conversion value and the available domain name is searched according to the obtained conversion value, the available domain name corresponding to the conversion value is searched, and the available domain name is distributed to the access terminal. Under the condition that the access terminal accesses for a plurality of times, a preset algorithm is adopted for calculating the identification of the access terminal every time, so that the same domain name can be allocated to the same access terminal every time, and user information in a Cookie (data stored on a user local terminal) cannot be lost due to the change of the domain name. Meanwhile, the embodiment of the application only needs to store the corresponding relation between the conversion values and the available domain names, the number of the conversion values can be set manually, a large amount of storage space is not required to be consumed, the hardware cost of domain name distribution is reduced, and the domain name distribution efficiency is improved.
Other effects of the above alternative will be described below in connection with specific embodiments.
Drawings
The drawings are for better understanding of the present solution and do not constitute a limitation of the present application. Wherein:
fig. 1 is a schematic flow chart of a domain name assignment method according to a first embodiment of the present application;
FIG. 2 is a flow chart of a domain name assignment method according to a second embodiment of the present application;
FIG. 3 is a flow chart of a domain name assignment method according to a third embodiment of the present application;
FIG. 4 is a flow chart of a domain name assignment method according to a fourth embodiment of the present application;
fig. 5 is a schematic structural diagram of a domain name assigning apparatus according to a fifth embodiment of the present application;
fig. 6 is a schematic structural diagram of a domain name assigning apparatus according to a sixth embodiment of the present application;
fig. 7 is a schematic structural diagram of a domain name assigning apparatus according to a seventh embodiment of the present application;
fig. 8 is a schematic structural diagram of a domain name assigning apparatus according to an eighth embodiment of the present application;
fig. 9 is a block diagram of an electronic device for implementing a domain name assignment method according to an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present application are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present application to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Reference in the specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase "in one embodiment" in various places in the specification are not necessarily all referring to the same embodiment.
Referring to fig. 1, the domain name assignment method provided in the embodiment of the present application may be applied to a domain name assignment device, and mainly refers to a device capable of deploying a server device that provides a network access function, such as a DELL (DELL) rack-mounted server host equipped with a CentOS (Community Enterprise Operating System ) system, or a device that provides a Docker (application container engine) service of a Linux system, such as an alicloud service. The domain name assignment method may include:
step 101: an access request from an access terminal is received, wherein the access request comprises an identification of the access terminal.
In this embodiment, the access terminal may include hardware and/or software. The access terminal may be an electronic device with a display screen including, but not limited to, a smart phone, tablet, e-book reader, MP3 player (Moving Picture Experts Group Audio Layer III, mpeg 3), MP4 (Moving Picture Experts Group Audio Layer IV, mpeg 4) player, laptop and desktop computer, etc. The access request of the access terminal can be received by domain name distribution equipment or by a special request module.
In this embodiment, the access request may be, for example, an HTTP (HyperText Transfer Protocol ) access request or an HTTPs (Hyper Text Transfer Protocol over SecureSocket Layer, hypertext transfer security protocol) access request, or the like. The access request may be used to request access to any web site.
In this embodiment, the identifier of the access terminal may be an identifier for distinguishing one access terminal from other access terminals, for example, an IP (Internet Protocol ) address of the access terminal device, an access terminal ID (Identity Document, an identification number), or a device number of the access terminal. If the access terminal is a mobile device, the device number of the access terminal may be, for example, IMEI (International Mobile Equipment Identity, international mobile equipment identifier, also called international mobile equipment identifier). If the access terminal is a computer device, the identifier of the access terminal may specifically be a MAC (Media Access Control ) address of the access terminal.
Step 102: and converting the identifier through a preset algorithm to obtain a conversion value of the identifier.
In this embodiment, the preset algorithm may be any method capable of converting the identifier into a value, such as a secure hash algorithm (Secure Hash Algorithm, SHA), specifically SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, or the like. The preset algorithm is used for mapping the identification to a conversion value. The conversion value may be a number or a combination of letters and numbers. When the converted value is a number, it may be, for example, a binary number, an octal number, a decimal number, a hexadecimal number, or the like.
In this embodiment, the preset algorithm may be a unified algorithm, that is, for all access ends and whether to access a website for the first time, the method used when converting the identifier into the conversion value is the same, so that the steps executed by converting the same identifier each time and the converted conversion value are the same.
Step 103: and searching the available domain name corresponding to the identified conversion value in the corresponding relation between the available domain name and the conversion value.
In this embodiment, after the conversion value corresponding to the identifier is calculated, the correspondence between the available domain name and the conversion value may be found through the conversion value according to the set search rule, and then the available domain name may be further found through the correspondence.
In this embodiment, the available domain name may include a domain name for accessing a website. For example, a domain name masked by a website which is verified not to be requested for access may access the website in any environment, and this domain name is available to a user who needs to access the website. For a web site, more than two available domain names may be set to avoid situations where one available domain name is masked and the web site requesting access cannot be accessed. If a plurality of available domain names are set, when one available domain name is shielded, the rest available domain names can be allocated to the user equipment accessing the website, and the access to the website is not affected because a certain domain name is shielded.
In this embodiment, for a website that requests access, the correspondence between two or more different available domain names and conversion values may be preset. The correspondence may be implemented by a list or an index.
Step 104: and allocating the available domain name corresponding to the identified conversion value to the access terminal.
In this embodiment, the available domain name corresponding to the identified conversion value is allocated to the access terminal, and the available domain name may be sent to the access terminal, so that the access terminal can access the website that requests access by using the available domain name. And distributing the available domain name corresponding to the identified conversion value to the access terminal, or utilizing the corresponding available domain name to access the website accessed by the request, and feeding back the access result to the access terminal.
In the embodiment of the application, after receiving the access request of the access terminal, the identifier of the access terminal is converted to obtain the conversion value corresponding to the identifier of the access terminal, and then the available domain name corresponding to the conversion value is obtained, so that the access terminal can access the website by using the available domain name. Thus, for the same access terminal, the same available domain name can be obtained each time the same website is accessed, and user information in the Cookie (data stored on the user local terminal) is not lost due to the change of the domain name. In addition, generally, in order to ensure the access speed, information required to be used for confirming the available domain name is required to be stored in the cache, and in the embodiment of the application, only the corresponding relation between the available domain name and the conversion value is required to be stored in the cache, so that the total number of the conversion values can be set, a large amount of storage space is not occupied, the storage capacity of the cache is adapted, the storage cost is reduced, and the operation efficiency is improved.
In one embodiment, the identifier of the access terminal is an IP address of the access terminal, and the converting the identifier by a preset algorithm to obtain a converted value of the identifier includes:
calculating a Hash Code (Hash Code) of the IP address by using a Hash algorithm;
calculating the absolute value of the remainder obtained by dividing the hash code by the total number of conversion values;
the absolute value is taken as the identified conversion value.
For example, if the total number of conversion values is 10, the hash mantissa may be used as the identified conversion value. Thus, the conversion value is a number from 0 to 9.
In the embodiment of the application, the total number of the conversion values is the set value, so that under the condition of massive users, only the corresponding relation between the conversion values and the available domain names is stored. Because the corresponding relation between the conversion value and the available domain name is consistent with the number of the conversion values, the total number of the conversion values can be controlled within a smaller number, so that the number of the corresponding relation between the conversion value and the available domain name is the same as the total number of the conversion values, and the occupied storage space is smaller. Therefore, the corresponding relation between the conversion value and the available domain name can be stored in the cache, so that when the available domain name is allocated to the access terminal, the corresponding relation can be directly searched from the cache, and the domain name allocation speed is ensured. The process of calculating the access terminal identification to obtain the conversion value consumes less time and less memory, and can ensure higher domain name distribution efficiency.
In other embodiments, the IP address may be converted to a conversion value in other ways, such as, for example, having the last bit of the IP address as the identified conversion value.
In this embodiment, the hash code may be an intelger (Integer) type hash code.
In other embodiments, when the identifier of the access terminal is another kind of identifier, a hash algorithm may be used to calculate a hash code of the Object class of the identifier, or a hash code of the String class.
In one embodiment, before searching for an available domain name corresponding to the identified conversion value, the domain name assignment method further includes: and setting the corresponding relation between the available domain name and the conversion value.
In the embodiment of the present application, the correspondence between the available domain name and the conversion value is set, and the corresponding available domain name may be set for each conversion value, so that the available domain name may be obtained under the condition that the conversion value is known. In the correspondence, the converted value may be non-duplicate and the available domain name may be duplicate. That is, there may be cases where more than two converted values correspond to one available domain name.
In one embodiment, setting the correspondence between the available domain name and the converted value includes:
a list of domain names is created, each conversion value in the list of domain names corresponding to an available domain name. Therefore, the conversion value obtained by adopting a preset algorithm for the identification of the access terminal can find the corresponding available domain name in the preset corresponding relation.
In the embodiment of the present application, the domain name list may include a set number of entries, each entry corresponding to a conversion value, and each conversion value corresponding to an available domain name. It may also happen that more than two entries correspond to the same available domain name, which is not limited in this application.
In one embodiment, as shown in fig. 2, establishing the domain name list further includes:
step 201: if the number of the available domain names is smaller than the total number of the conversion values in the domain name list, arranging the available domain names;
step 202: establishing a corresponding relation between the arranged available domain names and each conversion value in sequence;
step 203: when the available domain name is used up and the residual conversion value which does not have the corresponding relation with the available domain name exists, the arranged available domain name and the residual conversion value are sequentially in the corresponding relation.
In this embodiment, the available domain names are arranged according to a certain order, and then a corresponding relation is established between the available domain names and the conversion values in sequence; establishing a corresponding relation between a first one of the arranged available domain names and a first conversion value; and establishing a corresponding relation … … between the second one of the arranged available domain names and the second conversion value until the last available domain name. If the arranged domain names are used up, and still there is no conversion value of the corresponding available domain names, recycling the arranged available domain names. Specifically, for example, if there are 5 available domain names and the preset conversion values are 10 in total, the 5 available domain names are arranged, and the arranged 5 available domain names and the first 5 conversion values and the last 5 conversion values sequentially establish a corresponding relationship. So that the first conversion value and the sixth conversion value correspond to the first available domain name after arrangement, the second conversion value and the seventh conversion value correspond to the second available domain name after arrangement, and so on, and the fifth conversion value and the tenth conversion value correspond to the fifth available domain name after arrangement.
In other embodiments, as shown in fig. 3, one example of establishing a domain name list may include:
step 301: all available domain names for the web site are stored in a collection. For example, if a web site has 6 available domain names, then the 6 available domain names for the web site are put into a collection.
Step 302: and judging whether a conversion value which does not establish a corresponding relation with the available domain name exists or not.
Step 303: it is determined whether there are domain names available in the collection.
If there is a domain name available in the set and there is a converted value that does not have a correspondence with the available domain name, step 304 is performed. If there is no domain name available in the set and there is a converted value that does not have a correspondence with the available domain name, the process returns to step 301.
For example, there are 10 conversion values that need to be associated with the available domain name, and if the number of conversion values that do not have to be associated with the available domain name is 2, there are conversion values that have to be associated with the available domain name.
Step 304: if the available domain names exist in the set and the conversion values which do not establish the corresponding relation with the available domain names exist, one available domain name in the set is taken out, and the corresponding relation is established with the conversion values which do not establish the corresponding relation with the available domain names.
For example, if there are 6 available domain names in the set, one available domain name is fetched from the set, leaving 5 available domain names.
Steps 302, 303 may be performed out of order, or in any order. And if the conversion value which does not have the corresponding relation with the available domain name exists, ending, and finishing the establishment of the corresponding relation between the conversion value and the available domain name.
In one embodiment, the access request further comprises a website for requesting access; the domain name assignment method further comprises the following steps: one or more available domain names included in the web address are obtained.
In this embodiment, the available domain names are typically multiple.
In one embodiment, as shown in fig. 4, the domain name assignment method further includes:
step 401: detecting a masked domain name from the available domain names;
step 402: if there is an unmasked new domain name other than the available domain name, replacing the masked domain name with the new domain name;
step 403: if no new domain name exists, the masked domain name is replaced with an unmasked domain name from among the available domain names.
In this embodiment, after a period of use of an available domain name, there may be a masked situation. For example, the available domain names may be periodically checked by a third party tool for masked domain names. If an unmasked new domain name except the available domain name exists, the new domain name can access the target website, and the corresponding relation between the new domain name and the conversion value corresponding to the original domain name of the masked domain name is established. For example, the correspondence between a new domain name and a certain conversion value is stored in the domain name list. If the newly generated available domain name does not exist, one available domain name is selected from the rest available domain names, and a corresponding relation is established between the available domain name and the conversion value corresponding to the shielded domain name script.
In this embodiment, if the original available domain name is masked and there is no new domain name that is not masked other than the available domain name, then the masked domain name is replaced with one of the available domain names that is not masked and has a smaller number of corresponding conversion values.
In this embodiment, the available domain name may be detected according to a set detection period. The detection mode may specifically be that the detected available domain name is used to access the website, and whether the available domain name is shielded is judged according to the access result.
In this embodiment, it may be preferentially determined whether there is an unmasked new domain name other than the available domain name, and if not, one of the available domain names is used to replace the masked domain name.
In a specific example, the list of available domain names is shown in table 1, and the available domain names include 5, which are available domain name 1, available domain name 2, available domain name 3, available domain name 4, and available domain name 5, respectively. The number of conversion values is 10 and is 0-9. The entries in the domain name list have 10 entries accordingly. The conversion values 0-4 correspond to the available domain names 1-5 in turn, and the conversion values 5-9 correspond to the available domain names 1-5 in turn.
Conversion value | Available domain names |
0 | Usable Domain name 1 |
1 | Available Domain name 2 |
2 | Available Domain name 3 |
3 | Available Domain name 4 |
4 | Available Domain name 5 |
5 | Usable Domain name 1 |
6 | Available Domain name 2 |
7 | Available Domain name 3 |
8 | Available Domain name 4 |
9 | Available Domain name 5 |
TABLE 1
In other embodiments, the available domain names may not be arranged, if the number of the available domain names is smaller than the number of the conversion values, a corresponding relation is established between the available domain names and the conversion values, and the number of the conversion values corresponding to the domain names is as average as possible when the corresponding relation is established.
In another specific example, as shown in table 2, if available domain name 1 is masked and there is a newly generated available domain name 6, available domain name 6 is substituted for available domain name 1 such that conversion values 0 and 5 correspond to available domain name 6.
Conversion value | Available domain names |
0 | Available Domain name 6 |
1 | Available Domain name 2 |
2 | Available Domain name 3 |
3 | Available Domain name 4 |
4 | Available Domain name 5 |
5 | Available Domain name 6 |
6 | Available Domain name 2 |
7 | Available Domain name 3 |
8 | Available Domain name 4 |
9 | Available Domain name 5 |
TABLE 2
In another specific example, as shown in table 3 below, if the available domain name 1 is masked, there is no newly generated available domain name, then one of the available domain names 2-5 is selected, specifically, for example, available domain name 2, such that the conversion values 0 and 5 correspond to the available domain name 2.
TABLE 3 Table 3
In another specific example, as shown in table 4 below, if the available domain name 1 is masked, there is no newly generated available domain name, and the available domain name corresponds to two conversion values in the original table 1, then two available domain names, specifically, for example, the available domain name 2 and the available domain name 3, are selected from the available domain names 2-5 such that the conversion values 0 and 5 correspond to the available domain name 2 and the available domain name 3, respectively.
Conversion value | Available domain names |
0 | Available Domain name 2 |
1 | Available Domain name 2 |
2 | Available Domain name 3 |
3 | Available Domain name 4 |
4 | Available Domain name 5 |
5 | Available Domain name 3 |
6 | Available Domain name 2 |
7 | Available Domain name 3 |
8 | Available Domain name 4 |
9 | Available Domain name 5 |
TABLE 4 Table 4
The embodiment of the present application further provides a domain name assigning apparatus, as shown in fig. 5, a domain name assigning apparatus 500 includes:
the access request receiving module 501: the method comprises the steps of receiving an access request from an access terminal, wherein the access request comprises an identification of the access terminal;
the conversion module 502: the method comprises the steps of converting a mark through a preset algorithm to obtain a conversion value of the mark;
the search module 503: the method comprises the steps of searching an available domain name corresponding to an identified conversion value in the corresponding relation between the available domain name and the conversion value;
the allocation module 504: for assigning the available domain name corresponding to the identified translation value to the access terminal.
In one embodiment, the identification of the access terminal is an IP address of the access terminal, and the conversion module includes:
hash calculation unit: a hash code for calculating an IP address using a hash algorithm;
absolute value calculation unit: for calculating an absolute value of a remainder obtained by dividing the hash code by the total number of converted values;
the absolute value calculation unit is further configured to: the absolute value is taken as the identified conversion value.
In one embodiment, as shown in fig. 6, the domain name assigning apparatus 500 further includes:
correspondence setting module 601: for setting the correspondence between the available domain name and the converted value.
In one embodiment, the correspondence setting module is further configured to:
a list of domain names is created, each conversion value in the list of domain names corresponding to an available domain name.
In one embodiment, the correspondence setting module further includes:
an arrangement unit: for ranking the available domain names if the number of available domain names is less than the total number of conversion values in the domain name list;
the corresponding unit: the method comprises the steps of establishing a corresponding relation between the arranged available domain names and each conversion value in sequence;
the corresponding unit is also for: when the available domain name is used up and the residual conversion value which does not have the corresponding relation with the available domain name exists, the arranged available domain name and the residual conversion value are sequentially in the corresponding relation.
In one embodiment, as shown in fig. 7, the access request further includes a website address for requesting access; the domain name assignment device further includes:
available domain name acquisition module 701: for retrieving one or more available domain names included in the web site.
In one embodiment, as shown in fig. 8, the domain name assigning apparatus further includes:
detection module 801: for detecting a masked domain name from among the available domain names;
a first replacement module 802: for replacing the masked domain name with the new domain name if there is an unmasked new domain name other than the available domain name;
a second replacement module 803: for replacing the masked domain name with an unmasked domain name of the available domain names if no new domain name exists.
The functions of each module in each device of the embodiments of the present invention may be referred to the corresponding descriptions in the above methods, and are not described herein again.
According to embodiments of the present application, an electronic device and a readable storage medium are also provided.
As shown in fig. 9, a block diagram of an electronic device according to a domain name assignment method according to an embodiment of the present application is shown. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the application described and/or claimed herein.
As shown in fig. 9, the electronic device includes: one or more processors 901, memory 902, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the electronic device, including instructions stored in or on memory to display graphical information of a graphical user interface (Graphical User Interface, GUI) on an external input/output device, such as a display device coupled to the interface. In other embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple electronic devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). In fig. 9, a processor 901 is taken as an example.
Memory 902 is a non-transitory computer-readable storage medium provided herein. The memory stores instructions executable by the at least one processor to cause the at least one processor to perform the domain name assignment methods provided herein. The non-transitory computer readable storage medium of the present application stores computer instructions for causing a computer to perform the domain name assignment method provided by the present application.
The memory 902 is used as a non-transitory computer readable storage medium, and can be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules (e.g., the access request receiving module 501, the converting module 502, the searching module 503, and the assigning module 504 shown in fig. 5) corresponding to the domain name assigning method in the embodiments of the present application. The processor 901 performs various functional applications of the server and data processing, i.e., implements the domain name assignment method in the above-described method embodiment, by running non-transitory software programs, instructions, and modules stored in the memory 902.
The memory 902 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for a function; the storage data area may store data created from the use of domain name assignment electronics, and the like. In addition, the memory 902 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory 902 optionally includes memory remotely located relative to processor 901, which may be connected to the domain name assignment electronics via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the domain name assignment method may further include: an input device 903 and an output device 904. The processor 901, memory 902, input devices 903, and output devices 904 may be connected by a bus or other means, for example in fig. 9.
The input device 903 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the domain name assignment electronic device, such as a touch screen, keypad, mouse, trackpad, touchpad, pointer stick, one or more mouse buttons, trackball, joystick, and the like. The output means 904 may include a display device, auxiliary lighting means (e.g., LEDs), tactile feedback means (e.g., vibration motors), and the like. The display device may include, but is not limited to, a liquid crystal display (Liquid Crystal Display, LCD), a light emitting diode (Light Emitting Diode, LED) display, and a plasma display. In some implementations, the display device may be a touch screen.
Various implementations of the systems and techniques described here can be implemented in digital electronic circuitry, integrated circuitry, application specific integrated circuits (Application Specific Integrated Circuits, ASIC), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
These computing programs (also referred to as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented in a high-level procedural and/or object-oriented programming language, and/or in assembly/machine language. The terms "machine-readable medium" and "computer-readable medium" as used herein may be, but are not limited to, any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, programmable logic devices (programmable logic device, PLD)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor. Such a computer-readable signal may take many forms, including but not limited to, an electromagnetic signal, an optical signal, or any suitable combination of the preceding.
The "machine-readable medium" and "computer-readable medium" may be those contained in the electronic device described above; or may exist alone without being incorporated into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: obtaining virtual machine allocation request information from a storage device in communication connection; determining a physical machine group from the predetermined physical machine groups according to the virtual machine allocation request information; determining at least one physical machine from the determined physical machine group; an instruction to create a virtual machine is sent to the determined at least one physical machine.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., CRT (Cathode Ray Tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local area network (Local Area Network, LAN), wide area network (Wide Area Network, WAN) and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present application may be performed in parallel, sequentially, or in a different order, provided that the desired results of the technical solutions disclosed in the present application can be achieved, and are not limited herein.
The above embodiments do not limit the scope of the application. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application are intended to be included within the scope of the present application.
Claims (14)
1. A domain name assignment method, comprising:
receiving an access request from an access terminal, wherein the access request comprises an identification of the access terminal; the access terminal identifier is used for distinguishing one access terminal from other access terminals;
converting the identifier through a preset algorithm to obtain a conversion value of the identifier;
searching for the available domain name corresponding to the identified conversion value in the corresponding relation between the available domain name and the conversion value; the correspondence between the available domain names and the conversion values comprises correspondence between more than two different domain names preset for at least one website and the conversion values; the available domain name is one of more than two preset domain names used for accessing websites;
distributing the available domain name corresponding to the identified conversion value to the access terminal;
the method further comprises the steps of:
detecting a masked domain name in the available domain names;
if an unmasked new domain name exists except the available domain name, replacing the masked domain name by the new domain name;
if the new domain name does not exist, replacing the shielded domain name with an unmasked domain name in the available domain names.
2. The method of claim 1, wherein the identifier of the access terminal is an IP address of the access terminal, the identifier is converted by a preset algorithm to obtain a conversion value of the identifier, and the method includes:
calculating the hash code of the IP address by using a hash algorithm;
calculating the absolute value of a remainder obtained by dividing the hash code by the total number of conversion values;
and taking the absolute value as a conversion value of the identification.
3. The method of claim 1, wherein prior to finding an available domain name corresponding to the identified translation value, further comprising:
and setting the corresponding relation between the available domain name and the conversion value.
4. A method according to claim 3, wherein setting the correspondence of the available domain name and the conversion value comprises:
a list of domain names is established, each conversion value in the list of domain names corresponding to one of the available domain names.
5. The method of claim 4, wherein establishing a list of domain names, further comprises:
if the number of the available domain names is smaller than the total number of conversion values in the domain name list, arranging the available domain names;
establishing a corresponding relation between the arranged available domain names and each conversion value in sequence;
when the available domain name is used up and a residual conversion value which does not have a corresponding relation with the available domain name exists, the arranged available domain name and the residual conversion value are sequentially subjected to a corresponding relation.
6. The method of claim 1, wherein the access request further comprises a web address for requesting access; the method further comprises the steps of:
one or more available domain names included in the web address are obtained.
7. A domain name assignment device, comprising:
an access request receiving module: the method comprises the steps of receiving an access request from an access terminal, wherein the access request comprises an identifier of the access terminal; the access terminal identifier is used for distinguishing one access terminal from other access terminals;
and a conversion module: the method comprises the steps of converting the identifier through a preset algorithm to obtain a conversion value of the identifier;
and (3) a searching module: the method is used for searching the available domain name corresponding to the identified conversion value in the corresponding relation between the available domain name and the conversion value; the correspondence between the available domain names and the conversion values comprises correspondence between more than two different domain names preset for at least one website and the conversion values; the available domain name is one of more than two preset domain names used for accessing websites;
the distribution module: the available domain name corresponding to the identified conversion value is distributed to the access terminal;
the apparatus further comprises:
and a detection module: for detecting a masked domain name of the available domain names;
a first replacement module: for replacing the masked domain name with the new domain name if there is an unmasked new domain name other than the available domain name;
a second replacement module: for replacing the masked domain name with an unmasked domain name of the available domain name if the new domain name does not exist.
8. The apparatus of claim 7, wherein the identification of the access terminal is an IP address of the access terminal, and wherein the conversion module comprises:
hash calculation unit: a hash code for calculating the IP address by using a hash algorithm;
absolute value calculation unit: for calculating an absolute value of a remainder of the hash code divided by the total number of converted values;
the absolute value calculation unit is further configured to: and taking the absolute value as a conversion value of the identification.
9. The apparatus of claim 7, wherein the apparatus further comprises:
the corresponding relation setting module is used for: and the corresponding relation between the available domain name and the conversion value is set.
10. The apparatus of claim 9, wherein the correspondence setting module is further configured to:
a list of domain names is established, each conversion value in the list of domain names corresponding to one of the available domain names.
11. The apparatus of claim 10, wherein the correspondence setting module further comprises:
an arrangement unit: for ranking the available domain names if the number of available domain names is less than the total number of conversion values in the domain name list;
the corresponding unit: the method comprises the steps of sequentially establishing a corresponding relation between the arranged available domain names and each conversion value;
the corresponding unit is further configured to: when the available domain name is used up and a residual conversion value which does not have a corresponding relation with the available domain name exists, the arranged available domain name and the residual conversion value are sequentially subjected to a corresponding relation.
12. The apparatus of claim 7, wherein the access request further comprises a web address requesting access; the apparatus further comprises:
available domain name acquisition module: for obtaining one or more available domain names included in the web address.
13. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
14. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010111056.XA CN111935327B (en) | 2020-02-24 | 2020-02-24 | Domain name assignment method, device, equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010111056.XA CN111935327B (en) | 2020-02-24 | 2020-02-24 | Domain name assignment method, device, equipment and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111935327A CN111935327A (en) | 2020-11-13 |
CN111935327B true CN111935327B (en) | 2023-07-25 |
Family
ID=73316149
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010111056.XA Active CN111935327B (en) | 2020-02-24 | 2020-02-24 | Domain name assignment method, device, equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111935327B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115987813B (en) * | 2023-03-13 | 2023-05-30 | 北京集度科技有限公司 | Domain distribution device, method and system and intelligent vehicle |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018233140A1 (en) * | 2017-06-24 | 2018-12-27 | 平安科技(深圳)有限公司 | Domain name resolution apparatus and method and computer readable storage medium |
CN110519401A (en) * | 2019-07-05 | 2019-11-29 | 中国平安财产保险股份有限公司 | Improve method, apparatus, equipment and the storage medium of network Access Success Rate |
CN110809070A (en) * | 2019-11-12 | 2020-02-18 | 睿哲科技股份有限公司 | Website domain name resolution record processing method and device, electronic equipment and storage medium |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8103780B2 (en) * | 2008-12-18 | 2012-01-24 | At&T Intellectual Property I, Lp | Systems and methods for determining the location of a request on a content delivery network |
CN103428179B (en) * | 2012-05-18 | 2016-09-28 | 阿里巴巴集团控股有限公司 | A kind of log in the method for many domain names website, system and device |
CN103384993B (en) * | 2012-12-14 | 2016-10-12 | 华为技术有限公司 | The reorientation method of user equipment access webpage, gateway and server |
US10437897B2 (en) * | 2013-08-01 | 2019-10-08 | Go Daddy Operating Company, LLC | Methods and systems for recommending packages of domain names for registration |
US9612872B2 (en) * | 2015-09-02 | 2017-04-04 | Ciena Corporation | Data plane resource allocation |
CN110213398B (en) * | 2019-05-30 | 2021-10-08 | 腾讯科技(深圳)有限公司 | Alias management method, device, server and storage medium |
-
2020
- 2020-02-24 CN CN202010111056.XA patent/CN111935327B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018233140A1 (en) * | 2017-06-24 | 2018-12-27 | 平安科技(深圳)有限公司 | Domain name resolution apparatus and method and computer readable storage medium |
CN110519401A (en) * | 2019-07-05 | 2019-11-29 | 中国平安财产保险股份有限公司 | Improve method, apparatus, equipment and the storage medium of network Access Success Rate |
CN110809070A (en) * | 2019-11-12 | 2020-02-18 | 睿哲科技股份有限公司 | Website domain name resolution record processing method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111935327A (en) | 2020-11-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9342376B2 (en) | Method, system, and device for dynamic energy efficient job scheduling in a cloud computing environment | |
CN112269789B (en) | Method and device for storing data, and method and device for reading data | |
CN111247518A (en) | Database sharding | |
JP7047228B2 (en) | Data query methods, devices, electronic devices, readable storage media, and computer programs | |
US10169348B2 (en) | Using a file path to determine file locality for applications | |
US20210133217A1 (en) | Method and apparatus for importing data into graph database, electronic device and medium | |
CN107515879B (en) | Method and electronic equipment for document retrieval | |
US11755556B2 (en) | Method, device, and computer program product for managing storage system | |
US10630589B2 (en) | Resource management system | |
US9734178B2 (en) | Searching entity-key associations using in-memory objects | |
US20170097742A1 (en) | Generating dashboards using a mobile computing device | |
CN111259060B (en) | Data query method and device | |
CN111339098A (en) | Authority management method, data query method and device | |
CN110855812B (en) | Positioning method, device and equipment based on IP address | |
CN115438016A (en) | Dynamic fragmentation method, system, medium and device in distributed object storage | |
US10177795B1 (en) | Cache index mapping | |
CN111935327B (en) | Domain name assignment method, device, equipment and computer readable storage medium | |
KR102476620B1 (en) | Cache automatic control system | |
US11354492B2 (en) | EDOC utility using non-structured-query-language databases | |
CN114124883B (en) | Data access method and device based on cloud storage address, computer equipment and medium | |
CN112685451B (en) | Data query processing method, device, computer equipment and storage medium | |
US20220198301A1 (en) | Method and apparatus for update processing of question answering system | |
CN113010811B (en) | Webpage acquisition method and device, electronic equipment and computer readable storage medium | |
US20210021524A1 (en) | Load balancing system and method | |
US20200265019A1 (en) | On demand file sync |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |