The embodiment of the invention provides a character string matching method and device. The method comprises the following steps that: obtaining a character string to be matched and at least one key character string corresponding to the character string to be matched, calculating the matching value of the key character string, wherein the character string to be matched comprises a first characterstring and a second character string; calculating the maximum prefix matching character
string length of the first character string and the second character string; according to the maximum prefix matching character
string length, utilizing a preset rule to calculate first editing distance between the first character string and the second character string; and according to the first editing distance and the matching value, obtaining a similarity between the first character string and the second character string. The device is used for executing the method. By use of the embodiment of the invention, through the calculation of the matching value of the key character string, the preset rule is used for calculating the first editing distance between the first character string and the second character string, finally, the similarity between the first editing distance and the matching value is obtained, and the accuracy of character string matching is improved.