Method, device, electronic device and storage medium for correcting typos in search names

Through the combined use of the typo position model and the type model, typos in the retrieval name are identified and corrected, which solves the problem of poor error correction in retrieval names in the existing technology and achieves more efficient retrieval result acquisition.

CN113268600BActive Publication Date: 2024-08-27SHENYANG MXNAVI CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110711426.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-25
Publication Date
2024-08-27
Estimated Expiration
2041-06-25

AI Technical Summary

Technical Problem

Existing machine translation technology is not effective in correcting typos in searches such as geographical names, book names, or song titles, and cannot accurately retrieve the results that users want.

Method used

The initial search name is processed using the typo position model and the typo type model, and the target search name is generated to achieve intelligent error correction by identifying the position and type of the typo.

Benefits of technology

It improves the quality of error correction for typos in search names, improves user experience, and ensures the accuracy of search results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113268600B
    Figure CN113268600B
Patent Text Reader

Abstract

The embodiments of the present application provide a method, device, electronic device and storage medium for correcting typos in a search name. The method obtains an initial search name, processes the initial search name according to a typo position model and a typo type model, and obtains a target search name. The typo position model includes a mapping relationship between each correct search name, intended search name and erroneous search name and typo position labels, and the typo type model includes a mapping relationship between each erroneous search name and typo type label. Searching is performed according to the target search name to realize intelligent correction of typos in the search name, thereby improving the correction quality of typos in the search name and enhancing the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of language processing technology, and in particular to a method, device, electronic device and storage medium for correcting typos in a search name. Background Art

[0002] At present, conventional machine translation methods have become the mainstream technology for text error correction. The main idea is to regard error correction as the process of translating incorrect sentences into correct sentences in the same language. Its core consists of a language model and a translation model. The language model learns language rules and language knowledge; the translation model learns the user's error correction behavior from parallel corpora.

[0003] However, for name retrieval in certain special fields, such as geographical names, book names or song names, many names are not strictly based on language rules and knowledge in order to stand out and be special. Some even deliberately use words that violate semantic habits or uncommon words. As a result, conventional language models perform poorly in the error correction field of these retrieval names, and thus fail to retrieve the results that users want. Summary of the invention

[0004] The embodiments of the present application provide a method, device, electronic device and storage medium for correcting typos in search names, so as to solve the problem of poor correction effect of typos in search names in the prior art.

[0005] In a first aspect, an embodiment of the present application provides a method for correcting typos in a search name, comprising:

[0006] Get the initial search name;

[0007] According to the wrong character position model and the wrong character type model, the initial search name is processed to obtain a target search name, wherein the wrong character position model includes a mapping relationship between each correct search name, intended search name and wrong search name and the wrong character position label, and the wrong character type model includes a mapping relationship between each wrong search name and the wrong character type label;

[0008] Search is performed based on the target search name.

[0009] Optionally, the typo position tag is used to reflect the position number of the first typo in the search name, and the typo type tag is used to reflect the type of the first typo in the wrong search name. The initial search name is processed according to the typo position model and the typo type model to obtain the target search name, including:

[0010] Using a wrong character position model, inferring the wrong character position of the initial search name, and obtaining a first position label of the wrong character in the initial search name;

[0011] If the first position label is not 0, then using a wrong character type model to infer the wrong character type of the initial search name, and obtaining a first type label of the wrong character in the initial search name;

[0012] According to the first position tag and the first type tag, typos in the initial search name are corrected to obtain a target search name.

[0013] Optionally, the correcting typos in the initial search name according to the first position tag and the first type tag to obtain a target search name includes:

[0014] Determine a first wrong character corresponding to a first position tag in the initial search name;

[0015] According to the first type of label, the first wrong character in the initial search name is replaced to obtain at least one candidate search name;

[0016] Using the wrong character position model, inferring the wrong character position of the at least one candidate search name, and obtaining a second position label of the at least one candidate search name;

[0017] Filter out valid search names where the second location tag is different from the first location tag;

[0018] If the second position tag of the effective search name is 0, the effective search name is determined as the target search name.

[0019] Optionally, the method further comprises:

[0020] If the second position label of the effective search name is not 0, then using the wrong character type model to infer the wrong character type of the effective search name, and obtaining the second type label of the wrong character in the effective search name;

[0021] According to the second position tag and the second type tag, typos in the effective search name are corrected to obtain a target search name.

[0022] Optionally, the wrong character type label includes a homophone label and a similar character label, and the first wrong character in the initial search name is replaced according to the first type label to obtain at least one candidate search name, including:

[0023] If the first type of label is a homophone label, then according to the homophone table of the first wrong character, the first wrong character in the initial search name is replaced to obtain at least one candidate search name;

[0024] If the first type of label is a similar character label, the first wrong character in the initial search name is replaced according to the similar character table of the first wrong character to obtain at least one candidate search name.

[0025] Optionally, the method further comprises:

[0026] If the first position tag is 0, the initial search name is determined as the target search name.

[0027] Optionally, before the initial search name is processed according to the wrong character position model and the wrong character type model to obtain the target search name, the method further includes:

[0028] Get the correct search name;

[0029] Preprocessing the correct search names to obtain intended search names and erroneous search names corresponding to each correct search name;

[0030] According to the correct search name, the intended search name and the incorrect search name, a pre-built deep learning model is trained to obtain the wrong character position model;

[0031] According to the erroneous retrieval name, a pre-built deep learning model is trained to obtain the typo type model.

[0032] Optionally, the training of a pre-built deep learning model according to the correct search name, the intended search name and the incorrect search name to obtain the wrong character location model includes:

[0033] According to the positions of the wrong characters in the correct search name, the intended search name and the wrong search name, a first training data set including the wrong search name, the correct search name, the intended search name and wrong character position labels is generated;

[0034] The deep learning model is trained using the first training data set to obtain the typo position model.

[0035] Optionally, the step of training a pre-built deep learning model according to the erroneous search name to obtain the typo type model includes:

[0036] According to the type of the typo in the erroneous search name, generating a second training data set including the erroneous search name and the typo type label;

[0037] The deep learning model is trained using the second training data set to obtain the typo type model.

[0038] Optionally, the preprocessing of the correct search names to obtain intended search names and erroneous search names corresponding to the correct search names includes:

[0039] Performing word segmentation processing on the correct search name to obtain a word segmentation set of the correct search name;

[0040] discarding at least one participle in the participle set, and merging the remaining participles in the participle set to obtain an intended search name;

[0041] The characters in the correct search name and the intended search name are replaced with homophones or characters with similar shapes to obtain the incorrect search name.

[0042] In a second aspect, an embodiment of the present application provides a device for correcting typos in a search name, comprising:

[0043] An acquisition module, used to obtain an initial search name;

[0044] A processing module, used for processing the initial search name according to a wrong character position model and a wrong character type model to obtain a target search name, wherein the wrong character position model includes a mapping relationship between each correct search name, intended search name and wrong search name and the wrong character position label, and the wrong character type model includes a mapping relationship between each wrong search name and the wrong character type label;

[0045] The retrieval module is used to perform retrieval according to the target retrieval name.

[0046] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for correcting typos in a search name as described in the first aspect above is implemented.

[0047] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for correcting typos in a search name as described in the first aspect above.

[0048] The embodiments of the present application provide a method, device, electronic device and storage medium for correcting typos in search names. An initial search name is obtained, and the initial search name is processed according to a typo position model and a typo type model to obtain a target search name. The typo position model includes a mapping relationship between each correct search name, intended search name and erroneous search name and typo position labels, and the typo type model includes a mapping relationship between each erroneous search name and typo type label. Searching is performed according to the target search name to realize intelligent correction of typos in the search name, thereby improving the correction quality of typos in the search name and enhancing the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present application;

[0050] Figure 2 A flowchart of a method for correcting typos in a search name provided in Example 1 of the present application;

[0051] Figure 3 A schematic diagram of the working principle of the wrong character position model provided in Example 1 of the present application;

[0052] Figure 4 A schematic diagram of the working principle of the typo type model provided in Example 1 of the present application;

[0053] Figure 5 A flowchart of another method for correcting typos in a search name provided in Embodiment 2 of the present application;

[0054] Figure 6 A schematic diagram of a process for correcting typos by combining a typo position model and a typo type model provided in the second embodiment of the present application;

[0055] Figure 7 A schematic diagram of the training process of a typo position model and a typo type model is provided for the third embodiment of the present application;

[0056] Figure 8 A schematic diagram of the training process of the typo position model and the typo type model provided in Example 3 of the present application;

[0057] Fig. 9 A schematic diagram of the structure of a device for correcting typos in a search name provided in Embodiment 4 of the present application;

[0058] Fig.10 A schematic diagram of the structure of an electronic device provided in Example 5 of the present application. DETAILED DESCRIPTION

[0059] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only the parts related to the present application, rather than all structures, are shown in the accompanying drawings.

[0060] The technical solution of the embodiment of the present application can be applied to application fields of data retrieval based on the search name input by the user, such as geographical location, songs, books, etc. The technical solution provided by this embodiment can be applied to various types of device backgrounds and can also be applied to servers.

[0061] For example, Figure 1 A schematic diagram of an application scenario provided in an embodiment of the present application, taking geographic location retrieval as an example, such as Figure 1 As shown, the user device and the server are connected in communication. The user device is a user terminal device, such as a mobile phone, a tablet computer, a vehicle terminal, etc., and an application client, such as a navigation application (application, App), is installed on the user device. The server has the function of performing corresponding data processing according to the request sent by the user device and feeding back the data processing result to the user device. The server can be an ordinary server, a cloud server, a server cluster, etc.

[0062] The main idea of ​​the technical solution of the present application is as follows: Based on the technical problems existing in the prior art, the embodiment of the present application provides a solution for correcting typos in search names. According to the correct search name, names of different lengths and containing homophone errors and names containing similar characters errors are generated to simulate the search names that may be entered by users during search, and a typo position label is set for each search name, and a typo type label is set for each incorrect search name to obtain name data containing the two labels. Based on the above two types of name data, deep learning models are trained respectively to learn the relationship between the text features of the name data and the corresponding labels, so as to obtain a model that can identify the position of typos and a model that can identify the type of typos.

[0063] In the name correction stage, two models are used in combination. First, a model that can identify the position of typos is used to infer the position of typos. Then, a model that can identify the type of typos is used to determine whether the typos are homophones or similar characters. The typos are replaced with alternative homophones or similar characters according to the incorrect position of the typos to generate a group of new names. If the typo position is inferred for a new name again, and the typo position label returned is different from the previous inference, it is considered that the typo at the current position has been corrected correctly. The above inference process is recursively executed in sequence until no new typos are found, thereby correcting all typos in the retrieved names.

[0064] Embodiment 1

[0065] Figure 2 This is a flow chart of a method for correcting typos in a search name provided in the first embodiment of the present application. The method of this embodiment can be performed by a device for correcting typos in a search name provided in the embodiment of the present application. The device can be implemented by software and / or hardware and can be integrated into electronic devices such as computers and servers. Figure 2 As shown, the method for correcting typos in a search name of this embodiment includes:

[0066] S101, obtaining an initial search name.

[0067] For example, Figure 1 As shown, when a user enters a search name in the search bar of an application client of a user device, typos may appear in the search name due to uncertainty about the correct pronunciation of certain characters or confusion about the character shapes, making it difficult for the user device to accurately search, affecting the user experience.

[0068] Different from the prior art method of directly searching based on the search name input by the user, in this embodiment, when the user enters the search name in the search bar, the initial search name input by the user is processed to determine whether there are typos in the initial search name, and when it is determined that there are typos in the initial search name, the existing typos are corrected, and data is retrieved based on the search name after correction, so as to avoid the problem of ineffective search due to typos in the initial search name. For this reason, in this step, it is necessary to first obtain the initial search name.

[0069] The initial search name refers to the search name directly input by the user through the application client of the user device. It is a search name that has not been error-corrected and directly reflects the user's search needs.

[0070] In this embodiment, the device background can directly identify the initial search name entered by the user on the front-end page, or the server can obtain the initial search name from the user device through remote communication. Figure 1 As shown, when the user receives the initial search name input by the user on the user device or when the user device cannot search for data corresponding to the initial search name, the user device sends the initial search name to the server, and the server obtains the initial search name.

[0071] S102: Process the initial search name according to the wrong character position model and the wrong character type model to obtain a target search name.

[0072] In this step, the initial search name is processed by combining the typo position model and the typo type model to obtain a target search name, wherein the target search name can be a search name obtained after the initial search name is corrected, or it can be the initial search name itself. Specifically, if there are typos in the initial search name, the target search name is the search name obtained after the initial search name is corrected, and if there are no typos in the initial search name, the target search name is the initial search name itself.

[0073] In this embodiment, the typo position model includes the mapping relationship between each correct search name, intended search name and incorrect search name and the typo position label, and has the function of identifying the typo position in the search name; the typo type model includes the mapping relationship between the incorrect search name and the typo type label, and has the function of identifying the typo type.

[0074] The correct search name refers to the search name obtained from the original application data, such as the original geographical name obtained from the map data. It is understandable that the correct search name does not include typos.

[0075] The intended search name is obtained by simplifying the correct search name to simulate the search names of various lengths that the user may enter. The same correct search name can be processed to obtain different intended search names. It is understandable that the intended search name does not include typos.

[0076] An incorrect search name is a search name obtained by processing the correct search name and the intended search name by replacing homophones or similar characters. An incorrect search name contains at least one wrong character. For the same correct search name or intended search name, after replacing homophones or similar characters, multiple incorrect search names with different numbers of wrong characters, different types of wrong characters, different positions of wrong characters, and different combinations of wrong characters can be obtained.

[0077] To simplify the model and reduce the occupancy of device memory, in this embodiment, the typo position label is used to indicate the position of the typo in the search name, and the typo type label is used to indicate the type of typo appearing in the search name.

[0078] Among them, the position of the typo can be simply understood as the order in which the typo appears in the search name. According to the reading and writing habits of the language, the position order defaults to a left-to-right order. The position label indicates that the Nth character from left to right in the search name is a typo. For example, if the second character in a search name is a typo, its position label can be represented as 2.

[0079] For example, Figure 3The schematic diagram of the working principle of the wrong character position model provided in the first embodiment of the present application is as follows: Figure 3 As shown, in this embodiment, the input of the typo position model is the search name (which can be the initial search name or the search name to be inferred generated during the error correction process), and the output is the typo position label, such as 0, 1, 2, ..., where 0 means there is no typo in the search name to be corrected.

[0080] It is not difficult to see that in the typo position model, the typo position labels corresponding to the correct search name and the intended search name are both 0, and the typo position label corresponding to the incorrect search name is a positive integer greater than or equal to 1.

[0081] The type of typos can be simply understood as the classification of typos. In this embodiment, the types of typos are divided into two categories: homophone errors and similar-looking character errors according to the causes of the typos. Different symbols can be set in advance as category labels for homophone errors and similar-looking character errors. For example, x is used to represent the homophone error label, and y is used to represent the similar-looking character error label.

[0082] For example, Figure 4 The schematic diagram of the working principle of the typo type model provided in the first embodiment of the present application is as follows: Figure 4 As shown, in this embodiment, the input of the typo type model is the search name (which can be the initial search name or the search name to be inferred generated during the error correction process), and the output is the typo type label, such as x or y.

[0083] Accordingly, in this step, the initial search name input by the user can be input into the typo position model, and the typo position model can match the initial search name with the correct search name, intended search name and incorrect search name in the typo position model to find the search name corresponding to the initial search name, and determine whether there are typos in the initial search name or the location of the existing typos based on the typo position label corresponding to the initial search name.

[0084] Specifically, if the typo position label is 0, it is determined that there is no typo in the initial search name, and the initial search name is determined as the target search name; if the typo position label is not 0, it is determined that there is a typo in the initial search name, and the position of the typo is the Nth character from left to right in the initial search name corresponding to the typo position label, and the initial search name is further input into the typo type model, and the typo type model matches the initial search name with the wrong search name in the typo type model to find the wrong search name corresponding to the initial search name, and according to the typo type label corresponding to the wrong search name, the type of typo in the initial search name is determined, and according to the position label output by the typo position model and the type label output by the typo type model, a character of the corresponding type to the typo in the corresponding position is used, such as a homophone or similar character of the typo in the second position, to replace the typo in the corresponding position in the initial search name to obtain the target search name.

[0085] S103, searching according to the target search name.

[0086] In this step, data retrieval is performed according to the target search name obtained in S102, thereby avoiding the problem of ineffective retrieval due to typos in the initial search name, and improving the user experience.

[0087] In this embodiment, an initial search name is obtained and processed according to a typo position model and a typo type model to obtain a target search name. The typo position model includes a mapping relationship between each correct search name, intended search name and erroneous search name and typo position labels, and the typo type model includes a mapping relationship between each erroneous search name and typo type label. Retrieval is performed according to the target search name to implement intelligent error correction of typos in the search name. Since the erroneous search name in the typo position model and the typo type model truly reproduces the possible typo input by the user, the typo in the search name can be effectively located and identified as the type, thereby improving the error correction quality of typos in the search name and enhancing the user experience.

[0088] Embodiment 2

[0089] Since there may be more than one typo in the retrieval name at the same time, based on the above embodiments, in order to reduce the model complexity and improve the error correction efficiency, in this embodiment, a typo position label is set in the typo position model to reflect the position of the first typo in the corresponding correct retrieval name, intended retrieval name and incorrect retrieval name, and a typo type label is set in the typo type model to reflect the type of the first typo in the corresponding incorrect retrieval name. Exemplarily, Table 1 shows the mapping relationship between the incorrect retrieval name and the typo position label in a typo position model. The 2 in the typo position label indicates that the second character in the retrieval name is incorrect, and the 5 indicates that the fifth character in the retrieval name is incorrect; Table 2 shows the mapping relationship between the incorrect retrieval name and the typo type label in a typo type model. The x in the typo type label represents a homophone error, and the y represents a形近字 error (a character with similar form error).

[0090] Table 1

[0091] Error retrieving name Typo location label Renaissance Beijing Hotel 2 Renaissance Beijing Hotel 2 Renaissance Beijing Capital Hotel 5

[0092] Table 2

[0093] Error retrieving name Typo type label Renaissance Beijing Hotel y Renaissance Beijing Hotel y Renaissance Beijing Capital Hotel x

[0094] The incorrect retrieval names in Table 1 and Table 2 are the corresponding incorrect retrieval names for "Renaissance Beijing Wangfujing Hotel". The bolded characters in the incorrect retrieval names are the typos. As can be seen from Table 1 and Table 2, when there are multiple typos in the incorrect retrieval name, since the position label in the typo position model is used to reflect the position serial number of the first typo in the incorrect retrieval name, therefore, the typo position label corresponding to "北亰富力萬丽酒店" in Table 1 indicates the position serial number of "亰"; since the type label in the typo type model is used to reflect the type of the first typo in the incorrect retrieval name, therefore, the typo type label corresponding to "北亰富力萬丽酒店" in Table 2 indicates the typo type of "亰", that is, a character with similar form error (形近字错误).

[0095] Exemplarily, Figure 5 is a flowchart showing another method for correcting typos in the retrieval name provided in the second embodiment of the present application. As Figure 5 shown, in this embodiment, according to the typo position model and the typo type model, the typos in the initial retrieval name are corrected to obtain the target retrieval name, including:

[0096] S201. Use the typo position model to infer the typo position of the initial retrieval name to obtain the first position label of the typo in the initial retrieval name.

[0097] In this step, the initial search name is input into the typo position model, and the typo position is inferred by the typo position model to obtain the position label of the first typo in the initial search name. For easy distinction, the typo position label inferred for the first time by the typo position model is called the first position label.

[0098] S202: If the first position label is not 0, use a typo type model to infer the typo type of the initial search name to obtain a first type label of the typo in the initial search name.

[0099] If in S201, the first position label output by the typo position model is not 0, it means that there is a typo in the initial search name. In this step, the initial search name is further input into the typo type model, and the typo type is inferred by the typo type model to obtain the type of the first typo in the initial search name. For ease of distinction, the typo type label inferred for the first time by the typo type model is called the first type label.

[0100] It is understandable that if in S201, the first position label output by the wrong character position model is 0, then there is no wrong character in the initial search name, and the initial search name can be directly determined as the target search name.

[0101] S203: Determine the first wrong character corresponding to the first position tag in the initial search name.

[0102] After obtaining the first position tag and the first type tag, in this step, in order to facilitate the subsequent error correction, it is necessary to determine which wrong character in the initial search name corresponds to the first position tag.

[0103] Exemplarily, based on the first position label, the word whose position number is consistent with the first position label in the initial search name can be found from left to right to obtain the typo corresponding to the first position label. For easy distinction, the typo corresponding to the first position label is called the first typo here.

[0104] S204: Replace the first wrong character in the initial search name according to the first type label to obtain at least one candidate search name.

[0105] In this step, after the first wrong character is determined, the type of the first wrong character can be determined according to the first type label, such as a homophone error or a similar character error. Then, according to a homophone table or a similar character table of the first wrong character compiled in advance, the first wrong character in the initial search name is replaced one by one with the homophones in the homophone table or the similar characters in the similar character table, so as to obtain at least one candidate search name corresponding to the initial search name.

[0106] S205: Use a wrong character position model to infer the wrong character position of at least one candidate search name, and obtain a second position label of at least one candidate search name.

[0107] It is understandable that among the multiple candidate search names obtained according to S204, only one candidate search name effectively corrects the first typo in the initial search name, that is, only one candidate search name corrects the first typo. For this reason, in this embodiment, by using the typo position model to continue to infer the position of the candidate search names, the candidate search name that corrects the first typo is determined, and the correction of the first typo is completed. For the convenience of distinction, the typo position model is used to infer the typo position in the candidate search name, and the typo position label obtained is called the second position label.

[0108] Accordingly, in this step, at least one candidate search name obtained in S204 is respectively input into the typo position model, and the typo position model is used to infer the position of the typo in each candidate search name to obtain a second position label of the typo corresponding to each candidate search name.

[0109] S206: Filter out valid search names whose second position tags are different from the first position tags.

[0110] In this step, by screening the second position labels of the candidate search names, the candidate search names that have successfully corrected the first typo in the initial search name, ie, the valid search names, are determined.

[0111] It can be understood that when a candidate search name is input into the wrong character position model, if the second position label is the same as the first position label, it means that there is still a wrong character at the position corresponding to the first position label in the candidate search name, that is, the correction of the first wrong character in the initial search name has not been achieved; if the second position label is different from the first position label, it means that there is no wrong character at the position corresponding to the first position label in the candidate search name, that is, the correction of the first wrong character in the initial search name has been achieved. There are two cases here:

[0112] If the second position label obtained is 0, it means that there is no typo in the candidate search name, that is, the first typo in the initial search name is corrected successfully, and there are no other typos in the initial search name; if the value of the second position label obtained is greater than the value of the first position label, it means that the position of the first typo in the candidate search name is shifted backward compared to the position of the first typo in the initial search name, which means that there are still typos in the candidate search name, that is, the first typo in the initial search name is corrected successfully, and there are other typos in the initial search name except the first typo.

[0113] It can be seen that the valid search name is the candidate search name whose second position tag is different from the first position tag. Accordingly, in this step, the candidate search name whose second position tag is different from the first position tag is screened out to determine the valid search name.

[0114] S207: If the second position tag of the effective search name is 0, determine the effective search name as the target search name.

[0115] From the above analysis, it can be seen that when the second position label of the effective search name is 0, it means that there are no other typos in the initial search name except the first typo, that is, the error correction of the initial search name is completed, and the obtained effective search name is the target search name of the initial search name.

[0116] S208. If the second position label of the effective search name is not 0, the typo type model is used to infer the typo type of the effective search name to obtain the second type label of the typo in the effective search name.

[0117] From the above analysis, it can be seen that when the second position label of the effective search name is not 0, it means that there are other typos in the initial search name besides the first typo. This typo is the first typo in the effective search name, corresponding to the second typo in the initial search name. For the sake of convenience of description, this typo is called the second typo.

[0118] In order to correct the second typo, in this step, it is necessary to further input the valid search name into the typo type model, and the typo type model is used to infer the type of typo in the valid search name to obtain the second type label of the typo in the valid search name, that is, the type label of the second typo in the initial search name.

[0119] S209: Correct the typos in the valid search name according to the second position tag and the second type tag to obtain a target search name.

[0120] After S208, based on the newly obtained second position label and second type label, by repeating S203-S208, the second typo and other possible typos in the initial search name are corrected to obtain the target search name.

[0121] It should be noted that, in the process of repeating S203 - S208 , it is sufficient to replace the original position label and type label with the newly inferred position label and type label respectively.

[0122] For example, the initial search name entered by the user is "Beijing Renaissance Hotel". Figure 6A flowchart showing the process of correcting typos by combining a typo position model and a typo type model provided in the second embodiment of this application, as Figure 6 shown. The process of correcting the typos in "Beijing富力萬丽Hotel" includes:

[0123] ① Input "Beijing富力萬丽Hotel" into the typo position model, and the typo position model infers the typo position. The inference result is: 2 (i.e., the second character in "Beijing富力萬丽Hotel" is a typo);

[0124] ② Input "Beijing富力萬丽Hotel" into the typo type model, and the typo type model infers the typo type. The inference result is: y (i.e., "Beijing富力萬丽Hotel" is a case of similar - shaped character error);

[0125] ③ According to the inference result "2" of the typo position model and the inference result "y" of the typo type model, use the similar - shaped characters of "亰" to replace the "亰" in "Beijing富力萬丽Hotel", and obtain a series of corresponding candidate search names for "Beijing富力萬丽Hotel": Beijing富力萬丽Hotel, Beijing富力萬丽Hotel, Beijing富力萬丽Hotel, ……;

[0126] ④ Input these candidate search names into the typo position model respectively, and infer the typo positions in each candidate search name. The relationship between the candidate search names and the typo position labels is:

[0127] Beijing富力萬丽Hotel: 5,

[0128] Beijing富力萬丽Hotel: 2,

[0129] Beijing富力萬丽Hotel: 2,

[0130] ……;

[0131] ⑤ Discard the candidate search names whose inference results are still 2, and retain the valid search name "Beijing富力萬丽Hotel".至此, the correction of the first typo in "Beijing富力萬丽Hotel" is completed;

[0132] ⑥ Input "Beijing富力萬丽Hotel" into the typo type model, and the typo type model infers the typo type. The inference result is: x (i.e., "Beijing富力萬丽Hotel" is a case of homophone error);

[0133] ⑦ According to the inference result "5" of the typo position model and the inference result "x" of the typo type model, use the homophones of "萬" to replace the "萬" in "Beijing富力萬丽Hotel", and obtain a series of corresponding candidate search names for "Beijing富力萬丽Hotel": Beijing富力皖丽Hotel, Beijing富力湾丽Hotel, Beijing富力万丽Hotel, ……;

[0134] ⑧ Input these candidate search names into the wrong character position model respectively, infer the position of the wrong character in each candidate search name, and obtain the relationship between the candidate search name and the wrong character position label as follows:

[0135] Beijing R&F Wanli Hotel: 5,

[0136] Beijing R&F Bayview Hotel: 5,

[0137] Renaissance Beijing Capital Hotel: 0,

[0138] ……;

[0139] ⑨Discard the candidate search name whose inference result is still 5, and keep the valid search name "Beijing Furama Renaissance Hotel". At this point, the second typo in "Beijing Furama Renaissance Hotel" has been corrected.

[0140] Since the typo position label in "Beijing Capital Renaissance Hotel" is 0, it can be seen that there are no typos in "Beijing Capital Renaissance Hotel", that is, all typos in "Beijing Capital Renaissance Hotel" have been corrected, and the target search name "Beijing Capital Renaissance Hotel" is returned for retrieval.

[0141] In this embodiment, the typo position label in the typo position model is set to reflect the position of the first typo appearing in the corresponding search name, and the typo type label in the typo type model is set to reflect the type of the first typo appearing in the corresponding wrong search name. By combining the typo position model and the typo type model, the typos in the search name to be corrected are corrected word by word. Since the model does not need to consider various complex typo combinations, this not only reduces the complexity of the model, but also improves the correction efficiency and accuracy of typos in the search name to be corrected, which is conducive to further improving the user experience.

[0142] Embodiment 3

[0143] The following will use a specific embodiment to illustrate the training process of the wrong character position model and the wrong character type model in this embodiment. For example, Figure 7 A training flow diagram of a typo position model and a typo type model is provided for the third embodiment of the present application. Based on the above-mentioned first and second embodiments, Figure 7 As shown, the training steps of the typo position model and the typo type model include:

[0144] S301. Obtain the correct search name.

[0145] Taking the correct search name as a geographic search name as an example, in order to improve the accuracy of the typo position model and the typo type model in correcting typos in geographic names, in this embodiment, the original map name in the map data is used as the source data for the typo position model and the typo type model. To this end, in this step, the correct search name is obtained by obtaining the original map name in the map data.

[0146] In a possible implementation, if map data is stored on the electronic device for training the wrong character position model and the wrong character type model, then in this step, the original map name can be directly obtained from the map data.

[0147] In another possible implementation, if map data is not stored on the electronic device on which the typo location model and the typo type model are trained, then in this step, a map data acquisition request can be sent to the device storing the map data to obtain the map data of the map APP, and then the original map name required for model training can be extracted.

[0148] It can be understood that for search fields other than geographical location, such as songs, books, etc., the correct search name is the corresponding original song name, original book name, etc. Accordingly, in this embodiment, a method similar to the above can be adopted from the song library, book box catalog, etc. of the relevant application to obtain the correct search name.

[0149] S302: Preprocess the correct search names to obtain intended search names and erroneous search names corresponding to each correct search name.

[0150] In this step, the correct search names are preprocessed to simulate possible situations of search names and typos that may be entered by users when performing searches, and the intended search names and erroneous search names corresponding to each correct search name are obtained.

[0151] In a possible implementation manner, in this embodiment, the preprocessing process for the correct search name includes:

[0152] (1) Perform word segmentation on the correct search name to obtain a word segmentation set of the original map name.

[0153] When segmenting the correct search name, you can use some commonly used Chinese word segmentation tools, such as natural language processing and information retrieval (NLPIR), language technology platform (LTP), Stanford word segmenter, Jieba word segmentation, etc.

[0154] (2) Discard at least one participle in the participle set, merge the remaining participles in the participle set, and obtain the intended retrieval name.

[0155] In this step, since users may not enter the original geographical name in full when entering the search name in the application APP, they usually only enter the abbreviation or a few key words. In order to obtain the search results expected by users in this case, these possible names need to be taken into account when training the model.

[0156] Exemplarily, in this step, the word is taken as a unit, the order of word segmentation is maintained, and one word, two words, and so on are discarded in the order of word segmentation, and a new name is reassembled to obtain a search name that is closer to the actual intention input by the user.

[0157] (3) Replacing the characters in the correct search name and the intended search name with homophones or similar characters to obtain an incorrect search name.

[0158] In this step, each character in the correct search name and the intended search name is replaced with its corresponding homophone or similar character to obtain an incorrect search name containing typos.

[0159] Specifically, the characters in the original map name and the intended search name can be replaced one by one with homophones according to a pre-organized homophone table, and the characters in the original map name and the intended search name can be replaced one by one with similar characters according to a pre-organized similar character table, to obtain an erroneous search name that includes at least one similar character error or at least one homophone error or both homophone errors and similar character errors.

[0160] S303: Train a pre-built deep learning model based on the correct search name, the intended search name, and the incorrect search name to obtain a typo location model.

[0161] Since the typo position model includes the mapping relationship between the correct search name, intended search name and incorrect search name and the typo position label, in this step, according to the positions of the typos in the correct search name, intended search name and incorrect search name, a first training data set including the correct search name, intended search name, incorrect search name and typo position labels is generated, and the deep learning model is trained using the first training data set to obtain the typo position model.

[0162] The first training data set is obtained by adding wrong character position labels, such as 0, 1, 2, ..., to the correct search name obtained in S301 and the intended search name and wrong search name obtained in S302. Therefore, the first training data set includes the correct search name, the intended search name, the wrong search name and the wrong character position labels. In this step, the deep learning model is trained by the first training data set to obtain a wrong character position model.

[0163] The deep learning model can be pre-built using the deep learning library provided by Google's TensorFlow framework. In order to enable the trained model to have the function of identifying the position of a typo or the type of a typo, the constructed deep learning model can optionally include multiple layers of one-dimensional convolutional layers, pooling layers, and fully connected layers. The multiple layers of one-dimensional convolutional layers and pooling layers are used to extract text features of the name data, and the fully connected layers are used to learn the mapping relationship between the retrieved name and the label.

[0164] Specifically, when generating a typo location model, multi-layer one-dimensional convolutional layers and pooling layers in the deep learning model are used to extract text features of the retrieval names (including correct retrieval names, intended retrieval names, and incorrect retrieval names) in the first training data set, and the fully connected layer is used to learn the mapping relationship between retrieval names (including correct retrieval names, intended retrieval names, and incorrect retrieval names) and typo location labels.

[0165] S304: Train a pre-built deep learning model based on the incorrect search name to obtain a typo type model.

[0166] Since the typo type model includes the mapping relationship between each erroneous search name and the typo type label, in this step, according to the type of typo in the erroneous search name, a second training data set including the erroneous search name and the typo type label is generated, and the deep learning model is trained with the second training data set to obtain the typo type model. The second training data set is obtained by adding typo type labels, such as x and y, to the erroneous search name obtained in S302. Therefore, the second training data set includes the erroneous search name and the typo type label. In this step, the deep learning model is trained with the second training data set to obtain the typo type model. When generating the typo type model, the multi-layer one-dimensional convolutional layer and pooling layer in the deep learning model are used to extract the text features of the erroneous search name in the second training data set, and the fully connected layer is used to learn the mapping relationship between the erroneous search name and the typo type label.

[0167] It is understandable that in this embodiment, according to the need, after the wrong search name is classified, the wrong character position model and the wrong character type model can be trained separately to obtain multiple wrong character position models and multiple wrong character type models. When in use, the wrong character position model and the wrong character type model corresponding to the characteristics of the search name input by the user are screened out for error correction to speed up the error correction. For example, the wrong search name is classified according to the length of the wrong search name, and different wrong character position models and wrong character type models for error correction of input search names of different lengths are obtained, such as 4 characters, 5 characters, 6 characters, ..., and each time the error is corrected, it is only necessary to find the wrong character position model and the wrong character type model that match the length of the search name input by the user.

[0168] Take the Beijing Renaissance Hotel as an example. Figure 8 The following is a schematic diagram of the training process of the typo position model and the typo type model provided in Example 3 of the present application, such as Figure 8 As shown in the figure, the process of training the typo position model and typo type model related to "Beijing Renaissance Hotel" includes:

[0169] ① Perform word segmentation on "Beijing Furama Renaissance Hotel" to obtain the word segmentation set {Beijing, R&F, Renaissance, Hotel};

[0170] ② Recombining the segmented words in the segmented word set to obtain the search name that the user may enter, such as: Beijing Furama Hotel, Beijing Furama Renaissance, Furama Renaissance Hotel, Beijing Furama Hotel, Beijing Renaissance Hotel, Beijing Furama, Beijing Renaissance, Beijing Hotel, Furama Renaissance, Furama Hotel, Renaissance Hotel;

[0171] ③Replace the search names obtained in ② with homophones to obtain erroneous search names with homophones, such as: Beijing Renaissance Hotel, Beijing Renaissance Hotel, Beijing Fuli Renaissance Hotel, Beijing Fuli Renaissance Hotel, Beijing Renaissance Hotel, Beijing Renaissance Hotel, Beijing Renaissance Hotel Jiudian, Beijing Renaissance Hotel ..., Beijing Renaissance Hotel, Beijing Renaissance Hotel, Beijing Renaissance Hotel, Beijing Renaissance Hotel, Beijing Renaissance Hotel, Beijing Renaissance Hotel, etc.;

[0172] ④Replace the search names obtained in ② with similar characters to obtain incorrect search names with similar characters, such as: Beijing Renaissance Hotel, Beijing Renaissance Hotel, Beijing Fuli Renaissance Hotel, Beijing Fudao Renaissance Hotel, Beijing R&F Wanli Hotel, Beijing R&F Renaissance Hotel, Beijing R&F Renaissance Hotel, etc.;

[0173] ⑤ Mark the positions of typos in the search names obtained in ②, ③ and ④ to obtain the first training data set, such as: Beijing Capital Renaissance Hotel: 0, Beijing Capital Renaissance Hotel: 1, Beijing Capital Renaissance Hotel: 2, Beijing Fuli Renaissance Hotel: 3, Beijing Fuli Renaissance Hotel: 4, Beijing Capital Renaissance Hotel: 5, Beijing Capital Renaissance Hotel: 6, Beijing Capital Renaissance Jiudian: 7, Beijing Capital Renaissance Jiudian: 8, Beijing Capital Renaissance: 0, Beijing Capital Renaissance Hotel: 1, Beijing Capital Renaissance Hotel: 2, Beijing Capital Renaissance Hotel: 3, ...;

[0174] ⑥ Annotate the wrong search names obtained in ③ and ④ with the type of typos to obtain the second training data set, such as: Beijing Renaissance Hotel: x, Beijing Renaissance Hotel: x, Beijing Fuli Renaissance Hotel: x, Beijing Renaissance Hotel: x, Beijing Renaissance Hotel: x, Beijing Renaissance Hotel Jiudian: x, Zhaojing Renaissance Hotel: y, Beijing Renaissance Hotel: y, Beijing Fuli Renaissance Hotel: y, Beijing Fudao Renaissance Hotel: y, Beijing R&F Wanli Hotel: y, Beijing R&F Renaissance Hotel: y, ...;

[0175] ⑦ Using deep learning, the deep learning model is trained using the first training data set obtained in ⑤ to obtain a typo position model;

[0176] ⑧ Using deep learning method, the deep learning model is trained using the second training data set obtained in ⑥ to obtain a typo type model.

[0177] In this embodiment, the correct search name is obtained, the correct search name is preprocessed, and the intended search name and the incorrect search name corresponding to each correct search name are obtained; according to the correct search name, the intended search name and the incorrect search name, a pre-constructed deep learning model is trained to obtain a typo position model; according to the incorrect search name, a pre-constructed deep learning model is trained to obtain a typo type model, wherein the typo position model includes a mapping relationship between each correct search name, the intended search name and the incorrect search name and the typo position label, and the typo type model includes a mapping relationship between each incorrect search name and the typo type label. By using the typo position model and the typo type model trained in this embodiment to correct typos in the search name, the accuracy and efficiency of error correction can be improved, thereby enhancing the user experience.

[0178] Embodiment 4

[0179] Fig. 9 A schematic diagram of the structure of the device for correcting typos in a search name provided in the fourth embodiment of the present application, as shown in FIG. Fig. 9 As shown, the device 10 for correcting wrong characters of a searched name in this embodiment includes:

[0180] An acquisition module 11 , a processing module 12 and a retrieval module 13 .

[0181] Wherein, the acquisition module 11 is used to obtain the initial search name;

[0182] A processing module 12 is used to process the initial search name according to a wrong character position model and a wrong character type model to obtain a target search name, wherein the wrong character position model includes a mapping relationship between each correct search name, intended search name and wrong search name and the wrong character position label, and the wrong character type model includes a mapping relationship between each wrong search name and the wrong character type label;

[0183] The search module 13 is used to search according to the target search name.

[0184] Optionally, the wrong character position tag is used to reflect the position number of the first wrong character in the search name, and the wrong character type tag is used to reflect the type of the first wrong character in the wrong search name. The processing module 12 is specifically used to:

[0185] Using a wrong character position model, inferring the wrong character position of the initial search name, and obtaining a first position label of the wrong character in the initial search name;

[0186] If the first position label is not 0, then using a wrong character type model to infer the wrong character type of the initial search name, and obtaining a first type label of the wrong character in the initial search name;

[0187] According to the first position tag and the first type tag, typos in the initial search name are corrected to obtain a target search name.

[0188] Optionally, the processing module 12 is specifically used for:

[0189] Determine a first wrong character corresponding to a first position tag in the initial search name;

[0190] According to the first type of label, the first wrong character in the initial search name is replaced to obtain at least one candidate search name;

[0191] Using the wrong character position model, inferring the wrong character position of the at least one candidate search name, and obtaining a second position label of the at least one candidate search name;

[0192] Filter out valid search names where the second location tag is different from the first location tag;

[0193] If the second position tag of the effective search name is 0, the effective search name is determined as the target search name.

[0194] Optionally, the processing module 12 is further used for:

[0195] If the second position label of the effective search name is not 0, then using the wrong character type model to infer the wrong character type of the effective search name, and obtaining the second type label of the wrong character in the effective search name;

[0196] According to the second position tag and the second type tag, typos in the effective search name are corrected to obtain a target search name.

[0197] Optionally, the wrong character type label includes a homophone label and a similar character label, and the processing module 12 is specifically used to:

[0198] If the first type of label is a homophone label, then according to the homophone table of the first wrong character, the first wrong character in the initial search name is replaced to obtain at least one candidate search name;

[0199] If the first type of label is a similar character label, the first wrong character in the initial search name is replaced according to the similar character table of the first wrong character to obtain at least one candidate search name.

[0200] Optionally, the processing module 12 is further used for:

[0201] If the first position tag is 0, the initial search name is determined as the target search name.

[0202] Optionally, the acquisition module 11 is further used for:

[0203] Get the correct search name;

[0204] The processing module 12 is also used for:

[0205] Preprocessing the correct search names to obtain intended search names and erroneous search names corresponding to each correct search name;

[0206] According to the correct search name, the intended search name and the incorrect search name, a pre-built deep learning model is trained to obtain the wrong character position model;

[0207] According to the erroneous retrieval name, a pre-built deep learning model is trained to obtain the typo type model.

[0208] Optionally, the processing module 12 is specifically used for:

[0209] According to the positions of the wrong characters in the correct search name, the intended search name and the wrong search name, a first training data set including the wrong search name, the correct search name, the intended search name and wrong character position labels is generated;

[0210] The deep learning model is trained using the first training data set to obtain the typo position model.

[0211] Optionally, the processing module 12 is specifically used for:

[0212] According to the type of the typo in the erroneous search name, generating a second training data set including the erroneous search name and the typo type label;

[0213] The deep learning model is trained using the second training data set to obtain the typo type model.

[0214] Optionally, the processing module 12 is specifically used for:

[0215] Performing word segmentation processing on the correct search name to obtain a word segmentation set of the correct search name;

[0216] discarding at least one participle in the participle set, and merging the remaining participles in the participle set to obtain an intended search name;

[0217] The characters in the correct search name and the intended search name are replaced with homophones or characters with similar shapes to obtain the incorrect search name.

[0218] The device for correcting wrong characters in search names provided in this embodiment can execute the method for correcting wrong characters in search names provided in the above method embodiment, and has the corresponding functional modules and beneficial effects of the execution method. The implementation principle and technical effects of this embodiment are similar to those of the above method embodiment, and will not be described one by one here.

[0219] Embodiment 5

[0220] Fig.10 A schematic diagram of the structure of an electronic device provided in Embodiment 5 of the present application is shown in FIG. Fig.10 As shown, the electronic device 20 includes a memory 21, a processor 22, and a computer program stored in the memory and executable on the processor; the number of the processor 22 of the electronic device 20 may be one or more. Fig.10 A processor 22 is taken as an example; the processor 22 and the memory 21 in the electronic device 20 may be connected via a bus or other means. Fig.10 The example of connecting through bus is taken in the following.

[0221] The memory 21, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the acquisition module 11 and the processing module 12 in the embodiment of the present application. The processor 22 executes various functional applications and data processing of the device / terminal / server by running the software programs, instructions and modules stored in the memory 21, that is, to implement the above-mentioned method for correcting typos in the search name.

[0222] The memory 21 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 21 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 21 may further include a memory remotely arranged relative to the processor 22, and these remote memories may be connected to the execution device / terminal / server via a grid. Examples of the above-mentioned grid include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0223] Embodiment 6

[0224] Embodiment 6 of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a computer processor, the computer program is used to perform a method for correcting typos in a search name, the method comprising:

[0225] Get the initial search name;

[0226] According to the wrong character position model and the wrong character type model, the initial search name is processed to obtain a target search name, wherein the wrong character position model includes a mapping relationship between each correct search name, intended search name and wrong search name and the wrong character position label, and the wrong character type model includes a mapping relationship between each wrong search name and the wrong character type label;

[0227] Search is performed based on the target search name.

[0228] Of course, the computer-readable storage medium provided in the embodiment of the present application, whose computer program is not limited to the method operations described above, can also execute the related operations in the method for correcting typos in the search name provided in any embodiment of the present application.

[0229] Through the above description of the implementation method, the technicians in the relevant field can clearly understand that the present application can be implemented with the help of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application can be essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or grid device, etc.) to execute the methods described in each embodiment of the present application.

[0230] It is worth noting that in the embodiment of the typo correction device for the above-mentioned retrieval name, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application.

[0231] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims

1. A method for correcting typos in a search name, characterized in that: include: Get the initial search name; The initial search name is processed according to the typo position model and the typo type model to obtain a target search name, wherein the typo position model includes a mapping relationship between each correct search name, intended search name and incorrect search name and a typo position label, and the typo type model includes a mapping relationship between each incorrect search name and a typo type label, wherein the typo position label is used to reflect the position serial number of the first typo in the search name, and the typo type label is used to reflect the type of the first typo in the incorrect search name, the correct search name refers to the search name obtained from the original application data, the intended search name refers to the search name after simplifying the correct search name, and the incorrect search name refers to the search name obtained by processing the correct search name and the intended search name by replacing homophones or similar characters; Search according to the target search name; The initial search name is processed according to the wrong character position model and the wrong character type model to obtain a target search name, including: Using a wrong character position model, inferring the wrong character position of the initial search name, and obtaining a first position label of the wrong character in the initial search name; If the first position label is not 0, then using a wrong character type model to infer the wrong character type of the initial search name, and obtaining a first type label of the wrong character in the initial search name; Determine a first wrong character corresponding to a first position tag in the initial search name; According to the first type of label, the first wrong character in the initial search name is replaced to obtain at least one candidate search name; Using the wrong character position model, inferring the wrong character position of the at least one candidate search name, and obtaining a second position label of the at least one candidate search name; Filter out valid search names where the second location tag is different from the first location tag; If the second position tag of the effective search name is 0, the effective search name is determined as the target search name; If the second position label of the effective search name is not 0, then using the wrong character type model to infer the wrong character type of the effective search name, and obtaining the second type label of the wrong character in the effective search name; According to the second position tag and the second type tag, typos in the effective search name are corrected to obtain a target search name.

2. The method according to claim 1, characterized in that The wrong character type label includes a homophone label and a similar character label, and the first wrong character in the initial search name is replaced according to the first type label to obtain at least one candidate search name, including: If the first type of label is a homophone label, then according to the homophone table of the first wrong character, the first wrong character in the initial search name is replaced to obtain at least one candidate search name; If the first type of label is a similar character label, the first wrong character in the initial search name is replaced according to the similar character table of the first wrong character to obtain at least one candidate search name.

3. The method according to claim 1, characterized in that The method further comprises: If the first position tag is 0, the initial search name is determined as the target search name.

4. The method according to any one of claims 1 to 3, characterized in that: Before the initial search name is processed according to the wrong character position model and the wrong character type model to obtain the target search name, the method further includes: Get the correct search name; Preprocessing the correct search names to obtain intended search names and erroneous search names corresponding to each correct search name; According to the correct search name, the intended search name and the incorrect search name, a pre-built deep learning model is trained to obtain the wrong character position model; According to the erroneous retrieval name, a pre-built deep learning model is trained to obtain the typo type model.

5. The method according to claim 4, characterized in that The method of training a pre-built deep learning model according to the correct search name, the intended search name and the incorrect search name to obtain the wrong character position model includes: According to the positions of the wrong characters in the correct search name, the intended search name and the wrong search name, a first training data set including the wrong search name, the correct search name, the intended search name and wrong character position labels is generated; The deep learning model is trained using the first training data set to obtain the typo position model.

6. The method according to claim 4, characterized in that The step of training a pre-built deep learning model according to the erroneous search name to obtain the typo type model includes: According to the type of the typo in the erroneous search name, generating a second training data set including the erroneous search name and the typo type label; The deep learning model is trained using the second training data set to obtain the typo type model.

7. The method according to claim 4, characterized in that The preprocessing of the correct search names to obtain intended search names and erroneous search names corresponding to the correct search names includes: Performing word segmentation processing on the correct search name to obtain a word segmentation set of the correct search name; discarding at least one participle in the participle set, and merging the remaining participles in the participle set to obtain an intended search name; The characters in the correct search name and the intended search name are replaced with homophones or characters with similar shapes to obtain the incorrect search name.

8. A device for correcting typos in a search name, characterized in that: include: An acquisition module, used to obtain an initial search name; A processing module, used for processing the initial search name according to a typo position model and a typo type model to obtain a target search name, wherein the typo position model includes a mapping relationship between each correct search name, intended search name and erroneous search name and a typo position label, and the typo type model includes a mapping relationship between each erroneous search name and a typo type label, wherein the typo position label is used to reflect the position number of the first typo in the search name, and the typo type label is used to reflect the type of the first typo in the erroneous search name, the correct search name refers to the search name obtained from the original application data, the intended search name refers to the search name after simplifying the correct search name, and the erroneous search name refers to the search name obtained by processing the correct search name and the intended search name by replacing homophones or similar characters; A search module, used for searching according to the target search name; The processing module is specifically used for: Using a wrong character position model, inferring the wrong character position of the initial search name, and obtaining a first position label of the wrong character in the initial search name; If the first position label is not 0, then using a wrong character type model to infer the wrong character type of the initial search name, and obtaining a first type label of the wrong character in the initial search name; Determine a first wrong character corresponding to a first position tag in the initial search name; According to the first type of label, the first wrong character in the initial search name is replaced to obtain at least one candidate search name; Using the wrong character position model, inferring the wrong character position of the at least one candidate search name, and obtaining a second position label of the at least one candidate search name; Filter out valid search names where the second location tag is different from the first location tag; If the second position tag of the effective search name is 0, the effective search name is determined as the target search name; The processing module is further configured to: If the second position label of the effective search name is not 0, then using the wrong character type model to infer the wrong character type of the effective search name, and obtaining the second type label of the wrong character in the effective search name; According to the second position tag and the second type tag, typos in the effective search name are corrected to obtain a target search name.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method for correcting typos in a search name as described in any one of claims 1-7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for correcting typos in a search name as described in any one of claims 1 to 7 is implemented.