Query statement recommendation method and related device, equipment and storage medium

By replacing the target participle in the reference query statement with the participle type in the intelligent dialogue system, and clustering and matching based on the template query statement, the problems of low quality, high cost and time-consuming query statement recommendation in the prior art are solved, and efficient and economical query statement recommendations are achieved.

CN119066184BActive Publication Date: 2025-02-28IFLYTEK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411570789.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-06
Publication Date
2025-02-28
Estimated Expiration
2044-11-06

AI Technical Summary

Technical Problem

The existing query statement recommendation technology has problems such as low quality, high cost and long time, which is difficult to effectively improve the quality of recommendations while reducing costs and time-consuming.

Method used

By replacing the target participle in the reference query statement with the participle type, a template query statement is obtained, and clustered based on these template query statements to form a statement collection. Then, based on the word segmentation set in the statement set matching with the core entity words in the target query statement, an appropriate template query statement is selected as the recommended query statement.

Benefits of technology

This method can improve the quality of query statement recommendations, reduce computing power requirements, reduce costs and time-consuming, and provide more efficient query statement recommendation solutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The present application discloses a method for recommending query statements and related devices, equipment and storage media, wherein the method for recommending query statements includes: replacing the target participle in the reference query statement with the participle type to which it belongs, to obtain a template query statement; clustering based on each template query statement to obtain a number of statement sets; combining the target participles replaced by each template query statement in the same statement set to obtain a participle set of the corresponding statement set; matching the core entity words in the target query statement with the participle sets of each statement set to obtain a matching result of the corresponding statement set; wherein the target query statement is the query statement input into the intelligent dialogue system during this query; selecting at least one template query statement in the statement set selected by referring to the matching results of each statement set to obtain a recommended query statement. The above scheme can improve the quality of query statement recommendation and reduce the cost and time consumption of query statement recommendation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a query statement recommendation method and related devices, equipment and storage media. Background Art

[0002] Thanks to the rise of large language models, intelligent dialogue systems are increasingly being used in many areas such as acquiring knowledge, assisting office work, generating content, etc. Through the intelligent dialogue system, you only need to input relevant query statements into the intelligent dialogue system through natural language, and the intelligent dialogue system will give feedback on the query statements, greatly improving the efficiency of learning, work, production, etc.

[0003] At present, in order to help users obtain the desired information more quickly through intelligent dialogue systems and better meet the interaction needs of users, more and more functions related to recommended query statements have been provided in the prior art. However, the existing query statement recommendation technology has the defects of low quality, high cost and long time consumption. In view of this, how to improve the quality of query statement recommendation and reduce the cost and time consumption of query statement recommendation has become an urgent problem to be solved. Summary of the invention

[0004] The main technical problem solved by the present application is to provide a query statement recommendation method and related devices, equipment and storage media, which can improve the quality of query statement recommendation and reduce the cost and time consumption of query statement recommendation.

[0005] In order to solve the above technical problems, the first aspect of the present application provides a query statement recommendation method, including: replacing the target participle in the reference query statement with the participle type to which it belongs, to obtain a template query statement; clustering based on each template query statement to obtain a number of statement sets; combining the target participles replaced by each template query statement in the same statement set to obtain a participle set of the corresponding statement set; matching the core entity words in the target query statement with the participle sets of each statement set to obtain a matching result of the corresponding statement set; wherein the target query statement is the query statement input into the intelligent dialogue system during this query; and selecting at least one template query statement in the statement set selected with reference to the matching results of each statement set to obtain a recommended query statement.

[0006] In order to solve the above technical problems, the second aspect of the present application provides a query statement recommendation device, including: a word segmentation replacement module, a sentence clustering module, a word segmentation combination module, a word matching module and a sentence selection module, the word segmentation replacement module is used to replace the target word segmentation in the reference query statement with the corresponding word segmentation type to obtain a template query statement; the sentence clustering module is used to cluster based on each template query statement to obtain a number of sentence sets; the word segmentation combination module is used to combine the target word segmentations replaced by each template query statement in the same sentence set to obtain a word segmentation set of the corresponding sentence set; the word matching module is used to match the core entity words in the target query statement with the word segmentation sets of each sentence set to obtain a matching result of the corresponding sentence set; wherein the target query statement is the query statement input into the intelligent dialogue system during this query; the sentence selection module is used to select at least one template query statement in the sentence set selected with reference to the matching results of each sentence set to obtain a recommended query statement.

[0007] In order to solve the above technical problems, the third aspect of the present application provides an electronic device, which at least includes a memory and a processor coupled to each other, the memory at least stores program instructions, and the processor is used to execute the program instructions to implement the query statement recommendation method in the above first aspect.

[0008] In order to solve the above technical problem, the fourth aspect of the present application provides a computer-readable storage medium storing program instructions that can be executed by a processor, and the program instructions are used to implement the query statement recommendation method of the first aspect.

[0009] In the above scheme, the target word in the reference query is replaced with the word type to which it belongs, to obtain a template query, and then clustering is performed based on each template query to obtain a number of sentence sets, and then the word set of the corresponding sentence set is obtained based on the target word replaced by each template query in the same sentence set, and the word set of each sentence set is matched based on the core entity words in the target query to obtain the matching result of the corresponding sentence set, and the target query is the query input to the intelligent dialogue system during this query, and then at least one template query is selected in the sentence set selected by referring to the matching results of each sentence set to obtain a recommended query. Therefore, on the one hand, since the recommended query is obtained through a series of operations such as template extraction, template clustering, and word matching in combination with the core entity words in the target query based on the reference query, it can closely recommend query statements around the target query, which helps to improve the quality of query recommendation. On the other hand, compared with directly generating recommended query statements by using network models such as large language models, the recommended query obtained by the above series of operations can greatly reduce the computing power requirements for query recommendation, which helps to reduce the cost and time consumption of query recommendation. Therefore, the quality of query statement recommendation can be improved, and the cost and time consumption of query statement recommendation can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 This is a flowchart of an embodiment of a method for recommending query statements of the present application;

[0011] Figure 2a This is a process diagram of an embodiment of a query statement recommendation method of the present application;

[0012] Figure 2b It is a process diagram of another embodiment of the query statement recommendation method of the present application;

[0013] Figure 3 It is a schematic diagram of the framework of an embodiment of a query statement recommendation device of the present application;

[0014] Figure 4 It is a schematic diagram of the framework of an embodiment of the electronic device of the present application;

[0015] Figure 5 It is a schematic diagram of a framework of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0016] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.

[0017] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.

[0018] The terms "system" and "network" are often used interchangeably in this article. The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the fragment " / " in this article generally indicates that the associated objects before and after are in an "or" relationship. In addition, "many" in this article means two or more than two.

[0019] See also Figure 1 , Figure 1 This is a flowchart of an embodiment of the query statement recommendation method of the present application. Specifically, it may include the following steps:

[0020] Step S11: Replace the target word in the reference query statement with the word type to which it belongs, to obtain a template query statement.

[0021] In the disclosed embodiment, the source of the reference query statement may include at least one of the following: a first query statement in a historical query, and a second query statement generated by a large language model based on a query statement in a real query. That is, the reference query statement may only come from the first query statement, or the reference query statement may only come from the second query statement, or the reference query statement may also come from the first query statement and the second query statement, which is not limited here.

[0022] In one implementation scenario, as a possible example, when the reference query statement originates from the first query statement during the historical query, the first query statement input into the intelligent dialogue system during the historical query can be obtained and directly used as the reference query statement. It should be noted that the "intelligent dialogue system" in the disclosed embodiment may include but is not limited to: a large language model, a traditional neural network, an intelligent agent constructed based on technologies such as a large language model and a traditional neural network model, etc., and the specific type of the intelligent dialogue system is not limited here. In addition, the intelligent dialogue system can receive the query statement input by the user, and use its own knowledge obtained through training or further combine with an external knowledge base to provide feedback and reply to the query statement. The specific implementation principle of the intelligent dialogue system can refer to technical details such as the large language model, which will not be repeated here.

[0023] In another implementation scenario, as another possible example, when the reference query statement is derived from the first query statement in the historical query, the sentence quality of the first query statement can be obtained based on the evaluation results collected from the system feedback statement of the first query statement, and the system feedback statement is the feedback statement obtained after the first query statement is input into the intelligent dialogue system, and then based on the sentence quality of each first query statement, the first query statement is selected as the reference query statement. In the above method, the sentence quality of the first query statement is obtained by collecting the evaluation results from the system feedback statement of the first query statement, and the first query statement is selected as the reference query statement accordingly, which can improve the quality of the reference query statement as much as possible.

[0024] In a specific implementation scenario, the evaluation result of the system feedback statement can be obtained through the user's evaluation behavior such as scoring, liking, and disliking the system feedback statement after entering the first query statement during the historical query. For example, if the user's scoring of the system feedback statement is detected, the score can be directly recorded as the score of the first query statement; if the user's like of the system feedback statement is detected, the like can be converted into a score for the first query statement; if the user's dislike of the system feedback statement is detected, the dislike can be converted into a score for the first query statement (lower than the score converted by the aforementioned like). On this basis, for each first query statement, at least one score can be obtained. If N users have used the same first query statement in historical queries, the first query statement can collect N scores, and then the N scores can be combined (such as summing, averaging, weighting, etc.) to obtain the sentence quality of the first query statement.

[0025] In a specific implementation scenario, after obtaining the statement quality of each first query statement, the first query statements can be sorted in order of statement quality from high to low, and the first query statements in the front preset order (such as the top 10, top 20, etc., or the top 10%, top 20%, etc.) are selected as reference query statements.

[0026] In a specific implementation scenario, before obtaining the sentence quality of the first query sentence, the first query sentence may be screened according to the sentence length. For example, the first query sentence with a sentence length within a preset range (e.g., 20 to 200 words, etc.) may be retained to eliminate first query sentences that are too short or too long. On this basis, the sentence quality of the first query sentence is obtained based on the evaluation results collected from the system feedback sentence of the first query sentence.

[0027] In an implementation scenario, when the reference query statement is derived from the second query statement generated by the large language model based on the query statement during the real query, the second query statement can be directly used as the reference query statement. Exemplarily, the query statement during the real query can be recorded as "Statement A", and a prompt instruction can be constructed based on this, such as "Please refer to 'Statement A' to generate a statement with the same meaning but different expression, and the length is required to be between 20 and 200 words", etc. The specific content of the prompt instruction is not limited here. In other words, the prompt instruction is at least used to instruct the large language model to generate a query statement with the same meaning but different expression with reference to the query statement during the real query. On this basis, the prompt instruction can be input into the large language model to obtain the output statement of the large language model as the second query statement.

[0028] In an implementation scenario, after obtaining a reference query statement, the reference query statement can be first segmented to obtain each segmentation in the reference query statement, and then each segmentation can be identified using named entity recognition technology to obtain the segmentation part of speech of each segmentation and its segmentation type. It should be noted that the segmentation part of speech may include but is not limited to: noun, adjective, auxiliary word, verb, modal particle, etc. Taking the segmentation part of speech "noun" as an example, its segmentation type may include but is not limited to: city, scenic spot, person, food, transportation, electronic product, etc. On this basis, the segmentation with the segmentation part of speech of "noun" can be used as the target segmentation. In other words, the noun segmentation in the reference query statement can be replaced with the segmentation type to which the noun segmentation belongs. For example, take the reference query sentence "What are the characteristics of XX Park" as an example, where the part of speech of the participle "XX Park" is a noun and its participle type is "attraction", so "XX Park" can be used as the target participle and replaced with "attraction", and the template query sentence "What are the characteristics of [attraction]" can be obtained; or, take the reference query sentence "What are the climatic conditions in XX City" as an example, where the part of speech of the participle "XX City" is a noun and its participle type is "city", so "XX City" can be used as the target participle and replaced with "city", and the template query sentence "What are the climatic conditions in [city]" can be obtained. Of course, the above examples are only a few possible examples in the actual application process, and the specific content of the template query sentence is not limited thereto. In addition, for other reference query sentences, corresponding template query sentences can also be obtained by reference, and examples will not be given one by one here.

[0029] Step S12: clustering based on each template query statement to obtain several statement sets.

[0030] Specifically, after obtaining each template query statement, the semantic features of the template query statement can be extracted, and then semantic clustering can be performed based on the semantic features of each template query statement to obtain several statement sets. It should be noted that the specific process of semantic clustering can refer to the technical details of clustering algorithms such as K-Means and hierarchical clustering, and the clustering process will not be described in detail here. In addition, each statement set can contain at least one template query statement.

[0031] Step S13: Based on the target word segments replaced by the template query sentences in the same sentence set, a word segment set corresponding to the sentence set is obtained by combining.

[0032] In an implementation scenario, for each statement set, the template query statement in the statement set as the cluster center can be obtained, and a "statement set-template query statement" relationship mapping table is formed accordingly for subsequent use. For details, please refer to the subsequent related description, which will not be repeated here.

[0033] In an implementation scenario, for each statement set, the target participles replaced by each template query statement in the statement set can be obtained, and these target participles are combined to obtain the participle set of the statement set. For example, in a certain statement set, there is a template query statement whose target participle replaced is "XX City", there is a template query statement whose target participle replaced is "XX Park", another template query statement whose target participle replaced is "XX Resort", and there is another template query statement whose target participle replaced is "XX Mountain", then "XX City", "XX Park", "XX Resort" and "XX Mountain" can be combined as the participle set of the statement set. Of course, the above example is only a possible example in the actual application process, and does not limit the specific content of the participle set. The participle set will not be given examples one by one here.

[0034] In an implementation scenario, for each statement set, as described above, the target word segmentation replaced by each template query statement can also be obtained, so as to form a "statement set-target word segmentation" relationship mapping table for subsequent use. For details, please refer to the subsequent related description, which will not be repeated here.

[0035] Step S14: Matching the core entity words in the target query sentence with the word segmentation sets of each sentence set to obtain matching results of the corresponding sentence set.

[0036] In the disclosed embodiment, the target query sentence is the query sentence input into the intelligent dialogue system during this query. For example, the query sentence input into the intelligent dialogue system during this query may include but is not limited to: "Is XX Mountain in XX City suitable for visiting in spring?", etc., and the specific content of the target query sentence is not limited here.

[0037] In an implementation scenario, core entity words represent key words with a core position in the target query. In other words, if core entity words are missing, the target query will not be able to accurately express the key information that is expected to be obtained. For example, in the above target query "Is XX Mountain in XX City suitable for spring?", the core entity word is "XX Mountain in XX City". As a possible example, the core entity word and the target participle can have the same part of speech.

[0038] In an implementation scenario, as a possible example, the core entity words can be used to perform character matching in the word segmentation sets of each sentence set, and the matching result of the corresponding sentence set can be determined based on whether the character matching is successful. Exemplarily, as a possible character matching method, if the word segmentation set of any sentence set contains the same target word segmentation as the core entity word, the matching result of the sentence set can be determined to be a successful match. On the contrary, if the word segmentation set of any sentence set does not contain the same target word segmentation as the core entity word, the matching result of the sentence set can be determined to be a failed match. Alternatively, as another possible character matching method, if the word segmentation set of any sentence set contains the same target word segmentation as the core entity word for more than a preset continuous ratio (e.g., more than 50%, more than 80%, etc.), the matching result of the sentence set can be determined to be a successful match. On the contrary, if the word segmentation set of any sentence set does not contain the same target word segmentation as the core entity word for more than a preset continuous ratio, the matching result of the sentence set can be determined to be a failed match. In this case, taking the target query sentence "Is XX Mountain in XX City suitable for spring?" as an example, its core entity word "XX Mountain in XX City" and the word segmentation set of a certain sentence set ("XX City", "XX Park", "XX Resort", "XX Mountain") have more than 50% of the same characters in the target word segmentation "XX City" and "XX Mountain", so it can be determined that the matching result of the sentence set is a successful match. Of course, the above example is only a possible example of character matching in actual application, and other possible situations will not be given one by one here.

[0039] In another implementation scenario, as another possible example, the core entity words can be used to perform semantic matching in the word sets of each sentence set, and the matching result of the corresponding sentence set is determined based on whether the semantic matching is successful. Exemplarily, if the semantic similarity between the target word and the core entity word is higher than a preset threshold value in the word set of any sentence set, it can be determined that the matching result of the sentence set includes a successful match, and conversely, if the semantic similarity between the target word and the core entity word is higher than the preset threshold value in the word set of any sentence set, it can be determined that the matching result of the sentence set includes a failed match.

[0040] In another implementation scenario, as another possible example, the aforementioned character matching can also be performed first. When the character matching between the core entity word and the segmentation set of each sentence set fails, the semantic matching between the core entity word and the segmentation set of each sentence set can be performed. Specifically, it can be queried separately whether there is a target segmentation that matches (i.e. is exactly the same as) the original word of the core entity word in the segmentation set of each sentence set. On this basis, in response to the presence of the same target segmentation as the core entity word in the segmentation set of at least one sentence set, the matching result of the corresponding sentence set can be directly determined to be a successful match, and the matching results of the remaining sentence sets can be determined to be a failed match. In response to the absence of the same target segmentation as the core entity word in the segmentation set of each sentence set, a semantic match can be performed based on the core entity word and the target segmentation in the segmentation set of each sentence set to obtain the matching result of the corresponding sentence set. In the above method, original word matching is performed first, and then the matching result is directly determined when the segmentation set of at least one sentence set matches the original word of the core entity word successfully. In the case that the segmentation set of each sentence set matches the original word of the core entity word fails, semantic matching is performed to obtain the matching result accordingly. Therefore, the original word matching is followed by semantic matching, and the domain consistency of the sentence pattern is ensured as much as possible, which helps to provide the highest quality recommended query sentences.

[0041] In a specific implementation scenario, please refer to Figure 2a , Figure 2a 1 is a process diagram of an embodiment of the query statement recommendation method of the present application. Figure 2a As shown, after the reference query statement is replaced by the target word segmentation, a template query statement can be obtained, and then the template query statement is subjected to operations such as semantic extraction and semantic clustering to obtain several statement sets, such as statement set 1, statement set 2, ..., statement set N. Based on this, a relationship mapping table of "statement set-template query statement" and a relationship mapping table of "statement set-target word segmentation" can be formed. At the same time, the target query statement can extract its core entity words, and through the relationship mapping table of "statement set-target segmentation", the core entity words can be matched with the segmentation sets of each statement set (that is, the target segmentations belonging to the same statement set in the relationship mapping table) (such as the original word matching first and then the semantic matching mentioned above). If, during the original word matching process, only the target segmentation set of sentence set 2 exists in the segmentation set of sentence set 2, the matching result of sentence set 2 can be determined as a successful match, and the matching results of the remaining statement sets (statement set 1, statement set 3, ..., statement set N) are all failed matches; conversely, if during the original word matching process, there is no target segmentation set that is the same as the core entity word in the segmentation set of sentence set 1, sentence set 2, ..., sentence set N, then the semantic matching can continue.

[0042] In a specific implementation scenario, during the semantic matching process, in response to the presence of a target segmentation with a semantic similarity higher than a similarity threshold between the core entity word and the word segmentation set of the statement set, the matching result of the statement set can be determined as a successful match. Conversely, in response to the absence of a target segmentation with a semantic similarity higher than a similarity threshold between the core entity word and the word segmentation set of the statement set, the matching result of the statement set is determined as a failed match. It should be noted that the similarity threshold can be set according to actual application needs. For example, in the case where the quality requirements for the recommendation of the query statement are high, the similarity threshold can be set appropriately larger, and in the case where the quality requirements for the recommendation of the query statement are relatively loose, the similarity threshold can be set slightly smaller. The specific numerical value of the similarity threshold is not limited here. The above method determines the matching result of the statement set by comparing the size relationship between the semantic similarity and the similarity threshold, which can simplify the complexity of the semantic matching as much as possible.

[0043] Step S15: Select at least one template query statement from the statement set selected by referring to the matching results of each statement set to obtain a recommended query statement.

[0044] In an implementation scenario, please continue to refer to Figure 2a After obtaining the matching results of each statement set, it can be determined whether to select the statement set as the target set based on whether the matching results of the statement set are successful, and select the template query statement in the target set as the candidate query statement, and then replace the word segmentation type in the candidate query statement with the core entity word to obtain the recommended query statement. In the above method, the target set is first selected based on the matching results of the statement set, and then the candidate query statement is selected in the target set, so as to replace the word segmentation type in the candidate query statement with the core entity word to obtain the recommended query statement, and the recommended query statement can be obtained as relevant as possible to the target query statement.

[0045] In a specific implementation scenario, after obtaining the matching result of the statement set, in response to the matching result of the statement set being a successful match, the statement set may be selected as the target set, whereas in response to the matching result of the statement set being a failed match, the statement set may not be selected as the target set. Still taking the aforementioned statement set 1, statement set 2, ..., statement set N as an example, statement set 2 may be selected as the target set. Of course, in other cases, this can be deduced by analogy, and examples are not given one by one here.

[0046] In a specific implementation scenario, please continue to refer to Figure 2a, after selecting the target set, the candidate query statement can be selected in combination with the relationship mapping table of "statement set-template query statement". As mentioned above, the statement set and the template query statement as the cluster center of the statement set can be associated to form a relationship mapping table of "statement set-template query statement". Therefore, after determining the target set, the template query statement as the cluster center in the target set can be selected as the candidate query statement. Exemplarily, still taking the aforementioned target query statement "Is XX Mountain in XX City suitable for spring?" as an example, after the above process steps, the candidate query statement "What are the characteristics of [attractions]" can be selected, and the segmentation type (i.e. [attractions]) can be further replaced with the core entity word "XX Mountain in XX City" to obtain the recommended query statement "What are the characteristics of XX Mountain in XX City". Of course, the above example is only a possible example in the actual application process, and does not limit other possible situations. Examples are not given one by one here.

[0047] In another implementation scenario, as described above, after obtaining the matching results of each statement set, a statement set with successful matching results can be selected as the target set. As another possible example, different from the aforementioned implementation, for each template query statement in the target set, the local density of the template query statement can be obtained based on the semantic distance between the template query statement and other template query statements in the target set. Based on this, the template query statements in the target set can be sorted in order from high to low local density, and several ranked template query statements can be selected from the sorted template query statements as candidate query statements. It should be noted that the several ranks can be specifically set according to the actual application needs. For example, in the case of high requirements for the diversity of recommended query statements, the intervals between adjacent ranks in the several ranks can be larger (for example, taking the target set containing 100 template query statements as an example, the several ranks can be the 1st, 30th, 59th, 98th, etc.); or, in the case of high requirements for the relevance of recommended query statements, the several ranks can all be located before the preset rank (for example, taking the target set containing 100 template query statements as an example, the several ranks can all be located before the 4th). Of course, the above examples are only several possible examples of the several ranks, and the specific settings of the several ranks are not limited here.

[0048] In another implementation scenario, as another possible example, after selecting at least one template query statement to obtain a recommended query statement within the statement set selected by referring to the matching results of each statement set, the semantic similarity between the target query statement and each recommended query statement can also be obtained, and based on the semantic similarity of each recommended query statement, the recommended query statement can be selected as the recommended query statement recalled by the template query statement. Exemplarily, the recommended query statements with a semantic similarity higher than a preset threshold can be screened as the recommended query statements recalled by the template query statement. In the above method, after the recommended query statements are initially recalled by the template query statement, the semantic similarity between the target query statement and each recommended query statement is further measured to finally recall the recommended query statement based on this, which can maximize the correlation between the finally recalled recommended query statement and the target query statement.

[0049] In another implementation scenario, as another possible example, different from the aforementioned implementation, the reference query statements can be recalled through several recall methods based on the target query statement to obtain the recommended query statements recalled by various recall methods, and the recommended query statements recalled by the template query statement and the recommended query statements recalled by various recall methods are combined to obtain a recommendation set, and then the quality of each recommended query statement in the recommendation set is sorted to select at least some of the recommended query statements in the recommendation set as the target recommended statement. It should be noted that please refer to Figure 2b , Figure 2b FIG. 1 is a process diagram of another embodiment of a query statement recommendation method. Figure 2b As shown, the multiple recall methods may include but are not limited to: keyword recall, semantic recall, etc., and the specific types of the multiple recall methods are not limited here. The above method can improve the richness of the recommended query statements by combining multiple recall methods to recall the recommended query statements.

[0050] In a specific implementation scenario, when the multiple recall methods include keyword recall, a keyword set in the target query statement can be extracted, and reference query statements (such as Figure 2bAs shown, the reference query statement may be derived from the first query statement, the second query statement, etc.) as the recommended query statement recalled by keyword recall. It should be noted that, as a possible example, when the reference query statement contains all the keywords in the keyword set, it can be considered that the reference query statement hits the keyword set; or, as another possible example, when the reference query statement contains some keywords in the keyword set (e.g., hitting more than 1 / 2 keywords, more than 2 / 3 keywords, hitting more than 1 / 3 keywords, etc.), it can be considered that the reference query statement hits the keyword set. The specific requirements for the reference query statement to hit the keyword set are not limited here. Still taking the target query sentence "Is XX Mountain in XX City suitable for visiting in spring?" as an example, the keyword set may include the two keywords "XX City" and "XX Mountain". According to the first hit requirement mentioned above, assuming that there is a reference query sentence "XX City XX Mountain Mountain Climbing Guide", since the reference query sentence contains all the keywords in the keyword set, it can be considered that the reference query sentence hits the keyword set, and thus the reference query sentence can be recalled as a recommended query sentence; or, according to the second hit requirement mentioned above, in addition to the above reference query sentence "XX City XX Mountain Mountain Climbing Guide", the reference query sentence "What are the climate conditions in XX City" that hits 1 / 2 of the keywords can also be recalled as a recommended query sentence. Of course, the above examples are only a few possible examples in actual application, and other possible situations are not limited thereto, so they will not be given one by one here. In addition, if Figure 2b As shown, the reference query statements can be saved in ES (ElasticSearch), so the reference query statements that hit the keyword set can be retrieved and recalled through ES. In the above method, when several recall methods include keyword recall, the keyword set in the target query statement is extracted, and the reference query statements that hit the keyword set are recalled as recommended query statements recalled by keyword recall, so it is possible to recall from the keyword dimension.

[0051] In a specific implementation scenario, when several recall methods include semantic recall, the semantic similarity between the target query statement and each reference query statement can be obtained. As a possible example, the embedding representation of the target query statement and the embedding representation of the reference query statement can be obtained first, and then the embedding representation of the target query statement can be semantically extracted through a semantic extraction model such as BERT to obtain the semantic features of the target query statement, and the embedding representation of the reference query statement can be semantically extracted through the aforementioned semantic extraction model to obtain the semantic features of the reference query statement. Figure 2bAs shown, the above semantic features can be stored in a vector database such as milvus. On this basis, the semantic similarity between the target query and the reference query can be measured (such as cosine similarity, Euclidean distance, etc.). After obtaining the semantic similarity, the reference query can be selected as the recommended query recalled by semantic recall based on the semantic similarity of each reference query. As a possible example, the reference query can be sorted in order from high to low in terms of semantic similarity, and the reference query before the preset order (such as the top 3, top 5, top 7, etc.) can be selected and recalled as the recommended query. In the above method, when several recall methods include semantic recall, the semantic similarity between the target query and each reference query is obtained, and based on the semantic similarity of each reference query, the reference query is selected as the recommended query recalled by semantic recall, which can be recalled from the semantic dimension.

[0052] In a specific implementation scenario, after obtaining the recommended query statements respectively recalled by the above-mentioned various dimensions (such as keyword dimension, semantic dimension, template query statement dimension, etc.), these recommended query statements can be combined into a recommendation set. As a possible example, the recommended query statements respectively recalled by various dimensions can also be deduplicated and then combined into a recommendation set, which is not limited here. After obtaining the recommendation set, the quality of each recommended query statement in the recommendation set can be sorted. As a possible example, the recommended query statements derived from the first query statement can be ranked as a whole after the recommended query statements derived from the second query statement. It should be noted that the specific meanings of the first query statement and the second query statement can refer to the aforementioned related descriptions, which will not be repeated here. On this basis, for the recommended query statements derived from the first query statement, the sentence quality of the first query statement can be obtained based on the evaluation results collected from the system feedback statement of the first query statement. It should be noted that the specific meaning of the system feedback statement and the specific process of obtaining the sentence quality can refer to the aforementioned related descriptions, which will not be repeated here. Then, the recommended query statements derived from the first query statement can be sorted based on the sentence quality of the first query statement from which each recommended query statement is derived. Exemplarily, the sorting can be performed in descending order of sentence quality. The above method first sorts the recommended query statements by their specific sources, and then sorts the recommended query statements derived from the first query statement by sentence quality, which helps to recommend the best possible query statement in combination with the target query statement.

[0053] In a specific implementation scenario, after ranking the quality of each recommended query statement in the recommendation set, at least some of the recommended query statements in the recommendation set can be selected as target recommended statements. For example, the recommended query statements that are located before a preset ranking (e.g., the top 3, top 5, etc.) can be selected as target recommended statements.

[0054] In an implementation scenario, as a possible example, after obtaining the target recommendation sentence, the target recommendation sentence can also be subjected to relevant post-processing operations, so as to be displayed to the user after the post-processing operations are performed. Exemplarily, sensitive words (such as those involving specific topics, uncivilized words, etc.) in the target recommendation sentence can be filtered; or, entity alignment can be performed on the target recommendation sentence based on the target query sentence (such as replacing the entity words in the target recommendation sentence with the core entity words in the target query sentence) to ensure that the target recommendation sentence and the target query sentence have the same subject; or, the target recommendation sentence can be subjected to length control, such as filtering target recommendation sentences whose sentence length is not within a preset range (such as 20 to 200 words) to ensure that the target recommendation sentence has a better display effect when displayed on the front end of the intelligent dialogue system. Of course, the above examples are only several possible examples in the actual application process. In the actual application process, only one of them may be executed, or more of them may be executed, or other possible post-processing operations may be executed, which are not limited here, and examples are not given one by one.

[0055] In the above scheme, the target word in the reference query is replaced with the word type to which it belongs, to obtain a template query, and then clustering is performed based on each template query to obtain a number of sentence sets, and then the word set of the corresponding sentence set is obtained based on the target word replaced by each template query in the same sentence set, and the word set of each sentence set is matched based on the core entity words in the target query to obtain the matching result of the corresponding sentence set, and the target query is the query input to the intelligent dialogue system during this query, and then at least one template query is selected in the sentence set selected by referring to the matching results of each sentence set to obtain a recommended query. Therefore, on the one hand, since the recommended query is obtained through a series of operations such as template extraction, template clustering, and word matching in combination with the core entity words in the target query based on the reference query, it can closely recommend query statements around the target query, which helps to improve the quality of query recommendation. On the other hand, compared with directly generating recommended query statements by using network models such as large language models, the recommended query obtained by the above series of operations can greatly reduce the computing power requirements for query recommendation, which helps to reduce the cost and time consumption of query recommendation. Therefore, the quality of query statement recommendation can be improved, and the cost and time consumption of query statement recommendation can be reduced.

[0056] See also Figure 3 , Figure 3 It is a schematic diagram of the framework of an embodiment of the query statement recommendation device of the present application. The query statement recommendation device 30 includes: a word segmentation replacement module 31, a sentence clustering module 32, a word segmentation combination module 33, a word matching module 34 and a sentence selection module 35. The word segmentation replacement module 31 is used to replace the target word segmentation in the reference query statement with the corresponding word segmentation type to obtain a template query statement; the sentence clustering module 32 is used to cluster based on each template query statement to obtain a number of sentence sets; the word segmentation combination module 33 is used to combine the target word segmentation replaced by each template query statement in the same sentence set to obtain a word segmentation set of the corresponding sentence set; the word matching module 34 is used to match the core entity words in the target query statement with the word segmentation set of each sentence set to obtain the matching result of the corresponding sentence set; wherein the target query statement is the query statement input into the intelligent dialogue system during this query; the sentence selection module 35 is used to select at least one template query statement in the sentence set selected by referring to the matching results of each sentence set to obtain a recommended query statement.

[0057] In the above scheme, the query sentence recommendation device 30 replaces the target segmentation in the reference query sentence with the segmentation type to which it belongs, obtains a template query sentence, and then clusters based on each template query sentence to obtain a plurality of sentence sets, and then combines the target segmentations replaced by each template query sentence in the same sentence set to obtain a segmentation set of the corresponding sentence set, and matches the core entity words in the target query sentence with the segmentation sets of each sentence set to obtain a matching result of the corresponding sentence set, and the target query sentence is the query sentence input into the intelligent dialogue system during this query, and then the sentence set selected by referring to the matching results of each sentence set In the example, at least one template query statement is selected to obtain a recommended query statement. Therefore, on the one hand, since the recommended query statement is obtained through a series of operations such as template extraction, template clustering, and word matching based on the reference query statement, it can closely recommend query statements around the target query statement, which helps to improve the quality of query statement recommendation. On the other hand, compared with directly generating recommended query statements using network models such as large language models, obtaining recommended query statements through the above series of operations can greatly reduce the computing power requirements for query statement recommendation, which helps to reduce the cost and time consumption of query statement recommendation. Therefore, the quality of query statement recommendation can be improved and the cost and time consumption of query statement recommendation can be reduced.

[0058] In some disclosed embodiments, the word matching module 34 includes a word segmentation query submodule, which is used to query whether there are target word segmentations matching the original words of the core entity words in the word segmentation sets of each sentence set respectively; the word matching module 34 includes a first determination submodule, which is used to directly determine that the matching result of the corresponding sentence set is a successful match in response to the existence of target word segmentations identical to the core entity words in the word segmentation sets of at least one sentence set, and determine that the matching results of the remaining sentence sets are failed matches; the word matching module 34 includes a second matching submodule, which is used to perform semantic matching based on the core entity words and the target word segmentations in the word segmentation sets of each sentence set in response to the absence of target word segmentations identical to the core entity words in the word segmentation sets of each sentence set, to obtain the matching result of the corresponding sentence set.

[0059] In some disclosed embodiments, the second matching submodule includes a first response unit for determining that the matching result of the statement set is a successful match in response to the presence of a target segmentation in the segmentation set of the statement set whose semantic similarity with the core entity word is higher than a similarity threshold; the second matching submodule includes a second response unit for determining that the matching result of the statement set is a failed match in response to the absence of a target segmentation in the segmentation set of the statement set whose semantic similarity with the core entity word is higher than a similarity threshold.

[0060] In some disclosed embodiments, the statement selection module 35 includes a set selection submodule, which is used to determine whether to select a statement set as a target set based on whether the matching result of the statement set is a successful match; the statement selection module 35 includes a template selection submodule, which is used to select a template query statement in the target set as a candidate query statement; the statement selection module 35 includes an entity replacement submodule, which is used to replace the segmentation type in the candidate query statement with a core entity word to obtain a recommended query statement.

[0061] In some disclosed embodiments, the set selection submodule is specifically configured to select a statement set as a target set in response to a successful match result of the statement set.

[0062] In some disclosed embodiments, the template selection submodule is specifically used to select a template query statement that serves as a cluster center in the target set as a candidate query statement.

[0063] In some disclosed embodiments, the query statement recommendation device 30 includes a similarity measurement module for obtaining the semantic similarity between the target query statement and each recommended query statement; the query statement recommendation device 30 includes a recommendation selection module for selecting a recommended query statement as a recommended query statement recalled by the template query statement based on the semantic similarity of each recommended query statement.

[0064] In some disclosed embodiments, the query statement recommendation device 30 includes a statement recall module, which is used to recall reference query statements based on target query statements through several recall methods to obtain recommended query statements recalled by various recall methods; the query statement recommendation device 30 includes a statement combination module, which is used to combine recommended query statements recalled by template query statements and recommended query statements recalled by various recall methods to obtain a recommendation set; the query statement recommendation device 30 includes a quality sorting module, which is used to perform quality sorting based on each recommended query statement in the recommendation set; the query statement recommendation device 30 includes a target selection module, which is used to select at least some of the recommended query statements in the recommendation set as target recommended statements.

[0065] In some disclosed embodiments, the statement recall module includes a keyword recall submodule, which is used to extract a keyword set in the target query statement when several recall methods include keyword recall, and recall reference query statements that hit the keyword set as recommended query statements recalled by keyword recall.

[0066] In some disclosed embodiments, the sentence recall module includes a semantic recall submodule, which is used to obtain the semantic similarity between the target query statement and each reference query statement when several recall methods include semantic recall, and select the reference query statement as the recommended query statement recalled by semantic recall based on the semantic similarity of each reference query statement.

[0067] In some disclosed embodiments, the quality ranking module includes a first ranking submodule, which is used to rank the recommended query statements derived from the first query statement as a whole after the recommended query statements derived from the second query statement; wherein the first query statement is a query statement during historical query, and the second query statement is a query statement generated by a large language model based on a query statement during real query; the quality ranking module includes a second ranking submodule, which is used to obtain the sentence quality of the first query statement for the recommended query statements derived from the first query statement based on the evaluation results collected from the system feedback statements of the first query statement, and to rank each recommended query statement derived from the first query statement based on the sentence quality of the first query statement from which each recommended query statement is derived; wherein the system feedback statement is a feedback statement obtained after the first query statement is input into the intelligent dialogue system.

[0068] In some disclosed embodiments, the source of the reference query statement includes at least one of the following: a first query statement in a historical query, and a second query statement generated by a large language model based on a query statement in a real query.

[0069] In some disclosed embodiments, the query statement recommendation device 30 includes a sentence quality acquisition module, which is used to obtain the sentence quality of the first query statement based on the evaluation results collected from the system feedback statement of the first query statement when the reference query statement comes from the first query statement in the historical query; wherein the system feedback statement is the feedback statement obtained after the first query statement is input into the intelligent dialogue system; the query statement recommendation device 30 includes a reference selection module, which is used to select the first query statement as the reference query statement based on the sentence quality of each first query statement.

[0070] See also Figure 4 , Figure 4 It is a schematic diagram of the framework of an embodiment of an electronic device of the present application. The electronic device 40 includes at least a memory 41 and a processor 42 coupled to each other, the memory 41 stores at least program instructions, and the processor 42 is used to execute the program instructions to implement the steps in any of the above-mentioned query statement recommendation method embodiments. For details, please refer to the aforementioned disclosed embodiments, which will not be repeated here. As a possible example, the electronic device 40 may include but is not limited to a server, a smart phone, a tablet computer, or a vehicle-mounted device such as a car computer, etc., and the specific type of the electronic device 40 is not limited here.

[0071] Specifically, the processor 42 is used to control itself and the memory 41 to implement the steps in any of the above-mentioned query statement recommendation method embodiments. The processor 42 can also be called a CPU (Central Processing Unit). The processor 42 may be an integrated circuit chip with signal processing capabilities. The processor 42 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 42 can be implemented by an integrated circuit chip.

[0072] In the above scheme, the electronic device 40 replaces the target segmentation in the reference query sentence with the segmentation type to which it belongs, obtains a template query sentence, and then clusters based on each template query sentence to obtain a number of sentence sets, and then combines the target segmentations replaced by each template query in the same sentence set to obtain a segmentation set of the corresponding sentence set, and matches the segmentation sets of each sentence set based on the core entity words in the target query sentence to obtain a matching result of the corresponding sentence set, and the target query sentence is the query sentence input into the intelligent dialogue system during this query, and then selects at least one template query sentence in the sentence set selected by referring to the matching results of each sentence set to obtain a recommended query sentence. Therefore, on the one hand, since the recommended query sentence is obtained through a series of operations such as template extraction, template clustering, and word matching in combination with the core entity words in the target query sentence based on the reference query sentence, it can closely recommend query sentences around the target query sentence, which helps to improve the quality of query sentence recommendation. On the other hand, compared with directly generating recommended query sentences by using network models such as large language models, the recommended query sentences obtained by the above series of operations can greatly reduce the computing power requirements for query sentence recommendation, which helps to reduce the cost and time consumption of query sentence recommendation. Therefore, the quality of query statement recommendation can be improved, and the cost and time consumption of query statement recommendation can be reduced.

[0073] See also Figure 5 , Figure 5 The schematic diagram is a schematic diagram of a computer-readable storage medium 50 of the present application. The computer-readable storage medium 50 stores program instructions 51 that can be executed by a processor, and the program instructions 51 are used to implement the steps in any of the above query statement recommendation method embodiments.

[0074] In the above scheme, the computer-readable storage medium 50 replaces the target word segmentation in the reference query sentence with the corresponding word segmentation type to obtain a template query sentence, and then clusters based on each template query sentence to obtain a plurality of sentence sets, and then combines the target word segmentation replaced by each template query in the same sentence set to obtain a word segmentation set of the corresponding sentence set, and matches the word segmentation set of each sentence set based on the core entity word in the target query sentence to obtain the matching result of the corresponding sentence set, and the target query sentence is the query sentence input into the intelligent dialogue system during this query, and then the sentence set selected by referring to the matching results of each sentence set In the example, at least one template query statement is selected to obtain a recommended query statement. Therefore, on the one hand, since the recommended query statement is obtained through a series of operations such as template extraction, template clustering, and word matching based on the reference query statement, it can closely recommend query statements around the target query statement, which helps to improve the quality of query statement recommendation. On the other hand, compared with directly generating recommended query statements using network models such as large language models, obtaining recommended query statements through the above series of operations can greatly reduce the computing power requirements for query statement recommendation, which helps to reduce the cost and time consumption of query statement recommendation. Therefore, the quality of query statement recommendation can be improved and the cost and time consumption of query statement recommendation can be reduced.

[0075] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0076] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.

[0077] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0078] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0079] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0080] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

[0081] If the technical solution of this application involves personal information, the product using the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using the technical solution of this application has obtained the individual's separate consent before processing the sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, clear and prominent signs are set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that he or she agrees to the collection of his or her personal information; or on the device that processes personal information, the personal information processing rules are notified by obvious signs / information, and the individual's authorization is obtained through pop-up information or by asking the individual to upload his or her personal information; among them, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.

Claims

1. A query statement recommendation method, characterized in that: include: The target word in the reference query statement is replaced with the word type to which it belongs, to obtain a template query statement; Clustering is performed based on each of the template query statements to obtain a plurality of statement sets; Based on the target participles replaced by the template query statements in the same statement set, a participle set corresponding to the statement set is obtained by combining; Based on matching the core entity words in the target query sentence with the word segmentation sets of each of the sentence sets, a matching result corresponding to the sentence set is obtained; wherein the target query sentence is the query sentence input into the intelligent dialogue system during this query; In the statement set selected by referring to the matching results of each of the statement sets, at least one of the template query statements is selected to obtain a recommended query statement.

2. The method according to claim 1, characterized in that The step of matching the core entity words in the target query sentence with the word segmentation sets of each sentence set to obtain a matching result corresponding to the sentence set includes: Querying the word sets of each of the sentence sets respectively to see whether there is a target word that matches the original word of the core entity word; In response to the presence of a target segmented word identical to the core entity word in the segmented word set of at least one of the sentence sets, directly determining the matching result of the corresponding sentence set as a successful match, and determining the matching results of the remaining sentence sets as a failed match; In response to the fact that there is no target participle identical to the core entity word in the participle sets of each of the sentence sets, semantic matching is performed based on the core entity word and the target participle in the participle sets of each of the sentence sets to obtain a matching result corresponding to the sentence set.

3. The method according to claim 2, characterized in that The semantic matching between the core entity words and the target segmented words in the segmented word sets of each of the sentence sets is performed to obtain a matching result corresponding to the sentence set, including: In response to the presence of a target segmentation in the segmentation set of the sentence set whose semantic similarity with the core entity word is higher than a similarity threshold, determining that a matching result of the sentence set is a successful match; In response to the fact that there is no target segmentation in the segmentation set of the sentence set whose semantic similarity with the core entity word is higher than a similarity threshold, it is determined that the matching result of the sentence set is a matching failure.

4. The method according to claim 1, characterized in that: The step of selecting at least one of the template query statements from the statement set selected by referring to the matching results of each of the statement sets to obtain a recommended query statement includes: Determining whether to select the statement set as a target set based on whether the matching result of the statement set is a successful match; Selecting the template query statement in the target set as a candidate query statement; The segmentation type in the candidate query statement is replaced with the core entity word to obtain the recommended query statement.

5. The method according to claim 4, characterized in that The determining whether to select the statement set as the target set based on whether the matching result of the statement set is a successful match includes: in response to the matching result of the statement set being a successful match, selecting the statement set as the target set; And / or, the selecting the template query statement in the target set as the candidate query statement includes: selecting the template query statement in the target set as the cluster center as the candidate query statement.

6. The method according to claim 1, characterized in that After selecting at least one of the template query statements from the statement set selected by referring to the matching results of each of the statement sets to obtain a recommended query statement, the method further includes: Obtaining semantic similarity between the target query statement and each of the recommended query statements; Based on the semantic similarity of each of the recommended query statements, the recommended query statement is selected as the recommended query statement recalled by the template query statement.

7. The method according to claim 1, characterized in that The method further comprises: Based on the target query statement, the reference query statement is respectively recalled by a plurality of recall methods to obtain recommended query statements recalled by the various recall methods; Combining the recommended query statements retrieved by the template query statement and the recommended query statements retrieved by the various retrieve methods to obtain a recommendation set; The recommended query statements in the recommendation set are sorted based on their quality, so as to select at least some of the recommended query statements in the recommendation set as target recommended statements.

8. The method according to claim 7, characterized in that In the case where the plurality of recall methods include keyword recall, the reference query statements are respectively recalled by the plurality of recall methods based on the target query statement to obtain recommended query statements recalled by various recall methods, including: Extracting a keyword set in the target query statement, and recalling reference query statements that hit the keyword set as recommended query statements recalled by the keyword recall; And / or, in the case where the plurality of recall methods include semantic recall, the reference query statement is recalled based on the target query statement by using a plurality of recall methods to obtain recommended query statements recalled by various recall methods, including: The semantic similarity between the target query statement and each of the reference query statements is obtained, and based on the semantic similarity of each of the reference query statements, the reference query statement is selected as a recommended query statement recalled by the semantic recall.

9. The method according to claim 7, characterized in that: The ranking of the quality of each of the recommended query statements in the recommendation set includes: The recommended query statements derived from the first query statement are arranged as a whole after the recommended query statements derived from the second query statement; wherein the first query statement is a query statement during a historical query, and the second query statement is a query statement generated by a large language model based on a query statement during a real query; For the recommended query statements derived from the first query statement, the sentence quality of the first query statement is obtained based on the evaluation results collected from the system feedback statements of the first query statement, and the recommended query statements derived from the first query statement are ranked based on the sentence quality of the first query statement from which each of the recommended query statements is derived; wherein the system feedback statement is the feedback statement obtained after the first query statement is input into the intelligent dialogue system.

10. The method according to claim 1, characterized in that The source of the reference query statement includes at least one of the following: a first query statement during a historical query, and a second query statement generated by a large language model based on a query statement during a real query.

11. The method according to claim 1 or 10, characterized in that: When the reference query statement is derived from the first query statement in the historical query, the step of obtaining the reference query statement at least includes: Based on the evaluation results collected from the system feedback statements of the first query statement, the statement quality of the first query statement is obtained; wherein the system feedback statement is a feedback statement obtained after the first query statement is input into the intelligent dialogue system; Based on the statement quality of each of the first query statements, the first query statement is selected as the reference query statement.

12. A query statement recommendation device, characterized in that: include: A word replacement module is used to replace the target word in the reference query statement with the corresponding word type to obtain a template query statement; A statement clustering module, used for clustering the query statements based on the templates to obtain a number of statement sets; A word segmentation combination module, used for combining target word segments replaced by each of the template query statements in the same statement set to obtain a word segmentation set corresponding to the statement set; A word matching module, used to match the core entity words in the target query sentence with the word segmentation set of each of the sentence sets to obtain a matching result corresponding to the sentence set; wherein the target query sentence is the query sentence input into the intelligent dialogue system during this query; The statement selection module is used to select at least one of the template query statements in the statement set selected by referring to the matching results of each of the statement sets to obtain a recommended query statement.

13. An electronic device, characterized in that: The system at least comprises a memory and a processor coupled to each other, wherein the memory at least stores program instructions, and the processor is used to execute the program instructions to implement the query statement recommendation method according to any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that: Program instructions that can be executed by a processor are stored, and the program instructions are used to implement the query statement recommendation method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Text input method and device

    CN109582768A

  • Statement response method and device based on artificial intelligence and electronic equipment

    CN110489538A