Intelligent question and answer semantic understanding and enhanced rewriting optimization method based on multi-round dialogue

By analyzing the temporal context of historical dialogues and deconstructing them into multiple levels of semantics, a dialogue context encoding representation is constructed to identify explicit and implicit intentions and generate semantically enhanced rewritten statements. This solves the problem of insufficient contextual understanding in multi-turn dialogues in traditional question-answering systems, and improves the accuracy of question answering and user experience.

CN121614598BActive Publication Date: 2026-05-01SHANGHAI XIRUAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI XIRUAN TECH CO LTD
Filing Date
2026-02-02
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Traditional multi-turn dialogue question-and-answer systems cannot effectively capture contextual information in the dialogue history, resulting in poor performance when dealing with phenomena such as omission and reference.

Method used

By performing temporal analysis on the historical dialogue context, extracting the topic evolution path and entity co-occurrence relationship, constructing a dialogue context encoding representation, and using multi-level semantic decomposition to identify explicit and implicit intentions, generating semantically enhanced rewritten statements, and combining with the knowledge retrieval module to output text answers.

Benefits of technology

It improves the accuracy of question and answer in multi-turn dialogue scenarios, enhances the coherence and consistency of the dialogue system, reduces ambiguity and information omission, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121614598B_ABST
    Figure CN121614598B_ABST
Patent Text Reader

Abstract

The application provides a multi-round dialogue-based intelligent question and answer semantic understanding and enhanced rewriting optimization method, relates to the technical field of artificial intelligence semantic understanding, and comprises the following steps: obtaining a current query statement and a historical dialogue context, performing time sequence analysis on the historical dialogue context to construct dialogue context coding representation, performing multi-level semantic disassembly on the query statement to identify explicit and implicit intentions, generating a semantic enhanced rewriting statement based on an intention hierarchy structure, and finally performing semantic matching and retrieval to output an answer. The application can effectively improve the understanding accuracy of the real intention of the user in the multi-round dialogue, and improve the interactive experience and answer quality of the intelligent question and answer system.
Need to check novelty before this filing date? Find Prior Art

Description

Intelligent Question Answering Semantic Understanding and Enhanced Rewriting Optimization Methods Based on Multi-Turn Dialogue Technical Field

[0001] This invention relates to the field of artificial intelligence semantic understanding technology, and in particular to a method for intelligent question answering semantic understanding and enhanced rewriting optimization based on multi-turn dialogue. Background Technology

[0002] With the rapid development of artificial intelligence technology, intelligent dialogue systems have been widely applied in various fields such as customer service and personal assistants. Intelligent question-answering systems based on multi-turn dialogue can continuously interact with users, understanding their intent and providing relevant answers to meet their needs. During multi-turn dialogues, users' expressions are often concise and contain linguistic phenomena such as ellipsis and pronoun references, which places higher demands on the semantic understanding capabilities of intelligent question-answering systems.

[0003] Traditional multi-turn dialogue question-answering systems primarily focus on processing single-turn queries, failing to effectively capture contextual information from the dialogue history. This results in poor performance when handling phenomena such as ellipsis and pronoun references. In recent years, researchers have begun exploring methods to enhance query understanding using contextual information, inferring the complete semantics of the user's current query by analyzing historical dialogue context. However, existing technologies still have some significant shortcomings and deficiencies. Summary of the Invention

[0004] This invention provides a method for intelligent question-answering semantic understanding and enhanced rewriting optimization based on multi-turn dialogue, which can solve the problems in the prior art.

[0005] A first aspect of this invention provides an intelligent question-answering semantic understanding and enhanced rewriting optimization method based on multi-turn dialogue, comprising:

[0006] Obtain the query statement entered by the user in the current round and the historical dialogue context;

[0007] The historical dialogue context is analyzed temporally to extract the topic evolution path and entity co-occurrence relationship, and a dialogue context encoding representation is constructed in chronological order.

[0008] The query statement is semantically decomposed at multiple levels to identify explicit query intent and implicit demand intent. The implicit demand intent is obtained by analyzing the implicit information types and implicit constraints between the query statement and the contextual encoding representation of the dialogue, thus obtaining the intent hierarchy structure.

[0009] Based on the aforementioned intent hierarchy, the explicit query intent is resolved using a substitution and omission completion strategy to generate a literal complete statement, and the implicit demand intent is resolved using a semantic expansion strategy to generate a statement with deeper meaning, thus constructing a semantically enhanced rewritten statement.

[0010] The semantically enhanced rewritten statement is input into the knowledge retrieval module for semantic matching and retrieval, the text answer is output and updated to the historical dialogue context, and the dialogue context encoding representation is adjusted.

[0011] The historical dialogue context is analyzed temporally to extract the topic evolution path and entity co-occurrence relationship, and a dialogue context encoding representation is constructed in chronological order, including:

[0012] Semantic parsing is performed on each round of dialogue in the historical dialogue context to extract semantic triples, which include subject entities, predicate relations, and object entities.

[0013] The semantic triples are projected onto the semantic space in chronological order. The topic similarity and topic jump between adjacent rounds are calculated. When the topic similarity is higher than the similarity threshold, it is marked as a topic continuation node. When the topic jump is higher than the jump threshold, it is marked as a topic transfer node. By connecting the topic continuation nodes and the topic transfer nodes, the topic evolution path is formed and each node is assigned a topic decay weight. The topic decay weight decreases non-linearly over time.

[0014] The entities in the historical dialogue context are divided into temporal windows. The joint occurrence patterns of entity pairs are counted within each temporal window. The joint occurrence patterns include sequential co-occurrence, cross co-occurrence, and nested co-occurrence. The semantic coupling strength of entity pairs is calculated based on the type and frequency of the joint occurrence patterns.

[0015] The topic decay weight in the topic evolution path is fused and encoded with the semantic coupling strength to generate the dialogue context encoding representation.

[0016] The query statement is semantically decomposed at multiple levels to identify explicit query intent and implicit demand intent. The implicit demand intent is obtained by analyzing the implicit information types and implicit constraints between the query statement and the contextual encoding representation of the dialogue, resulting in an intent hierarchy structure, including:

[0017] The query statement is parsed using a semantic frame, the query frame type is identified and the corresponding required and optional frame slots are extracted, and the semantic content of the required frame slots already filled in the query statement is parsed into the explicit query intent.

[0018] The system detects the unfilled required and optional frame slots in the query statement, performs context dependency analysis on the unfilled slots, marks the slots whose fill values ​​can be obtained from the dialogue context encoding representation as context-dependent implicit requirements, and marks the slots whose fill values ​​cannot be obtained from the dialogue context encoding representation as knowledge reasoning implicit requirements.

[0019] For the context-dependent implicit requirement, semantic filling candidates are extracted from the dialogue context encoding representation, the semantic compatibility between the semantic filling candidates and the unfilled slots is calculated, and the semantic filling candidate with the highest semantic compatibility is selected as the implicit constraint. For the knowledge reasoning implicit requirement, the implicit information type is inferred based on the typical filling pattern of the query framework type, and the implicit requirement intent is formed by combining the implicit constraint.

[0020] The explicit query intent is taken as the dominant intent layer, and the implicit demand intent is taken as the auxiliary intent layer. A slot filling relationship is established between the dominant intent layer and the auxiliary intent layer to form the intent hierarchy structure.

[0021] The query statement is semantically framed to identify the query frame type and extract the corresponding required and optional frame slots. The semantic content of the filled required frame slots in the query statement is then parsed into the explicit query intent, including:

[0022] The query statement is parsed using a semantic framework to identify the sentence structure template and core semantic verbs. A framework classification feature pair is established based on the question pattern type of the sentence structure template and the action semantic category of the core semantic verbs. The query framework type corresponding to the query statement is located in a predefined query framework classification tree using the framework classification feature pair.

[0023] The corresponding frame slot configuration scheme is extracted based on the query frame type. The frame slot configuration scheme includes the slot semantic role definition of the required slots of the frame and the slot semantic role definition of the optional slots of the frame. The slot semantic role definition specifies the semantic component type and semantic constraint conditions that each slot needs to be filled.

[0024] The semantic component types of noun phrases, verb phrases and modifiers in the query statement are identified. The identified semantic component types are matched with the semantic role definition of the required slots in the frame. The semantic components that match the type are marked as filled required slots in the frame. The semantic content in the filled required slots in the frame is extracted. The semantic content is combined according to the semantic aggregation mode of the query frame type to generate the explicit query intent.

[0025] Based on the aforementioned intent hierarchy, the explicit query intent is processed using a referential resolution and omission completion strategy to generate a literal complete statement, while the implicit demand intent is processed using a semantic expansion strategy to generate a statement with deeper meaning. This results in the construction of a semantically enhanced rewritten statement, including:

[0026] The pronouns in the explicit query intent are subjected to pronoun dereference. Candidate entities that are semantically compatible with the pronouns are extracted from the dialogue context encoding representation. The distance weight between the candidate entities and the pronouns is calculated. The distance weight is calculated based on the temporal distance in the dialogue context encoding representation and the co-occurrence frequency in the entity co-occurrence relationship. The candidate entity with the smallest distance weight is selected to replace the pronoun, and the intermediate statement is obtained.

[0027] The intermediate statement is compared with its corresponding standard query template to identify semantically missing positions. Historical semantic content that is consistent with the semantic role of the semantically missing position is located from the topic evolution path and filled into the semantically missing position to generate a literal complete statement.

[0028] Based on the implicit demand intent, a semantic direction guidance vector is calculated, and a ray projection retrieval is performed in the domain semantic knowledge graph to obtain candidate extended concepts. The semantic gain value is calculated, and the candidate extended concept with the highest semantic gain value is selected for fusion to generate a statement with deep meaning.

[0029] Based on the hierarchical relationship in the intent hierarchy, when the implicit demand intent belongs to the explicit query intent, the deep meaning statement is appended to the literal complete statement; when they are independent, they are placed side by side to construct the semantically enhanced rewritten statement.

[0030] Based on the implicit demand intent, a semantic direction guidance vector is calculated, and candidate extended concepts are obtained through ray projection retrieval in the domain semantic knowledge graph. A semantic gain value is calculated, and the candidate extended concept with the highest semantic gain value is selected for fusion to generate a deep-meaning statement, including:

[0031] Extract the semantic core representation from the implicit demand intention, extract the historical topic semantic distribution from the dialogue context encoding representation, calculate the semantic gravitational field strength of the historical topic semantic distribution on the semantic core representation, and calculate its gradient direction as the semantic direction guiding vector.

[0032] A multi-scale semantic hierarchy structure is constructed in the domain semantic knowledge graph. The multi-scale semantic hierarchy structure includes a concept granularity layer, a relation granularity layer, and an attribute granularity layer. A hierarchical ray projection retrieval is performed on each granularity layer along the semantic direction guiding vector. Concept nodes with a semantic resonance degree exceeding the activation threshold with the implicit demand intention are extracted in each granularity layer as candidate extended concepts.

[0033] For each of the candidate extended concepts, a semantic extended subgraph containing the candidate extended concept is constructed, and the weighted fusion value of the topological similarity and semantic coverage between the semantic extended subgraph and the dialogue context encoding representation is calculated as the semantic gain value of the candidate extended concept.

[0034] The candidate extended concept with the highest semantic gain value is selected, and the multi-hop relationship path of the candidate extended concept in the semantic extension subgraph is extracted. The path semantics are then fused into the implicit demand intent according to the path weight allocation scheme of the multi-hop relationship path to generate the deep meaning statement.

[0035] The semantically enhanced rewritten statement is input into the knowledge retrieval module for semantic matching and retrieval, the text answer is output and updated to the historical dialogue context, and the dialogue context encoding representation is adjusted, including:

[0036] The semantically enhanced rewritten statement is input into the knowledge retrieval module, and the semantically enhanced rewritten statement is semantically vectorized to obtain the query semantic vector.

[0037] In the knowledge base, candidate knowledge fragments are semantically vectorized and encoded to obtain a set of knowledge semantic vectors. The semantic similarity between the query semantic vector and each knowledge semantic vector is calculated. The candidate knowledge fragments are sorted according to the semantic similarity. Candidate knowledge fragments that meet the matching conditions are selected as matching knowledge fragments.

[0038] From the matched knowledge fragments, extract information content corresponding to the query target of the semantically enhanced rewritten statement, organize the information content into natural language form, and generate a text answer;

[0039] The query statement of the current round is combined with the text answer to form the dialogue record of the current round. The current round dialogue record is appended to the historical dialogue context to form an updated historical dialogue context. The temporal parsing is then performed again to extract the updated topic evolution path and entity co-occurrence relationship, and the dialogue context encoding representation is adjusted.

[0040] A second aspect of this invention provides an intelligent question-answering semantic understanding and enhanced rewriting optimization system based on multi-turn dialogue, comprising:

[0041] The first unit is used to obtain the query statement entered by the user in the current round and the historical dialogue context;

[0042] The second unit is used to perform temporal analysis on the historical dialogue context, extract the topic evolution path and entity co-occurrence relationship, and construct a dialogue context encoding representation in chronological order.

[0043] The third unit is used to perform multi-level semantic decomposition on the query statement, identify explicit query intent and implicit demand intent, wherein the implicit demand intent is obtained by analyzing the implicit information type and implicit constraint conditions between the query statement and the dialogue context encoding representation, and obtains the intent hierarchy structure.

[0044] The fourth unit is used to generate literal complete sentences for the explicit query intent by using the referential resolution and omission completion strategy based on the intent hierarchy, and to generate deep meaning sentences for the implicit demand intent by using the semantic expansion strategy, thereby constructing semantically enhanced rewritten sentences.

[0045] The fifth unit is used to input the semantically enhanced rewritten statement into the knowledge retrieval module for semantic matching and retrieval, output the text answer and update it to the historical dialogue context, and adjust the dialogue context encoding representation.

[0046] A third aspect of the present invention,

[0047] An electronic device is provided, comprising:

[0048] processor;

[0049] Memory used to store processor-executable instructions;

[0050] The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.

[0051] Fourth aspect of the embodiments of the present invention,

[0052] A computer-readable storage medium is provided, having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.

[0053] The beneficial effects of this application are as follows:

[0054] By performing temporal analysis on the historical dialogue context, extracting the topic evolution path and entity co-occurrence relationship, and constructing a dialogue context encoding representation, the semantic coherence and contextual dependency relationships in multi-turn dialogues are effectively captured, improving the system's ability to understand complex dialogue scenarios.

[0055] This innovative approach employs a multi-level semantic decomposition mechanism, which not only identifies explicit query intent but also mines implicit user needs by analyzing the implicit information types and constraints between the query statement and the contextual encoding, forming a complete hierarchical intent structure. This overcomes the limitations of traditional question-answering systems that only focus on surface semantics. For explicit intent, it uses referential resolution and omission completion strategies; for implicit intent, it employs semantic expansion strategies, generating comprehensive and accurate semantically enhanced rewritten statements, significantly improving question-answering accuracy in complex multi-turn dialogue scenarios.

[0056] Dynamically updating the dialogue context encoding representation enables the question-answering system to continuously adapt to changes and evolutions in dialogue topics, enhancing the coherence and consistency of the intelligent question-answering system in long-term dialogues, reducing ambiguity and information omissions in multi-turn dialogues, improving user experience and interaction efficiency, and demonstrating significant practical value and application prospects. Attached Figure Description

[0057] Figure 1 is a flowchart illustrating the intelligent question-answering semantic understanding and enhanced rewriting optimization method based on multi-turn dialogue according to an embodiment of the present invention;

[0058] Figure 2 is a flowchart illustrating the method for constructing an intent hierarchy according to an embodiment of the present invention. Detailed Implementation

[0059] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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 embodiments of the present invention, and not all embodiments. 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.

[0060] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0061] Figure 1 is a flowchart illustrating the intelligent question-answering semantic understanding and enhanced rewriting optimization method based on multi-turn dialogue according to an embodiment of the present invention. As shown in Figure 1, the method includes:

[0062] Obtain the query statement entered by the user in the current round and the historical dialogue context;

[0063] The historical dialogue context is analyzed temporally to extract the topic evolution path and entity co-occurrence relationship, and a dialogue context encoding representation is constructed in chronological order.

[0064] The query statement is semantically decomposed at multiple levels to identify explicit query intent and implicit demand intent. The implicit demand intent is obtained by analyzing the implicit information types and implicit constraints between the query statement and the contextual encoding representation of the dialogue, thus obtaining the intent hierarchy structure.

[0065] Based on the aforementioned intent hierarchy, the explicit query intent is resolved using a substitution and omission completion strategy to generate a literal complete statement, and the implicit demand intent is resolved using a semantic expansion strategy to generate a statement with deeper meaning, thus constructing a semantically enhanced rewritten statement.

[0066] The semantically enhanced rewritten statement is input into the knowledge retrieval module for semantic matching and retrieval, the text answer is output and updated to the historical dialogue context, and the dialogue context encoding representation is adjusted.

[0067] In one optional implementation, the historical dialogue context is subjected to temporal parsing to extract topic evolution paths and entity co-occurrence relationships, and a dialogue context encoding representation is constructed in chronological order, including:

[0068] Semantic parsing is performed on each round of dialogue in the historical dialogue context to extract semantic triples, which include subject entities, predicate relations, and object entities.

[0069] The semantic triples are projected onto the semantic space in chronological order. The topic similarity and topic jump between adjacent rounds are calculated. When the topic similarity is higher than the similarity threshold, it is marked as a topic continuation node. When the topic jump is higher than the jump threshold, it is marked as a topic transfer node. By connecting the topic continuation nodes and the topic transfer nodes, the topic evolution path is formed and each node is assigned a topic decay weight. The topic decay weight decreases non-linearly over time.

[0070] The entities in the historical dialogue context are divided into temporal windows. The joint occurrence patterns of entity pairs are counted within each temporal window. The joint occurrence patterns include sequential co-occurrence, cross co-occurrence, and nested co-occurrence. The semantic coupling strength of entity pairs is calculated based on the type and frequency of the joint occurrence patterns.

[0071] The topic decay weight in the topic evolution path is fused and encoded with the semantic coupling strength to generate the dialogue context encoding representation.

[0072] In this specific embodiment, in order to achieve efficient processing and understanding of the historical dialogue context, it is necessary to perform semantic parsing on each round of dialogue in the historical dialogue context and extract semantic triples. The semantic triples include subject entity, predicate relation and object entity, which can accurately represent the basic semantic structure of the dialogue content. The semantic parsing adopts the method based on dependency parsing, performs word segmentation and part-of-speech tagging on the dialogue text, and constructs a dependency parsing tree to identify the core predicate and its associated subject and object entities. For example, for the dialogue "Xiaoming went to the zoo yesterday", the semantic triple <Xiaoming, went, zoo> can be extracted.

[0073] After extracting semantic triples, these triples are projected onto the semantic space in chronological order. The semantic space is represented by multi-dimensional vectors. Each triple is transformed into a vector representation through a pre-trained language model. The topic similarity and topic jump between semantic triples in adjacent rounds of dialogue are calculated. The topic similarity is obtained by calculating the cosine similarity of the semantic vectors, while the topic jump is represented by calculating the Euclidean distance of the semantic vectors to indicate the degree of semantic difference. When the topic similarity is higher than a preset similarity threshold (e.g., 0.7), the node is marked as a topic continuation node; when the topic jump is higher than a jump threshold (e.g., 0.5), the node is marked as a topic transition node.

[0074] By connecting topic continuation nodes and topic transition nodes, a complete topic evolution path is formed. Each node on the path is assigned a topic decay weight, which decreases non-linearly over time. The weight calculation adopts an exponential decay function, specifically, the node weight is inversely proportional to the exponential function of its time distance from the current moment. This design reflects that in a dialogue, the influence of recent topics on the current context is usually greater than that of long-term topics, but some key topics may continue to affect the entire dialogue process.

[0075] Entities in the historical dialogue context are divided into temporal windows. The size of the temporal window can be dynamically adjusted according to the characteristics of the dialogue. Generally, 3-5 rounds of dialogue are taken as one window. Within each temporal window, the joint occurrence pattern of entity pairs is counted, including sequential co-occurrence, cross co-occurrence, and nested co-occurrence. Sequential co-occurrence means that two entities appear in sequence within the window; cross co-occurrence means that two entities appear alternately within the window; and nested co-occurrence means that the occurrence range of one entity completely includes another entity. For example, when discussing "smartphones", there will be sequential co-occurrence of "product A" and "system A", cross co-occurrence of "product B" and "system B", and nested co-occurrence of "electronic products" and "mobile phones".

[0076] The semantic coupling strength of entity pairs is calculated based on the type and frequency of co-occurrence patterns. Different weights are assigned to different types of co-occurrence patterns: sequential co-occurrence has a weight of 0.7, cross-co-occurrence has a weight of 0.85, and nested co-occurrence has a weight of 0.9. The semantic coupling strength of an entity pair is equal to the sum of the products of its co-occurrence frequency and its corresponding weight. This calculation method reflects the different contributions of different co-occurrence patterns to the semantic association between entities.

[0077] The topic decay weight and semantic coupling strength in the topic evolution path are fused and encoded to generate the final dialogue context encoding representation. The fusion process adopts a weighted summation method, with the topic decay weight and semantic coupling strength assigned weights of 0.6 and 0.4, respectively. The resulting encoding representation can simultaneously reflect the topic evolution trajectory of the dialogue and the complex relationship between entities, providing rich contextual information for subsequent dialogue understanding and generation tasks.

[0078] In practical applications, such as intelligent customer service systems, this dialogue context encoding representation can help the system accurately understand changes in user intent. For example, when a user shifts from asking about "return methods" to "exchange process," the topic evolution path can identify that these are related but different topics; through entity co-occurrence relationships, it can be found that the entities "return" and "exchange" are highly related, thereby generating a more coherent and relevant response.

[0079] The entire processing flow exhibits excellent adaptability and scalability, allowing parameters to be adjusted based on the characteristics of different dialogue scenarios. For dialogues spanning extended periods, the temporal window size can be increased; for dialogues within specialized domains, domain knowledge can be introduced to enhance the accuracy of semantic parsing. Through this temporal parsing and topic evolution tracking, combined with the dynamic capture of entity relationships, a more comprehensive understanding of the dialogue context can be achieved, thereby improving the intelligence level of the dialogue system.

[0080] Figure 2 is a flowchart illustrating the method for constructing an intent hierarchy structure according to an embodiment of the present invention. In an optional implementation, the query statement is subjected to multi-level semantic decomposition to identify explicit query intent and implicit demand intent. The implicit demand intent is obtained by analyzing the implicit information types and implicit constraints between the query statement and the contextual encoding representation of the dialogue, resulting in an intent hierarchy structure, including:

[0081] The query statement is parsed using a semantic frame, the query frame type is identified and the corresponding required and optional frame slots are extracted, and the semantic content of the required frame slots already filled in the query statement is parsed into the explicit query intent.

[0082] The system detects the unfilled required and optional frame slots in the query statement, performs context dependency analysis on the unfilled slots, marks the slots whose fill values ​​can be obtained from the dialogue context encoding representation as context-dependent implicit requirements, and marks the slots whose fill values ​​cannot be obtained from the dialogue context encoding representation as knowledge reasoning implicit requirements.

[0083] For the context-dependent implicit requirement, semantic filling candidates are extracted from the dialogue context encoding representation, the semantic compatibility between the semantic filling candidates and the unfilled slots is calculated, and the semantic filling candidate with the highest semantic compatibility is selected as the implicit constraint. For the knowledge reasoning implicit requirement, the implicit information type is inferred based on the typical filling pattern of the query framework type, and the implicit requirement intent is formed by combining the implicit constraint.

[0084] The explicit query intent is taken as the dominant intent layer, and the implicit demand intent is taken as the auxiliary intent layer. A slot filling relationship is established between the dominant intent layer and the auxiliary intent layer to form the intent hierarchy structure.

[0085] In this specific embodiment, user queries in a dialogue system often contain multi-level semantic information, including explicit direct needs and implicit needs hidden in the context. The input query is semantically framed to identify the query frame type and extract the corresponding frame slots. The query frame type can be one of several predefined types, such as query, navigation, and transaction. Frame slots are divided into two categories: required frame slots and optional frame slots. Required frame slots refer to the basic semantic elements that the query of this type must contain, while optional frame slots are supplementary elements that can further refine the query intent.

[0086] Taking restaurant search as an example, when a user enters "find a reasonably priced restaurant," the search frame type is identified as "restaurant search." The required slots in the frame include "search object" and "search action," while the optional slots include "price range," "location," and "cuisine." In this example, the required slot "search object" is filled with "restaurant," the "search action" is filled with "find," the optional slot "price range" is filled with "reasonably priced," and other optional slots such as "location" and "cuisine" are not yet filled.

[0087] The semantic content of the required frame slots already filled in the query statement is parsed into explicit query intent. In the example above, the explicit query intent is "find a restaurant," which is a clearly expressed need by the user. This step is achieved through semantic analysis techniques, including dependency parsing and semantic role labeling, to extract the core semantic structure of the query statement. Unfilled required and optional frame slots in the query statement are detected. For these unfilled slots, context dependency analysis is performed to determine whether they can obtain filling values ​​from the dialogue context encoding representation. The dialogue context encoding representation refers to the vector representation obtained by encoding the current dialogue history through an encoder (such as BERT, RoBERTa, or other pre-trained models).

[0088] For unfilled slots, based on whether the fill value can be obtained from the dialogue context, they are divided into two categories: context-dependent implicit needs and knowledge-inference implicit needs. Context-dependent implicit needs refer to information that, although not explicitly mentioned in the current query, has appeared in previous conversations. Knowledge-inference implicit needs are information that, although neither mentioned in the current query nor appearing in previous conversations, is essential for completing the query.

[0089] Continuing with the example above, suppose that in the previous conversation, the user mentioned "I am near shopping mall A". Then the unfilled frame slot "Location" can obtain a fill value from the dialogue context and is marked as a context-dependent implicit requirement. The "Cuisine" slot was not mentioned in the previous conversation and is marked as a knowledge-reasoning implicit requirement.

[0090] To address context-dependent implicit requirements, semantic filling candidates are extracted from the dialogue context encoding representation. Specifically, each possible entity or attribute value in the dialogue history is converted into a vector representation, and the cosine similarity between these vectors and the vectors of unfilled slots is calculated to obtain semantic compatibility. The semantic filling candidate with the highest semantic compatibility is selected as the implicit constraint. In the example, "near A shopping mall" is selected as the filling value for the "location" slot and is determined as the implicit constraint.

[0091] For knowledge-based implicit needs, the type of implicit information can be inferred from the typical filling patterns of the query frame type. The typical filling patterns are common slot combination patterns learned from a large amount of historical query data. For example, in the restaurant query frame, if the query location and price range are known, users usually pay more attention to the type of restaurant suitable for the current time (breakfast, lunch or dinner). Therefore, the type of implicit information in the "cuisine" slot can be inferred from the query time, such as a preference for breakfast restaurants in the morning and a preference for full-course restaurants in the evening.

[0092] By combining implicit constraints derived from context-dependent implicit requirements and implicit information types inferred from knowledge-reasoning implicit requirements, a complete implicit requirement intent is formed. In the example, the implicit requirement intent might be "near Shopping Mall A, consider the types of restaurants suitable for the current time." The explicit query intent is designated as the dominant intent layer, and the implicit requirement intent as the auxiliary intent layer. A slot-filling relationship is established between the two, forming an intent hierarchy. The dominant intent layer directly reflects the user's explicit needs, while the auxiliary intent layer provides supplementary information, enabling the system to more accurately understand and respond to user queries. The two intent layers are connected through a slot-filling relationship; information from the auxiliary intent layer can fill unfilled slots in the dominant intent layer, thus generating a complete query understanding.

[0093] In practical applications, this multi-level semantic decomposition method can effectively handle various complex situations in dialogues, such as referential resolution and contextual dependencies, and greatly improve the understanding ability and response accuracy of the dialogue system.

[0094] In one optional implementation, the query statement is semantically framed to identify the query frame type and extract the corresponding required and optional frame slots. The semantic content of the filled required frame slots in the query statement is then parsed into the explicit query intent, including:

[0095] The query statement is parsed using a semantic framework to identify the sentence structure template and core semantic verbs. A framework classification feature pair is established based on the question pattern type of the sentence structure template and the action semantic category of the core semantic verbs. The query framework type corresponding to the query statement is located in a predefined query framework classification tree using the framework classification feature pair.

[0096] The corresponding frame slot configuration scheme is extracted based on the query frame type. The frame slot configuration scheme includes the slot semantic role definition of the required slots of the frame and the slot semantic role definition of the optional slots of the frame. The slot semantic role definition specifies the semantic component type and semantic constraint conditions that each slot needs to be filled.

[0097] The semantic component types of noun phrases, verb phrases and modifiers in the query statement are identified. The identified semantic component types are matched with the semantic role definition of the required slots in the frame. The semantic components that match the type are marked as filled required slots in the frame. The semantic content in the filled required slots in the frame is extracted. The semantic content is combined according to the semantic aggregation mode of the query frame type to generate the explicit query intent.

[0098] In this specific embodiment, the query statement is semantically parsed to identify its sentence structure template and core semantic verbs. The specific implementation process is as follows: The input query statement is subjected to lexical and syntactic analysis using natural language processing technology to identify the main components of the sentence, including subject, predicate, and object. Based on the syntactic analysis results, sentence structure templates are extracted, such as "whether-a-question," "how-a-question," and "why-a-question." Simultaneously, core semantic verbs in the sentence are identified, such as "query," "recommend," and "book," and the action semantic category of the verb is determined according to a predefined semantic classification system, such as "information acquisition," "transaction operation," and "status query." For example, for the query statement "How to book a flight from City S to City B tomorrow," the identified sentence structure template is "how-a-question," the core semantic verb is "book," and the action semantic category is "transaction operation."

[0099] Based on the identified sentence structure template's question pattern type and the core semantic verb's action semantic category, frame classification feature pairs are established. Each frame classification feature pair is a binary tuple composed of a question pattern type and an action semantic category, such as <"How-type question", "Transaction operation type">. Using a pre-established query frame classification tree, the input frame classification feature pairs are matched to locate the query frame type corresponding to the query statement. The query frame classification tree is a hierarchical frame type organization structure, where each node represents a query frame type, and the parent-child relationship between nodes represents the generalization and specialization relationship of the frame type. Continuing the example above, the frame classification feature pair <"How-type question", "Transaction operation type"> matches "Operation guidance query frame" in the query frame classification tree.

[0100] After determining the query frame type, the corresponding frame slot configuration scheme is extracted based on the type. The frame slot configuration scheme is a slot structure predefined for each query frame type, which includes the slot semantic role definition of the required slots and the slot semantic role definition of the optional slots. The slot semantic role definition specifies the semantic component type and semantic constraint conditions that each slot needs to be filled.

[0101] For the "operation guidance query framework", the required slots of the framework include "operation object" and "operation action", and the optional slots of the framework include "time", "location", "method", etc. Each slot has its corresponding semantic role definition. For example, the semantic role definition of the "operation object" slot is "must be an operable entity object, such as a product or service".

[0102] Semantic component type identification is performed on noun phrases, verb phrases, and modifiers in the query statement. Using deep learning models or rule-based methods, the semantic component type of each phrase in the query statement is identified, such as "entity noun," "time expression," and "location expression." For the query statement "How to book a flight from City S to City B tomorrow," the identified semantic components include: "book" (verb phrase), "tomorrow" (time expression), "City S" (location expression), "City B" (location expression), and "flight ticket" (entity noun).

[0103] The identified semantic component types are matched against the semantic role definitions of the required slots in the framework. By comparing the type characteristics of the semantic component with the requirements of the slot semantic role definition, it is determined whether the semantic component is suitable for filling a specific slot. Semantic components with successful type matching are marked as filled required slots in the framework. In the example, "booking" is identified as matching the "action" slot, "ticket" is identified as matching the "object" slot, while "tomorrow," "City S," and "City B" are identified as matching the "time" and "location" slots in the optional slots of the framework.

[0104] Extract the semantic content from the required slots of the populated frame, and combine this semantic content according to the semantic aggregation pattern of the query frame type to generate an explicit query intent. The semantic aggregation pattern defines how to combine the semantic content of each slot into a complete expression of query intent. For the example query, its explicit query intent can be expressed as: "The user wants to know how to book a flight ticket." This explicit query intent clearly expresses the user's core need and provides a clear direction for subsequent query processing.

[0105] The semantic framework parsing method described above can not only accurately identify the user's explicit query intent, but also extract key semantic slot information from the query, providing crucial support for subsequent query understanding and result generation. Furthermore, this method can also identify information in the user's query that is not explicitly expressed but is actually needed, thereby improving the comprehensiveness and accuracy of query understanding.

[0106] In one optional implementation, based on the intent hierarchy, the explicit query intent is processed using a referential resolution and omission completion strategy to generate a literal complete statement, and the implicit demand intent is processed using a semantic expansion strategy to generate a statement with deeper meaning, thus constructing a semantically enhanced rewritten statement, including:

[0107] The pronouns in the explicit query intent are subjected to pronoun dereference. Candidate entities that are semantically compatible with the pronouns are extracted from the dialogue context encoding representation. The distance weight between the candidate entities and the pronouns is calculated. The distance weight is calculated based on the temporal distance in the dialogue context encoding representation and the co-occurrence frequency in the entity co-occurrence relationship. The candidate entity with the smallest distance weight is selected to replace the pronoun, and the intermediate statement is obtained.

[0108] The intermediate statement is compared with its corresponding standard query template to identify semantically missing positions. Historical semantic content that is consistent with the semantic role of the semantically missing position is located from the topic evolution path and filled into the semantically missing position to generate a literal complete statement.

[0109] Based on the implicit demand intent, a semantic direction guidance vector is calculated, and a ray projection retrieval is performed in the domain semantic knowledge graph to obtain candidate extended concepts. The semantic gain value is calculated, and the candidate extended concept with the highest semantic gain value is selected for fusion to generate a statement with deep meaning.

[0110] Based on the hierarchical relationship in the intent hierarchy, when the implicit demand intent belongs to the explicit query intent, the deep meaning statement is appended to the literal complete statement; when they are independent, they are placed side by side to construct the semantically enhanced rewritten statement.

[0111] In this specific embodiment, the processing of explicit query intent requires the execution of a referential resolution process, which extracts candidate entities that are semantically compatible with the referential word from the dialogue context encoding representation. For example, when a user asks "How much does it cost?", it is necessary to determine what kind of product "it" refers to. Specifically, a candidate entity pool is established, which contains all entities that appear in the dialogue history, and each entity is labeled with its semantic type. When a referential word is encountered, a set of candidate entities with semantically compatible types is selected based on the grammatical features of the referential word (such as gender and quantity).

[0112] When calculating the distance weight between candidate entities and pronouns, a comprehensive formula is used: Distance Weight = α × Temporal Distance + β × Reciprocal of Co-occurrence Frequency. Here, temporal distance represents the difference between the number of times the candidate entity appeared in the dialogue history and the current round; co-occurrence frequency represents the number of times the pronoun and candidate entity appear together in the corpus. α and β are adjustable parameters, adjusted according to the characteristics of different domains, generally ranging from 0 to 1. For example, in the e-commerce domain, α can be set to 0.7 and β to 0.3, because the most recently mentioned product is the object of user attention. Ultimately, the candidate entity with the smallest distance weight is selected to replace the pronoun, resulting in the intermediate sentence.

[0113] To address the issue of semantic missing parts, the missing locations are identified by comparing the semantic integrity of the intermediate statement with that of the standard query template. The standard query template is a predefined complete query structure containing necessary semantic roles, such as "query + [product] + of + [attribute]". By comparing the structure of the intermediate statement with the template, missing semantic roles are marked. For example, a user query for "how much is the price" lacks the semantic role of the product entity. From the topic evolution path, historical content matching the semantic role at the missing location is searched. The topic evolution path is a directed graph constructed based on the dialogue history, recording the changes in topic entities. By tracing this path back, the most recent content matching the current semantic role is found, such as the name of the most recently discussed product, and this content is filled into the semantic missing location to generate a literal complete statement.

[0114] For implicit demand intentions, a semantic direction guidance vector is calculated. Based on user queries and historical interaction information, potential user concerns, such as product comparison, price sensitivity, or quality concern, are extracted and mapped into vector representations in the semantic space. For example, when a user asks "How is this phone?", based on the user's repeated viewing of cost-effectiveness information in historical interactions, it can be inferred that the user's concern is biased towards cost-effectiveness, and a semantic guidance vector biased towards "cost-effectiveness" is generated.

[0115] Ray projection retrieval is performed in the domain semantic knowledge graph. Starting from the current query semantics, the ray is extended along the direction of the semantic guidance vector to obtain candidate extended concepts that fall near the ray. The domain semantic knowledge graph is pre-constructed and contains various relationships between entities. For example, the mobile phone product node is connected to attribute nodes such as performance, price, and battery life. The semantic gain value of the candidate extended concepts is calculated to measure the information increment that the addition can bring to the original query. The candidate concept with the highest semantic gain value is selected for fusion to generate a statement with deeper meaning.

[0116] Based on the hierarchical relationship in the intent hierarchy, when the implicit demand intent belongs to the explicit query intent, the deeper meaning statement is added as supplementary information to the literal complete statement, such as "query the price of mobile phone M and compare the configuration of other brands of mobile phones in the same price range"; when the two intents are independent, a parallel structure is adopted, such as "query the price of mobile phone M and recommend mobile phones suitable for games", and finally construct a semantically enhanced rewritten statement.

[0117] In practical applications, such as intelligent customer service scenarios, when a user asks "Is it expensive?", the system identifies "it" as referring to the "M phone" mentioned earlier, completes the missing comparison object, and infers the user's focus on cost-effectiveness based on the user's browsing history. Finally, the query is rewritten as "How does the price of the M phone compare to the N phone with the same configuration?", enabling the system to provide answers that better meet the user's deeper needs.

[0118] In one optional implementation, based on the implicit demand intent, a semantic direction guidance vector is calculated, and candidate extended concepts are obtained through ray projection retrieval in the domain semantic knowledge graph. A semantic gain value is calculated, and the candidate extended concept with the highest semantic gain value is selected for fusion to generate a deep-meaning statement, including:

[0119] Extract the semantic core representation from the implicit demand intention, extract the historical topic semantic distribution from the dialogue context encoding representation, calculate the semantic gravitational field strength of the historical topic semantic distribution on the semantic core representation, and calculate its gradient direction as the semantic direction guiding vector.

[0120] A multi-scale semantic hierarchy structure is constructed in the domain semantic knowledge graph. The multi-scale semantic hierarchy structure includes a concept granularity layer, a relation granularity layer, and an attribute granularity layer. A hierarchical ray projection retrieval is performed on each granularity layer along the semantic direction guiding vector. Concept nodes with a semantic resonance degree exceeding the activation threshold with the implicit demand intention are extracted in each granularity layer as candidate extended concepts.

[0121] For each of the candidate extended concepts, a semantic extended subgraph containing the candidate extended concept is constructed, and the weighted fusion value of the topological similarity and semantic coverage between the semantic extended subgraph and the dialogue context encoding representation is calculated as the semantic gain value of the candidate extended concept.

[0122] The candidate extended concept with the highest semantic gain value is selected, and the multi-hop relationship path of the candidate extended concept in the semantic extension subgraph is extracted. The path semantics are then fused into the implicit demand intent according to the path weight allocation scheme of the multi-hop relationship path to generate the deep meaning statement.

[0123] In this specific embodiment, when extracting the semantic core representation from the implicit demand intention, a deep semantic encoder is used to encode the implicit demand intention to obtain a semantic vector representation of dimension d. The encoder contains a multi-layer bidirectional Transformer structure, which can capture key semantic information in the demand intention. For example, when a user expresses the implicit demand intention of "wanting to find a quiet place", the encoded semantic core representation will highlight the two semantic core elements of "quiet" and "place".

[0124] When extracting the semantic distribution of historical topics from the dialogue context encoding representation, a sliding window mechanism is used to weight and fuse the content of the most recent n rounds of dialogue, giving higher weight to recent dialogues and lower weight to distant dialogues, and constructing a semantic distribution vector of historical topics. In practical applications, n is usually taken as 3 to 5 rounds to ensure contextual coherence.

[0125] Based on the acquired semantic core representation and historical topic semantic distribution, the semantic gravitational field strength is calculated. The semantic gravitational field strength is a measure of the semantic attraction of the historical topic semantic distribution to the semantic core representation. It is calculated using a combination of cosine similarity and Euclidean distance. Specifically, the semantic core representation is regarded as a point in the semantic space. The vector field formed by the historical topic semantic distribution exerts a gravitational force on this point. The gravitational field strength F is equal to the semantic relevance multiplied by the inverse proportional function of semantic distance. The semantic relevance is calculated using cosine similarity, which represents the consistency of semantic direction. The semantic distance is calculated using the exponential decay function of Euclidean distance, which represents the distance influence in the semantic space.

[0126] After calculating the semantic gravitational field strength, a semantic direction guidance vector is obtained by performing gradient analysis on the gravitational field. This vector indicates the optimal direction for semantic expansion starting from the current semantic core representation. The calculation method is to perform a weighted summation of the gravitational field strength generated by each topic, with the weights determined based on the importance and timeliness of the topic.

[0127] A multi-scale semantic hierarchy structure is constructed for the domain semantic knowledge graph. The knowledge graph is divided into three layers according to semantic granularity: a concept granularity layer, a relation granularity layer, and an attribute granularity layer. The concept granularity layer stores basic concept nodes, such as "resort" and "attraction" in the tourism domain; the relation granularity layer stores the relationship types between concepts, such as "providing services" and "geographical location"; and the attribute granularity layer stores detailed feature descriptions of concepts, such as "environment" and "service quality". Connections are established between each layer through semantic associations, forming a vertical semantic transmission channel. During the knowledge graph construction process, ontology modeling and entity relation extraction techniques are employed to ensure the accuracy and completeness of knowledge. For the tourism domain, relevant knowledge can be extracted from tourism websites, review data, and professional literature to construct a knowledge graph containing multi-dimensional information such as attractions, accommodation, catering, and transportation.

[0128] Based on the acquired semantic direction guidance vector and the constructed multi-scale semantic hierarchy, hierarchical ray projection retrieval is performed. Broad ray projection is performed at the concept granularity level. Starting from the semantic core representation, a ray is projected along the direction of the semantic direction guidance vector. Ray projection is a virtual retrieval path used to find concepts related to the user's potential needs in the semantic space. The semantic resonance degree between the concept nodes passed by the ray and the implicit need intention is calculated.

[0129] Semantic resonance is an indicator that measures the degree of matching between concept nodes and users' implicit needs. It is calculated by weighting semantic similarity and contextual consistency. Semantic similarity is obtained by calculating the cosine similarity between the concept node vector and the semantic core representation. Contextual consistency is determined by analyzing the matching degree between the context of the concept node in the user's historical behavior and the current query context. The weight coefficients are dynamically adjusted according to the application scenario to balance the influence of semantic similarity and contextual relevance.

[0130] When the calculated semantic resonance exceeds a preset activation threshold, the corresponding concept node is selected as a candidate extended concept. The activation threshold is set according to application requirements, typically between 0.6 and 0.8, and can be adjusted based on the needs for extension precision and breadth. For the selected candidate extended concepts, depth ray projection is performed at the relation granularity layer and the attribute granularity layer to uncover finer semantic connections. At the relation granularity layer, projection is performed along the relation edges related to the candidate concept to identify the relation types related to user needs; at the attribute granularity layer, the attribute features of the candidate concept are projected to identify the specific features that users care about.

[0131] Taking the tourism sector as an example, if a user's core semantic representation is related to "vacation" and the semantic direction guiding vector points towards "natural environment", "resort" will be identified as a candidate extended concept at the concept granularity level. Further projection at the relationship granularity level will reveal that the "providing services" relationship is the user's focus. After projection at the attribute granularity level, attributes such as "environment" and "privacy" will be identified as highly relevant to the user's needs.

[0132] Based on the results of hierarchical ray projection retrieval, implicit demand extension results are generated. The projection results of the three levels are integrated to construct a semantic network containing concepts, relationships, and attributes. This network represents a multi-dimensional understanding of users' implicit demands. The extension results can be represented as a set of weighted entity-relationship-attribute triples, with each triple accompanied by semantic resonance as a weight.

[0133] The generated implicit demand expansion results are applied to the retrieval system to improve retrieval accuracy and user experience. During retrieval, not only are the user's explicit query terms considered, but also the implicit demand expansion results are combined to expand the query and reorder the results. For example, when a user searches for "vacation destination", based on the implicit demand expansion results, resorts with beautiful environments and good privacy will be recommended first, even if the user does not explicitly specify these attributes.

[0134] When constructing a semantic expansion subgraph for each candidate expansion concept, the one- to three-hop neighbor nodes and their connections related to the current dialogue topic in the knowledge graph are extracted, centered on the candidate expansion concept, to form a semantic expansion subgraph. The topological similarity between this subgraph and the dialogue context encoding representation is calculated, and a graph structure matching algorithm is used to evaluate the structural fit between the two. When calculating semantic coverage, the extent to which the expansion subgraph covers the user's implicit needs is evaluated. The topological similarity and semantic coverage are weighted and fused according to the ratio α:β to obtain the semantic gain value. In practice, α and β can be flexibly adjusted according to the application scenario; generally, α=0.4 and β=0.6.

[0135] When selecting the candidate extended concept with the highest semantic gain value for fusion, multi-hop relationship paths connected to implicit demand intentions are extracted from the semantic extended subgraph of the concept. Based on the path length and relationship importance, the weight of each path is calculated. The higher the path weight, the greater its semantic contribution to the final generated deep meaning statement. According to the path weight allocation scheme, the path semantics are fused with the implicit demand intentions to generate deep meaning statements.

[0136] Taking the tourism scenario as an example, when a user expresses the implicit need to "find a quiet place," the above method will identify candidate extended concepts such as "resort" and "forest park." After calculating the semantic gain value, if the semantic gain value of "forest park" is the highest, then multi-hop relationship paths related to "forest park" will be extracted, such as "forest park - environmental characteristics - natural tranquility" and "forest park - location characteristics - away from the hustle and bustle of the city." After integrating the semantics of these paths, the generated deeper meaning statement may be "Recommended forest parks that are away from the hustle and bustle of the city and have a natural tranquility, suitable for travelers who seek quiet and leisure," thus transforming the user's implicit need into a specific expression containing richer semantic information.

[0137] In one optional implementation, the semantically enhanced rewritten statement is input into a knowledge retrieval module for semantic matching and retrieval, the text answer is output and updated to the historical dialogue context, and the dialogue context encoding representation is adjusted, including:

[0138] The semantically enhanced rewritten statement is input into the knowledge retrieval module, and the semantically enhanced rewritten statement is semantically vectorized to obtain the query semantic vector.

[0139] In the knowledge base, candidate knowledge fragments are semantically vectorized and encoded to obtain a set of knowledge semantic vectors. The semantic similarity between the query semantic vector and each knowledge semantic vector is calculated. The candidate knowledge fragments are sorted according to the semantic similarity. Candidate knowledge fragments that meet the matching conditions are selected as matching knowledge fragments.

[0140] From the matched knowledge fragments, extract information content corresponding to the query target of the semantically enhanced rewritten statement, organize the information content into natural language form, and generate a text answer;

[0141] The query statement of the current round is combined with the text answer to form the dialogue record of the current round. The current round dialogue record is appended to the historical dialogue context to form an updated historical dialogue context. The temporal parsing is then performed again to extract the updated topic evolution path and entity co-occurrence relationship, and the dialogue context encoding representation is adjusted.

[0142] In this specific embodiment, the semantically enhanced rewritten statement is input into the knowledge retrieval module for processing. This statement has already undergone pre-processing, incorporating key information from historical dialogues to make the query intent clearer. Specifically, a pre-trained language model is used to perform semantic vectorization encoding on the semantically enhanced rewritten statement. During encoding, the statement is segmented and processed through a Transformer encoder structure to extract deep semantic features, ultimately outputting a fixed-dimensional semantic vector as the query semantic vector. For example, for the semantically enhanced rewritten statement "What is the working principle of a car braking system?", a pre-trained model such as BERT can encode it into a 768-dimensional semantic vector, which effectively expresses the query intent and core semantics.

[0143] In the knowledge base, candidate knowledge fragments are semantically vectorized and encoded. Each knowledge fragment in the knowledge base is also processed by a semantic encoder to obtain a set of knowledge semantic vectors. These knowledge fragments come from structured databases, semi-structured documents, or unstructured text. For structured data, such as car parameter information in tabular form, it is first converted into a natural language description before encoding. For unstructured text, such as technical document paragraphs, semantic encoding is performed directly.

[0144] The semantic similarity between the query semantic vector and each knowledge semantic vector is calculated. Commonly used calculation methods include cosine similarity, dot product, or Euclidean distance. In practical applications, cosine similarity is widely used because it is insensitive to vector length. The calculation formula is the dot product of the query vector and the knowledge vector divided by the product of their norms. Based on the calculated semantic similarity, the candidate knowledge segments are sorted in descending order, and the candidate knowledge segments with semantic similarity exceeding a preset threshold (such as 0.75) are selected as the matching knowledge segments.

[0145] Once the matching knowledge fragments are obtained, the information extraction and answer generation stage begins. This stage analyzes the query target in the semantically enhanced rewritten statement and identifies the information points that the user truly cares about. For example, for the query "What is the driving range of the latest C car model D?", the query target is identified as "driving range" and the query object is "latest C car model D". From the matching knowledge fragments, specific information content corresponding to the query target is extracted, such as "The driving range of the standard range version of the latest C car model D is 455 kilometers, and the long range version is 590 kilometers".

[0146] Information extraction can employ rule-based methods or machine learning methods. Rule-based methods are suitable for well-structured knowledge fragments, extracting key information through predefined template matching. Machine learning methods are suitable for complex text, using named entity recognition or relation extraction techniques to extract information. The extracted information is then processed by natural language generation to form a coherent and fluent text answer. During the generation process, a combination of templates and dynamic generation is used to ensure that the answer is natural in language and accurately responds to the user's query.

[0147] After the text answer is generated, it is combined with the query statement of the current round to form the current round dialogue record. For example, if a user queries "What is the range of the C car model D?", the answer is "The latest C car model D standard range version has a range of 455 kilometers, and the long range version has a range of 590 kilometers". These two sentences together constitute the current round dialogue record. The current round dialogue record is then added to the historical dialogue context to form an updated historical dialogue context.

[0148] The updated historical dialogue context is analyzed temporally to extract the updated topic evolution path and entity co-occurrence relationship. The topic evolution path is obtained by analyzing the changes in topic words in the historical dialogue, while the entity co-occurrence relationship is obtained by statistically analyzing the frequency of entity occurrence and their interrelationships in the dialogue. Based on this information, the dialogue context encoding representation is adjusted, and the state vector in the dialogue state tracking module is updated to prepare for the next round of dialogue.

[0149] In application scenarios, such as when a user first asks "What is the price of model D of car C?" and after receiving the answer, continues to ask "What is its driving range?", the system analyzes the dialogue context to understand that "it" refers to "model D of car C", generates a semantically enhanced rewritten statement "What is the driving range of model D of car C", performs knowledge retrieval and answers the question. In this process, the system continuously accumulates dialogue history and optimizes contextual understanding, making multi-turn dialogues more natural and fluent.

[0150] The above methods enable efficient knowledge retrieval and dynamic updating of dialogue context based on semantically enhanced rewritten statements, significantly improving the understanding ability and answer accuracy of the dialogue system in multi-turn interactions.

[0151] The present invention provides an intelligent question-answering semantic understanding and enhanced rewriting optimization system based on multi-turn dialogue, comprising:

[0152] The first unit is used to obtain the query statement entered by the user in the current round and the historical dialogue context;

[0153] The second unit is used to perform temporal analysis on the historical dialogue context, extract the topic evolution path and entity co-occurrence relationship, and construct a dialogue context encoding representation in chronological order.

[0154] The third unit is used to perform multi-level semantic decomposition on the query statement, identify explicit query intent and implicit demand intent, wherein the implicit demand intent is obtained by analyzing the implicit information type and implicit constraint conditions between the query statement and the dialogue context encoding representation, and obtains the intent hierarchy structure.

[0155] The fourth unit is used to generate literal complete sentences for the explicit query intent by using the referential resolution and omission completion strategy based on the intent hierarchy, and to generate deep meaning sentences for the implicit demand intent by using the semantic expansion strategy, thereby constructing semantically enhanced rewritten sentences.

[0156] The fifth unit is used to input the semantically enhanced rewritten statement into the knowledge retrieval module for semantic matching and retrieval, output the text answer and update it to the historical dialogue context, and adjust the dialogue context encoding representation.

[0157] A third aspect of the present invention provides an electronic device, comprising:

[0158] processor;

[0159] Memory used to store processor-executable instructions;

[0160] The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.

[0161] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.

[0162] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.

[0163] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for intelligent question-answering semantic understanding and enhanced rewriting optimization based on multi-turn dialogue, characterized in that, include: Obtain the query statement entered by the user in the current round and the historical dialogue context; The historical dialogue context is analyzed temporally to extract the topic evolution path and entity co-occurrence relationship, and a dialogue context encoding representation is constructed according to the time sequence. The query statement is then subjected to multi-level semantic decomposition to identify explicit query intent and implicit demand intent. The implicit demand intent is obtained by analyzing the implicit information types and implicit constraints between the query statement and the dialogue context encoding representation, resulting in an intent hierarchy structure. This includes: semantic frame parsing of the query statement, identifying the query frame type and extracting the corresponding required and optional frame slots; parsing the semantic content of the filled required frame slots in the query statement as the explicit query intent; detecting unfilled required and optional frame slots in the query statement; performing context dependency analysis on the unfilled slots; marking slots from which filling values ​​can be obtained from the dialogue context encoding representation as context-dependent implicit demands; and marking slots from which filling values ​​cannot be obtained from the dialogue context encoding representation as knowledge-reasoning implicit demands; and further analyzing the context... For implicit needs related to dependency, semantic fill candidates are extracted from the dialogue context encoding representation. The semantic compatibility between the semantic fill candidates and unfilled slots is calculated, and the semantic fill candidate with the highest semantic compatibility is selected as an implicit constraint. For the knowledge-reasoning implicit needs, the implicit information type is inferred based on the typical filling pattern of the query framework type, and the implicit need intent is formed by combining the implicit constraint. The explicit query intent is used as the dominant intent layer, and the implicit need intent is used as the auxiliary intent layer. The slot filling relationship between the dominant intent layer and the auxiliary intent layer is established to form the intent hierarchy. Based on the intent hierarchy, the explicit query intent is used to generate literal complete sentences using the referential resolution and omission completion strategies, and the implicit need intent is used to generate sentences with deeper meaning using the semantic expansion strategy, thus constructing a semantically enhanced rewritten sentence. The semantically enhanced rewritten sentence is input into the knowledge retrieval module for semantic matching and retrieval, outputs the text answer and updates the historical dialogue context, and adjusts the dialogue context encoding representation.

2. The method according to claim 1, characterized in that, The historical dialogue context is subjected to temporal analysis to extract topic evolution paths and entity co-occurrence relationships. A dialogue context encoding representation is constructed according to chronological order, including: semantic analysis of each round of dialogue in the historical dialogue context, extracting semantic triples, each semantic triple including a subject entity, a predicate relation, and an object entity; projecting the semantic triples onto a semantic space in chronological order, calculating the topic similarity and topic jump between adjacent rounds of semantic triples, marking a topic continuation node when the topic similarity is higher than a similarity threshold, and marking a topic transition node when the topic jump is higher than a jump threshold, and connecting... Connecting the topic continuation node and the topic transition node, a topic evolution path is formed, and each node is assigned a topic decay weight, which decreases non-linearly over time. The entities in the historical dialogue context are divided into temporal windows, and the joint occurrence patterns of entity pairs are statistically analyzed within each temporal window. These joint occurrence patterns include sequential co-occurrence, cross-co-occurrence, and nested co-occurrence. The semantic coupling strength of the entity pairs is calculated based on the type and frequency of the joint occurrence patterns. The topic decay weight and the semantic coupling strength in the topic evolution path are fused and encoded to generate the dialogue context encoding representation.

3. The method according to claim 1, characterized in that, The query statement is subjected to semantic frame parsing to identify the query frame type and extract the corresponding required and optional frame slots. The semantic content of the filled required frame slots in the query statement is parsed into the explicit query intent. This includes: performing semantic frame parsing on the query statement to identify the sentence structure template and core semantic verb of the query statement; establishing frame classification feature pairs based on the question pattern type of the sentence structure template and the action semantic category of the core semantic verb; locating the query frame type corresponding to the query statement in a predefined query frame classification tree using the frame classification feature pairs; and extracting the corresponding frame slot configuration scheme based on the query frame type. The framework slot configuration scheme includes the definition of the semantic role of the required slots and the definition of the semantic role of the optional slots. The definition of the semantic role specifies the semantic component type and semantic constraints that each slot needs to be filled with. The semantic component type is identified for noun phrases, verb phrases and modifiers in the query statement. The identified semantic component type is matched with the definition of the semantic role of the required slots. The semantic components that match the type are marked as filled required slots. The semantic content in the filled required slots is extracted. The semantic content is combined according to the semantic aggregation mode of the query framework type to generate the explicit query intent.

4. The method according to claim 1, characterized in that, Based on the aforementioned intent hierarchy, the explicit query intent is processed using a referential resolution and omission completion strategy to generate a literal complete statement, while the implicit demand intent is processed using a semantic expansion strategy to generate a statement with deeper meaning. A semantically enhanced rewritten statement is then constructed, including: performing referential resolution on the referents in the explicit query intent; extracting candidate entities that are semantically compatible with the referents from the dialogue context encoding representation; calculating the distance weight between the candidate entities and the referents, where the distance weight is calculated based on a combination of temporal distance in the dialogue context encoding representation and co-occurrence frequency in the entity co-occurrence relationship; selecting the candidate entity with the smallest distance weight to replace the referent to obtain an intermediate statement; and then connecting the intermediate statement with its corresponding standard query template. A semantic integrity comparison is performed to identify semantically missing locations. Historical semantic content consistent with the semantic role of the missing location is located from the topic evolution path and filled into the missing location to generate a literal complete sentence. Based on the implicit demand intent, a semantic direction guidance vector is calculated, and ray projection retrieval is performed in the domain semantic knowledge graph to obtain candidate extended concepts. The semantic gain value is calculated, and the candidate extended concept with the highest semantic gain value is selected for fusion to generate a deep meaning sentence. According to the hierarchical relationship in the intent hierarchy, when the implicit demand intent belongs to the explicit query intent, the deep meaning sentence is attached to the literal complete sentence; when they are independent, they are placed side by side to construct the semantically enhanced rewritten sentence.

5. The method according to claim 4, characterized in that, Based on the implicit demand intent, a semantic direction guidance vector is calculated, and candidate extended concepts are obtained through ray projection retrieval in the domain semantic knowledge graph. A semantic gain value is calculated, and the candidate extended concept with the highest semantic gain value is selected for fusion to generate a deep-meaning statement. This includes: extracting a semantic core representation from the implicit demand intent; extracting the historical topic semantic distribution from the dialogue context encoding representation; calculating the semantic gravitational field strength of the historical topic semantic distribution on the semantic core representation; and calculating its gradient direction as the semantic direction guidance vector. A multi-scale semantic hierarchy structure is constructed in the domain semantic knowledge graph, including a concept granularity layer, a relation granularity layer, and an attribute granularity layer. Along the semantic direction... A hierarchical ray projection retrieval is performed on the guiding vector at each granularity level. Concept nodes with semantic resonance exceeding the activation threshold with the implicit demand intent at each granularity level are extracted as candidate extended concepts. For each candidate extended concept, a semantic extended subgraph containing the candidate extended concept is constructed. The weighted fusion value of the topological similarity and semantic coverage between the semantic extended subgraph and the dialogue context encoding representation is calculated as the semantic gain value of the candidate extended concept. The candidate extended concept with the highest semantic gain value is selected, and the multi-hop relationship path of the candidate extended concept in the semantic extended subgraph is extracted. The path semantics are fused to the implicit demand intent according to the path weight allocation scheme of the multi-hop relationship path to generate the deep meaning statement.

6. The method according to claim 1, characterized in that, The semantically enhanced rewritten statement is input into the knowledge retrieval module for semantic matching and retrieval, outputting a text answer and updating the historical dialogue context. The dialogue context encoding representation is adjusted, including: inputting the semantically enhanced rewritten statement into the knowledge retrieval module, performing semantic vectorization encoding on the semantically enhanced rewritten statement to obtain a query semantic vector; performing semantic vectorization encoding on candidate knowledge fragments in the knowledge base to obtain a set of knowledge semantic vectors, calculating the semantic similarity between the query semantic vector and each knowledge semantic vector, sorting the candidate knowledge fragments according to the semantic similarity, and selecting candidate knowledge fragments whose semantic similarity meets the matching conditions as matching knowledge fragments; extracting information content corresponding to the query target of the semantically enhanced rewritten statement from the matching knowledge fragments, organizing the information content into natural language form, and generating a text answer; combining the query statement of the current round with the text answer to form the current round dialogue record, appending the current round dialogue record to the historical dialogue context to form an updated historical dialogue context, and re-performing temporal analysis to extract the updated topic evolution path and entity co-occurrence relationship, and adjusting the dialogue context encoding representation.

7. A multi-turn dialogue-based intelligent question-answering semantic understanding and enhanced rewriting optimization system, used to implement the method as described in any one of claims 1-6, characterized in that, include: The first unit is used to obtain the query statement entered by the user in the current round and the historical dialogue context; The second unit is used to perform temporal analysis on the historical dialogue context, extract the topic evolution path and entity co-occurrence relationship, and construct a dialogue context encoding representation in chronological order. The third unit is used to perform multi-level semantic decomposition on the query statement, identify explicit query intent and implicit demand intent, wherein the implicit demand intent is obtained by analyzing the implicit information type and implicit constraint conditions between the query statement and the contextual encoding representation of the dialogue, and obtains an intent hierarchy structure; the fourth unit is used to generate a literal complete statement for the explicit query intent by using a referential resolution and omission completion strategy, and to generate a deeper meaning statement for the implicit demand intent by using a semantic expansion strategy, thereby constructing a semantically enhanced rewritten statement; The fifth unit is used to input the semantically enhanced rewritten statement into the knowledge retrieval module for semantic matching and retrieval, output the text answer and update it to the historical dialogue context, and adjust the dialogue context encoding representation.

8. An electronic device, characterized in that, include: processor; A memory for storing processor-executable instructions; wherein the processor is configured to invoke the instructions stored in the memory to perform the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Intelligent multi-round question and answer system based on large model

    CN120611028A

  • Electric power question query system and method based on long-short-term memory

    CN120849455A