Guided question recommendation method about multiple rounds of dialogues

By building a question vector index library and topic question mapping table through large models and text clustering, combined with the BM2.5 model and vectorization technology, the problem of knowledge base maintenance in multi-round conversations is solved, and automated construction and efficient and accurate question recommendation are achieved.

CN120632052APending Publication Date: 2025-09-12GIANT MOBILE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510981250.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-16
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

In existing technologies, building and maintaining a knowledge base for multi-round conversations is time-consuming and costly, requires a lot of resources and manpower, and is difficult to automate.

Method used

Through large models and text clustering, we build a question vector index library and topic question mapping table, combine the BM2.5 model and vectorization technology to recommend questions and automatically build a knowledge base.

Benefits of technology

It realizes the automated construction of the knowledge base, saves costs, and improves the efficiency and accuracy of question recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120632052A_ABST
    Figure CN120632052A_ABST
Patent Text Reader

Abstract

The invention relates to a guide type question recommendation method about multiple rounds of dialogues, three models are used, namely, a topic classification model, a BM2.5 model and a vectorization model, the topic classification model is used for classifying questioning topics of a current user, and the BM2.5 model is used for roughly recalling candidate questions on the aspect of word granularity; and finally, the vectorization model carries out text vectorization on historical dialogues, current user questions and the like so as to filter and screen out the optimal recommendation questions. The knowledge base is automatically constructed through a large model and text clustering, the problem that maintenance is difficult in a traditional method is solved, and cost is saved. The topic classification model, the BM2.5 model and the vectorization model are adopted for question recommendation, computing resources are saved, and recommendation efficiency and recommendation accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of question recommendation, and in particular to a guided question recommendation method for multi-round dialogues. Background Art

[0002] In existing technologies, knowledge graphs or intent recognition are typically used to build a knowledge base to perform question recommendations. In multi-round conversations, question recommendations are made by searching the knowledge base based on user intent or certain triggers. However, building and maintaining this massive knowledge base is extremely time-consuming. For example, knowledge graphs require information extraction and named entity recognition to acquire large amounts of structured data and then add the constructed entities and elements to the graph. Intent recognition also requires building a large library of intent recognition nodes. The knowledge graphs maintained in this manner cannot generally be automated, requiring significant resources and manpower for subsequent maintenance.

[0003] Therefore, it is necessary to provide a guided question recommendation method for multi-round dialogues, realize the automatic construction of knowledge base through large models and text clustering, solve the maintenance problem in traditional methods, and save costs. Summary of the Invention

[0004] The purpose of the present invention is to provide a guided question recommendation method for multi-round dialogues, which realizes the automatic construction of the knowledge base through large models and text clustering, solves the problem of difficult maintenance in traditional methods, and saves costs.

[0005] In order to solve the problems existing in the prior art, the present invention provides a method for recommending guided questions in a multi-round dialogue, comprising:

[0006] S1: Collect questions and build a question vector index library and topic question mapping table;

[0007] S2: Input the current user's question topic into the topic classification model, and obtain the topic category of the current user's question topic through the topic classification model;

[0008] S3: Based on the topic-question mapping table and the obtained topic category of the current user's question topic, retrieve the question set of the current user's question topic, and flatten and shuffle all the questions in the set to obtain coarse recall candidate questions;

[0009] S4: Input the current user's question topic and the candidate questions from the rough recall into the BM2.5 model. Calculate the refined ranking of the candidate questions using the TF-IDF score. Remove the top 3 candidate questions from the refined ranking and select the top 50 candidate questions.

[0010] S5: Based on the candidate questions selected after fine sorting and the question vector index library, the vector of the candidate question is: C∈Rm×d , where m is the number of candidate questions selected after fine sorting, m≤50, d is the dimension of the vector, and C is the vector of candidate questions;

[0011] The historical dialogue vector H∈R is obtained based on the historical dialogue round number and question vector index library. n×d , where n is the number of historical dialogue rounds, d is the dimension of the vector, and H is the vector of historical dialogue;

[0012] The similarity score is calculated based on the vector of the candidate question and the vector of the historical conversation as follows:

[0013] score=C·H∈R m×n

[0014] Based on the similarity score matrix, we take the maximum and minimum values ​​by row, and filter out candidate questions corresponding to rows with maximum values ​​> 0.65 and minimum values ​​< 0.85;

[0015] S6: According to the number of historical dialogue turns and the filtered candidate questions, the scores of the filtered candidate questions are obtained as follows: score′∈R k×n , where k is the number of candidate questions after filtering, and n is the number of historical dialogue rounds;

[0016] Sort by the last column of the candidate question score matrix and select the candidate questions corresponding to the top 3 rows as recommended questions.

[0017] Optionally, in the guided question recommendation method for multi-round dialogue, the question vector index library and the topic-question mapping table are constructed as follows:

[0018] S11: Collect users’ real-world conversations based on topics from the conversation day;

[0019] S12: Use the vectorization model to vectorize each topic, use KMeans to perform text clustering, and merge the clustered topics to form merged data;

[0020] S13: Based on the merged data, filter out the responses of the agents in each group of conversations, retain only the user questions, and build a question vector index library;

[0021] S14: Based on the user questions, construct a topic and user question mapping table to form a topic question mapping table.

[0022] Optionally, in the guided question recommendation method for multi-round dialogues, the merged data includes multiple topics, the first group of multi-round dialogues corresponding to each topic, the second group of multi-round dialogues corresponding to each topic,..., the Nth group of multi-round dialogues corresponding to each topic, where N is a natural number.

[0023] Optionally, in the guided question recommendation method for multi-round dialogues, in S2, if the topic category of the current user's question topic is obtained to be one, then this topic category is directly adopted as the topic category of the current user's question topic; if the topic categories of the current user's question topic are obtained to be multiple, a vectorized model is used to perform cosine similarity calculation, and the top 2 topic categories are taken as the topic categories of the current user's question topic according to the similarity sorting.

[0024] Optionally, in the guided question recommendation method for multi-round dialogue, TF-IDF is term frequency–inverse document frequency, a commonly used weighting technology used in information retrieval and data mining, TF is term frequency, and IDF is inverse document frequency index.

[0025] Optionally, in the guided question recommendation method for multi-round dialogue, the BM2.5 model adopts the BM25 algorithm, where BM25 stands for Best Matching 25 and is a statistics-based text retrieval algorithm.

[0026] Optionally, in the guided question recommendation method for multi-round dialogue, the historical dialogue rounds include the current input question.

[0027] Optionally, in the guided question recommendation method for multiple rounds of dialogue, S1-S6 are repeated when a question is raised in each round of dialogue.

[0028] Compared with the prior art, the present invention has the following advantages:

[0029] (1) The present invention realizes the automatic construction of the knowledge base through large models and text clustering, solves the problem of difficult maintenance in traditional methods, and saves costs.

[0030] (2) The present invention adopts the topic classification model, BM2.5 model and vectorization model for question recommendation, which saves computing resources and improves the recommendation efficiency and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 A flow chart of a method provided by an embodiment of the present invention;

[0032] Figure 2 A schematic diagram of an intelligent agent dialog box provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0033] The following is a more detailed description of the specific embodiments of the present invention with reference to schematic diagrams. The advantages and features of the present invention will become more apparent from the following description. It should be noted that the drawings are in a very simplified form and are not to exact scale, and are only used for the purpose of conveniently and clearly illustrating the embodiments of the present invention.

[0034] In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise" and the like to indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.

[0035] Hereinafter, if the method described herein includes a series of steps, the order in which the steps are presented herein is not necessarily the only order in which the steps may be performed, and some of the steps described may be omitted and / or some other steps not described herein may be added to the method.

[0036] In existing technologies, knowledge graphs or intent recognition are typically used to build a knowledge base to perform question recommendations. In multi-round conversations, question recommendations are made by searching the knowledge base based on user intent or certain triggers. However, building and maintaining this massive knowledge base is extremely time-consuming. For example, knowledge graphs require information extraction and named entity recognition to acquire large amounts of structured data and then add the constructed entities and elements to the graph. Intent recognition also requires building a large library of intent recognition nodes. The knowledge graphs maintained in this manner cannot generally be automated, requiring significant resources and manpower for subsequent maintenance.

[0037] In order to solve the problems existing in the prior art, the present invention provides a method for recommending guided questions in multi-round dialogues, such as Figure 1 Said, including:

[0038] S1: Collect questions and build a question vector index library and topic-question mapping table; the method is as follows:

[0039] S11: Collect users' real-world conversations based on topics from the conversation day. The main data elements are topics and multiple rounds of conversations.

[0040] S12: Because similar topics exist in online data, the present invention uses a vectorization model to vectorize each topic, performs text clustering using KMeans, and merges clustered topics to form merged data. The merged data includes multiple topics, the first group of multi-round conversations corresponding to each topic, the second group of multi-round conversations corresponding to each topic, ..., the Nth group of multi-round conversations corresponding to each topic, where N is a natural number. Each group of multi-round conversations comes from conversations corresponding to similar topics.

[0041] S13: Based on the merged data, filter out the responses of the agents in each group of conversations, retain only the user questions, and build a question vector index library;

[0042] S14: Based on the user questions, construct a topic and user question mapping table to form a topic question mapping table.

[0043] S2: Based on each multi-round dialogue, the current user's question topic is obtained, and the current user's question topic is input into the topic classification model. The topic category of the current user's question topic is obtained through the topic classification model;

[0044] Specifically, if there is only one topic category for the topic of the current user's question, then this topic category is directly used as the topic category for the topic of the current user's question; if there are multiple topic categories for the topic of the current user's question, a vectorized model is used to calculate the cosine similarity, and the top two topic categories are taken as the topic categories for the topic of the current user's question based on the similarity sorting.

[0045] S3: Based on the topic-question mapping table and the obtained topic category of the current user's question topic, retrieve the question set of the current user's question topic, and flatten and shuffle all the questions in the set to obtain coarse recall candidate questions;

[0046] S4: Input the current user's question topic and the coarsely recalled candidate questions into the BM2.5 model. Calculate the refined ranking of the candidate questions using the TF-IDF score. Remove the top 3 candidate questions after refined ranking. After removing the top 3, select the top 50 candidate questions. The purpose of removing the top 3 is to eliminate candidate questions that are highly similar to the current user input at the word granularity level to avoid repeated questions.

[0047] The BM2.5 model uses the BM25 algorithm, which stands for BestMatching 25 and is a statistically based text retrieval algorithm. TF-IDF stands for term frequency–inverse document frequency, a common weighting technique used in information retrieval and data mining. TF stands for term frequency, and IDF stands for inverse document frequency.

[0048] S5: Based on the candidate questions selected after fine sorting and the question vector index library, the vector of the candidate question is: C∈R m×d , where m is the number of candidate questions selected after fine sorting, m≤50, d is the dimension of the vector, and C is the vector of candidate questions;

[0049] The historical dialogue vector H∈R is obtained based on the historical dialogue round number and question vector index library. n×d, where n is the number of historical dialogue rounds, d is the dimension of the vector, H is the vector of historical dialogues, and the number of historical dialogue rounds includes the current input question.

[0050] The similarity score is calculated based on the vector of the candidate question and the vector of the historical conversation as follows:

[0051] score=C·H∈R m×n

[0052] Based on the similarity score matrix, the maximum and minimum values ​​are taken row by row, and the candidate questions corresponding to the rows with the maximum value > 0.65 and the minimum value < 0.85 are filtered out.

[0053] S6: According to the number of historical dialogue turns and the filtered candidate questions, the scores of the filtered candidate questions are obtained as follows: score′∈R k×n , where k is the number of candidate questions after filtering, and n is the number of historical dialogue rounds;

[0054] Sort by the last column of the candidate question score matrix and select the candidate questions corresponding to the top 3 rows as recommended questions.

[0055] Optionally, in the guided question recommendation method for multiple rounds of dialogue, S1-S6 are repeated when a question is raised in each round of dialogue.

[0056] In one embodiment, the present invention is evaluated from the perspectives of efficiency and effectiveness. Regarding the efficiency evaluation, the present invention constructed a 1.1GB vector search library, ran it on a single-node machine with 4 cores and 8GB of CPU, and performed a 15-minute stress test with 500 samples and 100 concurrent requests for 50 and 100 minutes. The stress test results are as follows:

[0057] 1) Concurrency 50, success rate: 96.42%, processing 2.97 requests per second;

[0058] 2) Concurrency 100, success rate: 91.18%, processing 3.17 requests per second.

[0059] Regarding the effect evaluation, the present invention collects the latest user data and constructs a test data of 3000 samples, and the retrieval accuracy is 93.18%.

[0060] The method proposed in this invention can be applied to various business-driven multi-round dialogue intelligent robots. For example, in education or online learning, the robot can recommend progressive questions based on the student's answers to achieve personalized learning path planning; or medical intelligent dialogue customer service can recommend relevant health inquiries or medication reminders through daily Q&A; similarly, question recommendation can be applied to e-commerce customer service or after-sales service-related intelligent robots to guide the description of user questions, recommend solutions, or understand needs through dialogue, recommend matching products, etc. The above content is the application of guided question recommendation in vertical fields. Different fields and different businesses require the construction of recommendation question candidate vector libraries with different structures.

[0061] The above are applicable fields. The following is an example of a specific product to illustrate the application of the present invention. Figure 2 As shown in the figure, a companion chat product, for example, features multi-round conversations that primarily include topics and conversational agents. Topics are generated based on user profiles, and users can create their own if they choose not to accept a topic. After a topic is created, multi-round conversations are initiated by the agent and are related to the topic. Each response from the agent in the conversation between the user and the agent will be accompanied by a corresponding recommended question.

[0062] In summary, compared with the prior art, the present invention has the following advantages:

[0063] (1) The present invention realizes the automatic construction of the knowledge base through large models and text clustering, solves the problem of difficult maintenance in traditional methods, and saves costs.

[0064] (2) The present invention adopts the topic classification model, BM2.5 model and vectorization model for question recommendation, which saves computing resources and improves the recommendation efficiency and accuracy.

[0065] The above description is merely a preferred embodiment of the present invention and does not limit the present invention in any way. Any person skilled in the art who, without departing from the scope of the present invention, makes any equivalent substitution, modification, or other changes to the technical solution and technical content disclosed in the present invention shall be deemed to be within the scope of the present invention and still fall within the scope of protection of the present invention.

Claims

1. A method for recommending guided questions in multi-round dialogues, characterized in that: include: S1: Collect questions and build a question vector index library and topic-question mapping table; S2: Input the current user's question topic into the topic classification model, and obtain the topic category of the current user's question topic through the topic classification model; S3: Based on the topic-question mapping table and the obtained topic category of the current user's question topic, retrieve the question set of the current user's question topic, and flatten and shuffle all the questions in the set to obtain coarse recall candidate questions; S4: Input the current user's question topic and the candidate questions from the rough recall into the BM2.5 model. Calculate the refined ranking of the candidate questions using the TF-IDF score. Remove the top 3 candidate questions from the refined ranking and select the top 50 candidate questions. S5: Based on the candidate questions selected after fine sorting and the question vector index library, the vector of the candidate question is: C∈R m×d , where m is the number of candidate questions selected after fine sorting, m≤50, d is the dimension of the vector, and C is the vector of candidate questions; The historical dialogue vector H∈R is obtained based on the historical dialogue round number and question vector index library. n×d , where n is the number of historical dialogue rounds, d is the dimension of the vector, and H is the vector of historical dialogue; The similarity score is calculated based on the vector of the candidate question and the vector of the historical conversation as follows: score=C·H∈R m×n Based on the similarity score matrix, we take the maximum and minimum values ​​by row, and filter out candidate questions corresponding to rows with maximum values ​​> 0.65 and minimum values ​​< 0.85; S6: According to the number of historical dialogue turns and the filtered candidate questions, the scores of the filtered candidate questions are obtained as follows: score′∈R k×n , where k is the number of candidate questions after filtering, and n is the number of historical dialogue rounds; Sort by the last column of the candidate question score matrix and select the candidate questions corresponding to the top 3 rows as recommended questions.

2. The method for recommending guiding questions for multi-round dialogues according to claim 1, wherein: The question vector index library and topic question mapping table are constructed as follows: S11: Collect users’ real-world conversations based on topics from the conversation day; S12: Use the vectorization model to vectorize each topic, use KMeans to perform text clustering, and merge the clustered topics to form merged data; S13: Based on the merged data, filter out the responses of the agents in each group of conversations, retain only the user questions, and build a question vector index library; S14: Based on the user questions, construct a topic and user question mapping table to form a topic question mapping table.

3. The method for recommending guiding questions for multi-round dialogues according to claim 2, wherein: The merged data includes multiple topics, the first group of multi-round conversations corresponding to each topic, the second group of multi-round conversations corresponding to each topic, ..., the Nth group of multi-round conversations corresponding to each topic, where N is a natural number.

4. The method for recommending guiding questions for multi-round dialogues according to claim 1, wherein: In S2, if there is only one topic category for the topic of the current user's question, then this topic category is directly used as the topic category for the topic of the current user's question; if there are multiple topic categories for the topic of the current user's question, a vectorized model is used to calculate the cosine similarity, and the top 2 topic categories are taken as the topic categories for the topic of the current user's question based on the similarity sorting.

5. The method for recommending guiding questions for multi-round dialogues according to claim 1, wherein: TF-IDF stands for term frequency–inverse document frequency, a commonly used weighting technique for information retrieval and data mining. TF stands for term frequency and IDF stands for inverse document frequency.

6. The method for recommending guiding questions for multi-round dialogues according to claim 5, wherein: The BM2.5 model uses the BM25 algorithm. BM25 stands for Best Matching 25, a statistics-based text retrieval algorithm.

7. The method for recommending guiding questions for multi-round dialogues according to claim 1, wherein: The historical dialogue turns include the current input question.

8. The method for recommending guiding questions for multi-round dialogues according to claim 1, wherein: Repeat S1-S6 when questions are asked in each round of dialogue.