Question recommendation method and device and computer equipment
By using a pre-defined knowledge graph in the intelligent question-answering system to match the intent category and organizational category of the user's input question, key entities are identified and candidate questions with high similarity are selected. This solves the problem of poor recommendation performance in traditional intelligent question-answering systems and achieves personalized and accurate recommendations.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2026-03-31
AI Technical Summary
Traditional intelligent question-answering systems struggle to accurately understand the overall semantics of user questions, resulting in poor recommendation performance.
By obtaining the intent category of the user's input question, the system uses a pre-defined knowledge graph to match the historical entity set of the target organization category, identifies key entities, and selects candidate questions with high similarity from the candidate question set as recommended questions.
Personalized recommendations were implemented, improving the accuracy and usability of the intelligent question-answering system and ensuring that recommended questions could be answered using a pre-set knowledge graph.
Smart Images

Figure CN121765079A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a problem recommendation method, apparatus, and computer device. Background Technology
[0002] Intelligent question-answering systems are used to answer questions posed by humans in natural language and are now widely used.
[0003] However, the question recommendation function of traditional intelligent question answering systems often relies on rule-based or simple model parsing methods. When a user asks a question, the question recommendation function often only uses the key entities in the question or the entire question to recommend related questions. It is difficult to accurately understand the overall semantics of the user's question, which makes it impossible for the question answering recommendation function to accurately match relevant recommended questions, resulting in users receiving irrelevant or inefficient answers.
[0004] Therefore, traditional intelligent question-answering systems suffer from poor question recommendation performance. Summary of the Invention
[0005] Therefore, it is necessary to provide a question recommendation method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve the question recommendation effect of intelligent answering systems in response to the above-mentioned technical problems.
[0006] Firstly, this application provides a problem recommendation method, including:
[0007] Obtain user input questions from user accounts and identify the question intent category of the user input questions;
[0008] If the question intent category is a preset intent category, a target entity matching the key entity of the user question is determined based on a historical entity set matching the target organization category; wherein, the preset intent category is a question intent category that can be answered through a preset knowledge graph; the target organization category is the organization category to which the user account belongs; the historical entity set includes key entities extracted from a historical question set matching the target organization category; the historical question set includes at least one question that has been answered through the preset knowledge graph; and the key entity of the user question is the key entity in the user-input question.
[0009] From the candidate question set associated with the target entity, a candidate question that matches the user input question is selected as the user recommendation question; the candidate question set consists of at least one question in the historical question set that contains the target entity.
[0010] The user recommendation question is recommended.
[0011] In one embodiment, selecting a candidate question that matches the user input question from the candidate question set associated with the target entity as the user recommendation question includes:
[0012] Obtain the similarity score for each candidate question in the candidate question set; the similarity score is the similarity between the corresponding candidate question and the user input question.
[0013] At least one of the candidate questions ranked first in similarity from the candidate question set is selected as the user recommendation question.
[0014] In one embodiment, determining the target entity matching the key entity of the user problem based on the historical entity set matching the target organization category includes: performing entity retrieval in the historical entity set matching the target organization category based on the key entity of the user problem to obtain a retrieval entity set; the retrieval entity set includes a preset number of retrieval entities related to the key entity of the user problem; selecting the target entity from the retrieval entity set based on the entity similarity between each retrieval entity and the key entity of the user problem; the entity similarity between the target entity and the key entity is greater than a preset similarity threshold.
[0015] In one embodiment, the method further includes:
[0016] If the question intent category is not the preset category, a historical question that matches the user input question is determined from the historical question set that matches the target organization category as the user recommendation question.
[0017] In one embodiment, determining historical questions matching the user input question as user recommendation questions from a set of historical questions matching the target organization category includes:
[0018] Obtain the similarity score for each historical question in the historical question set; the similarity score is the similarity between the corresponding historical question and the user input question.
[0019] At least one of the historical questions ranked first in similarity from the set of historical questions is selected as the user recommendation question.
[0020] In one embodiment, the method further includes:
[0021] If the user input question can be answered using the preset knowledge graph, the key entities in the user input question are added as new historical entities to the historical entity set that matches the target organization category, and the user input question is added as a new historical question to the historical question set that matches the target organization category.
[0022] Record the mapping relationship between the new historical entity and the new historical problem, the mapping relationship being used to determine at least one problem containing the new historical entity in the set of historical problems.
[0023] In one embodiment, the target organization category is at least one of preset organization categories, and the method further includes:
[0024] Obtain historical question and answer records; the historical question and answer records include at least one unclassified question entered by the historical questioning account that can be answered through the preset knowledge graph;
[0025] According to the preset organization category to which the historical questioning accounts associated with each question belong, the questions to be classified are classified to obtain a set of historical questions that match each preset organization category;
[0026] Entity extraction is performed on the historical question sets that match each of the preset organization categories to obtain the historical entity sets that match each of the preset organization categories.
[0027] In one embodiment, the target organization category is at least one of preset organization categories, and the method further includes:
[0028] The preset intent category and the preset knowledge graph are input into the pre-trained language model, and the simulated user question function of the language model is invoked to generate simulated user questions; the simulated user question function is used to simulate real users asking questions to the intelligent question answering system in a thought chain manner.
[0029] If the simulated user question can be answered using the preset knowledge graph, the simulated user question is added to the historical question set that matches each preset organization category, and the key entities in the simulated user question are added to the historical entity set that matches each preset organization category.
[0030] Secondly, this application also provides a problem recommendation device, comprising:
[0031] The acquisition module is used to acquire user input questions from user accounts and identify the question intent category of the user input questions;
[0032] The recall module is used to determine, when the question intent category is a preset intent category, a target entity matching the key entity of the user's question based on a historical entity set matching the target organization category; wherein, the preset intent category is a question intent category that can be answered through a preset knowledge graph; the target organization category is the organization category to which the user account belongs; the historical entity set includes key entities extracted from a historical question set matching the target organization category; the historical question set includes at least one question that has been answered through the preset knowledge graph; and the key entity of the user's question is a key entity in the question input by the user.
[0033] The selection module is used to select candidate questions that match the user input question from a set of candidate questions associated with the target entity as user recommendation questions; the set of candidate questions consists of at least one question in the historical question set that contains the target entity.
[0034] The recommendation module is used to provide recommendations for the user's recommendation question.
[0035] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-mentioned recommended method for solving the problem.
[0036] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described recommended method for solving the problem.
[0037] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described problem-recommended method.
[0038] The aforementioned question recommendation method, apparatus, computer equipment, computer-readable storage medium, and computer program product acquire user input questions from user accounts, identify the question intent category of the user input questions, and, if the question intent category of the user input questions is one that can be answered using a preset knowledge graph, determine target entities that match the key entities in the user input questions from a historical entity set that matches the target organization category to which the user account belongs; and select candidate questions that match the user input questions from a candidate question set associated with the target entities as recommended questions for the user. This candidate question set consists of at least one question in the historical question set that contains the target entity. Thus, by constructing a historical question database corresponding to the organization to which the user account belongs, the system can effectively comprehensively consider both user characteristics and the question characteristics of the user input questions, achieving personalized recommendations. This ensures that the questions recommended by the intelligent question answering system match the overall semantics and key entities of the user input questions, and also guarantees that all recommended questions can be answered using knowledge from a preset knowledge graph, effectively improving the accuracy and practicality of the intelligent question answering system's question recommendations. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 This is a diagram illustrating the application environment of a problem recommendation method in one embodiment.
[0041] Figure 2 This is a flowchart illustrating a problem recommendation method in one embodiment;
[0042] Figure 3 This is a flowchart illustrating a problem recommendation method in another embodiment;
[0043] Figure 4 A structural block diagram of a problem recommendation device in one embodiment;
[0044] Figure 5 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0046] In this application, the data collection and processing have been strictly carried out in accordance with the requirements of relevant national laws and regulations, obtaining informed consent or separate consent from the data subject, and subsequent data use and processing have been conducted within the scope of laws and regulations and the authorization of the data subject.
[0047] The problem recommendation method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located in the cloud or on another network server. In specific implementation, the user can input a user input question targeting a target event through terminal 102, and terminal 102 sends the user input question to intelligent question answering system 104; intelligent question answering system 104 obtains the user input question from the user account and identifies the question intent category of the user input question; if the question intent category is a preset intent category, intelligent question answering system 104 determines the target entity that matches the key entity of the user question based on the historical entity set that matches the target organization category; wherein, the preset intent category is the question intent category that can be answered through a preset knowledge graph; the target organization category is the organization category to which the user account belongs; the historical entity set includes key entities extracted from the historical question set that matches the target organization category; the historical question set includes at least one question that has been answered through the preset knowledge graph; the key entity of the user question is the key entity in the user input question; intelligent question answering system 104 selects candidate questions that match the user input question from the candidate question set associated with the target entity as the user recommended question; the candidate question set includes at least one question that contains the target entity in the historical question set; intelligent question answering system 104 recommends the user recommended question.
[0048] The terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle systems, and projection devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted displays. Head-mounted displays can be virtual reality (VR) devices, augmented reality (AR) devices, and smart glasses. The intelligent question-answering system 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0049] In one exemplary embodiment, such as Figure 2As shown, a problem recommendation method is provided, which is then applied to... Figure 1 The following explanation uses the intelligent question-answering system 104 as an example, including the following steps S202 to S206. Wherein:
[0050] Step S202: Obtain user input questions from the user account and identify the question intent category of the user input questions.
[0051] Among them, user input questions are questions entered by the user account in response to the target event.
[0052] The target event can refer to the event that triggers a user's account to input a question into the intelligent question-answering system. Specifically, the target event can be a product malfunction event, an event that raises a question about a target object, etc. The target object can refer to a specific object or thing.
[0053] In practice, users can input questions about a target event through the user interaction front-end page of the intelligent question-answering system, allowing the system to retrieve these questions. Additionally, the intelligent question-answering system is equipped with an API interface, which allows users to input questions about a target event (such as a product malfunction event) through third-party systems, enabling the system to retrieve these questions as well.
[0054] Then, the intelligent question-answering system can identify the category of the user's question intent. Specifically, the intelligent question-answering system can call the intent recognition function in the language model to identify the category of the user's question intent.
[0055] Step S204: If the problem intent category is a preset intent category, determine the target entity that matches the user's problem key entity from the historical entity set that matches the target organization category.
[0056] Among them, the preset intent category is the question intent category that can be answered by a preset knowledge graph.
[0057] The historical entity set includes key entities extracted from each historical issue in the historical issue set that matches the target organization category.
[0058] The historical question set includes at least one question that has been answered through a pre-defined knowledge graph.
[0059] The target organization category can refer to the organization category to which the user account belongs. In practical applications, the target organization category can refer to the user group i to which the user account belongs. User group i can include, but is not limited to, department group, job group, business group, etc.
[0060] For ease of understanding by those skilled in the art, the set of historical problems matching the target organization category i can be represented as follows: The set of historical entities that match the target organization category i can be represented as: In practical applications, historical problem sets can be stored using a historical problem vector database; historical entity sets can be stored using a vector database of the core entities of historical problems. It should be noted that the construction of historical problem sets and historical entity sets will be further explained below, but will not be elaborated upon here.
[0061] In this context, the key entities in a user's question can refer to the key entities in the user's input question. For example, if the user inputs the question "The wind turbine is malfunctioning, how do I maintain it?", then the key entities in the user's question can include, but are not limited to, "wind turbine," "malfunction," and "maintenance."
[0062] In practice, after the intelligent question answering system identifies the question intent category of the user's input question, the intelligent question answering system can determine whether the question intent category of the user's input question is a preset intent category; where the preset intent category can refer to the question intent category that can be answered through a preset knowledge graph.
[0063] If the question intent category is a preset intent category, it means that the user's input question can be answered using a preset knowledge graph. The intelligent question-answering system can then determine the target organization category i to which the user account belongs, and identify the set of historical entities that match that target organization category i. .
[0064] Then, the intelligent question-answering system can draw from the historical entity set. The system identifies target entities that match the key entities in the user's input question. Specifically, the intelligent question-answering system can perform entity extraction processing on the user's input question to identify key or core entities; then, using these key entities from the user's input question, it can search the historical entity set... China recalls target entities that match the critical entity. In practical applications, the target entity The similarity between the target entity and the key entities in the user input question meets the preset conditions; optionally, the target entity It can be a set of historical entities The historical entity most similar to this key entity.
[0065] Step S206: Select the candidate question that matches the user input question from the candidate question set associated with the target entity as the user recommendation question.
[0066] The candidate problem set is at least one problem in the historical problem set that contains the target entity.
[0067] In practice, after recalling the target entity that matches the key entity in the user's input question, the intelligent question answering system can identify at least one question containing the target entity from the historical question set, thus obtaining the target entity. The system generates a corresponding set of candidate questions; then, the intelligent question answering system can recall candidate questions that match the user's input question from this set of candidate questions as recommended questions for the user.
[0068] In practical applications, the similarity between the candidate question and the user input question meets the preset conditions; optionally, the candidate question that matches the user input question can be the question that is most similar to the user input question in the candidate question set.
[0069] Step S208: Recommend user-recommended question.
[0070] In practice, once the intelligent question-answering system identifies a user-recommended question, it can recommend that question to the user's account. In real-world applications, the system can send the recommended question to the terminal, allowing it to be displayed on the user-interactive front-end page (e.g., a dialog interface) where the system interacts with the user. The user can then instruct the system to provide an answer to the recommended question.
[0071] In the above-described question recommendation method, user input questions from user accounts are obtained, and the question intent category of the user input questions is identified. If the question intent category of the user input questions is one that can be answered using a preset knowledge graph, a target entity matching the key entity in the user input questions is determined from a historical entity set that matches the target organization category to which the user account belongs. Then, from a candidate question set associated with the target entity, a candidate question matching the user input questions is selected as the user recommendation question. This candidate question set consists of at least one question in the historical question set that contains the target entity. Thus, by constructing a historical question database corresponding to the organization to which the user account belongs, user characteristics and question characteristics of the user input questions can be effectively considered comprehensively, achieving personalized recommendations. This ensures that the questions recommended by the intelligent question answering system match the overall semantics and key entities of the user input questions, and also guarantees that all recommended questions can be answered using knowledge from the preset knowledge graph, effectively improving the accuracy and practicality of the intelligent question answering system's question recommendations.
[0072] In an exemplary embodiment, selecting a candidate question that matches the user input question from a candidate question set associated with the target entity as the user recommendation question includes: obtaining the similarity of each candidate question in the candidate question set; the similarity is the similarity between the corresponding candidate question and the user input question; and selecting at least one candidate question with the highest similarity ranking in the candidate question set as the user recommendation question.
[0073] In its implementation, the intelligent question-answering system selects candidate questions that match the user's input question from a set of candidate questions associated with the target entity. The system calculates the similarity between each candidate question and the user's input question, obtaining the similarity score for each candidate question. Then, the system selects at least one candidate question with the highest similarity score as the user's recommended question. Specifically, the system sorts the candidate questions in descending order based on their similarity scores; then, from these sorted candidate questions, it selects one or more candidate questions with the highest similarity score for output or display.
[0074] The technical solution of this embodiment obtains the similarity of each candidate question in the candidate question set and selects at least one candidate question with the highest similarity ranking as the user recommendation question. This can quickly and effectively recall user recommendation questions that are similar to the user input question in the candidate question set associated with the target entity.
[0075] In an exemplary embodiment, determining the target entity that matches the key entity in the user input question from the historical entity set that matches the target organization category to which the user account belongs includes: performing entity retrieval in the historical entity set that matches the target organization category based on the key entity in the user input question to obtain a retrieval entity set; the retrieval entity set includes a preset number of retrieval entities related to the key entity; and selecting the target entity from the retrieval entity set based on the entity similarity between each retrieval entity and the key entity.
[0076] Among them, the entity similarity between the target entity and the key entity is greater than the preset similarity threshold.
[0077] In its implementation, the intelligent question-answering system determines the target entities that match the key entities in the user's input question from the historical entity set that matches the target organization category to which the user's account belongs. Specifically, this process includes: the intelligent question-answering system performing entity retrieval or entity recall based on the key entities in the user's input question within the historical entity set that matches the target organization category, obtaining a preset number of retrieval entities related to the key entities, i.e., a retrieval entity set. For example, the intelligent question-answering system can retrieve M retrieval entities from the historical entity vector library that match the key entities in the user's input question; where M can be a positive integer greater than 0.
[0078] Then, the intelligent question-answering system can select target entities from the set of search entities based on the similarity between each search entity and the key entity. For example, it can calculate the cosine similarity between each search entity and the key entity, where the cosine similarity value ranges from 0 to 1. The intelligent question-answering system can then identify search entities with a cosine similarity greater than a similarity threshold T as target entities. Specifically, the intelligent question-answering system can also sort the search entities in descending order according to their cosine similarity, and then identify one or more of the top-ranked search entities as target entities.
[0079] The technical solution of this embodiment uses key entities to perform entity retrieval in a historical entity set that matches the target organization category, obtaining a preset number of retrieval entities related to the key entities. This can effectively achieve rapid screening of potentially related entities in the entity recall stage, effectively reduce the computational pressure of the fine-ranking stage, improve response speed, and select target entities with similarity greater than a preset similarity threshold from the retrieval entity set based on the similarity between each retrieval entity and the key entity. This effectively reduces the computational cost in the entity fine-ranking stage and improves the efficiency of obtaining target entities.
[0080] In an exemplary embodiment, the method further includes: if the question intent category is not a preset category, determining a historical question that matches the user input question from a set of historical questions that match the target organization category as a user-recommended question.
[0081] In practice, if the question intent category is not a preset category, it means that the user's input question intent is outside the intent categories that the preset knowledge graph can answer. The intelligent question answering system can then directly determine historical questions matching the user's input question from the historical question set that match the target organization category as recommended questions. Specifically, if the target organization category is i, the intelligent question answering system can use the historical question set that matches the user's input question within target organization category i. Similarity assessment is performed to recall items from the historical problem set. In the middle, one or more historical questions similar to the user input question. This refers to user recommendation questions.
[0082] The technical solution of this embodiment, when the question intent category is not a preset category, determines historical questions matching the user's input question from a set of historical questions that match the target organization category as recommended questions for the user. This enables the intelligent question answering system to recommend questions similar to the user's input question and that can be answered by the preset knowledge graph, even if the user's input question intent is outside the intent category that can be answered by the preset knowledge graph. This avoids the intelligent question answering system recommending questions that it cannot answer, thus improving the question recommendation effect of the intelligent question answering system.
[0083] In an exemplary embodiment, determining historical questions that match the user input question as user recommendation questions from a set of historical questions that match the target organization category includes: obtaining the similarity of each historical question in the historical question set; the similarity is the similarity between the corresponding historical question and the user input question; and selecting at least one historical question with the highest similarity ranking in the historical question set as user recommendation questions.
[0084] In its implementation, the intelligent question-answering system, when determining historical questions matching the user's input question from a set of historical questions that match the target organizational category, includes the following steps: The intelligent question-answering system calculates the similarity between each historical question in the set and the user's input question, obtaining the similarity score for each historical question. Then, the intelligent question-answering system selects at least one historical question with the highest similarity score from the set as the user's recommended question. Specifically, the intelligent question-answering system sorts the historical questions in descending order according to their similarity scores; then, from the sorted historical questions, it selects one or more historical questions with the highest similarity score as the user's recommended question for output or display.
[0085] The technical solution of this embodiment, in the process of determining the historical questions that match the user input questions as user recommendation questions from the historical question set that matches the target organization category, obtains the similarity of each historical question in the historical question set, and selects at least one historical question with the highest similarity ranking in the historical question set as the user recommendation question. In this way, it can recommend matching historical questions to the user as much as possible in combination with the user input questions, improve the efficiency of the user in discovering historical questions of interest, reduce information overload, and effectively obtain the answer to the recommended question.
[0086] In an exemplary embodiment, the method further includes: when the user input question can be answered through a preset knowledge graph, adding the key entity in the user input question as a new historical entity to a historical entity set that matches the target organization category, and adding the user input question as a new historical question to a historical question set that matches the target organization category; and recording the mapping relationship between the new historical entity and the new historical question, the mapping relationship being used to determine at least one question containing the new historical entity in the historical question set.
[0087] In its implementation, if the intelligent question-answering system can answer user-input questions using a pre-defined knowledge graph, it can add key entities from the user-input question as new historical entities to a set of historical entities matching the target organization category, and add the user-input question as a new historical question to a set of historical questions matching the target organization category. The intelligent question-answering system can then record the mapping relationship between the new historical entities and the new historical questions. This mapping relationship is used to identify at least one question containing the new historical entities in the set of historical questions.
[0088] In this way, the historical question set and historical entity set can be updated based on the answers to user input questions in the preset knowledge graph. In addition, the intelligent question answering system can also quickly identify at least one question containing the new historical entity based on the above mapping relationship, so as to construct a candidate question set for the historical entity, which is convenient for recalling candidate questions that match the next user input question as the next user recommendation question.
[0089] In an exemplary embodiment, the target organization category is at least one of the preset organization categories, and the method further includes: obtaining historical question and answer records; the historical question and answer records include at least one unclassified question entered by a historical questioning account that can be answered through a preset knowledge graph; classifying each unclassified question according to the preset organization category to which the historical questioning account associated with each unclassified question belongs, to obtain a set of historical questions matching each preset organization category; and extracting entities from the set of historical questions matching each preset organization category to obtain a set of historical entities matching each preset organization category.
[0090] In practical implementation, the target organization category is at least one of the preset organization categories. The intelligent question-answering system can obtain historical question-answering records and select at least one question to be classified that can be answered through a preset knowledge graph. In practical applications, each question to be classified is associated with a corresponding historical questioning account. The intelligent question-answering system can classify each question according to the preset organization category to which the historical questioning account associated with each question belongs, obtaining a set of historical questions matching each preset organization category. For example, if the preset organization categories include organization A and organization B, the intelligent question-answering system can obtain a set of historical questions matching organization A and a set of historical questions matching organization B. In practical applications, the intelligent question-answering system can vectorize the historical questions in the sets of historical questions matching each preset organization category, obtaining a vector database of historical questions corresponding to each preset organization category.
[0091] Then, the intelligent question-answering system can extract entities from each historical question in the historical question set matching each preset organizational category, obtaining a historical entity set matching each preset organizational category. For example, if the preset organizational categories include organization A and organization B, the intelligent question-answering system can obtain the historical entity set matching organization A and the historical entity set matching organization B. In practical applications, the intelligent question-answering system can vectorize the historical entities in the historical entity sets matching each preset organizational category, obtaining a historical entity vector database corresponding to each preset organizational category (i.e., a vector database of the core entities of historical questions).
[0092] In this way, vector databases can be used for question retrieval, which can effectively improve the retrieval speed and accuracy of recommended questions. By constructing a vector database of historical questions and a vector database of core entities of historical questions, efficient mapping and association between questions and entities can be achieved.
[0093] In an exemplary embodiment, the target organization category is at least one of the preset organization categories. The method further includes: inputting the preset intent category and the preset knowledge graph into a pre-trained language model, generating a simulated user question by calling the simulated user questioning function of the language model; adding the simulated user question to the historical question set matching each preset organization category when the simulated user question can be answered by the preset knowledge graph, and adding the key entities in the simulated user question to the historical entity set matching each preset organization category.
[0094] Among them, the simulated user questioning function is used to simulate real users asking questions to the intelligent question-answering system in a thought chain manner.
[0095] In its implementation, the intelligent question-answering system can also input preset intent categories and preset knowledge graphs into a pre-trained language model. By calling the language model's simulated user questioning function, it can generate simulated user questions. Specifically, the intelligent question-answering system can obtain all the graph nodes in the preset knowledge graph and instruct the language model to simulate real users constructing and asking questions in a thought chain manner through preset intent categories, thus obtaining simulated user questions. Then, the intelligent question-answering system can select the parts of the simulated user questions that can be answered through the preset knowledge graph, add these simulated user questions to the historical question sets that match each preset organizational category, and add the key entities in these simulated user questions to the historical entity sets that match each preset organizational category.
[0096] The technical solution of this embodiment uses a language model combined with the knowledge of a preset knowledge graph to simulate real users constructing and asking questions in a thought chain manner, thereby obtaining simulated user questions. Simulated user questions that can be answered through the preset knowledge graph are added to the historical question sets that match each preset organizational category, and key entities in the simulated user questions are added to the historical entity sets that match each preset organizational category. This can effectively indicate the coverage of the questions recommended by the intelligent question answering system with the knowledge of the preset knowledge graph during the question-and-answer process, and minimize the occurrence of situations where the questions recommended by the intelligent question answering system cannot be answered through the preset knowledge graph.
[0097] In another embodiment, such as Figure 3 As shown, a problem recommendation method is provided, which is then applied to... Figure 1 Taking the intelligent question-answering system in China as an example, the following steps are included:
[0098] Step S302: Obtain user input questions from the user account and identify the question intent category of the user input questions.
[0099] Step S304: If the question intent category is a preset intent category, based on the key entities in the user input question, perform entity retrieval in the historical entity set that matches the target organization category to which the user account belongs, and obtain the retrieval entity set; the retrieval entity set includes a preset number of retrieval entities related to the key entities.
[0100] Step S306: Select the target entity from the search entity set based on the entity similarity between each search entity and the key entity; the entity similarity between the target entity and the key entity is greater than a preset similarity threshold.
[0101] Step S308: Obtain the candidate question set associated with the target entity; the candidate question set is at least one question that contains the target entity in the historical question set.
[0102] Step S310: Obtain the similarity of each candidate question in the candidate question set; the similarity is the similarity between the corresponding candidate question and the user input question.
[0103] Step S312: Select at least one candidate question with the highest similarity ranking from the candidate question set as the user recommendation question.
[0104] Step S314: Recommend user-recommended question.
[0105] It should be noted that the specific limitations of the above steps can be found in the specific limitations of a problem recommendation method described above.
[0106] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0107] Based on the same inventive concept, this application also provides a problem recommendation apparatus for implementing the problem recommendation method described above. The solution provided by this apparatus is similar to the solution described in the above method; therefore, the specific limitations in one or more problem recommendation apparatus embodiments provided below can be found in the limitations of the problem recommendation method described above, and will not be repeated here.
[0108] In one exemplary embodiment, such as Figure 4 As shown, a problem recommendation device is provided, comprising:
[0109] The acquisition module 410 is used to acquire user input questions from a user account and identify the question intent category of the user input questions;
[0110] The recall module 420 is configured to, when the question intent category is a preset intent category, determine a target entity matching the key entity of the user's question based on a historical entity set matching the target organization category; wherein, the preset intent category is a question intent category that can be answered through a preset knowledge graph; the target organization category is the organization category to which the user account belongs; the historical entity set includes key entities extracted from a historical question set matching the target organization category; the historical question set includes at least one question that has been answered through the preset knowledge graph; and the key entity of the user's question is a key entity in the user's input question.
[0111] Selection module 430 is used to select candidate questions that match the user input question from a set of candidate questions associated with the target entity as user recommendation questions; the set of candidate questions consists of at least one question in the historical question set that contains the target entity.
[0112] The recommendation module 440 is used to recommend the user recommendation question.
[0113] In one embodiment, the target organization category is at least one of preset organization categories, and the device is further configured to acquire historical question-and-answer records; the historical question-and-answer records include at least one unclassified question entered by a historical questioning account that can be answered through the preset knowledge graph; each unclassified question is classified according to the preset organization category to which the historical questioning account associated with each unclassified question belongs, to obtain a set of historical questions matching each preset organization category; entity extraction is performed on the set of historical questions matching each preset organization category, to obtain a set of historical entities matching each preset organization category.
[0114] In one embodiment, the target organization category is at least one of preset organization categories. The device is further configured to input the preset intent category and the preset knowledge graph into a pre-trained language model, and generate a simulated user question by calling the simulated user questioning function of the language model. The simulated user questioning function is used to simulate a real user asking a question to the intelligent question-answering system in a thought chain manner. If the simulated user question can be answered through the preset knowledge graph, the simulated user question is added to the historical question set matching each preset organization category, and the key entities in the simulated user question are added to the historical entity set matching each preset organization category.
[0115] In one embodiment, the selection module 430 is used to obtain the similarity between each candidate question in the candidate question set; the similarity is the similarity between the corresponding candidate question and the user input question; and to select at least one candidate question with the highest similarity ranking in the candidate question set as the user recommendation question.
[0116] In one embodiment, the recall module 420 is configured to perform entity retrieval in a historical entity set that matches the target organization category based on the key entity of the user problem, to obtain a retrieval entity set; the retrieval entity set includes a preset number of retrieval entities related to the key entity of the user problem; the target entity is selected from the retrieval entity set based on the entity similarity between each retrieval entity and the key entity of the user problem; the entity similarity between the target entity and the key entity is greater than a preset similarity threshold.
[0117] In one embodiment, the device is further configured to, when the question intent category is not the preset category, determine a historical question matching the user input question from a set of historical questions matching the target organization category as a user recommendation question.
[0118] In one embodiment, the apparatus is further configured to obtain the similarity of each historical question in the historical question set; the similarity is the similarity between the corresponding historical question and the user input question; and to select at least one historical question with the highest similarity ranking in the historical question set as the user recommendation question.
[0119] In one embodiment, the apparatus is further configured to, when able to answer the user input question through the preset knowledge graph, add key entities in the user input question as new historical entities to a historical entity set matching the target organization category, and add the user input question as a new historical question to a historical question set matching the target organization category; record the mapping relationship between the new historical entities and the new historical questions, the mapping relationship being used to determine at least one question containing the new historical entities in the historical question set.
[0120] The modules in the aforementioned recommended device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0121] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 5 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data used to implement the proposed method for solving the aforementioned problem. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a proposed method for solving a problem.
[0122] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0123] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, which, when executed by the processor, causes the processor to perform the steps of the problem recommendation method described above. The steps of the problem recommendation method here can be steps from one of the problem recommendation methods in the various embodiments described above.
[0124] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, causes the processor to perform the steps of the problem recommendation method described above. The steps of the problem recommendation method here may be steps from one of the problem recommendation methods in the various embodiments described above.
[0125] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, causes the processor to perform the steps of the problem recommendation method described above. The steps of the problem recommendation method here may be steps from one of the problem recommendation methods in the various embodiments described above.
[0126] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0127] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic resistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0128] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0129] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A question recommendation method characterized by comprising: The method comprises: obtaining a user input question of a user account, and identifying a question intention category of the user input question; in a case where the question intention category is a preset intention category, determining a target entity matching a user question key entity according to a historical entity set matching a target organization category; wherein the preset intention category is a question intention category capable of being answered by a preset knowledge graph; the target organization category is an organization category to which the user account belongs; the historical entity set comprises key entities extracted from a historical question set matching the target organization category; the historical question set comprises at least one question that has been answered by the preset knowledge graph; and the user question key entity is a key entity in the user input question; selecting a candidate question matching the user input question from a candidate question set associated with the target entity as a user recommended question; the candidate question set is at least one question containing the target entity in the historical question set; recommending the user recommended question.
2. The method of claim 1, wherein, The target organization category is at least one of preset organization categories, and the method further comprises: obtaining historical question and answer records; the historical question and answer records comprise at least one to-be-classified question input by a historical asking account and capable of being answered by the preset knowledge graph; classifying each of the to-be-classified questions according to a preset organization category to which a historical asking account associated with each of the to-be-classified questions belongs, to obtain a historical question set matching each of the preset organization categories; performing entity extraction on the historical question set matching each of the preset organization categories, to obtain a historical entity set matching each of the preset organization categories.
3. The method of claim 2, wherein, The method further comprises: inputting the preset intention category and the preset knowledge graph into a pre-trained language model to generate a simulated user question; the pre-trained language model is used to simulate a real user asking a question to an intelligent question and answer system in a way of thinking chain; in a case where the simulated user question can be answered by the preset knowledge graph, adding the simulated user question to the historical question set matching each of the preset organization categories, and adding a key entity in the simulated user question to the historical entity set matching each of the preset organization categories.
4. The method of claim 1, wherein, The method further comprises: obtaining a similarity corresponding to each candidate question in the candidate question set; the similarity is a similarity between the corresponding candidate question and the user input question; selecting at least one candidate question with a high similarity ranking in the candidate question set as the user recommended question.
5. The method of claim 1, wherein, The method further comprises: performing entity retrieval in the historical entity set matching the target organization category according to the user question key entity, to obtain a retrieval entity set; the retrieval entity set comprises a preset number of retrieval entities related to the user question key entity. According to entity similarity between each of the search entities and the key entity of the user question, the target entity is selected from the search entity set; the entity similarity between the target entity and the key entity is greater than a preset similarity threshold.
6. The method of claim 1, wherein, The method further includes: In a case where the question intent category is not the preset category, a historical question matching the user input question is determined as a user recommended question from a historical question set matching the target organization category.
7. The method of claim 6, wherein, The determining of the historical question matching the user input question as the user recommended question from the historical question set matching the target organization category includes: obtaining similarity corresponding to each historical question in the historical question set; the similarity is similarity between the corresponding historical question and the user input question; selecting at least one historical question with a highest similarity in the historical question set as the user recommended question.
8. The method of claim 1, wherein, The method further includes: In a case where the user input question can be answered by the preset knowledge graph, a key entity in the user input question is added to a historical entity set matching the target organization category as a new historical entity, and the user input question is added to a historical question set matching the target organization category as a new historical question; a mapping relationship between the new historical entity and the new historical question is recorded, and the mapping relationship is used to determine at least one question containing the new historical entity in the historical question set.
9. A question recommendation apparatus characterized by comprising: The apparatus includes: an obtaining module configured to obtain a user input question of a user account and identify a question intent category of the user input question; a recalling module configured to, in a case where the question intent category is a preset intent category, determine a target entity matching a key entity of a user question according to a historical entity set matching a target organization category; the preset intent category is a question intent category that can be answered by a preset knowledge graph; the target organization category is an organization category to which the user account belongs; the historical entity set includes key entities extracted from a historical question set matching the target organization category; the historical question set includes at least one question that has been answered by the preset knowledge graph; the key entity of the user question is a key entity in the user input question; a selecting module configured to select a candidate question matching the user input question as a user recommended question from a candidate question set associated with the target entity; the candidate question set is at least one question containing the target entity in the historical question set; a recommending module configured to recommend the user recommended question. 10.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-9. The processor, when executing the computer program, implements steps of the method in any one of claims 1 to 8. The processor, when executing the computer program, implements steps of the method in any one of claims 1 to 8.