Historical dialogue management method and device based on semantic tree and related equipment
By constructing a semantic tree to manage historical dialogues, the problem of inadequate information management in existing technologies is solved, achieving accurate and consistent responses in the dialogue system and improving the user experience.
Patent Information
- Application Number
- CN202511509972.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-22
- Publication Date
- 2026-01-27
AI Technical Summary
Existing dialogue management technologies struggle to effectively manage and utilize historical information when dealing with complex dialogue scenarios, leading to the loss of key information, inaccurate responses, and negatively impacting user experience. Furthermore, inconsistencies in responses are prominent in long dialogues, reducing system credibility and user trust.
By acquiring historical dialogue text, entity extraction and clustering are performed to construct a semantic tree. The semantic tree is then used for node matching and response content generation to ensure the accuracy and consistency of the responses.
Effective management and utilization of historical dialogue information can improve user experience, avoid erroneous responses caused by misunderstandings, and ensure the accuracy and consistency of responses.
Smart Images

Figure CN121413634A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of information processing technology, and in particular to a method, apparatus and related equipment for managing historical dialogues based on semantic trees. Background Technology
[0002] In today's digital age, dialogue management technologies in the fields of Natural Language Processing (NLP) and Large Module Modeling (LLM) have been widely applied in various scenarios such as intelligent customer service, chatbots, and intelligent assistants, greatly improving the efficiency and experience of human-computer interaction. With the rapid development of artificial intelligence technology, these applications are playing an increasingly important role in people's daily lives and work. For example, in the e-commerce sector, intelligent customer service can quickly respond to customer inquiries, answering questions about product information and order status, thus improving customer service efficiency; in the medical field, intelligent assistants can assist doctors in medical record analysis and disease diagnosis, reducing their workload.
[0003] However, existing dialogue management technologies still face numerous challenges in handling complex dialogue scenarios. As the length of the dialogue history increases, systems often struggle to effectively manage and utilize this historical information, leading to the loss of crucial information. When users engage in multi-turn dialogues with intelligent customer service, the system may fail to accurately understand the user's historical intent, resulting in irrelevant or inaccurate responses and negatively impacting the user experience. Interference from irrelevant information also hinders response generation. In actual dialogues, users may provide information unrelated to the core question, increasing the difficulty for the system to understand the user's intent and causing the system's generated response to deviate from the user's expectations. For example, when a user asks "how to check the price of a certain product," they might mention unrelated experiences from previous purchases of that product. If the dialogue system cannot accurately filter this irrelevant information, it may be unable to accurately answer the user's price inquiry question. Furthermore, inconsistent responses are a prominent issue in long or complex dialogues. When a dialogue involves multiple topics or spans a considerable period, the system may exhibit inconsistent responses, reducing the system's credibility and user trust. For example, in a long conversation about investment and financial management, the smart assistant initially suggests that the user choose low-risk investment products, but later recommends high-risk products without providing a reasonable explanation. This will make the user question the professionalism of the smart assistant.
[0004] These problems severely restrict the further development and application of dialogue management technology, and a solution is urgently needed to address these technical issues. Summary of the Invention
[0005] This invention provides a method, apparatus, and related equipment for managing historical dialogues based on semantic trees, aiming to solve the technical problem that traditional technologies cannot effectively manage and utilize historical dialogues.
[0006] In a first aspect, embodiments of the present invention provide a historical dialogue management method based on a semantic tree, comprising:
[0007] Obtain historical dialogue text and extract entities from the historical dialogue text to obtain an entity set containing multiple entities;
[0008] The entities in the entity set are clustered using a clustering algorithm to obtain multiple topic clusters;
[0009] Semantic recognition is performed based on the historical dialogue text corresponding to each entity to determine the entity relationships between entities within the topic cluster. Based on the entity relationships, a semantic tree corresponding to each topic cluster is constructed with entities as nodes and entity relationships as connecting lines. The entity relationships include superior relationships, subordinate relationships, and peer relationships.
[0010] Receive the question intent corresponding to the current question, match the question intent with the topic cluster of the most recent historical dialogue, and determine whether they belong to the same topic cluster based on the matching result;
[0011] If they belong to the same topic cluster, then perform node matching in the semantic tree of the topic cluster corresponding to the current question to obtain matching nodes, and generate response content based on the matching nodes;
[0012] If they do not belong to the same topic cluster, then the matching is performed on nodes in other topic clusters, and the response content is generated based on the matching results.
[0013] Secondly, embodiments of the present invention provide a semantic tree-based historical dialogue management device, comprising:
[0014] The extraction module is used to acquire historical dialogue text and extract entities from the historical dialogue text to obtain an entity set containing multiple entities.
[0015] The clustering module is used to cluster the entities in the entity set using a clustering algorithm to obtain multiple topic clusters;
[0016] The construction module is used to perform semantic recognition based on the historical dialogue text corresponding to each entity, determine the entity relationship between each entity within the topic cluster, and construct the semantic tree corresponding to each topic cluster based on the entity relationship, with the entity as the node and the entity relationship as the connecting line, to obtain the semantic tree corresponding to each topic cluster. The entity relationship includes superior relationship, subordinate relationship and peer relationship.
[0017] The cluster matching module is used to receive the question intent corresponding to the current question, match the question intent with the topic cluster of the most recent historical dialogue, and determine whether they belong to the same topic cluster based on the matching result;
[0018] The first node matching module is used to perform node matching in the semantic tree of the topic cluster corresponding to the current question if they belong to the same topic cluster, obtain matching nodes, and generate response content based on the matching nodes.
[0019] The second node matching module is used to match nodes in other topic clusters if they do not belong to the same topic cluster, and generate response content based on the matching results.
[0020] Thirdly, embodiments of the present invention provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the semantic tree-based historical dialogue management method described in the first aspect.
[0021] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the semantic tree-based historical dialogue management method described in the first aspect.
[0022] This invention provides a method, apparatus, and related equipment for managing historical dialogues based on semantic trees. The method acquires historical dialogue text and extracts entities from it to obtain an entity set containing multiple entities. It then clusters the entities in the entity set using a clustering algorithm to obtain multiple topic clusters. Semantic recognition is performed on the historical dialogue text corresponding to each entity to determine the entity relationships between entities within each topic cluster. Based on these relationships, a semantic tree is constructed for each topic cluster, using entities as nodes and entity relationships as connecting lines. The method receives the intent of the current question and matches it with the topic cluster of the most recent historical dialogue. Based on the matching result, it determines whether the question belongs to the same topic cluster. If they belong to the same topic cluster, node matching is performed in the semantic tree of the current question's corresponding topic cluster to obtain matching nodes, and response content is generated based on these matching nodes. If they do not belong to the same topic cluster, matching is performed in the nodes of other topic clusters, and response content is generated based on the matching results. This method understands the user's intent, quickly locates relevant entities based on the semantic tree, avoids erroneous responses due to misunderstandings, and effectively improves the user experience. Attached Figure Description
[0023] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a flowchart illustrating an embodiment of the semantic tree-based historical dialogue management method provided by the present invention.
[0025] Figure 2 A schematic block diagram of a semantic tree-based historical dialogue management device provided in an embodiment of the present invention. Detailed Implementation
[0026] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0027] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0028] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0029] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0030] Please see Figure 1 This is a flowchart illustrating a semantic tree-based historical dialogue management method provided in an embodiment of the present invention. The method includes steps S110 to S152.
[0031] Step S110: Obtain historical dialogue text and extract entities from the historical dialogue text to obtain an entity set containing multiple entities;
[0032] In this embodiment, real-time interaction between the user and the system is captured, including user question text, system historical responses, dialogue timestamps, user identifiers, and other information, forming a structured dialogue dataset (fields include: dialogue ID, user ID, round number, text content, timestamp, and role type), thus obtaining historical dialogue text. The collected historical dialogue text is cleaned and standardized, including removing special symbols, emoticons, and redundant spaces, performing Chinese word segmentation and part-of-speech tagging (based on the jieba word segmentation tool), and unifying the text encoding format to ensure data consistency during subsequent processing.
[0033] Furthermore, the processed historical dialogue text undergoes deep analysis to extract key entities. Specifically, the key entity extraction process includes: using Named Entity Recognition (NER) algorithms combined with a domain dictionary to identify entities with specific meanings in the historical dialogue text, resulting in an entity set. These entities cover a rich variety of types, including topics, domains, people, times, places, organizations, and events. In an e-commerce customer service dialogue, the system can identify "yesterday" as a time entity, "Apple phone" as a product entity, and "screen" as a component entity in the sentence "Yesterday I bought an Apple phone, but its screen seems to have a problem." To further improve the accuracy and efficiency of entity extraction, word vectors and deep learning models are combined to conduct in-depth analysis of the historical dialogue text. Word vector technology maps each word in the text to a low-dimensional dense vector, thereby capturing the semantic relationships between words. By utilizing deep learning models based on the Transformer architecture, such as BERT (Bidirectional Encoder Representations from Transformers), we can better understand the contextual semantics of text and improve the accuracy of entity recognition.
[0034] Step S120: Cluster the entities in the entity set using a clustering algorithm to obtain multiple topic clusters;
[0035] In this embodiment, a feature extraction model is pre-constructed to extract the embedding features of each entity in the entity set, obtaining the embedding vectors corresponding to each entity set. The embedding vectors of all entities are then combined to obtain an embedding vector set. A clustering algorithm (K-means, DBSCAN, etc.) is used to perform coarse clustering on the embedding features in the embedding vector set to obtain initial topic clusters. A topic association strength matrix M(i,j) is constructed, and based on this matrix, cluster pairs in the initial topic clusters are merged or parent-child hierarchical relationships are established to form topic clusters. Here, M(i,j) represents cluster C. i With Cj The co-occurrence frequency × semantic similarity is used to merge clusters with M(i,j)≥ a preset threshold to obtain topic clusters.
[0036] In one embodiment, taking intelligent customer service handling electronic product inquiries as an example, all mobile phone-related entities, such as "Brand A mobile phone," "Brand B mobile phone," "mobile phone battery," and "mobile phone screen," are grouped into a single topic cluster named "Mobile Phone Related." Similarly, computer-related entities, such as "Lenovo computer," "computer memory," and "computer hard drive," are grouped into another topic cluster named "Computer Related." This method organizes disparate entities according to semantic topics, providing a clear structural framework for subsequent semantic tree construction and dialogue management.
[0037] Step S130: Perform semantic recognition based on the historical dialogue text corresponding to each entity, determine the entity relationship between each entity within the topic cluster, and construct the semantic tree corresponding to each topic cluster based on the entity relationship, with the entity as the node and the entity relationship as the connecting line, to obtain the semantic tree corresponding to each topic cluster.
[0038] In this embodiment, after the topic clusters are constructed, the relationships between entities within each topic cluster are determined based on semantic recognition, and a semantic tree is constructed to clearly display the logical connections between entities. Semantic tree construction is a complex and crucial process that relies on semantic understanding and relation extraction techniques in natural language processing. Dependency parsing is used to analyze the entity relationships between entities in a sentence, thereby determining the hypernym, hyponym, and co-nym of nodes in the semantic tree. In the sentence "I use a charger to charge my phone," dependency parsing reveals a "charging tool -- charging object" relationship between "charger" and "phone." Simultaneously, deep learning models, such as attention-based neural networks, are used to further explore the semantic relationships between entities. This model can focus on the importance of different parts of the text in determining entity relationships, thus more accurately identifying entity relationships.
[0039] In one embodiment, taking the "mobile phone related" topic cluster as an example, assume that entities such as "brand A mobile phone," "mobile phone battery," "charger," and "mobile phone screen" have been extracted. Through semantic analysis and relation extraction, it is determined that "mobile phone" ("brand A mobile phone" is an instance of "mobile phone") and "mobile phone battery" have a "whole-component" relationship, "mobile phone" and "mobile phone screen" also have a "whole-component" relationship, and "charger" and "mobile phone" have a "charging tool-charging object" relationship. Using "mobile phone" as the root node, "mobile phone battery" and "mobile phone screen" are its next-level nodes, connected by "whole-component" relationship lines; "charger" is another level node, connected to "mobile phone" by "charging tool-charging object" relationship lines, thus constructing a semantic tree for the "mobile phone related" topic cluster. In this way, each topic cluster can construct a corresponding semantic tree (the current node and its next-level nodes have a hierarchical relationship), making the semantic structure in the dialogue clearer and more intuitive, laying a solid foundation for the dialogue system to understand user intent and provide accurate responses.
[0040] Step S140: Receive the question intent corresponding to the current question, match the question intent with the topic cluster of the most recent historical dialogue, and determine whether they belong to the same topic cluster based on the matching result;
[0041] Step S151: If they belong to the same topic cluster, perform node matching in the semantic tree of the topic cluster corresponding to the current question to obtain matching nodes, and generate response content based on the matching nodes.
[0042] Step S152: If they do not belong to the same topic cluster, then match them in the nodes of other topic clusters, and generate the response content based on the matching results.
[0043] In this embodiment, upon receiving the intent behind a user's question, determining whether to switch topics and which topics to switch to, and how to determine whether to ask a rhetorical question or directly provide an answer based on semantic tree node status updates and answer conditions, are key steps in achieving efficient dialogue management. Specifically:
[0044] The system matches the intent of the current question with the topic cluster of the most recent historical conversation to determine if they belong to the same topic. If the intent matches, it indicates that the conversation continues under the same topic. The system then matches the node to which the intent belongs within the topic cluster of the most recent historical conversation to determine the matching node. Simultaneously, the activity flag of the matching node is updated, and its activity flag is enhanced according to a preset activity flag mechanism. For example, in a previous "phone-related" topic conversation, if a user asks "How is the battery life of an Apple phone?", the system determines that this question belongs to the "battery life" node within the "phone-related" topic. Based on the "phone-related" semantic tree, the system updates the activity flag of the "battery life" node (e.g., adjusting node brightness) to record the user's concern about phone battery life. Each time a node is matched, the activity flag is updated to the highest level (maximum node brightness). An activity decay mechanism is set to periodically refresh the activity flags of each node. According to the activity decay mechanism (the activity flag decreases with the number of conversation rounds and time (reducing node brightness), it reflects the activity level of the nodes involved in the conversation), the activity flag is updated accordingly.
[0045] Furthermore, if the intent of the question does not match the topic cluster of the most recent historical dialogue, matching is performed among nodes in other topic clusters. Matching is performed sequentially from high to low activity level according to the nodes in each semantic tree, following the priority order of sibling nodes, subordinate nodes, and superior nodes (this order can also be adjusted manually or intelligently by the system). If a matching node exists in other topic clusters, it is determined as a topic switch, and the response content is generated based on the information corresponding to the matching node. If no matching node exists in other topic clusters, a new topic cluster and corresponding semantic tree are constructed based on the current question's topic, and the activity identifier of the node to which the matched or newly created topic cluster / semantic tree belongs is updated. For example, when a user suddenly asks "Which computer graphics card is better?" in a "mobile phone related" topic dialogue, the system recognizes that the intent of the question belongs to the "computer related" topic, so the dialogue state is switched to the "computer related" topic cluster, and the interaction with the user continues based on the semantic tree of the new topic cluster and historical dialogue information.
[0046] In one embodiment, to respond to user needs more intelligently and accurately and provide high-quality dialogue services, after receiving the intent of the current question, it is necessary to check whether the intent meets preset response conditions. If it does, the system matches the intent with the topic cluster of the most recent historical dialogue. If it does not, the system determines that the current question lacks key information and generates corresponding counter-questions based on the missing key information. For example, if a user asks "Recommend a mobile phone for me" but does not mention key information such as budget or brand preference, the system will enter a counter-question state and ask the user, "What is your approximate budget for a mobile phone? Do you have any favorite brands?" to obtain complete question information. When the system determines that the key information of the question is complete and that it is capable of answering it, such as when a user asks "What is the screen size of a certain brand's 14th generation mobile phone?", the system directly provides the answer based on its knowledge reserves: "The screen size of a certain brand's 14th generation mobile phone is 6.1 inches." Through this flexible state tree update and answer decision mechanism, the system can respond to user needs more intelligently and accurately, provide high-quality dialogue services, and improve user experience.
[0047] This method acquires historical dialogue text and extracts entities from it, resulting in an entity set containing multiple entities. It then clusters the entities in the entity set using a clustering algorithm, obtaining multiple topic clusters. Semantic recognition is performed on the historical dialogue text corresponding to each entity to determine the entity relationships within each topic cluster. Based on these relationships, a semantic tree is constructed for each topic cluster, using entities as nodes and entity relationships as connections. The method receives the intent of the current question and matches it with the topic clusters of the most recent historical dialogue. If the matching results indicate whether the question belongs to the same topic cluster, node matching is performed in the semantic tree of the current question's corresponding topic cluster to obtain matching nodes, and response content is generated based on these matching nodes. If the question does not belong to the same topic cluster, matching is performed in nodes of other topic clusters, and response content is generated based on these matching results. This method understands the user's intent, quickly locates relevant entities based on the semantic tree, avoids erroneous responses due to misunderstandings, and effectively improves the user experience.
[0048] This invention also provides a semantic tree-based historical dialogue management device, which is used to execute any of the aforementioned semantic tree-based historical dialogue management methods. Specifically, please refer to... Figure 2 , Figure 2 This is a schematic block diagram of a semantic tree-based historical dialogue management device 100 provided in an embodiment of the present invention. The semantic tree-based historical dialogue management device 100 can be configured in a server.
[0049] like Figure 2As shown, the semantic tree-based historical dialogue management device 100 includes an extraction module 110, a clustering module 120, a construction module 130, a cluster matching module 140, a first node matching module 150, and a second node matching module 160.
[0050] Extraction module 110 is used to acquire historical dialogue text and extract entities from the historical dialogue text to obtain an entity set containing multiple entities;
[0051] Clustering module 120 is used to cluster entities in the entity set using a clustering algorithm to obtain multiple topic clusters;
[0052] The construction module 130 is used to perform semantic recognition based on the historical dialogue text corresponding to each entity, determine the entity relationship between each entity in the topic cluster, and construct the semantic tree corresponding to each topic cluster according to the entity relationship, with the entity as the node and the entity relationship as the connecting line, to obtain the semantic tree corresponding to each topic cluster. The entity relationship includes superior relationship, subordinate relationship and peer relationship.
[0053] The cluster matching module 140 is used to receive the question intent corresponding to the current question, match the question intent with the topic cluster of the most recent historical dialogue, and determine whether they belong to the same topic cluster based on the matching result;
[0054] The first node matching module 150 is used to perform node matching in the semantic tree of the topic cluster corresponding to the current question if they belong to the same topic cluster, obtain matching nodes, and generate response content based on the matching nodes.
[0055] The second node matching module 160 is used to match nodes in other topic clusters if they do not belong to the same topic cluster, and generate response content based on the matching results.
[0056] In one embodiment, the clustering module 120 includes:
[0057] The feature extraction unit is used to extract the embedding features of each entity in the entity set to obtain the embedding vector set corresponding to the entity set.
[0058] The first clustering unit is used to perform coarse clustering on the embedded features in the set of embedded vectors using a clustering algorithm to obtain an initial topic cluster;
[0059] The second clustering unit is used to construct a topic association strength matrix and merge cluster pairs in the initial topic clusters based on the topic association strength matrix to obtain multiple topic clusters.
[0060] In one embodiment, the semantic tree-based historical dialogue management device 110 further includes:
[0061] The preprocessing module is used to clean and standardize the historical dialogue text and unify the text encoding format.
[0062] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the semantic tree-based historical dialogue management method as described above.
[0063] In another embodiment of the invention, a computer-readable storage medium is provided. This computer-readable storage medium may be a non-volatile computer-readable storage medium. The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform the semantic tree-based historical dialogue management method as described above.
[0064] Those skilled in the art will readily understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention.
[0065] In the embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Units with the same function may be grouped into one unit. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, or it may be an electrical, mechanical, or other form of connection.
[0066] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention, depending on actual needs.
[0067] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0068] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks.
[0069] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A historical dialogue management method based on semantic tree, characterized in that, include: Obtain historical dialogue text and extract entities from the historical dialogue text to obtain an entity set containing multiple entities; The entities in the entity set are clustered using a clustering algorithm to obtain multiple topic clusters; Semantic recognition is performed based on the historical dialogue text corresponding to each entity to determine the entity relationship between each entity within the topic cluster. Based on the entity relationship, a semantic tree corresponding to each topic cluster is constructed with entities as nodes and entity relationships as connecting lines. The relationship between the nodes includes superior relationship, subordinate relationship and peer relationship. Receive the question intent corresponding to the current question, match the question intent with the topic cluster of the most recent historical dialogue, and determine whether they belong to the same topic cluster based on the matching result; If they belong to the same topic cluster, then perform node matching in the semantic tree of the topic cluster corresponding to the current question to obtain matching nodes, and generate response content based on the information corresponding to the matching nodes; If they do not belong to the same topic cluster, then the matching is performed on nodes in other topic clusters, and the response content is generated based on the matching results.
2. The semantic tree-based historical dialogue management method as described in claim 1, characterized in that, The entity set is clustered using a clustering algorithm to obtain multiple topic clusters, including: Extract the embedding features of each entity in the entity set to obtain the embedding vector set corresponding to the entity set; A clustering algorithm is used to coarsely cluster the embedding features in the embedding vector set to obtain an initial topic cluster; Construct a topic association strength matrix, and merge the cluster pairs in the initial topic cluster based on the topic association strength matrix to obtain multiple topic clusters.
3. The semantic tree-based historical dialogue management method as described in claim 1, characterized in that, After obtaining the historical dialogue text, the process includes: The historical dialogue text is cleaned and standardized, and the text encoding format is unified.
4. The semantic tree-based historical dialogue management method as described in claim 1, characterized in that, After performing node matching in the semantic tree of the topic cluster corresponding to the current problem and obtaining the matching node, the process includes: The activity identifier of the matching node is enhanced according to a preset activity identifier mechanism, wherein the activity identifier decreases with the number of session rounds and time.
5. The semantic tree-based historical dialogue management method as described in claim 4, characterized in that, The process of matching nodes in other topic clusters and generating response content based on the matching results includes: Iterate through the nodes in each topic cluster and match them according to the activity identifier from strong to weak.
6. The historical dialogue management method based on semantic tree as described in claim 1, characterized in that, After receiving the question intent corresponding to the current question, the process includes: Detect whether the intent of the question meets the preset response conditions; If satisfied, then match the question intent with the topic cluster of the most recent historical dialogue; If the conditions are not met, it is determined that the current problem is missing key information, and corresponding counter-questions are generated based on the missing key information.
7. The semantic tree-based historical dialogue management method as described in claim 1, characterized in that, The process of matching nodes in other topic clusters and generating response content based on the matching results includes: If a matching node exists in other topic clusters, the response content is generated based on the information corresponding to the matching node. If no matching node exists in other topic clusters, a new topic cluster and corresponding semantic tree are constructed based on the topic of the current problem.
8. A semantic tree-based historical dialogue management device, characterized in that, include: The extraction module is used to acquire historical dialogue text and extract entities from the historical dialogue text to obtain an entity set containing multiple entities. The clustering module is used to cluster the entities in the entity set using a clustering algorithm to obtain multiple topic clusters; The construction module is used to perform semantic recognition based on the historical dialogue text corresponding to each entity, determine the entity relationship between each entity within the topic cluster, and construct the semantic tree corresponding to each topic cluster based on the entity relationship, with the entity as the node and the entity relationship as the connecting line, to obtain the semantic tree corresponding to each topic cluster. The entity relationship includes superior relationship, subordinate relationship and peer relationship. The cluster matching module is used to receive the question intent corresponding to the current question, match the question intent with the topic cluster of the most recent historical dialogue, and determine whether they belong to the same topic cluster based on the matching result; The first node matching module is used to perform node matching in the semantic tree of the topic cluster corresponding to the current question if they belong to the same topic cluster, obtain matching nodes, and generate response content based on the matching nodes. The second node matching module is used to match nodes in other topic clusters if they do not belong to the same topic cluster, and generate response content based on the matching results.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the semantic tree-based historical dialogue management method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform the semantic tree-based historical dialogue management method as described in any one of claims 1 to 7.