Search recommendation method and device, server, and computer-readable storage medium
By storing the correspondence between standard search statements and similar search statements in the database, calculating the similarity between standard search statements and original search statements, and determining the target search statements, the problem of high noise in traditional search recommendation methods is solved, and the search recommendations is improved accuracy.
Patent Information
- Application Number
- CN202011633735.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-31
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2040-12-31
AI Technical Summary
The recommended search statements in traditional search recommendation methods are noisy, resulting in low accuracy.
By storing the correspondence between standard search statements and similar search statements in the database, the similarity between standard search statements and original search statements is calculated, thereby determining the target search statements, and outputting them to remove noise, and improving the accuracy of recommendations.
The denoising processing of the target search statement by similar search statements significantly improves the accuracy of the final result search statement and reduces the noise impact.
Smart Images

Figure CN112632395B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a search recommendation method and device, a server, and a computer-readable storage medium. Background Art
[0002] With the development of Internet technology, search recommendation methods have been applied in various scenarios, such as in Frequently Asked Questions (FAQ) systems. A database is pre-built in the FAQ system. When the FAQ system receives a search statement input by a user, the FAQ system can recommend corresponding search statements to the user based on the search statement for the user to click.
[0003] Using traditional search recommendation methods, the recommended search sentences have large noise, so the recommendation accuracy is low. Summary of the invention
[0004] The embodiments of the present application provide a search recommendation method, device, server, and computer-readable storage medium, which can improve the accuracy of the obtained target search statement.
[0005] A search recommendation method, the method comprising:
[0006] According to the original search statement input by the user, a standard search statement matching the original search statement is searched from a database, wherein the database stores indexes, standard search statements, similar search statements, and corresponding relationships between the standard search statements and the similar search statements;
[0007] Based on the standard search statement, according to the index, the corresponding relationship between the standard search statement and the similar search statement, querying the database for a similar search statement corresponding to the standard search statement;
[0008] A first similarity between a similar search statement corresponding to the standard search statement and the original search statement is calculated, a target search statement is determined from the standard search statement based on the first similarity, and the target search statement is output.
[0009] In one embodiment, the method further comprises:
[0010] Acquire standard search statements, similar search statements, and corresponding relationships between the standard search statements and the similar search statements from the historical search statement data set;
[0011] Performing word segmentation on the standard search statement to obtain a plurality of standard words, and establishing an index based on the plurality of standard words;
[0012] The database is established according to the index, the standard search statement, the similar search statement, and the corresponding relationship between the standard search statement and the similar search statement.
[0013] In one embodiment, querying a database for a standard search statement matching the original search statement according to the original search statement input by the user includes:
[0014] Performing word segmentation processing on the original search sentence input by the user to obtain multiple original words;
[0015] Calculating a second similarity between the plurality of original words and the standard search statements stored in the database;
[0016] If the second similarity exceeds a second similarity threshold, the standard search statement corresponding to the second similarity is used as the standard search statement that matches the original search statement.
[0017] In one embodiment, the database further stores word vectors of the standard search statements, and the calculating the second similarity between the plurality of original words and the standard search statements stored in the database includes:
[0018] Calculate the word vectors of the multiple original words respectively;
[0019] The vector similarity between the word vectors of the multiple original words and the word vector of the standard search sentence is calculated to obtain the second vector similarity.
[0020] In one embodiment, the database further stores word vectors of the similar search statements corresponding to the standard search statement, and the calculating a first similarity between the similar search statement corresponding to the standard search statement and the original search statement, determining a target search statement from the standard search statement based on the first similarity, and outputting the target search statement includes:
[0021] Obtain a first word vector matrix according to the word vectors of the plurality of original words, and obtain a second word vector matrix according to the word vectors of the similar search statements corresponding to the standard search statements;
[0022] For each of the standard search sentences, calculating the vector similarity between the first word vector matrix and the second word vector matrix of the similar search sentence corresponding to the standard search sentence;
[0023] Obtaining a first vector similarity between the original search statement and the standard search statement according to the vector similarity calculation;
[0024] If the first vector similarity exceeds a first vector similarity threshold, the standard search statement corresponding to the first vector similarity is used as a target search statement, and the target search statement is output.
[0025] In one embodiment, the standard search statement is segmented to obtain a plurality of standard words, and an index is established based on the plurality of standard words, including:
[0026] Segmenting the standard search statement to obtain a plurality of standard terms;
[0027] determining a key standard term from the plurality of standard terms;
[0028] The word vectors of the key standard words are calculated, and a vector index is established based on the word vectors of the key standard words.
[0029] In one embodiment, the calculating the second similarity between the plurality of original words and the standard search statements stored in the database comprises:
[0030] Calculating text similarity between the plurality of original words and the words included in the standard search sentence;
[0031] The second text similarity is calculated based on the text similarity.
[0032] In one embodiment, calculating a first similarity between a similar search statement corresponding to the standard search statement and the original search statement, determining a target search statement from the standard search statement based on the first similarity, and outputting the target search statement includes:
[0033] For each of the standard search sentences, calculating text similarity between the plurality of original words and words included in the similar search sentences corresponding to the standard search sentences;
[0034] Calculating a first text similarity based on the text similarity;
[0035] If the first text similarity exceeds a first text similarity threshold, the standard search sentence corresponding to the first text similarity is used as a target search sentence, and the target search sentence is output.
[0036] In one embodiment, the calculating the second similarity between the plurality of original words and the standard search statements stored in the database further includes:
[0037] Calculating text similarity between the plurality of original words and the words included in the standard search sentence;
[0038] The second text similarity is calculated based on the text similarity.
[0039] In one embodiment, calculating a first similarity between a similar search statement corresponding to the standard search statement and the original search statement, determining a target search statement from the standard search statement based on the first similarity, and outputting the target search statement includes:
[0040] Obtain a first word vector matrix according to the word vectors of the plurality of original words, and obtain a second word vector matrix according to the word vectors of the similar search statements corresponding to the standard search statements;
[0041] For each of the standard search sentences, calculating the vector similarity between the first word vector matrix and the second word vector matrix of the similar search sentence corresponding to the standard search sentence;
[0042] Obtaining a first vector similarity between the original search statement and the standard search statement according to the vector similarity calculation;
[0043] If the first vector similarity exceeds a first vector similarity threshold, obtaining a standard search statement corresponding to the first vector similarity;
[0044] For each of the standard search sentences, calculating text similarity between the plurality of original words and the words included in the similar search sentences corresponding to the standard search sentences;
[0045] Calculating a first text similarity based on the text similarity;
[0046] If the first text similarity exceeds a first text similarity threshold, obtaining a standard search statement corresponding to the first text similarity;
[0047] Deduplication processing is performed on the standard search sentence corresponding to the first vector similarity and the standard search sentence corresponding to the first text similarity, and the standard search sentence obtained by the deduplication processing is used as the target search sentence, and the target search sentence is output.
[0048] A search recommendation device, comprising:
[0049] A standard search statement acquisition module, used to query a database for a standard search statement matching the original search statement according to the original search statement input by the user, wherein the database stores indexes, standard search statements, similar search statements, and corresponding relationships between the standard search statements and the similar search statements;
[0050] A similar search statement acquisition module, configured to query the database for similar search statements corresponding to the standard search statement based on the standard search statement according to the index, the corresponding relationship between the standard search statement and the similar search statement;
[0051] The target search statement output module is used to calculate the first similarity between the similar search statement corresponding to the standard search statement and the original search statement, determine the target search statement from the standard search statement based on the first similarity, and output the target search statement.
[0052] A server comprises 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 method.
[0053] A computer-readable storage medium stores a computer program, which implements the steps of the above method when executed by a processor.
[0054] The above-mentioned search recommendation method, device, server, and computer-readable storage medium query the database for a standard search statement matching the original search statement according to the original search statement input by the user, and the database stores indexes, standard search statements, similar search statements, and the correspondence between the standard search statements and the similar search statements. Based on the standard search statement, according to the index, the correspondence between the standard search statement and the similar search statement, query the database for a similar search statement corresponding to the standard search statement, calculate the first similarity between the similar search statement corresponding to the standard search statement and the original search statement, determine the target search statement from the standard search statement based on the first similarity, and output the target search statement.
[0055] The standard search statement that matches the original search statement is only queried from the database based on the original search statement input by the user, and the obtained standard search statement has certain noise. In order to remove the noise, not only the standard search statement is stored in the database, but also similar search statements of the standard search statement are added and stored. Therefore, after obtaining the standard search statement, similar search statements corresponding to the standard search statement can be further queried from the database based on the standard search statement, and the target search statement is determined from the standard search statement through the first similarity between the similar search statement corresponding to the standard search statement and the original search statement, and the target search statement is output. Therefore, the target search statement is denoised by the similar search statement, which improves the accuracy of the target search statement finally obtained. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art 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.
[0057] Figure 1 A schematic diagram of an application environment in an embodiment;
[0058] Figure 2 A flowchart of a method for searching for recommendations in one embodiment;
[0059] Figure 3 A schematic diagram of a search recommendation method in one embodiment;
[0060] Figure 4 A flowchart of a method for establishing a database in one embodiment;
[0061] Figure 5 for Figure 2 A flowchart of a method for querying a database for a standard search statement matching an original search statement according to an original search statement input by a user;
[0062] Figure 6 A flowchart of a method for determining a target search statement from a standard search statement and outputting the target search statement in one embodiment;
[0063] Figure 7 A flowchart of a method for determining a target search statement from a standard search statement and outputting the target search statement in another embodiment;
[0064] Figure 8 A flowchart of a method for determining a target search statement from a standard search statement and outputting the target search statement in another embodiment;
[0065] Fig. 9 A structural block diagram of a search recommendation device in an embodiment;
[0066] Fig.10 A structural block diagram of a search recommendation device in another embodiment;
[0067] Fig.11 FIG. 1 is a schematic diagram of the internal structure of a server in an embodiment. DETAILED DESCRIPTION
[0068] In order to make the purpose, technical solution and advantages of the present application more clearly understood, 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.
[0069] It can be understood that the terms "first", "second", etc. used in the present application can be used in this article to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from another element.
[0070] Figure 1 FIG. 1 is an application scenario diagram of a search recommendation method in an embodiment. Figure 1 As shown, the application environment includes a terminal 120 and a server 140, and the terminal 120 is connected to the server 140 through a network. The server 140 uses the search recommendation method in this application to query the standard search statement matching the original search statement from the database according to the original search statement input by the user. The database stores the index, standard search statement, similar search statement and the correspondence between the standard search statement and the similar search statement; based on the standard search statement, according to the index, the correspondence between the standard search statement and the similar search statement, query the similar search statement corresponding to the standard search statement from the database; calculate the first similarity between the similar search statement corresponding to the standard search statement and the original search statement, determine the target search statement from the standard search statement based on the first similarity, and output the target search statement. Here, the terminal 120 can be any terminal device such as a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a car computer, a wearable device, a smart home, etc.
[0071] With the development of Internet technology, search recommendation methods have been applied to various scenarios, such as Frequently Asked Questions (FAQ) systems. A database is pre-built in the FAQ system. When the FAQ system receives a search statement input by a user, the FAQ system can recommend a corresponding search statement to the user based on the search statement for the user to click. However, using the traditional search recommendation method, the noise of the recommended search statement is large, so the accuracy of the recommendation is low. In order to solve this problem, the present application proposes a search recommendation method.
[0072] Figure 2 FIG. 1 is a flowchart of a method for searching for recommendations in one embodiment. Figure 2 As shown, a search recommendation method is provided, which is applied to a server and includes steps 220 to 260. Among them,
[0073] Step 220, query the database for a standard search statement matching the original search statement according to the original search statement input by the user, wherein the database stores indexes, standard search statements, similar search statements, and corresponding relationships between standard search statements and similar search statements.
[0074] The original search statement refers to the words entered by the user when searching in the FAQ system. The standard search statement is pre-stored in the database and is a relatively formal and written word with the same intention as the words entered by the user when searching. Similar search statements are also stored in the database and have the same intention as the standard search statement, but are more colloquial in expression and more in line with the user's input habits. The database stores indexes, standard search statements, similar search statements, and the correspondence between standard search statements and similar search statements. The index is a database index, which is constructed based on the keywords contained in the standard search statement and is used to quickly find and locate the annotated search statement based on the original search statement entered by the user.
[0075] When the user enters an original search statement, the server receives the original search statement and can search for a standard search statement that matches the original search statement from a large number of standard search statements through the index. The number of standard search statements that match the original search statement is at least one, and this application does not limit this.
[0076] Step 240 , based on the standard search statement, according to the index, the standard search statement and the corresponding relationship between the similar search statements, query the database for similar search statements corresponding to the standard search statement.
[0077] Then, based on the correspondence between the standard search statement and the similar search statement, the server can query the database for a similar search statement corresponding to the standard search statement according to the standard search statement that matches the original search statement. One standard search statement corresponds to at least one similar search statement, which is not limited in this application.
[0078] Step 260 , calculating a first similarity between a similar search statement corresponding to the standard search statement and the original search statement, determining a target search statement from the standard search statement based on the first similarity, and outputting the target search statement.
[0079] After the server obtains similar search statements under the standard search statement based on the standard search statement, it calculates the first similarity between a group of similar search statements under each standard search statement and the original search statement. The first similarity between a group of similar search statements and the original search statement can be obtained by calculating the similarity between the words included in a group of similar search statements and the words included in the original search statement. And so on, the first similarity between each group of similar search statements and the original search statement is obtained. Then, based on the first similarity, the standard search statements are sorted in order from large to small, and a preset number of standard search statements with high rankings are selected as target search statements, and output.
[0080] like Figure 3 As shown, it is a schematic diagram of a search recommendation method in one embodiment. First, based on the original search statement input by the user, a standard search statement matching the original search statement is queried from the database. For example, the standard search statements matching an original search statement include standard search statement 1, standard search statement 2, and standard search statement 3. Secondly, similar search statements corresponding to each standard search statement are queried from the database, including similar search statement 11, similar search statement 12, and similar search statement 13 corresponding to standard search statement 1; similar search statement 21, similar search statement 22, and similar search statement 23 corresponding to standard search statement 2; and similar search statement 31, similar search statement 32, and similar search statement 33 corresponding to standard search statement 3.
[0081] Calculate the similarity between the word vector matrix of similar search statement 11, similar search statement 12, and similar search statement 13 and the word vector matrix of standard search statement 1 respectively, and obtain similarity 1; calculate the similarity between the word vector matrix of similar search statement 21, similar search statement 22, and similar search statement 23 and the word vector matrix of standard search statement 1 respectively, and obtain similarity 2; calculate the similarity between the word vector matrix of similar search statement 31, similar search statement 32, and similar search statement 33 and the word vector matrix of standard search statement 3 respectively, and obtain similarity 3. Sort the standard search statements 1, 2, and 3 in descending order according to similarity 1, 2, and 3, and select the top-ranked standard search statement as the target search statement, and output it. The data in this application is only an example, and does not limit the number of standard search statements and similar search statements, nor does it limit the number of target search statements finally selected.
[0082] In the embodiment of the present application, the traditional search recommendation method only queries the database for standard search statements that match the original search statements based on the original search statements input by the user, and the obtained standard search statements have certain noise. In order to remove the noise, a search recommendation method is proposed, in which not only the standard search statements are stored in the database, but also similar search statements of the standard search statements are added and stored. Therefore, after obtaining the standard search statement, the server can further query the database for similar search statements corresponding to the standard search statement based on the standard search statement, and determine the target search statement from the standard search statement through the first similarity between the similar search statement corresponding to the standard search statement and the original search statement, and output the target search statement. Therefore, the target search statement is denoised by the similar search statement, which improves the accuracy of the target search statement finally obtained.
[0083] In one embodiment, Figure 4 As shown, a search recommendation method is provided, which also includes:
[0084] Step 420: Obtain standard search statements, similar search statements, and corresponding relationships between standard search statements and similar search statements from the historical search statement data set.
[0085] The historical search statement dataset may be a set of search statements obtained from a commonly used question-answering system. Among them, the FAQ (Frequently Asked Questions) system is a commonly used search-based question-answering system. The server may obtain the historical search statement dataset from the question-answering system, and then obtain the standard search statement, similar search statement, and the corresponding relationship between the standard search statement and the similar search statement from the historical search statement dataset.
[0086] Among them, the standard search statement refers to the relatively formal vocabulary output by the question-answering system. Similar search statements refer to search statements that are randomly input by users in the question-answering system, are more colloquial in expression, are more in line with the user's input habits, and have the same intention as the standard search statement. Similar search statements can also be search statements with the same intention as the standard search statement obtained by similarly deforming the standard search statement. For each standard search statement, a search statement with the same intention as the standard search statement is obtained in the question-answering system. Then, the search statement with the same intention as the standard search statement constitutes a similar search statement that has a corresponding relationship with the standard search statement.
[0087] The correspondence between the standard search statements and the similar search statements in the database may be formatted into JSON format. Of course, the present application does not limit the data structure of the correspondence between the standard search statements and the similar search statements.
[0088] Step 440: segment the standard search statement to obtain a plurality of standard words, and create an index based on the plurality of standard words.
[0089] The server performs word segmentation on the obtained standard search sentence, wherein word segmentation is the process of recombining a continuous sequence of words into a word sequence according to certain specifications. For example, in the scenario of credit card repayment installment, one of the standard search questions is "How many installments can be divided into installments", and the standard search question is segmented to obtain "installment / can / divided / how many / installments", and 5 standard words are obtained. Of course, this application does not limit the process and results of the word segmentation processing.
[0090] Then, the server creates an index based on the multiple standard words obtained by segmenting the standard search sentence. Specifically, key standard words can be extracted from the multiple standard words, and then the index can be created based on the key standard words. For example, the key standard words extracted from the above five standard words are "installment" and "period". Then, the standard search question "How many periods can be divided into for installment" can be indexed based on the two key standard words "installment" and "period".
[0091] Step 460: Establish a database based on the index, the standard search statement, the similar search statement, and the correspondence between the standard search statement and the similar search statement.
[0092] The server obtains standard search statements, similar search statements, and the corresponding relationship between standard search statements and similar search statements from the historical search statement data set. Then, each standard search statement is segmented to obtain multiple standard words, keywords are extracted from the multiple standard words, and then an index is established based on the keywords. Among them, an index is a structure that sorts the values of one or more columns in a data table in a database. Therefore, using an index can quickly access specific information in a data table.
[0093] Finally, the server can establish a database according to the index, the standard search statement, the similar search statement, and the corresponding relationship between the standard search statement and the similar search statement.
[0094] In an embodiment of the present application, the server obtains standard search statements, similar search statements, and the corresponding relationship between standard search statements and similar search statements from a historical search statement data set in advance. Then, each standard search statement is segmented to obtain multiple standard words, keywords are extracted from the multiple standard words, and then an index is established based on the keywords. Finally, a database can be established based on the index, standard search statements, similar search statements, and the corresponding relationship between standard search statements and similar search statements. Thus, by adopting the search recommendation method of the present application, similar search statements corresponding to the standard search statements can be queried from the database, and the target search statement can be determined from the standard search statement through the first similarity between the similar search statement corresponding to the standard search statement and the original search statement, and the target search statement is output. Thus, the target search statement is denoised by the similar search statement, thereby improving the accuracy of the target search statement finally obtained.
[0095] In one embodiment, Figure 5 As shown, step 220, according to the original search statement input by the user, searches the database for a standard search statement that matches the original search statement, including:
[0096] Step 222: perform word segmentation processing on the original search sentence input by the user to obtain multiple original words.
[0097] The user enters the original search statement in the search engine. After the server obtains the original search statement, it performs word segmentation on the original search statement to obtain multiple original words. For example, in the scenario of credit card repayment installment, the user enters an original search statement of "how many installments do you have in total", then after word segmentation, "how many installments do you have in total", and 7 original words are obtained.
[0098] Step 224, calculating the second similarity between the plurality of original words and the standard search statements stored in the database.
[0099] By calculating the similarity between multiple original words in the original search sentence and the words contained in each standard search sentence in the database, the similarity is named as the second similarity. According to the size of the second similarity, the standard search sentence matching the original search sentence is determined. Among them, the second similarity here includes text similarity and vector similarity. Text similarity is the similarity between words on characters, and vector similarity is the similarity calculated based on the word vector matrix, which includes word vectors.
[0100] Step 226: If the second similarity exceeds the second similarity threshold, the standard search statement corresponding to the second similarity is used as the standard search statement that matches the original search statement.
[0101] The second similarity threshold is preset, which can be determined based on experience, for example, 80%. The second similarity threshold can also be determined based on the number of standard search statements to be matched, which is not limited in this application.
[0102] After obtaining the second similarity by calculating the similarity between the multiple original words in the original search sentence and the words included in each standard search sentence in the database, it is determined whether the second similarity exceeds the second similarity threshold. If the second similarity does not exceed the second similarity threshold, the standard search sentence corresponding to the second similarity threshold is eliminated. If the second similarity exceeds the second similarity threshold, the standard search sentence corresponding to the second similarity is used as the standard search sentence matching the original search sentence.
[0103] In the embodiment of the present application, the second similarity is obtained by calculating the similarity between the multiple original words in the original search sentence and the words contained in each standard search sentence in the database. Then, according to the size of the second similarity, the standard search sentence matching the original search sentence is screened out from the database. The standard search sentence matching the original search sentence is screened out according to the similarity between the words, which improves the accuracy of the matching result compared with the traditional method of matching by prefix.
[0104] Continuing from the previous embodiment, the database further stores word vectors of standard search sentences, and calculating the second similarity between the plurality of original words and the standard search sentences stored in the database includes:
[0105] Calculate the word vectors of multiple original words respectively;
[0106] The vector similarity between the word vectors of the plurality of original words and the word vector of the standard search sentence is calculated to obtain a second vector similarity.
[0107] Specifically, each standard search statement in the database is segmented in advance and then the word vector is calculated, and the word vector of the standard search statement is stored in the database. First, when the user enters the original search statement in the search engine, the server obtains the original search statement and performs word segmentation on the original search statement to obtain multiple original words.
[0108] Secondly, the word vectors of multiple original words are calculated respectively, and the first word vector matrix is obtained according to the word vectors of the multiple original words, and the word vector matrix of the standard search sentence is obtained according to the word vector of the standard search sentence. Specifically, the word vectors of multiple original words are filled into a matrix of a preset size to obtain the first word vector matrix. For example, the number of original words here is 3. Assuming that the word vector of each original word is assumed to be 1×4-dimensional, the word vectors of the three original words are filled into a 3×4-dimensional matrix in sequence to obtain a 3×4-dimensional first word vector matrix. Similarly, the word vectors of the standard search sentence are filled in the same way to obtain the word vector matrix of the standard search sentence. For standard search sentence 1, the vector similarity between the first word vector matrix and the word vector matrix of standard search sentence 1 is calculated to obtain the second vector similarity. For standard search sentence 2, the vector similarity between the first word vector matrix and the word vector matrix of standard search sentence 2 is calculated to obtain the second vector similarity. For standard search sentence 3, the vector similarity between the first word vector matrix and the word vector matrix of standard search sentence 3 is calculated to obtain the second vector similarity. Of course, this application does not limit this.
[0109] In an embodiment of the present application, when calculating the second similarity between multiple original words and the standard search statements stored in the database, the second vector similarity can be obtained by calculating the vector similarity. Because the word vector contains a lot of important information in the word, the second vector similarity can be accurately calculated based on the word vector. Then, according to the size of the second vector similarity, the standard search statement that matches the original search statement is screened out from the database. The standard search statement that matches the original search statement is screened out according to the similarity between the word vectors, which improves the accuracy of the matching results compared to the traditional method of matching by prefix.
[0110] In one embodiment, the database also stores word vectors of similar search statements corresponding to the standard search statement. Figure 6 As shown, step 260, calculating a first similarity between a similar search statement corresponding to the standard search statement and the original search statement, determining a target search statement from the standard search statement based on the first similarity, and outputting the target search statement, includes:
[0111] Step 262, obtaining a first word vector matrix based on the word vectors of the plurality of original words, and obtaining a second word vector matrix based on the word vectors of similar search sentences corresponding to the standard search sentence;
[0112] Step 264, for each standard search sentence, calculating the vector similarity between the first word vector matrix and the second word vector matrix of a similar search sentence corresponding to the standard search sentence;
[0113] Step 266, obtaining a first vector similarity between the original search statement and the standard search statement according to the vector similarity calculation;
[0114] Step 268: If the first vector similarity exceeds the first vector similarity threshold, the standard search sentence corresponding to the first vector similarity is used as a target search sentence, and the target search sentence is output.
[0115] The database stores indexes, standard search statements, similar search statements, and the corresponding relationship between standard search statements and similar search statements. The database also stores word vectors of standard search statements and word vectors of similar search statements corresponding to standard search statements.
[0116] Specifically, after determining the standard search sentence matching the original search sentence in step 240, further determine the similar search sentence corresponding to the standard search sentence. Then, for each standard search sentence, calculate the vector similarity between the word vectors of the multiple original words and the word vectors of the similar search sentence corresponding to the standard search sentence.
[0117] Combination Figure 3 As shown, a first word vector matrix is obtained according to the word vectors of multiple original words, and a second word vector matrix is obtained according to the word vectors of similar search statements corresponding to the standard search statement. Specifically, the word vectors of multiple original words are filled into a matrix of a preset size to obtain a first word vector matrix. For example, the number of original words here is 3. Assuming that the word vector of each original word is assumed to be 1×4 dimensional, the word vectors of the three original words are sequentially filled into a 3×4 dimensional matrix to obtain a 3×4 dimensional first word vector matrix. Similarly, the word vectors of similar search statements are filled in the same way to obtain a second word vector matrix. For standard search statement 1, the vector similarities of the first word vector matrix and the second word vector matrix of similar search statement 11, the second word vector matrix of similar search statement 12, and the second word vector matrix of similar search statement 13 are calculated respectively. Then, these vector similarities are summed to obtain the first vector similarity between the original search statement and the standard search statement 1.
[0118] Similarly, for standard search sentence 2, the first vector similarity between the original search sentence and standard search sentence 2 is calculated.
[0119] Similarly, for standard search sentence 3, the first vector similarity between the original search sentence and standard search sentence 3 is calculated.
[0120] Determine whether the first vector similarity exceeds the first vector similarity threshold. If the first vector similarity exceeds the first vector similarity threshold, the standard search statement corresponding to the first vector similarity is used as the target search statement, and the target search statement is output. Assume that if the first vector similarity between the original search statement and the standard search statement 1 and the standard search statement 2 exceeds the first vector similarity threshold, the standard search statement 1 and the standard search statement 2 are used as the target search statement, and the target search statement is output. Thus, the standard search statement 3 screened out for the first time is eliminated. The data in this application is for example only, and does not limit the number of standard search statements and similar search statements, nor does it limit the number of target search statements ultimately screened out.
[0121] In the embodiment of the present application, the traditional search recommendation method only queries the database for standard search statements that match the original search statements based on the original search statements input by the user, and the obtained standard search statements have certain noise. In order to remove the noise, a search recommendation method is proposed, in which not only the standard search statements are stored in the database, but also similar search statements of the standard search statements are added and stored. Therefore, after obtaining the standard search statement, the server can further query the database for similar search statements corresponding to the standard search statement based on the standard search statement, and determine the target search statement from the standard search statement through the first similarity between the similar search statement corresponding to the standard search statement and the original search statement, and output the target search statement. Therefore, the target search statement is denoised by the similar search statement, which improves the accuracy of the target search statement finally obtained.
[0122] In the embodiment of the present application, when calculating the first similarity, the first vector similarity is calculated, that is, the first vector similarity is obtained by calculating the vector similarity between the first word vector matrix and the second word vector matrix. Compared with the traditional method of matching by prefix, the accuracy of the matching result is further improved.
[0123] In one embodiment, the standard search statement is segmented to obtain a plurality of standard words, and an index is established based on the plurality of standard words, including:
[0124] Segment the standard search statement to obtain multiple standard terms;
[0125] Determine key standard terms from multiple standard terms;
[0126] Calculate the word vectors of key standard words, and establish a vector index based on the word vectors of key standard words.
[0127] Specifically, the database stores indexes, standard search statements, similar search statements, and the corresponding relationship between standard search statements and similar search statements. The index is a database index, which is constructed based on the keywords contained in the standard search statement and is used to quickly find and locate the annotated search statement based on the original search statement entered by the user.
[0128] Therefore, when creating an index in a database, the standard search statement can be segmented to obtain multiple standard words, and key standard words can be determined from the multiple standard words. The word vectors of the key standard words are calculated, and a vector index is created based on the word vectors of the key standard words.
[0129] For example, in the scenario of credit card repayment installment, one of the standard search questions is "How many installments can be made for the installment", and the standard search question is segmented to obtain "installment / can / divided / how many / installments", and 5 standard words are obtained. Of course, this application does not limit the process and results of the segmentation processing.
[0130] Then, the server creates an index based on the multiple standard words obtained by segmenting the standard search statements. Specifically, keywords can be extracted from multiple standard words, and then the word vectors of the key standard words can be calculated, and a vector index can be created based on the word vectors of the key standard words. For example, the key standard words extracted from the above five standard words are "installment" and "period". Then, the word vectors of the two key standard words "installment" and "period" can be calculated, and based on the word vectors of the two key standard words "installment" and "period", a vector index can be created for the standard search question "How many periods can the installment be divided into?"
[0131] In an embodiment of the present application, a vector index is established based on the word vectors of the key standard words in the standard search sentence. Thus, a standard search sentence matching the original search sentence can be quickly searched from the vector index in the database based on the word vector. Specifically, by calculating the second vector similarity between the multiple original words in the original search sentence and the standard search sentence stored in the database, and then judging the magnitude relationship between the second similarity and the second similarity threshold, if the second similarity exceeds the second similarity threshold, the standard search sentence corresponding to the second similarity is used as the standard search sentence matching the original search sentence.
[0132] In one embodiment, calculating the second similarity between the plurality of original words and the standard search statements stored in the database includes:
[0133] Calculating text similarity between the plurality of original words and the words included in the standard search sentence;
[0134] The second text similarity is calculated based on the text similarity.
[0135] Among them, text similarity refers to the similarity between words in terms of characters. For example, in the scenario of credit card repayment installment, the original search sentence entered by the user is "How many installments do you have in total?", then after word segmentation, "How many installments do you have in total?" is obtained, and 7 original words are obtained.
[0136] In the scenario of credit card repayment installment, one of the standard search questions is "How many installments can be divided into installments", and the standard search question is segmented to obtain "installment / can / divided / how many / periods", and 5 standard words are obtained. Of course, this application does not limit the process and results of the word segmentation processing. Then, the text similarity between the 7 original words and the 5 standard words can be calculated. Then the calculated text similarities are summed to obtain the second text similarity. For example, the word "installment" appears in both the original search sentence and the standard search question, then the text similarity of the word "installment" in the original search sentence and the standard search question is 1, and similarly, the text similarity of the word "how much" in the original search sentence and the standard search question is also 1. The words "you" and "how much" do not appear in the original search sentence and the standard search question, then the text similarity of the words "you" and "how much" in the original search sentence and the standard search question is 0.
[0137] In an embodiment of the present application, when calculating the second similarity between multiple original words and the standard search statements stored in the database, the second text similarity can be obtained by calculating the text similarity. The second text similarity can judge the similarity between the standard search statement and the original search statement from the character perspective. Then, based on the size of the second text similarity, the standard search statement that matches the original search statement is screened out from the database. The standard search statement that matches the original search statement is screened out based on the similarity from the character perspective, which improves the accuracy of the matching results compared to the traditional method of matching by prefix.
[0138] In the previous embodiment, Figure 7 As shown, step 260, calculating a first similarity between a similar search statement corresponding to the standard search statement and the original search statement, determining a target search statement from the standard search statement based on the first similarity, and outputting the target search statement, includes:
[0139] Step 720, for each standard search sentence, calculating the text similarity between the multiple original words and the words included in the similar search sentence corresponding to the standard search sentence;
[0140] Step 740, obtaining a first text similarity according to the text similarity calculation;
[0141] Step 760: If the first text similarity exceeds the first text similarity threshold, the standard search sentence corresponding to the first text similarity is used as a target search sentence, and the target search sentence is output.
[0142] The database stores indexes, standard search statements, similar search statements, and the corresponding relationships between the standard search statements and the similar search statements.
[0143] Specifically, after determining the standard search sentence matching the original search sentence in step 240, further determine the similar search sentence corresponding to the standard search sentence. Then, for each standard search sentence, calculate the text similarity between the multiple original words and the words contained in the similar search sentence corresponding to the standard search sentence.
[0144] Combination Figure 3 As shown, for standard search sentence 1, the text similarities between multiple original words and the words included in similar search sentence 11, similar search sentence 12, and similar search sentence 13 are calculated respectively. Then, these text similarities are summed to obtain a first text similarity.
[0145] For standard search sentence 2, the text similarities between the multiple original words and the words included in similar search sentence 21, similar search sentence 22, and similar search sentence 23 are calculated respectively. Then, these text similarities are summed to obtain a first text similarity.
[0146] For the standard search sentence 3, the text similarities between the multiple original words and the words included in the similar search sentence 31, the similar search sentence 32, and the similar search sentence 33 are calculated respectively to obtain the first text similarity.
[0147] Determine whether the first text similarity exceeds the first text similarity threshold. If the first text similarity exceeds the first text similarity threshold, the standard search statement corresponding to the first text similarity is used as the target search statement, and the target search statement is output. Assuming that the first text similarity corresponding to standard search statement 1 and standard search statement 2 exceeds the first text similarity threshold, standard search statement 1 and standard search statement 2 are used as target search statements, and the target search statements are output. Thus, the standard search statement 3 screened out for the first time is eliminated. The data in this application is for example only, and does not limit the number of standard search statements and similar search statements, nor does it limit the number of target search statements ultimately screened out.
[0148] In the embodiment of the present application, the traditional search recommendation method only queries the database for standard search statements that match the original search statements based on the original search statements input by the user, and the obtained standard search statements have certain noise. In order to remove the noise, a search recommendation method is proposed, in which not only the standard search statements are stored in the database, but also similar search statements of the standard search statements are added and stored. Therefore, after obtaining the standard search statement, the server can further query the database for similar search statements corresponding to the standard search statement based on the standard search statement, and determine the target search statement from the standard search statement through the first similarity between the similar search statement corresponding to the standard search statement and the original search statement, and output the target search statement. Therefore, the target search statement is denoised by the similar search statement, which improves the accuracy of the target search statement finally obtained.
[0149] In the embodiment of the present application, the first similarity is calculated by calculating the first text similarity, that is, the first text similarity is obtained by calculating the text similarity between words in terms of characters. Compared with the traditional method of matching by prefix, the accuracy of the matching result is further improved.
[0150] In one embodiment, calculating the second similarity between the plurality of original words and the standard search statements stored in the database further includes:
[0151] Calculating text similarity between the plurality of original words and the words included in the standard search sentence;
[0152] The second text similarity is calculated based on the text similarity.
[0153] In the embodiment of the present application, when calculating the second similarity between the original search sentence and the standard search sentence, the vector similarity and text similarity between the multiple original words and the words included in the standard search sentence are calculated at the same time, and the second vector similarity is calculated according to the vector similarity, and the second text similarity is calculated according to the text similarity. Thus, the text similarity is calculated from the perspective of vectors and characters, and the corresponding standard search sentence is matched from the perspective of vectors and characters.
[0154] In one embodiment, Figure 8 As shown, step 260, calculating a first similarity between a similar search statement corresponding to the standard search statement and the original search statement, determining a target search statement from the standard search statement based on the first similarity, and outputting the target search statement, includes:
[0155] Step 802, obtaining a first word vector matrix based on the word vectors of the plurality of original words, and obtaining a second word vector matrix based on the word vectors of similar search sentences corresponding to the standard search sentence;
[0156] Step 804, for each standard search sentence, calculating the vector similarity between the first word vector matrix and the second word vector matrix of a similar search sentence corresponding to the standard search sentence;
[0157] Step 806, obtaining a first vector similarity between the original search statement and the standard search statement according to the vector similarity calculation;
[0158] Step 808: if the first vector similarity exceeds the first vector similarity threshold, obtaining a standard search statement corresponding to the first vector similarity;
[0159] Step 810, for each standard search sentence, calculating the text similarity between a plurality of original words and words included in similar search sentences corresponding to the standard search sentence;
[0160] Step 812, obtaining a first text similarity according to the text similarity calculation;
[0161] Step 814: if the first text similarity exceeds the first text similarity threshold, obtaining a standard search statement corresponding to the first text similarity;
[0162] Step 816, perform deduplication processing on the standard search sentence corresponding to the first vector similarity and the standard search sentence corresponding to the first text similarity, use the standard search sentence obtained by the deduplication processing as the target search sentence, and output the target search sentence.
[0163] Among them, when obtaining the standard search statement from the database according to the original search statement in step 220, it can be determined by calculating the vector similarity between the original search statement and the words included in the standard search statement, or by calculating the text similarity between the original search statement and the words included in the standard search statement. It can also be determined by calculating the vector similarity and text similarity between the words included in the original search statement and the standard search statement at the same time, which is not limited in this application.
[0164] Specifically, when calculating the first similarity between the similar search statements corresponding to the standard search statements and the original search statements, for each group of similar search statements (similar search statements corresponding to the same standard search statement are divided into the same group of similar search statements), the vector similarity and text similarity between the group of similar search statements and the standard search statements can be calculated at the same time. Then, the standard search statements corresponding to the first vector similarity exceeding the first vector similarity threshold and the standard search statements corresponding to the first text similarity exceeding the first text similarity threshold are obtained at the same time. Finally, the standard search statements corresponding to the first vector similarity and the standard search statements corresponding to the first text similarity are deduplicated, and the standard search statements obtained by the deduplication process are used as target search statements, and the target search statements are output.
[0165] The process of calculating the vector similarity and text similarity between the group of similar search statements and the standard search statement is not described in detail here, and reference may be made to the specific steps in the aforementioned embodiment.
[0166] In the embodiment of the present application, when calculating the first similarity between the similar search statements corresponding to the standard search statements and the original search statements, the vector similarity and text similarity between the group of similar search statements and the standard search statements can be calculated for each group of similar search statements. Thus, the similarity between the similar search statements and the original search statements is judged from the perspective of word vectors and characters at the same time, and then the similarity between the standard search statements corresponding to the similar search statements is inferred. Finally, the target search statement is denoised by the similar search statements, thereby improving the accuracy of the target search statement finally obtained.
[0167] In one embodiment, Fig. 9 As shown, a search recommendation device 900 is provided, the device comprising:
[0168] The standard search statement acquisition module 920 is used to query the database for a standard search statement matching the original search statement according to the original search statement input by the user, and the database stores the index, the standard search statement, the similar search statement and the corresponding relationship between the standard search statement and the similar search statement;
[0169] A similar search statement acquisition module 940 is used to query similar search statements corresponding to the standard search statement from the database based on the standard search statement according to the index, the corresponding relationship between the standard search statement and the similar search statement;
[0170] The target search statement output module 960 is used to calculate the first similarity between the similar search statement corresponding to the standard search statement and the original search statement, determine the target search statement from the standard search statement based on the first similarity, and output the target search statement.
[0171] In one embodiment, Fig.10 As shown, a search recommendation device 900 is provided, which also includes: a database establishment module 980, which is used to obtain standard search statements, similar search statements and the correspondence between standard search statements and similar search statements from a historical search statement data set; segment the standard search statements to obtain multiple standard words, and establish an index based on the multiple standard words; establish a database according to the index, standard search statements, similar search statements and the correspondence between standard search statements and similar search statements.
[0172] In one embodiment, the standard search statement acquisition module 920 includes:
[0173] A word segmentation unit is used to perform word segmentation processing on the original search sentence input by the user to obtain multiple original words;
[0174] A second similarity calculation unit, used to calculate a second similarity between the plurality of original words and the standard search sentence stored in the database;
[0175] The standard search statement determining unit is configured to use the standard search statement corresponding to the second similarity as the standard search statement matching the original search statement if the second similarity exceeds a second similarity threshold.
[0176] In one embodiment, the second similarity calculation unit includes a second vector similarity calculation subunit, which is used to calculate the word vectors of multiple original words respectively; calculate the vector similarity between the word vectors of the multiple original words and the word vector of the standard search statement to obtain the second vector similarity.
[0177] In one embodiment, the database also stores word vectors of similar search statements corresponding to the standard search statement. The target search statement output module 960 includes:
[0178] A word vector matrix calculation unit, used to obtain a first word vector matrix according to the word vectors of the plurality of original words, and to obtain a second word vector matrix according to the word vectors of the similar search sentences corresponding to the standard search sentences;
[0179] A vector similarity calculation unit, used to calculate, for each standard search sentence, the vector similarity between the first word vector matrix and the second word vector matrix of a similar search sentence corresponding to the standard search sentence;
[0180] A first vector similarity calculation unit, configured to obtain a first vector similarity between the original search statement and the standard search statement according to the vector similarity calculation;
[0181] The target search statement determining unit is used to take the standard search statement corresponding to the first vector similarity as the target search statement if the first vector similarity exceeds the first vector similarity threshold, and output the target search statement.
[0182] In one embodiment, the database establishment module 980 is also used to segment the standard search statement to obtain multiple standard words; determine the key standard words from the multiple standard words; calculate the word vector of the key standard word, and establish a vector index based on the word vector of the key standard word.
[0183] In one embodiment, the second similarity calculation unit is further used to calculate the text similarity between the multiple original words and the words included in the standard search sentence; and obtain the second text similarity according to the text similarity calculation.
[0184] In one embodiment, the target search statement output module 960 includes:
[0185] A text similarity calculation unit, for calculating, for each standard search sentence, the text similarity between a plurality of original words and words included in similar search sentences corresponding to the standard search sentence;
[0186] A first text similarity calculation unit, configured to obtain a first text similarity according to the text similarity calculation;
[0187] The target search sentence determining unit is used to take the standard search sentence corresponding to the first text similarity as the target search sentence if the first text similarity exceeds the first text similarity threshold, and output the target search sentence.
[0188] In one embodiment, the second similarity calculation unit further includes a second text similarity calculation subunit, which is used to calculate the text similarity between the multiple original words and the words included in the standard search sentence; and obtain the second text similarity according to the text similarity calculation.
[0189] In one embodiment, the target search statement output module 960 includes:
[0190] A first vector similarity calculation unit is used to obtain a first word vector matrix based on word vectors of multiple original words, and obtain a second word vector matrix based on word vectors of similar search sentences corresponding to the standard search sentences; for each standard search sentence, calculate the vector similarity between the first word vector matrix and the second word vector matrix of the similar search sentence corresponding to the standard search sentence; and obtain the first vector similarity between the original search sentence and the standard search sentence based on the vector similarity calculation;
[0191] A judgment unit, configured to obtain a standard search statement corresponding to the first vector similarity if the first vector similarity exceeds a first vector similarity threshold;
[0192] A first text similarity calculation unit is used to calculate, for each standard search sentence, the text similarity between a plurality of original words and words included in a similar search sentence corresponding to the standard search sentence; and obtain a first text similarity according to the text similarity calculation;
[0193] The judgment unit is further configured to obtain a standard search statement corresponding to the first text similarity if the first text similarity exceeds a first text similarity threshold;
[0194] The deduplication unit is used to perform deduplication processing on the standard search sentence corresponding to the first vector similarity and the standard search sentence corresponding to the first text similarity, use the standard search sentence obtained by the deduplication processing as the target search sentence, and output the target search sentence.
[0195] The division of the various modules in the above search recommendation device is only for illustration. In other embodiments, the search recommendation device may be divided into different modules as needed to complete all or part of the functions of the above search recommendation device.
[0196] Fig.11 FIG. 1 is a schematic diagram of the internal structure of a server in an embodiment. Fig.11 As shown, the server includes a processor and a memory connected via a system bus. The processor is used to provide computing and control capabilities to support the operation of the entire server. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by the processor to implement a search recommendation method provided in each of the following embodiments. The internal memory provides a cached operating environment for the operating system computer program in the non-volatile storage medium. The server can be a mobile phone, a tablet computer, a personal digital assistant, a wearable device, etc.
[0197] The implementation of each module in the search recommendation device provided in the embodiment of the present application may be in the form of a computer program. The computer program may be run on a terminal or a server. The program modules constituted by the computer program may be stored in a memory of a terminal or a server. When the computer program is executed by a processor, the steps of the method described in the embodiment of the present application are implemented.
[0198] The embodiment of the present application further provides a computer-readable storage medium, one or more non-volatile computer-readable storage media containing computer-executable instructions, which, when executed by one or more processors, cause the processors to perform the steps of the search recommendation method.
[0199] A computer program product comprising instructions, when executed on a computer, causes the computer to perform a search recommendation method.
[0200] Any reference to memory, storage, database or other media used in the embodiments of the present application may include non-volatile and / or volatile memory. Suitable non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM), which is used as an external cache memory. As an illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM) and memory bus dynamic RAM (RDRAM).
[0201] The above 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 modifications 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 recommendation method, characterized in that: The method comprises: According to the original search statement input by the user, a standard search statement matching the original search statement is searched from a database, wherein the database stores indexes, standard search statements, similar search statements, and corresponding relationships between the standard search statements and the similar search statements; Based on the standard search statement, according to the index, the corresponding relationship between the standard search statement and the similar search statement, querying the database for a similar search statement corresponding to the standard search statement; A first similarity between a similar search statement corresponding to the standard search statement and the original search statement is calculated, a target search statement is determined from the standard search statement based on the first similarity, and the target search statement is output.
2. The method according to claim 1, characterized in that The method further comprises: Acquire standard search statements, similar search statements, and corresponding relationships between the standard search statements and the similar search statements from the historical search statement data set; Performing word segmentation on the standard search statement to obtain a plurality of standard words, and establishing an index based on the plurality of standard words; The database is established according to the index, the standard search statement, the similar search statement, and the corresponding relationship between the standard search statement and the similar search statement.
3. The method according to claim 2, characterized in that The step of searching a database for a standard search statement matching the original search statement according to the original search statement input by the user includes: Performing word segmentation processing on the original search sentence input by the user to obtain multiple original words; Calculating a second similarity between the plurality of original words and the standard search statements stored in the database; If the second similarity exceeds a second similarity threshold, the standard search statement corresponding to the second similarity exceeding the second similarity threshold is used as the standard search statement matching the original search statement.
4. The method according to claim 3, characterized in that The database also stores word vectors of the standard search sentences, and the calculating of the second similarity between the plurality of original words and the standard search sentences stored in the database includes: Calculate the word vectors of the multiple original words respectively; The second similarity is obtained by calculating the vector similarity between the word vectors of the multiple original words and the word vector of the standard search sentence.
5. The method according to claim 4, characterized in that The database also stores word vectors of the similar search statements corresponding to the standard search statement, and the calculating a first similarity between the similar search statement corresponding to the standard search statement and the original search statement, determining a target search statement from the standard search statement based on the first similarity, and outputting the target search statement includes: Obtain a first word vector matrix according to the word vectors of the plurality of original words, and obtain a second word vector matrix according to the word vectors of the similar search statements corresponding to the standard search statements; For each of the standard search sentences, calculating the vector similarity between the first word vector matrix and the second word vector matrix of the similar search sentence corresponding to the standard search sentence; Obtaining, according to the vector similarity calculation, a first vector similarity between the original search statement and a similar search statement corresponding to the standard search statement; If the first vector similarity exceeds a first vector similarity threshold, a standard search statement corresponding to the first vector similarity exceeding the first vector similarity threshold is used as a target search statement, and the target search statement is output.
6. The method according to claim 2, characterized in that The standard search statement is segmented to obtain a plurality of standard words, and an index is established based on the plurality of standard words, including: Segmenting the standard search statement to obtain a plurality of standard terms; determining a key standard term from the plurality of standard terms; The word vectors of the key standard words are calculated, and a vector index is established based on the word vectors of the key standard words.
7. The method according to claim 3, characterized in that The calculating the second similarity between the plurality of original words and the standard search statements stored in the database comprises: Calculating text similarity between the plurality of original words and the words included in the standard search sentence; The second similarity is calculated based on the text similarity.
8. The method according to claim 7, characterized in that The calculating a first similarity between a similar search statement corresponding to the standard search statement and the original search statement, determining a target search statement from the standard search statement based on the first similarity, and outputting the target search statement includes: For each of the standard search sentences, calculating text similarity between the plurality of original words and words included in the similar search sentences corresponding to the standard search sentences; Calculating a first text similarity based on the text similarity; If the first text similarity exceeds a first text similarity threshold, a standard search sentence corresponding to the first text similarity exceeding the first text similarity threshold is used as a target search sentence, and the target search sentence is output.
9. The method according to claim 7, characterized in that: The calculating a first similarity between a similar search statement corresponding to the standard search statement and the original search statement, determining a target search statement from the standard search statement based on the first similarity, and outputting the target search statement includes: Obtain a first word vector matrix according to the word vectors of the plurality of original words, and obtain a second word vector matrix according to the word vectors of the similar search statements corresponding to the standard search statements; For each of the standard search sentences, calculating the vector similarity between the first word vector matrix and the second word vector matrix of the similar search sentence corresponding to the standard search sentence; Obtaining, according to the vector similarity calculation, a first vector similarity between the original search statement and a similar search statement corresponding to the standard search statement; If the first vector similarity exceeds a first vector similarity threshold, obtaining a standard search statement corresponding to the first vector similarity exceeding the first vector similarity threshold; For each of the standard search sentences, calculating text similarity between the plurality of original words and words included in the similar search sentences corresponding to the standard search sentences; Calculating a first text similarity based on the text similarity; If the first text similarity exceeds a first text similarity threshold, obtaining a standard search statement corresponding to the first text similarity exceeding the first text similarity threshold; Deduplication processing is performed on standard search statements corresponding to the first vector similarity exceeding the first vector similarity threshold, and standard search statements corresponding to the first text similarity exceeding the first text similarity threshold, and the standard search statements obtained by deduplication processing are used as target search statements, and the target search statements are output.
10. A search recommendation device, characterized in that: The device comprises: A standard search statement acquisition module, used to query a database for a standard search statement matching the original search statement according to the original search statement input by the user, wherein the database stores indexes, standard search statements, similar search statements, and corresponding relationships between the standard search statements and the similar search statements; A similar search statement acquisition module, configured to query the database for similar search statements corresponding to the standard search statement based on the standard search statement according to the index, the corresponding relationship between the standard search statement and the similar search statement; The target search statement output module is used to calculate the first similarity between the similar search statement corresponding to the standard search statement and the original search statement, determine the target search statement from the standard search statement based on the first similarity, and output the target search statement.
11. A server comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the computer program is executed by the processor, the processor is caused to perform the steps of the search recommendation method according to any one of claims 1 to 9.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the search recommendation method according to any one of claims 1 to 9 are implemented.
