Method, device, electronic device and readable storage medium for querying information error correction

By determining the error correction strategy based on the length of the query information, and using natural language processing and editing distance query methods, error correction is corrected for query information of different lengths, the problem of slow error correction speed in the prior art is solved, and the error correction efficiency and the accuracy of search results are improved.

CN113420219BActive Publication Date: 2025-04-15BEIJING XUEZHITU NETWORK TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110737680.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-30
Publication Date
2025-04-15
Estimated Expiration
2041-06-30

AI Technical Summary

Technical Problem

When correcting query information of different lengths, the prior art adopts the same error correction strategy, resulting in a slower error correction speed.

Method used

By obtaining the length of the query information, different error correction strategies are determined according to the length, natural language processing is used to convert the query information into a pinyin string, and query the pinyin string with an editing distance of less than or equal to the preset threshold in the preset database for error correction.

Benefits of technology

By determining the error correction strategy based on the length of the query information, different error correction strategies are adopted for query information of different lengths, the error correction speed of query information is significantly improved, invalid queries are reduced, and the search recall rate is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113420219B_ABST
    Figure CN113420219B_ABST
Patent Text Reader

Abstract

The present application relates to the field of computer technology, and discloses a method for query information error correction, the method comprising: obtaining the length of the query information; determining an error correction strategy according to the length; and correcting the query information according to the error correction strategy to obtain an error correction result. The error correction strategy is determined by the length of the query information, and different error correction strategies are used for query information of different lengths, so that the error correction speed of the query information can be improved. The present application also discloses a device, an electronic device, and a storage medium for query information error correction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device and readable storage medium for querying information and correcting errors. Background Art

[0002] Search engines are one of the most important ways for people to obtain information. Their most basic and core function is information retrieval, finding web pages or documents containing keywords, and then displaying web pages or documents containing keywords to users. Among the query information entered into the search engine, a considerable portion is incorrect. Submitting an incorrect query to the search engine usually does not produce good search results, and may result in a small number of returned results or a large difference from the user's expectations. Therefore, it is necessary to correct the query information.

[0003] In the process of implementing the embodiments of the present disclosure, it was found that at least the following problems exist in the related art: the prior art does not consider the length of the query information, and adopts the same error correction strategy when correcting query information of different lengths, resulting in a slow error correction speed. Summary of the invention

[0004] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical components or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.

[0005] The embodiments of the present disclosure provide a method, an apparatus, an electronic device, and a readable storage medium for query information error correction, so as to improve the speed of query information error correction.

[0006] In some embodiments, the method for query information error correction includes: obtaining the length of the query information; determining an error correction strategy based on the length; and correcting the query information according to the error correction strategy to obtain an error correction result.

[0007] In some embodiments, the device for query information error correction includes: an acquisition module configured to obtain the length of the query information; a determination module configured to determine an error correction strategy based on the length; and an error correction module configured to correct the query information according to the error correction strategy to obtain an error correction result.

[0008] In some embodiments, the electronic device includes a processor and a memory storing program instructions, and the processor is configured to execute the above-mentioned method for querying information errors when running the program instructions.

[0009] In some embodiments, the readable storage medium stores executable instructions, and the executable instructions execute the above-mentioned method for querying information and correcting errors when running.

[0010] The method, device, electronic device and readable storage medium for query information error correction provided by the embodiments of the present disclosure can achieve the following technical effects: by obtaining the length of the query information; determining the error correction strategy according to the length of the query information; and correcting the query information according to the error correction strategy to obtain an error correction result. The error correction strategy is determined by the length of the query information, and different error correction strategies are used for query information of different lengths, which can improve the error correction speed of the query information.

[0011] The above general description and the following description are exemplary and explanatory only and are not intended to limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] One or more embodiments are exemplarily described by corresponding drawings, which do not limit the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements, and the drawings do not constitute a scale limitation, and wherein:

[0013] Figure 1 is a schematic diagram of a method for querying information and correcting errors provided by an embodiment of the present disclosure;

[0014] Figure 2 is a schematic diagram of a BK tree structure provided by an embodiment of the present disclosure;

[0015] Figure 3 is a schematic diagram of a device for querying information and correcting errors provided by an embodiment of the present disclosure;

[0016] Figure 4 It is a schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0017] In order to be able to understand the features and technical contents of the embodiments of the present disclosure in more detail, the implementation of the embodiments of the present disclosure is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present disclosure. In the following technical description, for the convenience of explanation, a full understanding of the disclosed embodiments is provided through multiple details. However, one or more embodiments can still be implemented without these details. In other cases, to simplify the drawings, well-known structures and devices can be simplified for display.

[0018] The terms "first", "second", etc. in the specification and claims of the embodiments of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so that the embodiments of the embodiments of the present disclosure described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.

[0019] Unless otherwise stated, the term "plurality" means two or more.

[0020] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B indicates: A or B.

[0021] The term "and / or" is a description of the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.

[0022] Combination Figure 1 As shown, the embodiment of the present disclosure provides a method for querying information error correction, including:

[0023] Step S101, obtaining the length of the query information;

[0024] Step S102, determining an error correction strategy according to the length of the query information;

[0025] Step S103, correcting the query information according to the error correction strategy to obtain an error correction result.

[0026] The method for query information error correction provided by the embodiment of the present disclosure obtains the length of the query information; determines the error correction strategy according to the length; and corrects the query information according to the error correction strategy to obtain an error correction result. The error correction strategy is determined by the length of the query information, and different error correction strategies are used for query information of different lengths, so that the error correction speed of the query information can be improved.

[0027] Optionally, the length of the query information is the number of Chinese characters in the query information.

[0028] Optionally, determining the error correction strategy based on the length includes: when the length of the query information is less than or equal to a preset threshold, converting the query information into a pinyin character string and then performing query information error correction as the error correction strategy.

[0029] Optionally, the length of the query information is less than or equal to a preset threshold, including: the number of Chinese characters in the query information is less than or equal to the preset threshold. Optionally, the preset threshold is 6. In some embodiments, the query information "posture map" is obtained, the number of Chinese characters in the "posture map" is 4, and the number of Chinese characters is less than 6, then the error correction strategy is to convert the "posture map" into the pinyin string "zishitupu" before correcting the query information. In some embodiments, the query information is "zisi map", the number of Chinese characters in the "zisi map" is 2, and the number of Chinese characters is less than 6, and the error correction strategy is to convert the "zisi map" into the pinyin string "zisitupu" before correcting the query information.

[0030] In this way, by performing natural language processing on the query information and converting it into a pinyin string, users can obtain more comprehensive query results based on the query information, thereby obtaining more comprehensive error correction results, and can provide users with more effective information, reducing invalid queries.

[0031] Optionally, the query information is corrected according to the error correction strategy, including: converting the query information into a pinyin string; searching a first preset database for a pre-stored pinyin string whose edit distance with the pinyin string is less than or equal to a preset edit distance threshold to obtain a first query result; the first preset database stores the pre-stored pinyin string; and determining an error correction result corresponding to the query information based on the first query result.

[0032] Optionally, the edit distance refers to the minimum number of edit operations required to convert one string into another string between two strings. Optionally, the edit operation includes replacing a character in the string with another character, inserting a character in the string, deleting a character in the string, etc.

[0033] Optionally, the first preset database is a BK (Burkhard-Keller) tree. The nodes in the BK tree are pre-stored pinyin character strings.

[0034] Optionally, a pre-stored pinyin string is searched in a preset BK tree, and when the edit distance between the pre-stored pinyin string and the pinyin string converted from the query information is less than or equal to a preset edit distance threshold, the searched pre-stored pinyin string is determined as the first query result. Optionally, the preset edit distance threshold is 2.

[0035] Optionally, a root node identical to the pinyin character string is searched in a preset BK tree; when the edit distance between the root node and a child node is less than or equal to a preset edit distance, the child node is determined as the first query result.

[0036] In some embodiments, in combination Figure 2 As shown, Figure 2 Schematic diagram of a BK tree structure, wherein the root node is "help", the child nodes of the root node "help" include: "hell", "hello" and "loop", the edit distance between "hell" and "help" is 1, the edit distance between "hello" and "help" is 2, and the edit distance between "loop" and "help" is 4; when the pinyin character string converted from the query information is "help" and the preset edit distance threshold is 2, the root node "help" that is the same as the pinyin character string "help" is obtained, the edit distance between "hell" in the child node of "help" and the root node "help" is 1, and the edit distance between "hello" and the root node "help" is 2, then "hell" and "hello" are determined as the first query results.

[0037] Optionally, when the first query result cannot be obtained, a pre-stored pinyin character string with the smallest edit distance with the pinyin character string in the first preset database is determined as the first query result.

[0038] Optionally, determining an error correction result corresponding to the query information according to the first query result includes: obtaining a word corresponding to a pre-stored pinyin string, and determining the word corresponding to the pre-stored pinyin string as the error correction result.

[0039] In some embodiments, the query information is "posture graph", the "posture graph" is converted into the pinyin string "zishitupu", the preset edit distance threshold is 2, and the edit distance between the pre-stored pinyin string "zishitupu" queried from the BK tree and the pinyin string "zishitupu" is less than 2, then "zishitupu" is determined as the first query result, and the word corresponding to "zishitupu" is obtained, including: "knowledge graph"; the "knowledge graph" is determined as the error correction result.

[0040] Optionally, the preset BK tree is obtained in the following manner: all pre-stored words in the preset dictionary are converted into corresponding pre-stored pinyin character strings and stored in the BK tree.

[0041] Optionally, the pre-stored word is converted into a pre-stored pinyin character string corresponding to the pre-stored word through a HanLP (Han Language Processing) toolkit.

[0042] Optionally, the preset dictionary is obtained in the following manner, including: obtaining the main and sub-title attributes of each entity from the knowledge graph database, obtaining all values ​​of the main and sub-title attributes, and storing the entity, the main and sub-title attributes and all their values ​​in the dictionary. Optionally, all values ​​of the corresponding attributes of the entity are obtained by reading the HDFS (Hadoop Distributed File System) file where the entity is stored. Optionally, the Baidu search engine is used to mark the frequency of words that do not have a word frequency in the knowledge graph database.

[0043] Optionally, the preset dictionary is obtained in the following manner, including: obtaining historical query information from a log of historical search records, and obtaining a frequency corresponding to the historical query information, determining the frequency as a word frequency of the historical query information, and storing the historical query information and its corresponding word frequency in the dictionary.

[0044] Optionally, the preset dictionary is obtained in the following manner, including: collecting common error-prone words and storing the common error-prone words in the dictionary. In some embodiments, common error-prone words are, for example, "bee" and "bee", "Legend of Miyue" and "Legend of the Half Moon", etc.

[0045] In this way, the edit distance based on pinyin adopts the query method of constructing a BK tree. Through natural language processing, the words in the dictionary are converted into pinyin and stored in the BK tree. The BK tree is a data structure used to perform spelling checks based on the Levenshtein (string similarity) distance concept. Based on this data structure, fast calculation based on the edit distance of pinyin can be achieved, which greatly improves the speed at which users can correct errors based on the BK tree. At the same time, since the dictionary is obtained from the knowledge graph database, query information is corrected by combining the knowledge graph database, which not only improves the user's query experience, but also allows the query information entered by the user to feedback more effective information with the help of the knowledge graph database, reducing invalid searches and improving the recall rate of searches. It also greatly improves the speed of error correction of query information and reduces the poor experience caused by error correction delays.

[0046] Optionally, determining the error correction strategy according to the length of the query information includes: when the length of the query information is greater than a preset threshold, determining directly correcting the query information as the error correction strategy.

[0047] Optionally, when the number of Chinese characters in the query information is greater than a preset threshold, directly correcting the query information is determined as the error correction strategy.

[0048] Optionally, correcting the query information according to the error correction strategy includes: searching for an alternative character string in a second preset database to obtain a second query result; the edit distance between the alternative character string and the character string corresponding to the query information is less than or equal to a preset edit distance threshold; the second preset database stores the alternative character string; and determining the error correction result corresponding to the query information according to the second query result. Optionally, the preset edit distance threshold is 2.

[0049] Optionally, the second preset database is an index file.

[0050] Optionally, the candidate character string includes Chinese characters and / or Pinyin characters.

[0051] Optionally, searching for candidate strings in a second preset database to obtain a second query result includes: searching for candidate strings in a preset index file using a preset method to obtain the second query result. Optionally, the preset method is spellChecker.suggestSimilar (spelling check) method.

[0052] Optionally, searching for candidate strings in a preset index file using a preset method to obtain a second query result includes: searching the index file for candidate strings whose edit distance with the query information is less than or equal to a preset edit distance threshold, and determining the found candidate strings as the second query result.

[0053] Optionally, determining an error correction result corresponding to the query information according to the second query result includes: determining the second query result as the error correction result corresponding to the query information.

[0054] Optionally, the candidate character string is searched in the second preset database, and when the second query result cannot be obtained, the candidate character string in the second preset database with the smallest edit distance to the query information is determined as the second query result.

[0055] Optionally, the preset index file is obtained in the following manner: a preset dictionary is obtained, and an index file is created for words in the dictionary whose length is greater than 5.

[0056] In some embodiments, by creating an index file, calling a PlainTextDictionary object, and implementing a Dictionary interface, the index file uses a Lucene (full-text search engine) index to provide content using a text file, and each line in the text file contains a phrase. The Lucene index is used to implement query information error correction based on the edit distance of Chinese characters, which greatly improves the speed of error correction.

[0057] Optionally, after obtaining the error correction results, the method further includes: sorting the error correction results in ascending order of edit distance; and displaying the sorted error correction results.

[0058] In some embodiments, the error correction results corresponding to "help" include: "hell" and "hello", the edit distance corresponding to "hell" is 1, and the edit distance corresponding to "hello" is 2, then the order from small to large edit distances is: "hell" "hello".

[0059] Optionally, before displaying the sorted error correction results, the method further includes: determining the error correction results corresponding to the same edit distance as the error correction results to be sorted, obtaining source information of the error correction results to be sorted; and sorting the error correction results to be sorted according to the source information.

[0060] Optionally, the source information includes: from a knowledge graph database, from logs of historical search records, etc.

[0061] Optionally, sorting the error correction results to be sorted according to the source information includes: sorting the error correction results to be sorted according to a preset order of the source information. For example, sorting the error correction results to be sorted from the log of the historical search record before the error correction results to be sorted from the knowledge graph database.

[0062] Optionally, before displaying the sorted error correction results, it also includes: when there are error correction results to be sorted with the same source information, obtaining the word frequency of the error correction results to be sorted with the same source information, and sorting the error correction results to be sorted with the same source information in descending order of word frequency.

[0063] Combination Figure 3 As shown, an embodiment of the present disclosure provides a device for query information error correction, including: an acquisition module 301, a determination module 302 and a determination module 303; the acquisition module 301 is configured to acquire the length of the query information, and send the length of the query information to the determination module 302; the determination module 302 is configured to receive the length of the query information sent by the acquisition module 301, determine an error correction strategy according to the length, and send the error correction strategy to the error correction module 303; the error correction module 303 is configured to receive the error correction strategy sent by the determination module 302, correct the query information according to the error correction strategy, and obtain an error correction result.

[0064] The device for query information error correction provided by the embodiment of the present disclosure is used to obtain the length of the query information through the acquisition module; the determination module determines the error correction strategy according to the length; the error correction module corrects the query information according to the error correction strategy to obtain the error correction result. In this way, by obtaining the length of the query information, different error correction strategies are used for query information of different lengths, thereby improving the error correction speed of the query information.

[0065] Optionally, the determination module includes: a natural language processing module, a first query module and a second query module; the natural language processing module is configured to convert the query information into a pinyin string; the first query module is configured to query a first preset database for a pre-stored pinyin string whose edit distance with the pinyin string is less than or equal to a preset edit distance threshold to obtain a first query result; the first preset database stores pre-stored pinyin strings; the first query module is also configured to determine an error correction result corresponding to the query information based on the first query result.

[0066] Optionally, the second query module is configured to query alternative strings in a second preset database to obtain a second query result; the edit distance between the alternative string and the string corresponding to the query information is less than or equal to a preset edit distance threshold; the second preset database stores the alternative strings; the second query module is also configured to determine the error correction result corresponding to the query information based on the second query result.

[0067] Optionally, the device for querying information error correction further includes: a sorting module; the sorting module is configured to sort the error correction results in order of the edit distance from small to large, and display the sorted error correction results.

[0068] Optionally, the sorting module is further configured to determine the error correction results corresponding to the same edit distance as the error correction results to be sorted, obtain source information of the error correction results to be sorted, and sort the error correction results to be sorted according to the source information.

[0069] In this way, the error correction strategy is determined by the length of the query information, and different error correction strategies are adopted for query information of different lengths, thereby improving the error correction speed of the query information.

[0070] Combination Figure 4 As shown, an embodiment of the present disclosure provides an electronic device, including a processor (processor) 400 and a memory (memory) 401 storing program instructions. Optionally, the device may also include a communication interface (CommunicationInterface) 402 and a bus 403. Among them, the processor 400, the communication interface 402, and the memory 401 can communicate with each other through the bus 403. The communication interface 402 can be used for information transmission. The processor 400 can call the program instructions in the memory 401 to execute the method for querying information error correction of the above embodiment.

[0071] In addition, the program instructions in the memory 401 can be implemented in the form of software functional units and can be stored in a readable storage medium when sold or used as an independent product.

[0072] The memory 401 is a readable storage medium that can be used to store software programs and executable programs, such as program instructions / modules corresponding to the method in the embodiment of the present disclosure. The processor 400 executes the functional application and data processing by running the program instructions / modules stored in the memory 401, that is, the method for querying information error correction in the above embodiment is implemented.

[0073] The memory 401 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 401 may include a high-speed random access memory and may also include a non-volatile memory.

[0074] The electronic device provided by the embodiment of the present disclosure obtains the length of the query information; determines the error correction strategy according to the length; and corrects the query information according to the error correction strategy to obtain an error correction result. The error correction strategy is determined by the length of the query information, and different error correction strategies are used for query information of different lengths, so that the error correction speed of the query information can be improved.

[0075] Optionally, the electronic device is a computer or the like.

[0076] An embodiment of the present disclosure provides a readable storage medium storing executable instructions, wherein the executable instructions are configured to execute the above-mentioned method for querying information and correcting errors.

[0077] An embodiment of the present disclosure provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the above-mentioned method for querying information and correcting errors.

[0078] The above-mentioned readable storage medium may be a transient readable storage medium or a non-transitory readable storage medium.

[0079] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiment of the present disclosure. The aforementioned storage medium may be a non-transient storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes, or a transient storage medium.

[0080] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent only possible changes. Unless explicitly required, separate components and functions are optional, and the order of operation may vary. The parts and features of some embodiments may be included in or replace the parts and features of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and the claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of listings containing one or more associated ones. In addition, when used in the present application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the presence of other identical elements in the process, method or device comprising the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the various embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.

[0081] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. The technicians may use different methods for each specific application to implement the described functions, but such implementations should not be considered to exceed the scope of the embodiments of the present disclosure. The technicians may clearly understand that, for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above may refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.

[0082] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.

Claims

1. A method for query information error correction, characterized in that: include: Obtain the length of the query information, where the length of the query information is the number of Chinese characters in the query information; determining an error correction strategy based on the length; Correct the query information according to the error correction strategy to obtain an error correction result; Determining an error correction strategy according to the length includes: In the case where the length is less than or equal to a preset threshold, converting the query information into a pinyin character string and then performing query information error correction is determined as an error correction strategy; When the length is greater than a preset threshold, directly correcting the query information is determined as an error correction strategy.

2. The method according to claim 1, characterized in that Correcting the query information according to the error correction strategy includes: Convert the query information into a pinyin string; Searching a first preset database for a pre-stored pinyin character string whose edit distance with the pinyin character string is less than or equal to a preset edit distance threshold, to obtain a first query result; the first preset database stores pre-stored pinyin character strings; An error correction result corresponding to the query information is determined according to the first query result.

3. The method according to claim 1, characterized in that Correcting the query information according to the error correction strategy includes: Querying a second preset database for candidate strings to obtain a second query result; the edit distance between the candidate string and the string corresponding to the query information is less than or equal to a preset edit distance threshold; the second preset database stores the candidate strings; An error correction result corresponding to the query information is determined according to the second query result.

4. The method according to claim 2 or 3, characterized in that: After obtaining the error correction results, it also includes: Sorting the error correction results in ascending order of the edit distance; Display the sorted error correction results.

5. The method according to claim 4, characterized in that Before displaying the sorted error correction results, it also includes: Determine the error correction results corresponding to the same edit distance as the error correction results to be sorted, and obtain source information of the error correction results to be sorted; The error correction results to be sorted are sorted according to the source information.

6. A device for query information error correction, characterized in that: include: An acquisition module is configured to acquire the length of the query information, wherein the length of the query information is the number of Chinese characters in the query information; a determination module, configured to determine an error correction strategy according to the length; an error correction module, configured to correct the query information according to the error correction strategy to obtain an error correction result; The determination module is specifically configured to, when the length is less than or equal to a preset threshold, determine the error correction strategy after converting the query information into a pinyin string; when the length is greater than the preset threshold, determine the error correction strategy directly on the query information.

7. An electronic device comprising a processor and a memory storing program instructions, characterized in that: The processor is configured to execute the method for query information error correction according to any one of claims 1 to 5 when running the program instructions.

8. A readable storage medium storing executable instructions, characterized in that: The executable instructions execute the method for querying information and correcting errors as described in any one of claims 1 to 5 when running.

Citation Information

Patent Citations

  • Negative information mode fuzzy matching method based on editing distance

    CN106168954A

  • Method and device for recalling correction candidates on basis of artificial intelligence

    CN106469097A

  • Input error correction method and device for Chinese phonetic alphabet and electronic equipment

    CN109597500A