摘要 |
The invention provides a method and a device for mutual conversion of long domain names and short domain names. The method for converting long domain names into short domain names includes: obtaining long domain names submitted by users; traversing each character in each long domain name one by one, and determining corresponding writing values and corresponding line-row positions, in a preset two-dimensional array, of each character; generating short-domain-name identity values according to traversal paths, in the two-dimensional array, of the long domain names; and converting the short-domain-name identity values into short domain names. By the method and the device for mutual conversion of long domain names and short domain names, hash conflicts can be avoided, one-one mapping of the long domain names and the short domain names can be guaranteed, and conversion speed of the long domain names and the short domain names can be improved. |