Search information prompting method and device, computer equipment and storage medium
By constructing query statements and filtering rules with multiple search word rewriting methods, recalling candidate words to correct input errors solves the problem of inaccurate search results and improves search accuracy.
Patent Information
- Application Number
- CN202410808525.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-08-27
AI Technical Summary
In search scenarios, search terms entered by users are prone to misspellings or ambiguities, resulting in inaccurate search results.
By constructing query statements with multiple search word rewriting methods, using pre-built search word database indexes to recall candidate words, and determining target words based on text similarity and string filtering rules, search prompt information is generated to correct input errors.
It improves the accuracy of search results, can comprehensively consider various types of input errors that may occur during the input process, accurately corrects search terms, and solves the problem of inaccurate search results caused by input errors.
Smart Images

Figure CN118551097A
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data technology, and in particular to a search information prompt method, apparatus, computer equipment, storage medium and computer program product. Background Art
[0002] With the development of Internet technology, people can find the information resources they need by entering search text in various search engines.
[0003] Currently, in search scenarios, the quality of the search terms entered by users determines the search results. However, when users enter search terms through Pinyin or Wubi, or enter search terms through voice recognition, they often enter incorrect content, resulting in failure to search for the corresponding search content. In addition, when users enter relatively vague information for the content they want to search, such as the name of an event or a product, it is also difficult to find the ideal search content.
[0004] Therefore, there is a problem in the traditional technology that after the user enters the search term in the search engine, the search results are not accurate enough. Summary of the invention
[0005] Based on this, it is necessary to provide a search information prompt method, device, computer equipment, computer-readable storage medium and computer program product that can improve the accuracy of search results in response to the above technical problems.
[0006] A search information prompt method, the method comprising:
[0007] In response to an input operation on the search box, obtaining a search term input by the input operation;
[0008] Constructing at least one search query statement for the search term; the search query statement is a query instruction obtained by concatenating at least one rewritten string belonging to the same search term rewriting method; the search term rewriting method is used to rewrite a string having the same preset feature as the search term; different search term rewriting methods correspond to different preset features;
[0009] Based on each search query statement, at least one candidate word is recalled from a pre-built search word library index; the text similarity between the candidate word and the search word satisfies a preset similarity condition;
[0010] At least one target word that meets the string screening rule is determined among the candidate words; the target word is used to generate search prompt information for the input operation.
[0011] In an exemplary embodiment, constructing at least one search query statement for a search term includes:
[0012] Rewrite the search word according to each search word rewriting method to obtain at least one rewritten character string corresponding to the search word in each search word rewriting method;
[0013] For any search term rewriting method, the weight of each rewriting string under the search term rewriting method is determined, and each rewriting string under the search term rewriting method and the weight of each rewriting string are concatenated to obtain a search query statement corresponding to the search term rewriting method.
[0014] In an exemplary embodiment, each rewritten string and the weight of each rewritten string in the search word rewriting mode are concatenated to obtain a search query statement corresponding to the search word rewriting mode, including:
[0015] splicing each rewritten string in the search word rewriting mode and the weight corresponding to each rewritten string into the search domain of the search word library index;
[0016] By calling the search query statement matching interface, a search query statement for the search term rewriting method is constructed in the retrieval domain.
[0017] In an exemplary embodiment, the string screening rules include Chinese string screening rules and Pinyin string screening rules, and determining at least one target word that meets the string screening rules from each candidate word includes:
[0018] Among the candidate words, at least one candidate word that meets the Chinese character string screening rule is selected as the initial target word;
[0019] Among the initial target words, at least one initial target word that meets the pinyin character string screening rule is screened out as the target word.
[0020] In an exemplary embodiment, at least one candidate word that meets the Chinese character string screening rule is screened out from each candidate word as the initial target word, including:
[0021] For any candidate word, determining the Chinese string edit distance and Chinese string similarity between the Chinese string of any candidate word and the Chinese string of the search word;
[0022] Any candidate word whose Chinese character string edit distance is less than or equal to a preset Chinese character string edit distance threshold and whose Chinese character string similarity is greater than a preset Chinese character string similarity threshold is used as the initial target word.
[0023] In an exemplary embodiment, at least one initial target word that meets the pinyin character string screening rule is screened out from the initial target words as the target word, including:
[0024] For any initial target word, determining the pinyin string edit distance, pinyin string similarity and common substring length between the pinyin string of any initial target word and the pinyin string of the search word;
[0025] Any initial target word whose pinyin string edit distance is less than or equal to the preset pinyin edit distance threshold, whose pinyin string similarity is greater than the preset pinyin string similarity threshold, and whose common substring length is greater than the preset common substring similarity threshold is taken as the target word.
[0026] In an exemplary embodiment, after the step of obtaining the search term input by the input operation, the method further includes:
[0027] Determine a scenario identifier of a search scenario corresponding to the input operation, and determine a search term data type corresponding to the search scenario according to the scenario identifier;
[0028] According to the search word data type, at least one associated word associated with the existence of the search word is obtained from the local search word library as the target word.
[0029] A search information prompting device, the device comprising:
[0030] A response module, configured to obtain a search term inputted in response to an input operation on the search box;
[0031] A construction module is used to construct at least one search query statement for a search term; the search query statement is a query instruction obtained by concatenating at least one rewriting string belonging to the same search term rewriting method; the search term rewriting method is used to rewrite a string having the same preset feature as the search term; different search term rewriting methods correspond to different preset features;
[0032] A recall module is used to recall at least one candidate word from a pre-built search word library index based on each search query statement; the text similarity between the candidate word and the search word meets a preset similarity condition;
[0033] The screening module is used to determine at least one target word that meets the string screening rules among the candidate words; the target word is used to generate search prompt information for the input operation.
[0034] In an exemplary embodiment, the construction module is specifically used to: rewrite the search term according to each search term rewriting method to obtain at least one rewritten string corresponding to the search term under each search term rewriting method; for any search term rewriting method, determine the weight of each rewritten string under the search term rewriting method, and concatenate each rewritten string under the search term rewriting method and the weight of each rewritten string to obtain a search query statement corresponding to the search term rewriting method.
[0035] In an exemplary embodiment, the construction module is specifically used to: splice each rewritten string under the search term rewriting method and the weight corresponding to each rewritten string into the retrieval domain of the search term library index; and construct a search query statement for the search term rewriting method in the retrieval domain by calling the search query statement matching interface.
[0036] In an exemplary embodiment, the string filtering rules include Chinese string filtering rules and Pinyin string filtering rules, and the filtering module is specifically used to: among each candidate word, filter out at least one candidate word that meets the Chinese string filtering rules as the initial target word; among each initial target word, filter out at least one initial target word that meets the Pinyin string filtering rules as the target word.
[0037] In an exemplary embodiment, the screening module is specifically used to: for any candidate word, determine the Chinese string edit distance and Chinese string similarity between the Chinese string of any candidate word and the Chinese string of the search word; and take any candidate word whose Chinese string edit distance is less than or equal to a preset Chinese edit distance threshold and whose Chinese string similarity is greater than a preset Chinese string similarity threshold as the initial target word.
[0038] In an exemplary embodiment, the screening module is specifically used to: for any initial target word, determine the pinyin string edit distance, pinyin string similarity and common substring length between the pinyin string of any initial target word and the pinyin string of the search word; and take any initial target word whose pinyin string edit distance is less than or equal to a preset pinyin edit distance threshold, whose pinyin string similarity is greater than a preset pinyin string similarity threshold, and whose common substring length is greater than a preset common substring similarity threshold as the target word.
[0039] In an exemplary embodiment, the device also includes: a determination module for determining a scene identifier of a search scene corresponding to an input operation, and determining a corresponding search term data type under the search scene based on the scene identifier; and obtaining, based on the search term data type, at least one associated word associated with the existence of the search term from a local search term library as a target word.
[0040] A computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0041] A computer-readable storage medium stores a computer program, which implements the steps of the above method when executed by a processor.
[0042] A computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0043] The above-mentioned search information prompt method, device, computer equipment, storage medium and computer program product obtain the search term input by the input operation in response to the input operation on the search box; construct at least one search query statement for the search term; the search query statement is a query instruction obtained by splicing at least one rewriting string belonging to the same search term rewriting method; the search term rewriting method is used to rewrite a string with the same preset feature as the search term; different search term rewriting methods correspond to different preset features; based on each search query statement, at least one candidate word is recalled from a pre-constructed search term library index; the text similarity between the candidate word and the search term meets the preset similarity condition; in At least one target word that meets the string screening rules is determined among each candidate word; the target word is used to generate search prompt information for the input operation; in this way, it is possible to construct multiple different types of search query statements for the search word based on different preset features between words through different search word rewriting methods, thereby realizing the determination of the target word, i.e., the correction word, for the search word from multiple feature dimensions, and accurately determining the correction word for the search word that may have input errors by comprehensively considering the various types of input errors that may occur during the input process. The user can correct the search word based on the correction word, thereby solving the problem of inaccurate search results caused by input errors, thereby achieving the beneficial effect of improving search accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments of the present application or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0045] FIG1 is a diagram showing an application environment of a search information prompt method in one embodiment;
[0046] Figure 2 A flowchart of a search information prompt method in an embodiment;
[0047] Figure 3 A flowchart of a method for constructing a search query statement in an embodiment;
[0048] Figure 4 A schematic diagram of a flow chart of a method for correcting search words in an embodiment;
[0049] Figure 5 A schematic diagram of a flow chart of a search information prompt method in another embodiment;
[0050] Figure 6 is a structural block diagram of a search information prompting device in one embodiment;
[0051] FIG. 7 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. It should be noted that in the embodiments of the present application, certain software, groups, models and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0053] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations. The acquisition, storage, use, and processing of data in the technical solution of this application are in compliance with relevant provisions of national laws and regulations.
[0054] The search information prompt method provided in the embodiment of the present application can be applied in the application environment shown in FIG. 1. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server 104 responds to the input operation on the search box and obtains the search term input by the input operation; the server 104 constructs at least one search query statement for the search term; the search query statement is a query instruction obtained by splicing at least one rewritten string belonging to the same search term rewriting method; the search term rewriting method is used to rewrite a string with the same preset feature as the search term; different search term rewriting methods correspond to different preset features; the server 104 recalls at least one candidate word from the pre-constructed search term library index based on each search query statement; the text similarity between the candidate word and the search term meets the preset similarity condition; the server 104 determines at least one target word that meets the string screening rule in each candidate word; the target word is used to generate search prompt information for the input operation, and the search prompt information can be displayed in the terminal 102. The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server 104 may be an independent physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services.
[0055] In an exemplary embodiment, Figure 2 As shown, a search information prompt method is provided, which is described by taking the method applied to the server 104 in FIG. 1 as an example, and includes the following steps 202 to 206. Among them:
[0056] Step 202: In response to an input operation on the search box, obtain a search term input by the input operation.
[0057] The search box may be an input location in a search engine for inputting search terms.
[0058] The search term may refer to a term entered by a user account in the search box.
[0059] Optionally, the server obtains the search term inputted in response to an input operation of the user account to the search box.
[0060] Step 204, construct at least one search query statement for the search term; the search query statement is a query instruction obtained by splicing at least one rewriting string belonging to the same search term rewriting method; the search term rewriting method is used to rewrite a string with the same preset characteristics as the search term; different search term rewriting methods correspond to different preset characteristics.
[0061] The search query statement may refer to a query instruction that can be used to perform information search in a pre-built search vocabulary index.
[0062] The search term rewriting method may refer to a method of transforming the search term character string, for example, the search term rewriting method may include replacing similar characters, exchanging adjacent characters, obtaining the full Chinese pinyin spelling, and obtaining the first Chinese pinyin letter.
[0063] The rewritten character string may refer to a character string obtained by performing a character string transformation on the search term.
[0064] Optionally, the server constructs each search query statement for the search term.
[0065] Step 206: based on each search query statement, recall at least one candidate word from a pre-constructed search word library index; the text similarity between the candidate word and the search word satisfies a preset similarity condition.
[0066] Among them, the pre-built search word library index can be a data index built in the search engine by pre-modeling based on the basic word library data. In practical applications, the fields of the search word library index may include: id: the unique identifier of the basic word for error correction; content: the content of the basic word for error correction is stored. Here, the single-word segmentation method is adopted, and the corresponding first letter field and full spelling field are designed; type: data category, 01 represents coupons, 02 represents movie performances, and 03 represents merchants. Regarding the index data model of the search word library index, the index data source of the index data model can be roughly divided into two parts: proprietary word library and business data. The index data needs to be classified and divided according to the data category. Taking the comprehensive APP search and correction scenario as an example, it includes multiple business data categories such as financial services, supermarkets, catering, movies, performances, and activities. According to the business data category, the index data can be divided into corresponding categories. For example, the proprietary word library data can be divided into: financial word library, supermarket word library, catering word library, and movie word library, etc. Similarly, business data can be classified into specific data categories.
[0067] The candidate word may refer to any word associated with the search word.
[0068] Herein, text similarity may refer to the similarity between two words.
[0069] Among them, the preset similarity condition may refer to the condition that the text similarity between the candidate word and the search word needs to meet. The preset similarity condition can be used to select candidate words from each word. For example, the text similarity between each word and the search word can be determined, and then the top N words with the highest text similarity to the search word can be used as candidate words.
[0070] Optionally, the server recalls at least one candidate word from a pre-built search word library index based on each search query statement.
[0071] For example, based on each constructed query statement, the server recalls the TopN (default top 10) strings with the highest text similarity from the search vocabulary index as candidate words.
[0072] Step 208: Determine at least one target word that meets the string screening rule among the candidate words; the target word is used to generate search prompt information for the input operation.
[0073] The string screening rule may refer to a screening rule used when screening candidate words based on the strings corresponding to the search word and the candidate words to determine the target word.
[0074] The target word may refer to a word that can be used to correct the user's search word.
[0075] Among them, the search prompt information can display each target word in the form of a list below the search box, or can display each target word in the form of a label below the search box. The user can replace the search word in the search box with the target word by triggering the list or label below the search box.
[0076] Optionally, the server uses a string screening rule to screen each candidate word and determines at least one target word among each candidate word.
[0077] In the above-mentioned search information prompt method, by responding to an input operation on a search box, a search term inputted by the input operation is obtained; at least one search query statement for the search term is constructed; the search query statement is a query instruction obtained by splicing at least one rewriting character string belonging to the same search term rewriting method; the search term rewriting method is used to rewrite a character string having the same preset feature as the search term; different search term rewriting methods correspond to different preset features; based on each search query statement, at least one candidate word is recalled from a pre-constructed search term library index; the text similarity between the candidate word and the search term satisfies a preset similarity condition; and a candidate word that meets the text similarity condition is determined in each candidate word. At least one target word of the string filtering rule; the target word is used to generate search prompt information for input operations; in this way, it is possible to construct multiple different types of search query statements for the search word based on different preset features between words through different search word rewriting methods, thereby realizing the determination of the target word, i.e., the correction word, for the search word from multiple feature dimensions, and accurately determining the correction word for the search word that may have input errors by comprehensively considering the various types of input errors that may occur during the input process. The user can correct the search word based on the correction word, thereby solving the problem of inaccurate search results caused by input errors, thereby achieving the beneficial effect of improving search accuracy.
[0078] In an exemplary embodiment, Figure 3 As shown, step 204 includes steps 302 to 304. Among them:
[0079] Step 302: rewrite the search word according to each search word rewriting method to obtain at least one rewritten character string corresponding to the search word in each search word rewriting method.
[0080] Optionally, the server rewrites the search word according to each search word rewriting method to obtain each rewritten character string corresponding to the search word in each search word rewriting method.
[0081] For example, the search term rewriting method can be a Chinese similar character replacement method, a Chinese adjacent character position exchange method, a Chinese pinyin full spelling method, and a Chinese pinyin full spelling method. The search term can be rewritten according to each search term rewriting method. For example, when the search term input in the input operation is "Kendeqi", the following four methods can be used to rewrite "Kendeqi". The following uses "ABC" as the representation of the target word, A, B, and C represent the 1st, 2nd, and 3rd characters of the target word respectively, that is, A, B, and C correspond to a Chinese character respectively:
[0082] 1) Chinese similar characters replacement, by default only replaces similar words in the first 10 characters. Specifically:
[0083] First, the input search term string is segmented by a word segmenter or by single-word segmentation to obtain the terms corresponding to the search term string, and the similar words corresponding to each term are obtained from the local similar word database to obtain a similar word list, as shown in Table 1 below.
[0084] Table 1
[0085]
[0086] Secondly, use the list of similar words to recursively replace each word and give it a weight value (weight value 0.8, weight defaults to 1.0) to obtain a list of similar character strings, as shown in Table 2.
[0087] Table 2
[0088]
[0089] 2) Chinese adjacent characters are swapped. By default, only the first 6 characters are swapped. Specifically: recursively swap the top N characters of the search string and give them a weight value (weight value 0.8, weight default 1.0), and get a list of adjacent strings, as shown in Table 3.
[0090] Table 3
[0091]
[0092] 3) Get the full pinyin of Chinese. Specifically: Use the pinyin tool to get the full pinyin string of the search term string, and give it a weight value (weight value 0.6, weight default 1.0), as shown in Table 4 below.
[0093] Table 4
[0094]
[0095] 4) Get the first letter of Chinese pinyin. Specifically: Use the pinyin tool to get the first letter of the pinyin string of the search word string, and give it a weight value (weight value 0.4, weight default 1.0), as shown in Table 5 below.
[0096] Table 5
[0097]
[0098] Step 304, for any search term rewriting method, determine the weight of each rewriting string under the search term rewriting method, and concatenate each rewriting string under the search term rewriting method and the weight of each rewriting string to obtain a search query statement corresponding to the search term rewriting method.
[0099] Optionally, for any search term rewriting method, the server determines the weights corresponding to each rewritten string under the search term rewriting method, and then concatenates each rewritten string under the search term rewriting method and the weights of each rewritten string to obtain a search query statement corresponding to the search term rewriting method.
[0100] For example, the above-mentioned similar character string list, adjacent character string list, full pinyin character string, pinyin initial character string and their corresponding weight values can be assembled into the corresponding vocabulary index retrieval domain, and the search query statement matching interface can be used to construct the corresponding query statement that can be queried in the search vocabulary index.
[0101] After constructing the corresponding query statements, the TopN (default top 10) candidate words with the highest string text similarity are recalled from the search word library index based on each query statement, as shown in Table 6. It can be seen that the search query statement constructed in this application is based on a dictionary, and has high controllability and scalability, and is interpretable. It can identify various error types that may occur in the search process based on the constructed search query statement, including homophony, homomorphism, inversion, multiple words, fewer words, and other error types.
[0102] Table 6
[0103]
[0104] In this embodiment, the search word is rewritten according to each search word rewriting method to obtain at least one rewritten string corresponding to the search word under each search word rewriting method. For any search word rewriting method, the weight of each rewritten string under the search word rewriting method is determined, and the rewritten strings under the search word rewriting method and the weights of each rewritten string are spliced to obtain a search query statement corresponding to the search word rewriting method. In this way, based on the corresponding rewritten strings under any search word rewriting method and the corresponding weights, a search query statement corresponding to any search word rewriting method can be spliced to obtain, thereby achieving the beneficial effect of expanding the types of search query statements.
[0105] In an exemplary embodiment, each rewritten string under the search term rewriting method and the weight of each rewritten string are spliced to obtain a search query statement corresponding to the search term rewriting method, including: splicing each rewritten string under the search term rewriting method and the weight corresponding to each rewritten string into the retrieval domain of the search term library index; by calling the search query statement matching interface, constructing a search query statement for the search term rewriting method in the retrieval domain.
[0106] The search domain may refer to a search range.
[0107] The search query statement matching interface may refer to an interface having a search query statement matching function.
[0108] Optionally, for any search term rewriting method, the server splices the rewritten strings and the weights corresponding to the rewritten strings under the search term rewriting method into the retrieval domain of the search term library index, and constructs a search query statement for the search term rewriting method by calling the search query statement matching interface.
[0109] In this embodiment, each rewritten character string in the search term rewriting mode and the weight corresponding to each rewritten character string are spliced into the search domain of the search term library index; by calling the search query statement matching interface, a search query statement for the search term rewriting mode is constructed in the search domain; in this way, a search query statement for the search term can be constructed within the search scope corresponding to the search term, which is beneficial for subsequent searching for the search term based on the search query statement in the pre-constructed search term library index, that is, achieving the beneficial effect of accurately constructing a search query statement for the search term.
[0110] In an exemplary embodiment, the string filtering rules include Chinese string filtering rules and Pinyin string filtering rules, and at least one target word that meets the string filtering rules is determined in each candidate word, including: in each candidate word, at least one candidate word that meets the Chinese string filtering rules is filtered out as an initial target word; in each initial target word, at least one initial target word that meets the Pinyin string filtering rules is filtered out as a target word.
[0111] The Chinese character string screening rule may refer to a rule corresponding to screening based on character string features of the Chinese character string of the candidate word and the Chinese character string of the target word.
[0112] The pinyin character string screening rule may refer to a rule corresponding to screening based on the character string features of the Chinese pinyin character string of the candidate word and the Chinese pinyin character string of the target word.
[0113] Optionally, the server selects candidate words that meet the Chinese character string screening rules from among the candidate words as initial target words, and then selects initial target words that meet the pinyin character string screening rules from among the initial target words as target words.
[0114] In this embodiment, at least one candidate word that meets the Chinese character string screening rules is screened out from each candidate word as the initial target word; and at least one initial target word that meets the pinyin character string screening rules is screened out from each initial target word as the target word; in this way, based on the Chinese character string screening rules and the pinyin character string screening rules, the recalled candidate words can be screened more strictly and comprehensively, thereby achieving the beneficial effect of accurately determining the target word from each candidate word.
[0115] In an exemplary embodiment, among each candidate word, at least one candidate word that meets the Chinese string screening rules is screened out as the initial target word, including: for any candidate word, determining the Chinese string edit distance and Chinese string similarity between the Chinese string of any candidate word and the Chinese string of the search word; any candidate word whose Chinese string edit distance is less than or equal to a preset Chinese edit distance threshold and whose Chinese string similarity is greater than a preset Chinese string similarity threshold is taken as the initial target word.
[0116] The Chinese character string edit distance may refer to the edit distance between the Chinese character string of the candidate word and the Chinese character string of the search word. In practical applications, an edit distance calculation algorithm may be used to calculate the edit distance between two Chinese character strings.
[0117] The Chinese character string similarity may refer to the similarity between the Chinese character string of the candidate word and the Chinese character string of the search word.
[0118] Among them, the Chinese edit distance threshold can be the threshold for the Chinese string edit distance set by the Chinese string screening rule, which is used to determine whether the edit distance between the Chinese string of the candidate word and the Chinese string of the search word is small enough, thereby determining the degree of association between the candidate word and the search word.
[0119] Among them, the Chinese string similarity threshold can be a threshold for Chinese string similarity set by the Chinese string screening rule, which is used to determine whether the similarity between the Chinese string of the candidate word and the Chinese string of the search word is large enough, thereby determining the degree of association between the candidate word and the search word.
[0120] Optionally, for any candidate word, the server determines the edit distance between the Chinese character string of the candidate word and the Chinese character string of the search word, and determines the string similarity between the Chinese character string of the candidate word and the Chinese character string of the search word. The server takes the candidate word whose edit distance is less than or equal to a preset Chinese edit distance threshold and whose string similarity is greater than a preset Chinese character string similarity threshold as the initial target word.
[0121] To facilitate the understanding of those skilled in the art, the following exemplary method is provided for screening the initial target word from each candidate word based on the Chinese character string screening rule. Example indicators are shown in Table 7 below, specifically:
[0122] 1) Calculate the edit distance d1 between the Chinese string of the input search term and the Chinese string of the candidate term.
[0123] 2) Calculate the common subsequence length sqLen1 between the search term Chinese string and the candidate term Chinese string.
[0124] 3) Take the maximum string length value between the search term Chinese string and the candidate term Chinese string, that is, maxLen1=Math.max(search term Chinese string length, candidate term Chinese string length).
[0125] 4) Set the maximum edit distance boundary parameter max_edits1 to {1,2}, with a default value of 2; set the Chinese string substring similarity threshold sub_string_similarity1 to (0.25, 1), with a default value of 0.34. The larger the value, the more similar the two are.
[0126] 5) The candidate words that satisfy d1<=max_edits1, sqLen1 / maxLen1 > sub_string_similarity1 are used as the initial target words.
[0127] Table 7
[0128]
[0129] In this embodiment, for any candidate word, the Chinese string edit distance and Chinese string similarity between the Chinese string of any candidate word and the Chinese string of the search word are determined; any candidate word whose Chinese string edit distance is less than or equal to a preset Chinese edit distance threshold and whose Chinese string similarity is greater than a preset Chinese string similarity threshold is used as the initial target word; in this way, each candidate word can be preliminarily screened from dimensions such as the edit distance and similarity between Chinese strings, thereby achieving the beneficial effect of accurately screening out the initial target words that meet the Chinese string screening rules.
[0130] In an exemplary embodiment, among each initial target word, at least one initial target word that meets the pinyin string screening rules is screened out as the target word, including: for any initial target word, determining the pinyin string edit distance, pinyin string similarity and common substring length between the pinyin string of any initial target word and the pinyin string of the search word; any initial target word whose pinyin string edit distance is less than or equal to a preset pinyin edit distance threshold, whose pinyin string similarity is greater than a preset pinyin string similarity threshold, and whose common substring length is greater than a preset common substring similarity threshold is taken as the target word.
[0131] Among them, the Pinyin string edit distance can refer to the edit distance between the Chinese Pinyin full spelling string of the candidate word and the Chinese Pinyin full spelling string of the search word. In actual application, the edit distance calculation method can be used to calculate the edit distance between two Chinese Pinyin full spelling strings.
[0132] The pinyin character string similarity may refer to the similarity between the Chinese pinyin character string of the candidate word and the Chinese pinyin character string of the search word.
[0133] The common substring length may refer to the length corresponding to the common string between the Chinese pinyin full spelling string of the candidate word and the Chinese pinyin full spelling string of the search word.
[0134] Among them, the pinyin edit distance threshold can be the threshold for the edit distance of the Chinese pinyin full spelling string set by the pinyin string screening rule, which is used to determine whether the edit distance between the Chinese pinyin full spelling string of the candidate word and the Chinese pinyin full spelling string of the search word is small enough, thereby determining the degree of association between the candidate word and the search word.
[0135] Among them, the pinyin string similarity threshold can be the threshold for pinyin string similarity set by the pinyin string screening rule, which is used to determine whether the similarity between the Chinese pinyin full spelling string of the candidate word and the Chinese pinyin full spelling string of the search word is large enough, thereby determining the degree of association between the candidate word and the search word.
[0136] Among them, the common substring similarity threshold can be the threshold for common substring similarity set by the pinyin string screening rule, which is used to determine whether the common substring length between the Chinese pinyin full spelling string of the candidate word and the Chinese pinyin full spelling string of the search word is long enough, thereby determining the degree of association between the candidate word and the search word.
[0137] Optionally, for any initial target word, the server determines the pinyin string edit distance, pinyin string similarity and common substring length between the pinyin string of the initial target word and the pinyin string of the search word, and then, the server takes each initial target word whose pinyin string edit distance is less than or equal to a preset pinyin edit distance threshold, whose pinyin string similarity is greater than a preset pinyin string similarity threshold, and whose common substring length is greater than a preset common substring similarity threshold as a target word.
[0138] To facilitate the understanding of those skilled in the art, the following exemplary method is provided for screening target words from each initial target word based on the pinyin character string screening rule, which is to further screen the initial target words that meet the conditions in Table 7, specifically:
[0139] 1) Calculate the edit distance d2 between the pinyin string of the search word and the pinyin string of the initial target word.
[0140] 2) Calculate the common subsequence length sqLen2 between the pinyin string of the search word and the pinyin string of the initial target word.
[0141] 3) Calculate the common substring length ssLen2 between the pinyin string of the search word and the pinyin string of the initial target word.
[0142] 4) Take the maximum character length between the search word's pinyin string and the initial target word's pinyin string, maxLen2 = Math.max2 (search word's pinyin string length, initial target word's pinyin string length).
[0143] 5) Set the maximum edit distance boundary parameter max_edits2 to {1, 2}, with a default of 2; set the substring similarity threshold sub_string_similarity2 to a value range of (0.45, 1), with a default of 0.5. The larger the value, the more similar the two are. Set the subsequence similarity threshold sub_seq_similarity2 to a value range of [0, 3]. The default is 0. The larger the value, the more similar the two are.
[0144] 6) Get the target word that satisfies d2<=max_edits2, sqLen2 / maxLen2>=sub_string_similarity2, and ssLen2> sub_seq_similarity2.
[0145] Table 8
[0146]
[0147] In actual applications, after the initial target words are screened to obtain the target words, the target words that meet the conditions need to be sorted in reverse order according to the length of the Chinese character string to obtain a target word set, as shown in Table 9 below. The target word set is then returned.
[0148] Table 9
[0149]
[0150] In this embodiment, for any initial target word, the pinyin string edit distance, pinyin string similarity and common substring length between the pinyin string of any initial target word and the pinyin string of the search word are determined; any initial target word whose pinyin string edit distance is less than or equal to a preset pinyin edit distance threshold, whose pinyin string similarity is greater than a preset pinyin string similarity threshold, and whose common substring length is greater than a preset common substring similarity threshold is taken as the target word; in this way, each initial target word can be screened again from the dimensions of edit distance, similarity and common substring length between pinyin strings, so as to achieve the beneficial effect of accurately screening out target words that meet the pinyin string screening rules.
[0151] In an exemplary embodiment, after the step of obtaining the search term input by the input operation, the method further includes: determining a scene identifier of the search scene corresponding to the input operation, and determining a search term data type corresponding to the search scene based on the scene identifier; and obtaining at least one associated word associated with the existence of the search term from a local search term library as a target word based on the search term data type.
[0152] The search scenario may refer to the business scenario corresponding to when the input operation is triggered.
[0153] The scene identifier may refer to a scene number corresponding to the search scene.
[0154] The search term data type may refer to the data type corresponding to the search term.
[0155] The local search word library may refer to a search word library pre-stored in a local server. In practical applications, the local search word library is a local error correction word library, whose data comes from a set of error-prone words mined from search log data and word library data maintained dynamically by business.
[0156] Optionally, the server determines the scene identifier of the search scene corresponding to the input operation, and determines the search term data type corresponding to the search scene based on the scene identifier. The server then obtains at least one associated word associated with the search term from the local search term library as the target word based on the search term data type.
[0157] In actual applications, the search terms can be corrected by obtaining correction-related words from a local correction word library based on the scene number and data type of the search term.
[0158] To facilitate understanding by those skilled in the art, the following also provides an exemplary method for correcting errors in search terms, corresponding to Figure 4 The specific steps of the method include:
[0159] Step 1: When the search term input by the input operation is obtained, the fallback data for error correction is obtained from the local error correction word library: when it is determined that there is fallback data for the search term, the error correction is completed by returning the fallback data; when it is determined that there is no fallback data for the search term, the search term (i.e., the term to be corrected) is query rewritten, and candidate terms matching the search term are recalled from the search word library index;
[0160] Step 2: If the recall result is empty or contains the search word (i.e., the word to be corrected), an empty list is returned; otherwise, each candidate word in the recall result is filtered using the Chinese string filtering rule and the Pinyin string filtering rule;
[0161] Step 3: If there is no candidate word that satisfies both the Chinese string filtering rules and the Pinyin string filtering rules, an empty list is returned; if there is a candidate word that satisfies both the Chinese string filtering rules and the Pinyin string filtering rules, the candidate word that satisfies both the Chinese string filtering rules and the Pinyin string filtering rules is returned as the target word, and each target word is deduplicated and sorted again according to the length of the Chinese string.
[0162] In this embodiment, the scene identifier of the search scene corresponding to the input operation is determined, and based on the scene identifier, the corresponding search term data type in the search scene is determined; based on the search term data type, at least one associated word associated with the search term is obtained from the local search term library as a target word; in this way, it is possible to quickly determine whether the local search term library stores words associated with the search term based on the scene identifier of the search scene, thereby achieving the beneficial effect of quickly determining the target word for the search term.
[0163] In another embodiment, Figure 5 As shown, a search information prompt method is provided, which is described by taking the method applied to the server 104 in FIG. 1 as an example, and includes the following steps:
[0164] Step S502: in response to an input operation on the search box, obtaining a search term input by the input operation.
[0165] Step S504, construct at least one search query statement for the search term; the search query statement is a query instruction obtained by concatenating at least one rewriting string belonging to the same search term rewriting method; the search term rewriting method is used to rewrite a string having the same preset feature as the search term; different search term rewriting methods correspond to different preset features.
[0166] Step S506: based on each search query statement, recall at least one candidate word from a pre-constructed search word library index; the text similarity between the candidate word and the search word satisfies a preset similarity condition.
[0167] Step S508: Filter out at least one candidate word that meets the Chinese character string filtering rule from among the candidate words as the initial target word.
[0168] Step S510, among the initial target words, at least one initial target word that meets the pinyin character string screening rule is screened out as the target word; the target word is used to generate search prompt information for the input operation.
[0169] It should be noted that the specific limitations of the above steps can refer to the specific limitations of a search information prompt method mentioned above.
[0170] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0171] Based on the same inventive concept, the embodiment of the present application also provides a search information prompt device for implementing the search information prompt method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more search information prompt device embodiments provided below can refer to the limitations of the search information prompt method above, and will not be repeated here.
[0172] In an exemplary embodiment, Figure 6 As shown, a search information prompting device is provided, including: a response module 602, a construction module 604, a recall module 606 and a screening module 608, wherein:
[0173] A response module 602 is used to obtain a search term inputted by the input operation in response to an input operation on the search box;
[0174] A construction module 604 is used to construct at least one search query statement for the search term; the search query statement is a query instruction obtained by concatenating at least one rewriting string belonging to the same search term rewriting method; the search term rewriting method is used to rewrite a string having the same preset feature as the search term; different search term rewriting methods correspond to different preset features;
[0175] The recall module 606 is used to recall at least one candidate word from the pre-built search word library index based on each search query statement; the text similarity between the candidate word and the search word meets a preset similarity condition;
[0176] The screening module 608 is used to determine at least one target word that meets the string screening rule among the candidate words; the target word is used to generate search prompt information for the input operation.
[0177] In an exemplary embodiment, construction module 604 is specifically used to: rewrite the search term according to each search term rewriting method to obtain at least one rewritten string corresponding to the search term under each search term rewriting method; for any search term rewriting method, determine the weight of each rewritten string under the search term rewriting method, and concatenate each rewritten string under the search term rewriting method and the weight of each rewritten string to obtain a search query statement corresponding to the search term rewriting method.
[0178] In an exemplary embodiment, construction module 604 is specifically used to: splice each rewritten string under the search term rewriting method and the weight corresponding to each rewritten string into the retrieval domain of the search term library index; and construct a search query statement for the search term rewriting method in the retrieval domain by calling the search query statement matching interface.
[0179] In an exemplary embodiment, the string filtering rules include Chinese string filtering rules and Pinyin string filtering rules, and the filtering module 608 is specifically used to: among each candidate word, filter out at least one candidate word that meets the Chinese string filtering rules as the initial target word; among each initial target word, filter out at least one initial target word that meets the Pinyin string filtering rules as the target word.
[0180] In an exemplary embodiment, the screening module 608 is specifically used to: for any candidate word, determine the Chinese string edit distance and Chinese string similarity between the Chinese string of any candidate word and the Chinese string of the search word; and take any candidate word whose Chinese string edit distance is less than or equal to a preset Chinese edit distance threshold and whose Chinese string similarity is greater than a preset Chinese string similarity threshold as the initial target word.
[0181] In an exemplary embodiment, the screening module 608 is specifically used to: for any initial target word, determine the pinyin string edit distance, pinyin string similarity and common substring length between the pinyin string of any initial target word and the pinyin string of the search word; and take any initial target word whose pinyin string edit distance is less than or equal to a preset pinyin edit distance threshold, whose pinyin string similarity is greater than a preset pinyin string similarity threshold, and whose common substring length is greater than a preset common substring similarity threshold as a target word.
[0182] In an exemplary embodiment, the device also includes: a determination module for determining a scene identifier of a search scene corresponding to an input operation, and determining a corresponding search term data type under the search scene based on the scene identifier; and obtaining, based on the search term data type, at least one associated word associated with the existence of the search term from a local search term library as a target word.
[0183] Each module in the above-mentioned search information prompting device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0184] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG7. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store search information prompt data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a search information prompt method is implemented.
[0185] Those skilled in the art will understand that the structure shown in FIG. 7 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0186] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above-mentioned method for prompting search information. The steps of the method for prompting search information here may be the steps of the method for prompting search information in each of the above-mentioned embodiments.
[0187] In one embodiment, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the processor executes the steps of the above-mentioned method for prompting search information. The steps of the method for prompting search information here can be the steps of the method for prompting search information in each of the above-mentioned embodiments.
[0188] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, causes the processor to execute the steps of the above-mentioned method for prompting search information. The steps of the method for prompting search information here may be the steps of the method for prompting search information in each of the above-mentioned embodiments.
[0189] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0190] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0191] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0192] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A search information prompt method, It is characterized in that The method comprises: In response to an input operation on the search box, obtaining a search term input by the input operation; Constructing at least one search query statement for the search term; the search query statement is a query instruction obtained by concatenating at least one rewriting string belonging to the same search term rewriting method; the search term rewriting method is used to rewrite a string having the same preset feature as the search term; different types of the search term rewriting methods correspond to different types of the preset features; Based on each of the search query statements, at least one candidate word is recalled from a pre-constructed search word library index; the text similarity between the candidate word and the search word satisfies a preset similarity condition; At least one target word that meets the string screening rule is determined among the candidate words; the target word is used to generate search prompt information for the input operation.
2. The method according to claim 1, It is characterized in that The constructing at least one search query statement for the search term includes: Rewriting the search word according to each of the search word rewriting methods to obtain at least one rewritten character string corresponding to the search word in each of the search word rewriting methods; For any of the search term rewriting methods, determine the weight of each rewriting string under the search term rewriting method, and concatenate each rewriting string under the search term rewriting method and the weight of each rewriting string to obtain a search query statement corresponding to the search term rewriting method.
3. The method according to claim 2, It is characterized in that The step of concatenating the rewritten character strings and the weights of the rewritten character strings in the search word rewriting mode to obtain a search query statement corresponding to the search word rewriting mode includes: splicing each of the rewritten character strings and the weight corresponding to each of the rewritten character strings in the search word rewriting mode into the search domain of the search word library index; By calling the search query statement matching interface, a search query statement for the search term rewriting method is constructed in the retrieval domain.
4. The method according to claim 1, It is characterized in that The string screening rules include Chinese string screening rules and Pinyin string screening rules, and the step of determining at least one target word that meets the string screening rules from among the candidate words includes: Among the candidate words, at least one candidate word that meets the Chinese character string screening rule is selected as the initial target word; Among the initial target words, at least one initial target word that meets the pinyin character string screening rule is screened out as the target word.
5. The method according to claim 4, It is characterized in that The step of selecting at least one candidate word that meets the Chinese character string screening rule from among the candidate words as the initial target word includes: For any of the candidate words, determining the Chinese character string edit distance and Chinese character string similarity between the Chinese character string of any of the candidate words and the Chinese character string of the search word; Any candidate word whose Chinese character string edit distance is less than or equal to a preset Chinese character string edit distance threshold and whose Chinese character string similarity is greater than a preset Chinese character string similarity threshold is used as the initial target word.
6. The method according to claim 5, It is characterized in that The step of selecting at least one of the initial target words that meets the pinyin character string screening rule from the initial target words as the target word includes: For any of the initial target words, determining the pinyin string edit distance, pinyin string similarity and common substring length between the pinyin string of any of the initial target words and the pinyin string of the search word; Any of the initial target words whose pinyin string edit distance is less than or equal to a preset pinyin edit distance threshold, whose pinyin string similarity is greater than a preset pinyin string similarity threshold, and whose common substring length is greater than a preset common substring similarity threshold is taken as the target word.
7. The method according to claim 1, It is characterized in that After the step of obtaining the search term input by the input operation, the method further includes: Determine a scene identifier of a search scene corresponding to the input operation, and determine a search term data type corresponding to the search scene according to the scene identifier; According to the search word data type, at least one associated word associated with the existence of the search word is obtained from a local search word library as the target word.
8. A search information prompting device, It is characterized in that The device comprises: A response module, configured to obtain a search term inputted in response to an input operation on the search box; A construction module, used to construct at least one search query statement for the search term; the search query statement is a query instruction obtained by concatenating at least one rewriting string belonging to the same search term rewriting method; the search term rewriting method is used to rewrite a string having the same preset feature as the search term; different types of the search term rewriting methods correspond to different types of the preset features; A recall module, configured to recall at least one candidate word from a pre-constructed search word library index based on each of the search query statements; the text similarity between the candidate word and the search word satisfies a preset similarity condition; The screening module is used to determine at least one target word that meets the string screening rule among the candidate words; the target word is used to generate search prompt information for the input operation.
9. The device according to claim 8, It is characterized in that The construction module is specifically used to: rewrite the search term according to each of the search term rewriting methods to obtain at least one rewritten string corresponding to the search term under each of the search term rewriting methods; for any of the search term rewriting methods, determine the weight of each of the rewritten strings under the search term rewriting method, and concatenate each of the rewritten strings under the search term rewriting method and the weight of each of the rewritten strings to obtain a search query statement corresponding to the search term rewriting method.
10. The device according to claim 9, It is characterized in that The construction module is specifically used to: splice each of the rewritten strings and the weights corresponding to each of the rewritten strings under the search term rewriting method into the search domain of the search term library index; and construct a search query statement for the search term rewriting method in the search domain by calling the search query statement matching interface.
11. The device according to claim 8, It is characterized in that The string screening rules include Chinese string screening rules and pinyin string screening rules. The screening module is specifically used to: screen out at least one candidate word that meets the Chinese string screening rules among each candidate word as the initial target word; and screen out at least one initial target word that meets the pinyin string screening rules among each initial target word as the target word.
12. The device according to claim 11, It is characterized in that The screening module is specifically used to: for any of the candidate words, determine the Chinese string edit distance and Chinese string similarity between the Chinese string of any of the candidate words and the Chinese string of the search word; and use any of the candidate words whose Chinese string edit distance is less than or equal to a preset Chinese edit distance threshold and whose Chinese string similarity is greater than a preset Chinese string similarity threshold as the initial target word.
13. The device according to claim 12, It is characterized in that The screening module is specifically used to: for any of the initial target words, determine the pinyin string edit distance, pinyin string similarity and common substring length between the pinyin string of any of the initial target words and the pinyin string of the search word; Any of the initial target words whose pinyin string edit distance is less than or equal to a preset pinyin edit distance threshold, whose pinyin string similarity is greater than a preset pinyin string similarity threshold, and whose common substring length is greater than a preset common substring similarity threshold is taken as the target word.
14. The device according to claim 8, It is characterized in that The device also includes: a determination module, used to determine the scene identifier of the search scene corresponding to the input operation, and determine the corresponding search term data type under the search scene based on the scene identifier; based on the search term data type, obtain at least one associated word associated with the existence of the search term from a local search term library as the target word.
15. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
16. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
17. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
