Intelligent customer service dialogue generation optimization method and system based on knowledge graph

By using a knowledge graph-based intelligent customer service dialogue generation method, which utilizes bidirectional long short-term memory networks and user feature vectors for entity and intent recognition, the intelligent customer service system achieves efficient knowledge transfer and personalized dialogue generation across different domains. This solves the problem of insufficient knowledge integration in existing systems and improves response accuracy and user satisfaction.

CN120653742BActive Publication Date: 2026-03-17HANGZHOU ZERO ONEBIT TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-11
Publication Date
2026-03-17

Smart Images

  • Figure CN120653742B_ABST
    Figure CN120653742B_ABST
Patent Text Reader

Abstract

This invention provides an intelligent customer service dialogue generation optimization method and system based on knowledge graphs, relating to the field of knowledge graph technology. The method includes: using a bidirectional long short-term memory network to identify the entities and intents of user questions; performing multi-hop queries in the knowledge graph based on the question entities to obtain an initial knowledge subgraph; constructing a user feature vector containing dialogue state, problem resolution, and service preferences; performing hierarchical reconstruction of the initial knowledge subgraph based on the user feature vectors; calculating the structural similarity of the domain knowledge graph and extracting general knowledge organization patterns; decomposing the reconstructed knowledge subgraph into structural templates and content filling items to determine inter-domain knowledge mapping relationships, obtaining a transfer-optimized knowledge graph; generating candidate responses based on the optimized knowledge graph and the initial intent, evaluating their accuracy, adaptability, and relevance, and selecting the best response for output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to knowledge graph technology, and more particularly to a method and system for optimizing intelligent customer service dialogue generation based on knowledge graphs. Background Technology

[0002] Existing intelligent customer service systems primarily employ retrieval-based or generative methods for dialogue generation. Retrieval-based methods rely on pre-set question-and-answer databases to match user questions, making them unable to handle complex or novel issues. While generative methods can produce fluent responses, they often suffer from inaccurate knowledge and fabricated information. Current systems lack effective mechanisms for integrating domain knowledge with dialogue strategies, resulting in a superficial understanding of user intent and an inability to dynamically adjust response content and style based on user characteristics. Furthermore, insufficient cross-domain knowledge transfer capabilities necessitate significant manual adjustments when applying the system to new domains. Therefore, there is an urgent need for an optimized intelligent customer service dialogue generation method that can deeply integrate knowledge graphs and dialogue generation, and possess cross-domain knowledge transfer capabilities. Summary of the Invention

[0003] To address the shortcomings of existing technologies, this invention provides an optimized method and system for generating intelligent customer service dialogues based on knowledge graphs, which can solve the problems in existing technologies.

[0004] In a first aspect, the present invention provides an optimized method for generating intelligent customer service dialogues based on knowledge graphs, including:

[0005] A bidirectional long short-term memory network is used to perform entity recognition and intent recognition on the user-input question text to obtain the question entity and initial intent. Based on the question entity, multi-hop queries are performed in a preset knowledge graph to obtain an initial knowledge subgraph. A user feature vector containing dialogue state features, problem-solving features, and service preference features is constructed based on the user-input question text. The initial knowledge subgraph is reconstructed hierarchically based on the user feature vector to obtain a reconstructed knowledge subgraph. Structural similarity calculation and element recognition are performed on an existing domain knowledge graph to extract a general knowledge organization pattern. Based on the general knowledge organization pattern, the reconstructed knowledge subgraph is decomposed into structural templates and content filling items. The knowledge mapping relationship between domains is determined through semantic similarity matching to obtain a transfer-optimized knowledge graph. Candidate responses are generated based on the transfer-optimized knowledge graph and the initial intent. The candidate responses are evaluated for knowledge accuracy, expression adaptability, and domain relevance, and the candidate response with the highest comprehensive score is selected as the output.

[0006] Optionally, obtaining an initial knowledge subgraph by performing multi-hop queries on a preset knowledge graph based on the question entity includes: constructing an entity relationship importance scoring matrix based on the question entity; generating an adaptive decay factor related to the number of hops and path scores of the query path based on the entity relationship importance scoring matrix; calculating the expected return of the query path starting from the question entity based on the entity relationship importance scoring matrix and the adaptive decay factor, and generating a priority query path set; selecting multiple complementary paths with the highest scores from the priority query path set, allocating computing resources for parallel queries based on the path scores of the complementary paths, and obtaining multiple candidate knowledge subgraphs and their feature matrices; calculating the complementarity and redundancy between the candidate knowledge subgraphs based on the feature matrices, weighted fusion of complementary regions in the candidate knowledge subgraphs, and redundant branch pruning of overlapping regions to obtain the initial knowledge subgraph.

[0007] Optionally, constructing a user feature vector containing dialogue state features, problem-solving features, and service preference features based on the user's input question text includes: performing multimodal feature extraction based on the user's question text, including: identifying professional terms in the question text to obtain a professionalism score; extracting the user message length sequence and response time sequence to obtain an interaction pattern feature vector; and analyzing the frequency of emoji usage to obtain the sentiment polarity intensity; fusing the professionalism score, interaction pattern feature vector, and sentiment polarity intensity through an attention mechanism to obtain a fused feature vector; constructing a user intent-topic transition matrix based on the initial intent; and calculating adjacent topics based on the user intent-topic transition matrix. Similarity is used to generate a conversation coherence index based on the similarity of adjacent topics; the question complexity and answer completeness are calculated to obtain a dialogue depth index; a multi-turn dialogue state transition network is constructed based on the conversation coherence index and the dialogue depth index; a business knowledge association graph is constructed, and the scope of user inquiries is analyzed based on the business knowledge association graph to identify potential service needs and calculate problem-solving paths; user interaction vector sequences are clustered using self-organizing mapping to obtain interaction behavior categories, and a service preference vector is constructed based on the interaction behavior categories; the fused feature vector, the multi-turn dialogue state transition network, the problem-solving paths, and the service preference vector are combined to form a user feature vector.

[0008] Optionally, the hierarchical reconstruction of the initial knowledge subgraph based on the user feature vector to obtain the reconstructed knowledge subgraph includes: layering the nodes of the initial knowledge subgraph according to the fused feature vector to obtain a preliminary hierarchical structure; constructing an inter-layer transition probability matrix using the multi-turn dialogue state transition network, and dynamically adjusting the hierarchical structure based on the inter-layer transition probability matrix to obtain an optimized hierarchical structure; constructing a knowledge transfer graph based on the problem-solving path, and mapping the optimized hierarchical structure to the knowledge transfer graph to obtain multiple possible transfer paths; reordering the transfer paths based on the service preference vector to obtain the optimal transfer path; and constructing a multi-dimensional knowledge network based on the optimal transfer path to eliminate and supplement knowledge redundancy, thereby obtaining the reconstructed knowledge subgraph.

[0009] Optionally, constructing a multidimensional knowledge network based on the optimal transmission path, eliminating and supplementing knowledge redundancy, and obtaining a reconstructed knowledge subgraph includes: constructing a node semantic similarity matrix and a structural relevance matrix based on the optimal transmission path, and obtaining a hybrid relevance matrix through weighted fusion; using the hybrid relevance matrix to identify knowledge clusters, and calculating the importance weights of nodes within the clusters based on a hierarchical attention mechanism; constructing a multidimensional knowledge network in semantic, structural, and functional dimensions according to the node importance weights and the hybrid relevance matrix; using the multidimensional knowledge network to perform cross-dimensional reasoning, identifying and supplementing knowledge gaps, and optimizing the overall network structure through weighted graph embedding to obtain a reconstructed knowledge subgraph.

[0010] Optionally, performing structural similarity calculation and element identification on existing domain knowledge graphs to extract general knowledge organization patterns includes: constructing structural feature vectors of existing domain knowledge graphs, including node degree distribution, path length distribution, and local clustering coefficients; embedding nodes into the existing domain knowledge graphs based on graph neural networks and obtaining graph-level representations through attention pooling; calculating structural similarity matrices between different domain knowledge graphs using the structural feature vectors and graph-level representations; performing pattern matching on knowledge graph substructures with similarity higher than a preset similarity threshold to identify structural units and semantic elements with co-occurrence frequencies higher than a preset frequency threshold; and abstracting and summarizing the identified structural units and semantic elements to form general knowledge organization patterns.

[0011] Optionally, decomposing the reconstructed knowledge subgraph into structural templates and content fillers based on the general knowledge organization pattern, and determining inter-domain knowledge mapping relationships through semantic similarity matching to obtain a transfer-optimized knowledge graph includes: constructing a structural matching matrix for the reconstructed knowledge subgraph based on the general knowledge organization pattern, wherein the structural matching matrix integrates local structural similarity and semantic similarity; decomposing the reconstructed knowledge subgraph into structural templates and corresponding content fillers through maximum binary matching; calculating the semantic similarity between the content fillers and the concepts of the target application domain using word vector similarity, knowledge base path similarity, and context similarity; generating an inter-domain knowledge mapping matrix based on the semantic similarity; constructing an initial knowledge structure in the target application domain based on the structural templates and the inter-domain knowledge mapping matrix; identifying the concept types and relationship patterns of the target application domain; and merging and supplementing the initial knowledge structure with the initial knowledge structure to form a domain-enhanced initial knowledge structure; and jointly optimizing the domain-enhanced initial knowledge structure for structural preservation, semantic consistency, and constraint satisfaction to obtain a transfer-optimized knowledge graph.

[0012] Optionally, generating candidate responses based on the transfer-optimized knowledge graph and the initial intent, and evaluating the candidate responses for knowledge accuracy, expression suitability, and domain relevance, and selecting the candidate response with the highest comprehensive score as the output includes: extracting knowledge path representation, entity relationship representation, and attribute feature representation from the transfer-optimized knowledge graph, performing hierarchical attention fusion with the semantic vector of the initial intent, and constructing a multi-level context vector with knowledge perception capabilities; adjusting the knowledge-enhanced dialogue generation model based on the multi-level context vector to generate multiple candidate responses; evaluating the candidate responses in multiple dimensions: calculating the knowledge accuracy score using knowledge graph path verification and entity relationship constraint testing; calculating the language style matching degree and professionalism matching degree of the candidate responses based on user feature vectors to obtain the expression suitability score; calculating the domain coverage and professional terminology accuracy of the candidate responses by combining the structural features of the transfer-optimized knowledge graph and the domain ontology to obtain the domain relevance score; and weighting and fusing the knowledge accuracy score, expression suitability score, and domain relevance score to obtain a comprehensive score, and selecting the candidate response with the highest comprehensive score as the output.

[0013] Secondly, this invention provides an intelligent customer service dialogue generation and optimization system based on knowledge graphs, comprising:

[0014] The first unit is used to perform entity recognition and intent recognition on the user-input question text using a bidirectional long short-term memory network to obtain the question entity and the initial intent; and to perform multi-hop queries on a preset knowledge graph based on the question entity to obtain the initial knowledge subgraph.

[0015] The second unit is used to construct a user feature vector containing dialogue state features, problem-solving features, and service preference features based on the user-input question text; and to perform hierarchical reconstruction of the initial knowledge subgraph based on the user feature vector to obtain a reconstructed knowledge subgraph.

[0016] The third unit is used to calculate the structural similarity and identify the elements of the existing domain knowledge graph, and extract the general knowledge organization pattern; based on the general knowledge organization pattern, the reconstructed knowledge subgraph is decomposed into structural templates and content filling items, and the knowledge mapping relationship between domains is determined by semantic similarity matching to obtain the transfer-optimized knowledge graph;

[0017] The fourth unit is used to generate candidate responses based on the transfer optimization knowledge graph and the initial intent, evaluate the candidate responses in terms of knowledge accuracy, expression adaptability and domain relevance, and select the candidate response with the highest comprehensive score as the output.

[0018] The user feature vector construction mechanism provided by this invention integrates dialogue state, problem solving, and service preference features into the knowledge subgraph reconstruction process, enabling the system to dynamically adjust response strategies according to different user characteristics, thereby significantly improving user satisfaction.

[0019] The general knowledge organization pattern extraction method proposed in this invention separates the knowledge structure template from the content filling items, significantly improving knowledge transfer efficiency and shortening the adaptation time to new domains. Through a multi-dimensional evaluation mechanism, candidate responses are comprehensively evaluated to ensure the accuracy of knowledge, the suitability of expression, and the relevance of the domain, effectively improving the accuracy rate of responses and the first-time resolution rate of user problems. The overall solution achieves deep integration of knowledge graphs, user features, and dialogue generation, possessing cross-domain knowledge transfer capabilities. This significantly reduces the human and time costs of deploying intelligent customer service in new domains, while improving service quality and generating good technical and economic benefits. Attached Figure Description

[0020] Figure 1 This is a flowchart illustrating the optimization method for generating intelligent customer service dialogues based on knowledge graphs, as described in an embodiment of the present invention. Detailed Implementation

[0021] The technical solutions of the present invention will be described below with reference to the accompanying drawings. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0022] Figure 1 This is a flowchart illustrating the knowledge graph-based intelligent customer service dialogue generation optimization method of the present invention, as shown below. Figure 1 As shown, the method includes:

[0023] A bidirectional long short-term memory network is used to perform entity recognition and intent recognition on the user-input question text to obtain the question entity and initial intent. Based on the question entity, multi-hop queries are performed in a preset knowledge graph to obtain an initial knowledge subgraph. A user feature vector containing dialogue state features, problem-solving features, and service preference features is constructed based on the user-input question text. The initial knowledge subgraph is reconstructed hierarchically based on the user feature vector to obtain a reconstructed knowledge subgraph. Structural similarity calculation and element recognition are performed on an existing domain knowledge graph to extract a general knowledge organization pattern. Based on the general knowledge organization pattern, the reconstructed knowledge subgraph is decomposed into structural templates and content filling items. The knowledge mapping relationship between domains is determined through semantic similarity matching to obtain a transfer-optimized knowledge graph. Candidate responses are generated based on the transfer-optimized knowledge graph and the initial intent. The candidate responses are evaluated for knowledge accuracy, expression adaptability, and domain relevance, and the candidate response with the highest comprehensive score is selected as the output.

[0024] Optionally, obtaining an initial knowledge subgraph by performing multi-hop queries on a preset knowledge graph based on the question entity includes: constructing an entity relationship importance scoring matrix based on the question entity; generating an adaptive decay factor related to the number of hops and path scores of the query path based on the entity relationship importance scoring matrix; calculating the expected return of the query path starting from the question entity based on the entity relationship importance scoring matrix and the adaptive decay factor, and generating a priority query path set; selecting multiple complementary paths with the highest scores from the priority query path set, allocating computing resources for parallel queries based on the path scores of the complementary paths, and obtaining multiple candidate knowledge subgraphs and their feature matrices; calculating the complementarity and redundancy between the candidate knowledge subgraphs based on the feature matrices, weighted fusion of complementary regions in the candidate knowledge subgraphs, and redundant branch pruning of overlapping regions to obtain the initial knowledge subgraph.

[0025] For example, in entity recognition, the user's question text is taken as the input sequence. A word embedding layer converts the text into a low-dimensional dense vector representation, which is then fed into a bidirectional long short-term memory (LSTM) network. This network contains two LSM units, forward and backward, which process information from the left and right sides of the sentence respectively, capturing contextual dependencies. The network output layer uses a conditional random field to optimize the sequence labeling results, ultimately outputting the entity type label for each word. For intent recognition, an attention-based classifier is employed. The hidden states of the bidirectional LSM network are taken as input, and a multi-head self-attention mechanism captures key information from the question text. Then, a fully connected layer and a softmax function calculate the probability distribution of each intent category, selecting the category with the highest probability as the initial intent.

[0026] Based on the identified problem entities, multi-hop queries are performed in a pre-built knowledge graph to obtain an initial knowledge subgraph. The pre-built knowledge graph is a structured graph database containing domain entities, relationships, attributes, and other knowledge, used to support intelligent customer service in knowledge retrieval and reasoning. For each relationship type directly connected to the problem entity in the knowledge graph, three indicators are calculated: its frequency in historical queries, user feedback score, and prior weight defined by domain experts. Taking the problem "How to handle bank card theft" as an example, the identified problem entities are "bank card" and "theft," and related relationships include "prevention measures," "processing procedures," and "legal responsibility." Among them, the historical query frequency of the "processing procedures" relationship is high (0.8), the user feedback score is excellent (0.9), and the domain expert-defined weight is high (0.9), resulting in a comprehensive importance score of 0.87. All relationships are combined into an entity relationship importance score matrix, where each element represents the importance score of a specific relationship type between specific entity pairs.

[0027] The decay factor controls the degree to which the importance of a relationship decreases as the number of hops increases during multi-hop queries. It dynamically adjusts the decay rate by considering the cumulative score of the current query path, the current number of hops, and the complexity of the query domain. For simple domains (such as frequently asked questions), a larger decay factor (e.g., 0.7) can be used, while for complex domains (such as technical consultations), a smaller decay factor (e.g., 0.4) should be used to retain more in-depth knowledge.

[0028] Based on the entity relationship importance scoring matrix and adaptive decay factor, the expected return of a query path starting from the question entity is calculated, generating a priority set of query paths. During the calculation, the path tree is first expanded from the question entity to connected nodes in the knowledge graph. For each path in the path tree, the weighted sum of the importance of each hop relationship is accumulated, with the weight being the decay factor corresponding to the number of hops. All paths are sorted according to expected return, and the top N paths with the highest returns are selected as the priority set of query paths.

[0029] In the complementary path selection process, in addition to considering path scores, the complementarity between paths is also calculated to avoid selecting paths with overlapping information. The entity and relation overlap rate between paths is calculated, and paths with an overlap rate below a threshold are considered complementary paths. For example, in a bank card fraud case, three highly complementary paths might be selected: "Bank Card - Fraud Type - Emergency Handling Measures," "Bank Card - Loss Reporting Process - Customer Service Contact Information," and "Fraud - Legal Liability - Bank Obligations." For the selected complementary paths, computational resources are allocated according to their score ratios, with higher-scoring paths receiving more resources for parallel queries, resulting in multiple candidate knowledge subgraphs. Structural features (such as node degree distribution and path length distribution), content features (such as entity type distribution and relation type distribution), and semantic features (graph embedding vectors) are extracted from each subgraph to form a feature matrix.

[0030] The complementarity between candidate knowledge subgraphs is determined by comparing the orthogonal components of their feature matrices; a larger orthogonal component indicates stronger complementarity. Redundancy is determined by comparing the overlap of entity relationships between subgraphs; a higher overlap rate indicates greater redundancy. Taking a bank card fraud case as an example, the complementarity between the "emergency handling measures" subgraph and the "loss reporting process" subgraph is 0.72 (high complementarity), while the redundancy between the "customer service contact information" subgraph and the "loss reporting process" subgraph is 0.08 (low redundancy). Complementary regions in the candidate knowledge subgraphs are weighted and fused, with the weighting coefficient proportional to the region's information richness and relevance to the query intent. For overlapping regions, redundant branches are pruned, retaining branches with high information density and high connectivity while removing redundant branches. The resulting initial knowledge subgraph contains core knowledge directly related to the problem, as well as supplementary information from multiple perspectives, while avoiding information redundancy.

[0031] This invention guides multi-hop queries through an entity relationship importance scoring matrix and an adaptive decay factor, making the knowledge acquisition process more accurate and efficient. Based on a priority mechanism of expected path returns and a complementary path selection strategy, it significantly improves knowledge coverage and diversity. Through complementarity fusion and redundancy pruning, it optimizes the structure of the knowledge subgraph, reduces information redundancy, and improves the quality and efficiency of subsequent dialogue generation.

[0032] Optionally, constructing a user feature vector containing dialogue state features, problem-solving features, and service preference features based on the user's input question text includes: performing multimodal feature extraction based on the user's question text, including: identifying professional terms in the question text to obtain a professionalism score; extracting the user message length sequence and response time sequence to obtain an interaction pattern feature vector; and analyzing the frequency of emoji usage to obtain the sentiment polarity intensity; fusing the professionalism score, interaction pattern feature vector, and sentiment polarity intensity through an attention mechanism to obtain a fused feature vector; constructing a user intent-topic transition matrix based on the initial intent; and calculating adjacent topics based on the user intent-topic transition matrix. Similarity is used to generate a conversation coherence index based on the similarity of adjacent topics; the question complexity and answer completeness are calculated to obtain a dialogue depth index; a multi-turn dialogue state transition network is constructed based on the conversation coherence index and the dialogue depth index; a business knowledge association graph is constructed, and the scope of user inquiries is analyzed based on the business knowledge association graph to identify potential service needs and calculate problem-solving paths; user interaction vector sequences are clustered using self-organizing mapping to obtain interaction behavior categories, and a service preference vector is constructed based on the interaction behavior categories; the fused feature vector, the multi-turn dialogue state transition network, the problem-solving paths, and the service preference vector are combined to form a user feature vector.

[0033] For example, this embodiment describes in detail how to construct a user feature vector containing fused feature vectors, dialogue state features, problem-solving features, and service preference features based on the user's input question text. First, multimodal feature extraction needs to be performed based on the user's question text, including three aspects: technical terminology recognition, interaction pattern feature extraction, and sentiment polarity analysis.

[0034] In the terminology recognition stage, a terminology database is maintained, containing industry terms, professional vocabulary, and technical terms. This database is categorized by industry, including professional terms from major fields such as finance, technology, and healthcare. When a user inputs question text, a hybrid method based on word list matching and contextual semantic analysis is used to identify professional terms in the text. Specifically, explicit professional terms are first identified through word list matching, and then a pre-trained terminology recognition model is used to capture context-related professional expressions. For example, in the question "My structured deposit with an annualized return of 4.5% has matured, how do I apply for automatic renewal?", three financial professional terms are identified: "annualized return," "structured deposit," and "automatic renewal." A professionalism score is calculated based on the number of identified professional terms, their proportion in the question, and their complexity. For the example above, the professionalism score is calculated to be 0.78 (high professionalism).

[0035] For interaction pattern feature extraction, the message length sequence and response time sequence in the user's historical dialogue records are analyzed. The message length sequence is the sequence of the number of characters in each message in multiple consecutive rounds of dialogue; the response time sequence is the sequence of time intervals between when the user sends the next message after receiving a reply. For new users, the average value of the same user group is used as the initial value. Taking a financial service consultation scenario as an example, the message length sequence of a user's last 5 rounds of dialogue is [45, 12, 78, 25, 36] characters, and the response time sequence is [15, 60, 25, 40] seconds. Statistical features (mean, variance, trend) and pattern features (volatility, persistence) are calculated for these sequences to construct an interaction pattern feature vector. This vector reflects the user's expression habits and patience level. For the example user, they are judged to be a "detailed expression type, moderate patience type" user.

[0036] In sentiment polarity analysis, emojis, sentiment words, and sentence structure features are detected in user question texts. Emoji usage frequency is obtained by calculating the ratio of the number of times an emoji appears in the text to the text length. Simultaneously, a sentiment lexicon is used to assess the sentiment tendency of the text. For example, the question "This financial product is terrible (angry emoji), I want to complain!" contains the negative sentiment word "terrible" and an angry emoji, resulting in a sentiment polarity intensity of -0.85 (strongly negative). The professionalism score, interaction pattern feature vector, and sentiment polarity intensity are fused using an attention mechanism to obtain a fused feature vector. The attention mechanism dynamically adjusts the weights of each feature based on the current dialogue context and service type; for example, in a complaint handling scenario, sentiment polarity receives a higher weight.

[0037] To construct a user intent-topic transition matrix based on initial intent, a predefined set of intent categories is maintained, such as "inquiry information," "problem solving," and "expressing dissatisfaction," along with corresponding topic domains, such as "product information," "operational procedures," and "account security." The user intent-topic transition matrix is ​​constructed by analyzing the transition patterns between intent and topic in users' historical conversations. Each element in the matrix represents the probability of transitioning from one intent-topic combination to another. Taking bank customer service as an example, the transition probability from "inquiry information - product information" to "problem solving - operation procedures" is 0.65, indicating that after inquiring about product information, users are highly likely to further inquire about specific operational procedures.

[0038] The similarity between adjacent topics is calculated based on the user intent-topic transition matrix, employing a combination of semantic similarity algorithms based on word vectors and structural similarity algorithms based on knowledge graphs. Semantic similarity is obtained by calculating the cosine similarity of word vectors for topic keywords; structural similarity is obtained by calculating the path overlap of topics within the knowledge graph. These two similarities are then weighted and averaged to obtain a comprehensive similarity score. For example, "credit card application" and "credit card activation" have a semantic similarity of 0.75, a structural similarity of 0.82, and a comprehensive similarity of 0.78 (high similarity). A conversation coherence metric is generated based on the adjacent topic similarity, reflecting the naturalness and logic of topic transitions in user conversations. The coherence metric calculation considers the average value, volatility, and frequency of anomalous transitions in the adjacent topic similarity.

[0039] Problem complexity is evaluated based on three dimensions: the complexity of the problem's syntactic structure, the number of knowledge points involved, and the length of the solution path. For example, the complexity of "How to choose a suitable portfolio of financial products based on my risk appetite and investment horizon" is 0.82 (high complexity). Solution completeness is calculated by evaluating the proportion of knowledge points covered in the response and the signal indicating user confirmation of completion. A multi-turn dialogue state transition network is constructed based on conversation coherence and dialogue depth indices. This network is a directed graph where nodes represent dialogue states (e.g., "initial consultation," "in-depth discussion," "confirmation of resolution," etc.) and edges represent state transition probabilities. The network structure reflects the user's dialogue progress patterns and preference for in-depth discussion.

[0040] Construct a business knowledge association graph, which organizes the core concepts, processes, and relationships within a business domain in a graph structure. For example, in the financial services field, the graph includes key nodes such as "product type," "service process," and "risk level," as well as relationships between them such as "inclusion," "sequence," and "applicable conditions." Analyze the scope of user inquiries based on the business knowledge association graph, mapping users' historical questions to nodes and paths in the graph, and identifying frequently accessed subgraph structures. For example, if a user's historical inquiries are mainly concentrated in the "investment products - risk assessment - return calculation" subgraph area, their inquiry scope can be determined to be "investment and wealth management," indicating a focus on risk and return.

[0041] Based on the analysis of the consultation scope, potential service needs are further identified. By comparing user consultation paths with typical service need patterns, service need types with high matching degrees are identified. For example, users who frequently query knowledge related to "account security" and "abnormal transactions" are identified as having a potential need for "security assurance services." Based on the identified potential service needs, and combined with the service process nodes and relationship edges in the business knowledge association graph, problem-solving paths are calculated. Taking into account the complexity of the problem, the user's level of expertise, and historical solution patterns, the optimal solution path is planned in the business knowledge association graph. Taking "how to apply for credit card installment payments" as an example, for users with high expertise, the path is "installment conditions → application channels → fee calculation"; for users with low expertise, the path is "basic explanation → installment conditions → application steps → precautions".

[0042] User interaction vector sequences contain multi-dimensional features of each user interaction, such as questioning method (direct / indirect), information completeness, and confirmation request frequency. A self-organizing map algorithm is used to cluster historical user interaction vectors, forming interaction behavior categories such as "efficient and concise," "detailed confirmation," and "exploratory learning." New users' interaction vectors are then matched with these categories based on similarity to determine their category. A service preference vector is constructed based on the interaction behavior categories, containing four dimensions: response speed preference, information detail preference, technical terminology usage preference, and interaction frequency preference. For example, the service preference vector for an "efficient and concise" user is [0.9, 0.3, 0.7, 0.2], indicating a high emphasis on response speed, a preference for concise information, acceptance of some technical terminology, and a lack of need for frequent interaction.

[0043] Finally, the fused feature vector, multi-turn dialogue state transition network, problem-solving path, and service preference vector are combined to form the user feature vector. The combination process employs a hierarchical coding structure, achieving effective integration of each component through feature embedding and the fusion network. First, the fused feature vector undergoes dimensionality normalization to ensure that each feature component is within the same numerical range. For the multi-turn dialogue state transition network, key topological features are extracted, including node connectivity distribution, centrality index, and principal eigenvalues ​​of the transition probability matrix, forming a fixed-dimensional network representation vector. The problem-solving path is converted into a sequence representation using a path encoder, capturing node types, relationship types, and their order information within the path. The service preference vector, after normalization with the above features, is directly used as a sub-component of the user feature vector. Subsequently, a multilayer perceptron is used to perform nonlinear mapping on these preprocessed features, generating an intermediate representation. During the mapping process, a feature selection gating mechanism is set to dynamically adjust the importance weights of each feature component based on the current dialogue stage and problem type. Finally, through residual connections and layer normalization techniques, the intermediate representation is fused with the original features to form the final user feature vector.

[0044] This technical solution constructs a user feature vector rich in semantic and behavioral information through multi-dimensional feature extraction and fusion. It accurately captures users' professional level, interaction habits, emotional state, and service needs, enabling intelligent customer service to deeply understand user characteristics and perform personalized knowledge reconstruction and dialogue generation. Compared to traditional methods, this solution significantly improves user experience and problem-solving efficiency, making intelligent customer service more intelligent and human-centered.

[0045] Optionally, the hierarchical reconstruction of the initial knowledge subgraph based on the user feature vector to obtain the reconstructed knowledge subgraph includes: layering the nodes of the initial knowledge subgraph according to the fused feature vector to obtain a preliminary hierarchical structure; constructing an inter-layer transition probability matrix using the multi-turn dialogue state transition network, and dynamically adjusting the hierarchical structure based on the inter-layer transition probability matrix to obtain an optimized hierarchical structure; constructing a knowledge transfer graph based on the problem-solving path, and mapping the optimized hierarchical structure to the knowledge transfer graph to obtain multiple possible transfer paths; reordering the transfer paths based on the service preference vector to obtain the optimal transfer path; and constructing a multi-dimensional knowledge network based on the optimal transfer path to eliminate and supplement knowledge redundancy, thereby obtaining the reconstructed knowledge subgraph.

[0046] For example, we analyze the professional level component, cognitive style component, and emotional state component in the user's fused feature vector. The professional level component determines a user's ability to accept professional knowledge; for instance, a financial industry user with a professional level component value of 0.85 can understand relatively complex financial terms and concepts. The cognitive style component is used to determine the user's preferred information organization style, such as linear or divergent thinking. The emotional state component is used to adjust the way knowledge is presented; for example, knowledge structures need to be simplified when the user is in a negative emotional state.

[0047] Based on the above analysis, the nodes of the initial knowledge subgraph are divided into different levels. Taking the investment and financial management consulting scenario as an example, the initial knowledge subgraph contains multiple knowledge nodes such as "fund type," "risk rating," "return calculation," "tax policy," and "subscription process." For users with higher levels of expertise, a three-layer structure is constructed: the top layer is the basic concept layer, containing "fund type" and "risk rating"; the middle layer is the deep knowledge layer, containing "return calculation" and "tax policy"; and the bottom layer is the operation guidance layer, containing "subscription process." For users with lower levels of expertise, four or more layers may be constructed, adding an explanation layer between the basic concepts and deep knowledge to refine the connections between knowledge points. Nodes in each layer are clustered based on semantic similarity and structural connectivity between nodes to form knowledge clusters. Through the above processing, a preliminary hierarchical structure is obtained, which is a hierarchical directed acyclic graph.

[0048] Analyzing the multi-turn dialogue state transition network of users, we extract the state transition patterns during the dialogue process. For example, a user's dialogue state transition network shows that the probability of moving from "basic consultation" to "detailed exploration" is 0.7, and the probability of moving from "detailed exploration" to "practical confirmation" is 0.8, indicating that the user prefers to understand the concept first and then gradually delve into the details. Based on these state transition patterns, we construct a transition probability matrix between knowledge levels. Taking the aforementioned three-layer structure as an example, the transition probability from the basic concept layer to the deep knowledge layer is 0.75, the transition probability from the deep knowledge layer to the operational guidance layer is 0.65, and the transition probability from the basic concept layer directly to the operational guidance layer is 0.15.

[0049] Based on the inter-layer transition probability matrix, the hierarchical relationships of the initial layered structure are dynamically adjusted. The adjustment process considers three key factors: transition probability, intra-layer node correlation, and inter-layer connection density. When the transition probability between two layers is higher than a threshold (e.g., 0.7), the connection strength between these two layers is enhanced; when the correlation between nodes within a layer is lower than a threshold (e.g., 0.4), the layer is considered for splitting; when the inter-layer connection density is too high, causing structural complexity to exceed the user's cognitive load, some layers are merged or simplified. Through these adjustments, an optimized layered structure is obtained. In the investment and financial management consulting example, the "risk rating" and "return calculation" nodes, originally located on different layers, might be moved to the same layer because user dialogue patterns show that these two types of information are often queried and discussed together.

[0050] A knowledge transfer graph is constructed based on the problem-solving path, extracting key nodes and transformation steps. These nodes typically represent the knowledge points required to solve the problem, while the transformation steps reflect the causal or dependent relationships between these knowledge points. Taking "how to choose a suitable fund product" as an example, the problem-solving path includes five key steps: "risk tolerance assessment → fund type screening → performance comparison → fee analysis → purchase decision." A knowledge transfer graph is constructed based on these steps, where nodes represent related knowledge points, and edges represent the transfer relationships between knowledge points. During the construction process, three types of transfer relationships are considered: premise relationships (understanding A is a premise for understanding B), derivation relationships (B can be derived from A), and complementary relationships (A and B are complementary to each other).

[0051] The optimized hierarchical structure is mapped to a knowledge transfer graph, generating multiple possible transfer paths. The mapping process is achieved by calculating the semantic similarity and functional equivalence between nodes in the hierarchical structure and nodes in the transfer graph. In the investment and financial management example, the "risk rating" node in the hierarchical structure might map to the "risk tolerance assessment" node in the transfer graph. Through mapping, multiple possible knowledge transfer paths are obtained, such as "fund type → risk rating → return calculation → subscription process" and "risk rating → fund type → tax policy → subscription process". These transfer paths are then reordered based on service preference vectors to determine the optimal transfer path. The service preference vector includes components such as response speed preference and information detail preference; the matching degree between each path and these preferences is calculated. For example, for users who value efficiency (response speed preference component is 0.9), a simpler path with fewer nodes is preferred; for users who value detailed information (information detail preference component is 0.8), a path covering more comprehensive knowledge points is selected. The optimal transfer path is selected through comprehensive scoring.

[0052] This technical solution achieves personalized optimization of knowledge subgraphs through hierarchical reconstruction based on user characteristics, ensuring a high degree of alignment between the knowledge organization structure and user cognitive characteristics and dialogue preferences. Compared to traditional static knowledge organization methods, this solution can dynamically adjust the knowledge presentation method according to the user's professional level, dialogue status, and service preferences, significantly improving the relevance and effectiveness of knowledge delivery.

[0053] Optionally, constructing a multidimensional knowledge network based on the optimal transmission path, eliminating and supplementing knowledge redundancy, and obtaining a reconstructed knowledge subgraph includes: constructing a node semantic similarity matrix and a structural relevance matrix based on the optimal transmission path, and obtaining a hybrid relevance matrix through weighted fusion; using the hybrid relevance matrix to identify knowledge clusters, and calculating the importance weights of nodes within the clusters based on a hierarchical attention mechanism; constructing a multidimensional knowledge network in semantic, structural, and functional dimensions according to the node importance weights and the hybrid relevance matrix; using the multidimensional knowledge network to perform cross-dimensional reasoning, identifying and supplementing knowledge gaps, and optimizing the overall network structure through weighted graph embedding to obtain a reconstructed knowledge subgraph.

[0054] For example, we analyze all knowledge nodes in the optimal transmission path and calculate the semantic similarity and structural relevance between node pairs. Semantic similarity is calculated by comparing the semantic representation vectors of the node content, and a deep learning pre-trained model is used to extract the semantic features of the node text. Taking the investment product consultation scenario as an example, the cosine similarity of the semantic vectors of the "fixed deposit" node and the "structured deposit" node is 0.75, indicating that the two have a high semantic relevance.

[0055] Structural relevance is analyzed based on the connection patterns of nodes in the knowledge graph, considering three dimensions: direct connections between nodes, the number of common neighbors, and path distance. For example, although the nodes "fund redemption" and "fund subscription" have a semantic similarity of 0.62, their structural relevance is calculated to be 0.85 because they are frequently connected to the "fund transaction" node in the knowledge graph and have similar connection patterns. By setting a semantic similarity weight α and a structural relevance weight β (α+β=1), the two matrices are weighted and fused into a hybrid relevance matrix. For specialized domain knowledge, α=0.4 and β=0.6 can be set to emphasize structural relationships; for general domain knowledge, α=0.7 and β=0.3 can be set to emphasize semantic associations.

[0056] A knowledge cluster is a set of nodes in a knowledge graph that are highly related semantically and structurally, collectively expressing a complete knowledge topic or concept. By applying a community detection algorithm to a hybrid relevance matrix, nodes with relevance higher than a preset threshold (e.g., 0.65) are clustered into knowledge clusters. Taking the investment and financial management field as an example, a "risk assessment" knowledge cluster might be identified, containing nodes related to "risk tolerance," "risk preference testing," and "risk level classification"; a "return analysis" knowledge cluster might contain nodes related to "expected rate of return," "historical performance comparison," and "return calculation methods." For each identified knowledge cluster, a hierarchical attention mechanism is applied to calculate the importance weights of the nodes within the cluster. The hierarchical attention mechanism first calculates the semantic importance of each node at the node level, and then calculates the node's contribution to the entire cluster topic at the knowledge cluster level. Node-level attention is based on the information entropy of the node content and the term frequency-inverse document frequency value; cluster-level attention is based on the node's position in the optimal propagation path and its connectivity centrality. For example, in the "risk assessment" knowledge cluster, the "risk tolerance" node, due to its key position in the transmission path and its connection to multiple other nodes, has an importance weight of 0.82; while "risk preference test," as an implementation method, has an importance weight of 0.65. Through the hierarchical attention mechanism, not only can the semantically and structurally highly related set of nodes be identified, but the importance weight of each node within the cluster can also be accurately calculated, laying the foundation for subsequent knowledge network construction.

[0057] Multidimensional knowledge networks not only include binary relationships between nodes but also higher-order cross-dimensional associations. In the semantic dimension, connections are established based on the semantic similarity of nodes; for example, "fixed deposit" and "structured deposit" are semantically similar and thus semantically related. In the structural dimension, connections are established based on the original structural relationships of the knowledge graph; for example, "fund subscription" and "fund redemption" are sub-operations of "fund transaction," thus structurally related. In the functional dimension, connections are established based on the functional roles of nodes in the problem-solving process; for example, "risk assessment" and "return expectation" belong to the assessment and expectation functions in investment decision-making, thus functionally related. During construction, the centrality and connection priority of nodes in the network are determined based on node importance weights. Nodes with high importance (e.g., weight ≥ 0.7) are given higher visibility and more cross-dimensional connections. Simultaneously, the numerical values ​​in the mixed correlation matrix are used to determine connection strength: strong connections are established between nodes with correlations higher than 0.8, medium-strength connections are established between correlations between 0.5 and 0.8, and weak connections are established between correlations between 0.3 and 0.5. Taking investment product consulting as an example, a multi-dimensional knowledge network was constructed, comprising 30 nodes across four main categories: "product type," "risk level," "return calculation," and "operation process." In this network, the "risk level" node, due to its high importance weight (0.85), is connected to nodes across multiple dimensions; while the "return calculation formula" node is primarily connected to nodes in the functional dimension.

[0058] Cross-dimensional reasoning refers to inferring potential implicit relationships or missing knowledge by analyzing the relationship patterns between nodes in different dimensions. Cross-dimensional reasoning is performed through three reasoning modes: transitive reasoning (if A is related to B, and B is related to C, then A may be related to C), symmetry reasoning (if A and B have a specific relationship, B and A may have a symmetric relationship), and combinatorial reasoning (inferring new relationships based on multiple known relationships).

[0059] During the reasoning process, knowledge gaps are identified, including structural gaps (connections that should exist in the network but are missing) and content gaps (information that a node should have but is missing). For example, in an investment and financial management network, it is found that there is a missing intermediate connecting node between the "risk assessment" and "investment advice" nodes, while from a functional perspective, these two should be connected through the concept of "risk-return matching." Relevant content is retrieved from the complete knowledge base to supplement the "risk-return matching" node and its connection relationship. For content gaps, such as the "structured deposit" node lacking information on the "impact of early redemption," relevant content is also supplemented through retrieval.

[0060] After knowledge supplementation, the overall network structure is optimized using weighted graph embedding (GEM). GEM considers the weights of nodes and edges to ensure the preservation of key network structures and semantic relationships during dimensionality reduction. It generates a fixed-dimensional (typically 128 or 256-dimensional) vector representation for each node in the knowledge network. The relative positions of these vectors in space reflect the semantic and structural relationships between nodes. During GEM, a feature representation is first constructed for each node, containing semantic vectors of the node's content and structural positional information. Then, the embedding process is differentiated based on the previously calculated node importance weights, with important nodes receiving more accurate vector representations. This is achieved by adjusting the optimization intensity for different nodes during the learning process. Edge weights are also set based on the degree of association between node pairs in the hybrid relevance matrix; edges between highly correlated node pairs receive higher weights, while weakly correlated edges may be pruned. In the embedding space, the node distribution is further optimized by imposing structural constraints to ensure the preservation of hierarchical relationships and semantic connections within the knowledge network. For example, the subordinate relationship between upper-level and lower-level concepts is expressed through specific directional relationships between their embedding vectors.

[0061] By optimizing the network structure, redundant nodes are identified, including nodes with highly overlapping information and nodes with technical details that are unnecessary for user understanding. Secondly, redundant connections are identified—connections that can be effectively reached via other paths without providing additional information. The optimization process preserves knowledge integrity while significantly reducing network complexity, ultimately resulting in a streamlined and efficient reconstructed knowledge subgraph.

[0062] This technical solution utilizes a weighted fusion of node semantic similarity matrices and structural relevance matrices to more accurately capture the complex relationships between knowledge elements. Hierarchical attention mechanisms and knowledge cluster recognition technology significantly improve the rationality of the network structure and the efficiency of knowledge transfer. Weighted graph embedding optimization further enhances the clarity of knowledge organization and access efficiency. The overall solution achieves personalized reconstruction of knowledge subgraphs, making knowledge presentation more aligned with users' cognitive characteristics and problem-solving needs, effectively improving the response quality and user satisfaction of intelligent customer service.

[0063] Optionally, performing structural similarity calculation and element identification on existing domain knowledge graphs to extract general knowledge organization patterns includes: constructing structural feature vectors of existing domain knowledge graphs, including node degree distribution, path length distribution, and local clustering coefficients; embedding nodes into the existing domain knowledge graphs based on graph neural networks and obtaining graph-level representations through attention pooling; calculating structural similarity matrices between different domain knowledge graphs using the structural feature vectors and graph-level representations; performing pattern matching on knowledge graph substructures with similarity higher than a preset similarity threshold to identify structural units and semantic elements with co-occurrence frequencies higher than a preset frequency threshold; and abstracting and summarizing the identified structural units and semantic elements to form general knowledge organization patterns.

[0064] For example, a structural feature vector of an existing domain knowledge graph is constructed, including node degree distribution, path length distribution, and local clustering coefficients. The degree of each node in the knowledge graph is calculated, i.e., the number of edges directly connected to that node, and then the node degree distribution characteristics of the entire graph are statistically analyzed. Taking a financial domain knowledge graph as an example, this graph contains 500 entity nodes and 1200 relation edges. Its node degree distribution shows that 25% of the nodes have a degree of 1-2 (low-connectivity nodes), 60% of the nodes have a degree of 3-8 (medium-connectivity nodes), and 15% of the nodes have a degree greater than 8 (high-connectivity nodes). This distribution characteristic is encoded into a fixed-dimensional vector, such as a 20-dimensional vector, where each element represents the percentage of nodes within a specific degree range. The path length distribution characteristic is obtained by calculating the shortest path length between any two nodes in the graph. 1000 pairs of nodes are randomly sampled in the graph, their shortest path lengths are calculated, and the distribution of different lengths is statistically analyzed. In the financial graph, sampling results show that 15% of node pairs have a distance of 1, 35% have a distance of 2, 30% have a distance of 3, 15% have a distance of 4, and 5% have a distance greater than 4. This distribution is also encoded as a fixed-dimensional vector. Local clustering coefficients reflect the density of the neighborhood of nodes in the graph. The local clustering coefficient of each node is calculated, and its distribution characteristics are statistically analyzed. In the financial graph, the average local clustering coefficient is 0.42, indicating a moderate degree of local clustering. The three feature vectors—node degree distribution, path length distribution, and local clustering coefficient distribution—are concatenated to form a complete structural feature vector.

[0065] The node embedding process uses a graph convolutional network, which contains multiple convolutional layers, each aggregating and updating node features. Initial node features include a one-hot encoding of the node type and a node attribute vector. Taking a medical knowledge graph as an example, the initial features of a "disease" type node include the node type encoding and disease characteristic attributes; "symptom" type nodes include attributes such as symptom severity and frequency of occurrence. The first layer of the graph convolutional network aggregates the features of each node's direct neighbors, the second layer aggregates the features of its second-order neighbors, and so on. After three layers of graph convolution, each node obtains a 128-dimensional embedding vector, which encodes the node's local structural information and semantic features.

[0066] Attention pooling is a key step in aggregating node-level features into a graph-level representation. First, an importance score is calculated for each node, based on its centrality and domain relevance. The centrality score considers degree centrality, proximity centrality, and betweenness centrality; domain relevance is based on the node's association with core domain concepts. In the medical graph, the "heart disease" node, connecting multiple symptom and treatment nodes and representing a core disease concept, has an importance score of 0.85 (high importance). Attention weights are assigned based on node importance scores, and the embedding vectors of all nodes are aggregated into a single graph-level representation vector through weighted summation. The graph-level representation of the medical graph is a 256-dimensional vector that encodes the overall structural features and domain knowledge distribution characteristics of the graph.

[0067] A two-stage similarity calculation method is adopted: first, pure structural similarity is calculated based on structural feature vectors; then, comprehensive similarity is calculated by combining graph-level representation. Pure structural similarity is obtained by calculating the cosine similarity of the structural feature vectors of two graphs, reflecting the degree of similarity in the topological structure of the graphs. Comprehensive similarity considers both structural features and graph-level representation to capture deeper levels of similarity. Similarity calculations were performed on knowledge graphs in four fields: finance, healthcare, education, and e-commerce, resulting in a 4×4 similarity matrix. The results show that the structural similarity between the finance and education graphs is 0.72, indicating a high similarity in the knowledge organization methods of these two fields; while the similarity between finance and healthcare is only 0.45, indicating significant structural differences.

[0068] Pattern matching was performed on knowledge graph substructures with similarity scores exceeding a preset similarity threshold to identify structural units and semantic elements with co-occurrence frequencies exceeding a preset frequency threshold. A similarity threshold of 0.7 was set to extract highly similar substructures from the knowledge graphs of the finance and education domains. Substructure extraction employed a frequent subgraph mining algorithm, which first decomposes the graph into multiple subgraphs and then identifies frequently occurring patterns based on the hash features of the subgraphs. In the finance and education graphs, two high-frequency structural units were identified: star-shaped structures (a central concept connecting multiple related concepts) and hierarchical structures (concepts organized according to abstraction levels). Co-occurrence frequency analysis targeted the semantic roles and relationship types within the structural units. The frequency of each semantic role (e.g., "core concept," "attribute description," "example description") and relationship type (e.g., "inclusion relationship," "premise relationship," "causal relationship") was statistically analyzed across different domains. A frequency threshold of 80% was set, meaning semantic elements appearing in more than 80% of the domains were considered general elements. The analysis results show that the semantic combination of "definition-example-application" appears in 95% of all analyzed domains and is identified as a highly general semantic element; the tree-like organizational structure of "core concepts and attribute relationships" appears in 92% of the domains and is identified as a general structural unit.

[0069] The identified structural units and semantic elements are abstracted and generalized. This process includes three stages: pattern cleaning, generalization, and formalization. Pattern cleaning removes domain-specific terminology and expressions, preserving the essential characteristics of structure and relationships. Generalization transforms similar structural and semantic expressions into a unified abstract representation. The formalization stage then converts the abstract representation into a formal description that can be recognized and applied.

[0070] For example, six general knowledge organization patterns were extracted from knowledge graphs in five fields: finance, healthcare, education, e-commerce, and technology. These patterns include: hierarchical decomposition (organizing complex concepts into hierarchical structures), domain matrix (organizing related concepts through dimensional cross-referencing), sequential process (organizing knowledge units according to time or logical order), comparative analysis (highlighting conceptual differences through comparison), problem-solving (organizing knowledge around problems and their solutions), and case study (illustrating abstract concepts through typical cases). Taking the hierarchical decomposition pattern as an example, its abstract representation is a four-layer structure of "core concept - classification dimension - sub-concept - instance," suitable for knowledge domains with clearly defined classification systems. The financial field's "investment products - risk level - fixed income - government bonds" and the educational field's "subject - difficulty - advanced mathematics - calculus" both follow this pattern.

[0071] For each general pattern, its applicable conditions, organizational rules, and evaluation metrics are defined. Applicable conditions specify the types of knowledge and application scenarios suitable for the pattern; organizational rules define the relationships and presentation order between knowledge units; evaluation metrics include dimensions such as knowledge coverage, structural complexity, and learning efficiency. For example, the hierarchical decomposition pattern is suitable for clearly categorized conceptual systems, its organizational rules require maintaining a unidirectional inclusion relationship between levels, and its evaluation emphasizes the rationality and completeness of the hierarchical division. The domain matrix pattern is suitable for knowledge organization with multi-dimensional attributes, such as comparisons of product functions, prices, and applicable scenarios, and its organizational rules emphasize the orthogonality and consistency of dimensions. After the general knowledge organization patterns are formed, a pattern library is built, with each pattern containing a formal description, example templates, and application guidelines. The formal description uses graph structure representation to define the node types, relationship types, and topology of the pattern; the example templates provide specific application cases in multiple domains; and the application guidelines explain how to select and adjust patterns to meet specific knowledge organization needs.

[0072] This technical solution enables efficient identification and abstraction of cross-domain knowledge patterns; it provides a basic framework and rule system for knowledge reconstruction for intelligent customer service, improving the standardization and effectiveness of knowledge organization.

[0073] Optionally, decomposing the reconstructed knowledge subgraph into structural templates and content fillers based on the general knowledge organization pattern, and determining inter-domain knowledge mapping relationships through semantic similarity matching to obtain a transfer-optimized knowledge graph includes: constructing a structural matching matrix for the reconstructed knowledge subgraph based on the general knowledge organization pattern, wherein the structural matching matrix integrates local structural similarity and semantic similarity; decomposing the reconstructed knowledge subgraph into structural templates and corresponding content fillers through maximum binary matching; calculating the semantic similarity between the content fillers and the concepts of the target application domain using word vector similarity, knowledge base path similarity, and context similarity; generating an inter-domain knowledge mapping matrix based on the semantic similarity; constructing an initial knowledge structure in the target application domain based on the structural templates and the inter-domain knowledge mapping matrix; identifying the concept types and relationship patterns of the target application domain; and merging and supplementing the initial knowledge structure with the initial knowledge structure to form a domain-enhanced initial knowledge structure; and jointly optimizing the domain-enhanced initial knowledge structure for structural preservation, semantic consistency, and constraint satisfaction to obtain a transfer-optimized knowledge graph.

[0074] For example, when constructing the structure matching matrix, the reconstructed knowledge subgraph is compared with each pattern in the general knowledge organization pattern library. The comparison process considers two key dimensions: local structural similarity and semantic similarity. Local structural similarity is calculated using graph edit distance, measuring the number of operations required to convert a local structure in the knowledge subgraph into a pattern structure. For instance, comparing the three-layer structure of "product type-risk level-return characteristics" in the financial product knowledge subgraph with the hierarchical decomposition pattern of "concept-attribute-characteristic" in the general pattern library requires 2 node replacements and 1 edge attribute modification, with a normalized edit distance of 0.15 (the smaller the distance, the higher the similarity). Semantic similarity is calculated based on semantic matching of node type and relation type. Semantic features of nodes and relations are extracted using a pre-trained semantic representation model, and their cosine similarity with corresponding elements in the pattern is calculated. The local structural similarity and semantic similarity are fused into a comprehensive similarity by weighted averaging, constructing an N×M structure matching matrix, where N is the number of local structures in the knowledge subgraph and M is the number of patterns in the pattern library.

[0075] Based on the aforementioned structure matching matrix, the knowledge subgraph decomposition problem is transformed into a bipartite graph maximum weight matching problem. Specifically, a bipartite graph is constructed, where the left set of nodes represents all local structures in the knowledge subgraph, and the right set of nodes represents all patterns in the general knowledge organization pattern library. The weight of the edge is the similarity value in the corresponding structure matching matrix. An optimized implementation based on the Hungarian algorithm is used to calculate the maximum weight matching. This algorithm first initializes feasible top-level labels, then iteratively constructs an alternating path tree, updating the matching and feasible top-level labels until the optimal matching is found. The matching results form a mapping table, indicating which pattern should be used to represent each local structure. For example, the local structure "financial product - risk level - return performance" is matched to the hierarchical decomposition pattern "concept - attribute - measure" with a similarity of 0.87; the local structure "fixed deposit vs. financial product" is matched to the comparison pattern "project A - comparison dimension - project B" with a similarity of 0.82. Based on the matching results, each local structure in the knowledge subgraph is structurally abstracted and its content separated according to the corresponding pattern. Structural abstraction extracts the topological relationships and node types of local structures to form a structural template; content separation extracts specific conceptual entities, attribute values, and relationship descriptions as content fillers. Taking "Fund Investment - Risk Level - R3 (Medium Risk) - Expected Annualized Return 4%-6%" as an example, the decomposed structural template is "Investment Product Type - Risk Attribute - Risk Level - Return Attribute - Return Range," with corresponding content fillers of "Fund Investment," "R3 (Medium Risk)," and "Expected Annualized Return 4%-6%." To handle boundary cases, a structural overlap detection and conflict resolution mechanism is also implemented. When a local structure may match multiple patterns, the pattern with the highest similarity is selected; when the similarity difference is less than a threshold (e.g., 0.05), multiple patterns are retained for subsequent processing reference.

[0076] The process involves extracting a set of concepts from the target application domain (e.g., insurance) and then calculating the multi-dimensional semantic similarity between the content items in the source domain (e.g., banking and wealth management) and the concepts in the target domain. Word vector similarity is calculated by comparing the word vectors of concept names using a domain-adapted word embedding model trained on a comprehensive corpus and domain-specific documents, accurately capturing the semantics of professional terms. For example, the word vector similarity between "principal-protected product" in banking and wealth management and "principal-protected insurance" in insurance is 0.82, indicating a high semantic correlation. Knowledge base path similarity examines the similarity of the path structure of concepts in their respective knowledge bases, extracting the hierarchical relationship paths and related concept paths, and calculating the structural similarity of the paths. In the example above, "principal-protected product" and "principal-protected insurance" both occupy similar positions in their respective domain classification systems, both being subclasses of low-risk investment tools, with a path similarity of 0.75. Contextual similarity analysis examines the usage and functional roles of concepts in real-world application scenarios. Contextual fragments of concepts are extracted from customer service dialogue records, and their usage environments are compared using text semantic similarity algorithms. For example, terms like "principal-protected products" and "principal-guaranteed insurance" often appear in customer inquiries within contexts of security queries and risk aversion, with a contextual similarity score of 0.79. Word vector similarity, path similarity, and contextual similarity are weighted and averaged to form a comprehensive semantic similarity score. This score is then used to generate an inter-domain knowledge mapping matrix based on a threshold (e.g., similarity ≥ 0.7). This matrix is ​​P×Q dimensional, where P is the number of content items in the source domain, Q is the number of concepts in the target domain, and the matrix element values ​​represent the mapping strength of corresponding concept pairs.

[0077] An initial knowledge structure is constructed in the target application domain based on structural templates and inter-domain knowledge mapping matrices. Concept types and relationship patterns in the target application domain are identified and integrated with the initial knowledge structure to form a domain-enhanced initial knowledge structure. When constructing the initial knowledge structure, the source domain's structural template serves as the skeleton, and the content items from the source domain are replaced with corresponding concepts from the target domain according to the knowledge mapping matrix. For example, the hierarchical decomposition template "product type - risk level - return characteristics - applicable population" from the banking and wealth management domain is applied to the insurance domain. Through the mapping matrix, "wealth management products" is replaced with "insurance products," and "fixed income" is replaced with "life insurance," thus constructing the initial structure for the insurance domain.

[0078] During implementation, different mapping scenarios are handled by adjusting the confidence threshold: for high-confidence mappings (e.g., similarity ≥ 0.8), they are directly replaced; for medium-confidence mappings (similarity between 0.6 and 0.8), double labeling is retained for verification; for low-confidence or no-mapping items, they are marked as items to be supplemented. Taking the migration from bank wealth management to the insurance field as an example, the concept of "annualized rate of return" is mapped to "expected rate of return" in the insurance field, with a confidence level of 0.85, and is directly replaced; "risk level - R3" is mapped to "risk level - medium", with a confidence level of 0.72, and double labeling is retained: "risk level - R3 / medium"; "financial manager" has no high-similarity mapping in the insurance field and is marked as items to be supplemented.

[0079] The first step involves identifying the unique concept types and relationship patterns specific to the target application domain. This is achieved by analyzing the target domain knowledge base and domain documents, extracting important concepts and relationships not covered by the initial structure. In the insurance domain, unique concepts such as "policy terms," ​​"exclusion clauses," and "claims process," as well as unique relationship patterns such as "underwriting-claims," ​​are identified. The importance of these unique elements is assessed, with a comprehensive score calculated based on three dimensions: usage frequency, centrality, and customer attention. Elements with importance exceeding a threshold are included in the fusion and supplementation phase. The fusion and supplementation process follows three rules: maintaining structural consistency (new elements should conform to the original structural patterns), minimizing modifications (minimizing changes to the initial structure), and domain adaptability (adjustments should reflect the knowledge characteristics of the target domain). Through this series of processes, a domain-enhanced initial knowledge structure is formed.

[0080] Joint optimization employs an iterative approach, evaluating and improving three key metrics in each iteration. Structural preservation assesses the consistency between the knowledge structure and the original template, ensuring the logical organization of knowledge remains intact. This metric is quantified using computational graph isomorphism and path preservation rate. Semantic consistency assesses the correctness and coherence of relationships between concepts, evaluated through relation triple verification and semantic conflict detection. Constraint satisfaction assesses whether the structure conforms to domain-specific knowledge constraints, such as mutual exclusion and dependency relationships. During optimization, corresponding correction strategies are adopted for different problems. Structural conflicts are resolved by adjusting node positions or adding transition nodes; semantic inconsistencies are resolved by modifying relation types or remapping concepts; constraint violations are resolved by adding missing nodes or adjusting relation directions. Taking migration optimization in the insurance domain as an example, it was found that in the initial structure, "insurance product" was directly connected to "application process," lacking an intermediate step, resulting in structural incoherence. Based on the structural preservation assessment, a "requirements analysis" node was added as an intermediate step, restoring the process integrity in the original template. To address the semantic consistency issue, it was found that the relationship between "insurance product" and "expected rate of return" used the term "directly generated," which was inaccurate in the context of insurance. The relationship was changed to "may be provided," which improved the semantic accuracy.

[0081] In the constraint satisfaction optimization phase, specific constraints in the insurance domain were identified, such as "life insurance is not applicable to corporate clients." However, in the initial structure, "corporate clients" was incorrectly linked to "life insurance products." This connection was removed, and constraint descriptions were added to ensure that the knowledge conformed to domain rules. The optimization process was iterative, with three metrics recalculated after each adjustment until a preset threshold or the maximum number of iterations was reached. The final output transfer-optimized knowledge graph retains the structural advantages of the general knowledge organization model while fully adapting to the specific needs of the target domain.

[0082] This technical solution achieves efficient transfer and optimization of knowledge graphs and effective reuse of knowledge structures through structural decomposition based on a general knowledge organization model and cross-domain knowledge mapping. Multi-dimensional semantic similarity calculation and inter-domain knowledge mapping technology ensure the accuracy of cross-domain concept correspondence, while the joint optimization of structure preservation, semantic consistency and constraint satisfaction guarantees the quality and applicability of the transfer results.

[0083] Optionally, generating candidate responses based on the transfer-optimized knowledge graph and the initial intent, and evaluating the candidate responses for knowledge accuracy, expression suitability, and domain relevance, and selecting the candidate response with the highest comprehensive score as the output includes: extracting knowledge path representation, entity relationship representation, and attribute feature representation from the transfer-optimized knowledge graph, performing hierarchical attention fusion with the semantic vector of the initial intent, and constructing a multi-level context vector with knowledge perception capabilities; adjusting the knowledge-enhanced dialogue generation model based on the multi-level context vector to generate multiple candidate responses; evaluating the candidate responses in multiple dimensions: calculating the knowledge accuracy score using knowledge graph path verification and entity relationship constraint testing; calculating the language style matching degree and professionalism matching degree of the candidate responses based on user feature vectors to obtain the expression suitability score; calculating the domain coverage and professional terminology accuracy of the candidate responses by combining the structural features of the transfer-optimized knowledge graph and the domain ontology to obtain the domain relevance score; and weighting and fusing the knowledge accuracy score, expression suitability score, and domain relevance score to obtain a comprehensive score, and selecting the candidate response with the highest comprehensive score as the output.

[0084] For example, the initial intent is already a classification result. An intent-semantic mapping table is maintained, mapping each intent class to a predefined semantic vector. Knowledge path representation extracts multiple possible paths from the user's query entity to the target answer entity. Each path contains a series of entity nodes and relational edges. First, the entity in the query is identified, such as "critical illness insurance." Then, starting from this entity in the knowledge graph, a path search algorithm with a limited depth (usually 3-4 hops) is used to find all possible related paths. Each path uses a path encoder for representation learning. This encoder is implemented by a unidirectional LSTM network, processing the nodes and edges on the path sequentially, and finally outputting a vector representation of the path. Taking an insurance consultation scenario as an example, if a user queries "What are the exclusions of critical illness insurance?", paths such as "critical illness insurance - includes - insurance terms - stipulates - exclusions" and "critical illness insurance - belongs to - insurance products - has - exclusions" are extracted and encoded into 128-dimensional vectors respectively. Entity relationship representation focuses on the core entities related to the query and their relationships. A local relation graph is constructed, containing entities identified in the query (such as "critical illness insurance" and "exclusion clauses") and their first- and second-order neighbors in the knowledge graph. For each entity node, its type and attributes are extracted; for relation edges between entities, the relation type and attributes are extracted. The local relation graph is encoded using a graph convolutional network, which updates the representations of nodes and edges through a message-passing mechanism. The network contains two convolutional layers, each followed by a ReLU activation function, ultimately outputting a 64-dimensional entity representation and a 32-dimensional relation representation. Attribute feature representation focuses on the specific attribute values ​​of the entities. All attribute triples related to the query are extracted from the knowledge graph, such as "critical illness insurance - payout conditions - specific disease diagnosis" and "critical illness insurance - waiting period - 90 days". For text-type attribute values, they are converted into vectors using a bag-of-words model or TF-IDF method; for numerical attribute values, normalization is performed; and for categorical attribute values, one-hot encoding is used. All attribute vectors are merged to form the attribute feature representation of the entity.

[0085] Hierarchical attention fusion is the core step in combining three knowledge representations with the initial intent semantic vector. This process employs a three-layer stacked attention network: first, at the path level, the relevance of each knowledge path to the initial intent is calculated, and attention weights are assigned to each path; then, at the entity / relationship level, the importance weights of each entity and relationship in the local relation graph are calculated; finally, at the attribute level, the attribute features most relevant to the current intent are identified. Each layer of the attention network is implemented by a two-layer feedforward neural network, with input being the concatenation of the current layer's features and the intent vector, and output being a normalized attention score. Through weighted summation, a multi-layered context vector with a dimension of 512 is generated, fusing the three knowledge representations and the initial intent.

[0086] The knowledge-enhanced dialogue generation model employs an encoder-decoder architecture. The encoder processes multi-level context vectors, while the decoder generates the response text. The encoder consists of a three-layer bidirectional LSTM network with 128 hidden units per layer, converting the context vectors into an encoded representation. The decoder consists of a three-layer unidirectional LSTM network, accessing the hidden states of the encoder at each time step through an attention mechanism to generate the response word sequence. The attention mechanism is implemented using a feedforward neural network, calculating the matching degree between the decoder's current hidden state and each state of the encoder to generate an attention distribution. To increase response diversity, a Beam Search and diversity penalty strategy are employed, setting the beam width to 5. During decoding, multiple candidate word sequences are retained, and a diversity score is introduced to reduce repetitive content. By adjusting the sampling temperature (e.g., 0.7, 0.8, 0.9), 5-10 candidate responses are generated for each query, encompassing different expressions and content emphases.

[0087] Knowledge accuracy assessment first utilizes rule-based information extraction techniques to extract entity and relation triples from candidate responses. A domain-adaptive named entity recognition module is used to identify entity references in responses based on a conditional random field model; dependency parsing and relation template matching are then used to identify relationships between entities. For example, from the response "Critical illness insurance is not payable if diagnosed during the waiting period," two relation triples are identified: "Critical illness insurance - has - waiting period" and "Diagnosed during the waiting period - leads to - no payable."

[0088] The knowledge graph path verification checks whether these triples can find supporting paths in the knowledge graph. A bidirectional search strategy is used, starting from both the head and tail entities of the triples simultaneously to find paths connecting them. For each extracted triple, a score of 1.0 is awarded if a completely matching supporting path is found; a score of 0.5-0.9 is awarded if a partially matching path is found (containing similar relationships or intermediate entities); and a score of 0 is awarded if no matching path is found. The entity relationship constraint verification verifies whether the triples conform to predefined domain constraint rules. A rule base is maintained, including type constraints (e.g., "insurance products cannot be attributes of people"), mutually exclusive relationship constraints (e.g., "the same product cannot be both high-risk and low-risk"), etc. For each triple in the response, it is checked whether it violates any constraint rules, and a corresponding score is deducted for each rule violation. The average score of the two tests is combined to calculate the knowledge accuracy score, with a maximum score of 10.

[0089] Expression suitability assessment calculates the matching degree of candidate responses based on user feature vectors. Language style matching assessment uses a text style feature extractor to extract features such as sentence length distribution, lexical complexity, and frequency of modal particles in the responses, and calculates cosine similarity with user language preference vectors. For example, responses aimed at ordinary users should use concise and straightforward expressions, with sentence lengths controlled within 15 words. Professionalism matching is determined by calculating the density of professional terms in the responses and comparing it with the user's professional level. A terminology difficulty level table is maintained, classifying terms into beginner, intermediate, and advanced levels. A weighted professionalism score is calculated based on the frequency of use of terms at each level in the responses. If the professionalism of the response matches the user's level, it receives full marks; the greater the deviation, the lower the score.

[0090] Domain relevance assessment combines the structural features of the knowledge graph with transfer optimization and the domain ontology for calculation. Domain coverage measures the extent to which the response covers the relevant knowledge of the query. First, relevant subgraphs in the knowledge graph are determined based on the initial intent and query entities, containing core nodes and edges directly related to the query. Then, the extent to which the response content covers the nodes and edges of the relevant subgraphs is analyzed. Coverage is calculated based on the degree of matching between the identified entity and relation triples and the relevant subgraphs. For example, for the query "critical illness insurance exclusion clauses," the relevant subgraph contains nodes for "critical illness insurance" and "exclusion clauses," as well as related nodes such as "waiting period" and "payment restrictions." If the response mentions 80% of the core nodes, the domain coverage is high; if it only covers 20%, the coverage is low. Terminology accuracy assesses whether the terminology used in the response is standardized and accurate. A standard dictionary of domain terminology is maintained, containing standardized terms and their variant forms. For terms identified in the response, it is checked whether standardized expressions are used. For example, in the insurance field, "policy surrender" is the standard term, while "refund" is not; "insurance liability" is the standard expression, while "scope of coverage," though understandable, is not professional enough. The proportion of standardized terms used is calculated as an accuracy score. A weighted average of the overall field coverage and the accuracy of the professional terminology is then used to obtain a field relevance score, with a maximum score of 10.

[0091] A comprehensive score is obtained by weighting and fusing the scores of knowledge accuracy, expression suitability, and domain relevance. The weighting and fusion uses a linear combination approach, with different weight configurations set according to the user's query type. For knowledge consultation queries, the weight of knowledge accuracy is 0.5, expression suitability is 0.3, and domain relevance is 0.2; for suggestion consultation queries, the weights are 0.3, 0.5, and 0.2 respectively; and for professional terminology consultation queries, the weights are 0.4, 0.2, and 0.4 respectively. The query type is determined based on the initial intent; for example, "inquiring about insurance terms" belongs to the knowledge consultation category. The comprehensive score is calculated by weighting the scores of the three dimensions with their corresponding weights, comparing the comprehensive scores of all candidate responses, and selecting the highest score as the output. When the difference between multiple responses is less than 0.2 points, response length (preferably 100-300 words) and the degree of difference from historical answers are considered as auxiliary judgment criteria. A feedback collection mechanism is also designed to dynamically adjust the scoring weights based on user satisfaction evaluations and follow-up inquiries, continuously optimizing response quality.

[0092] This technical solution achieves knowledge-aware dialogue generation and refined response evaluation by extracting multi-level knowledge representations from the migration-optimized knowledge graph and integrating them with the initial intent; the dynamic weight adjustment mechanism enables the system to flexibly adjust the evaluation criteria for different scenarios and user needs, providing a personalized service experience.

[0093] Optionally, the joint optimization of the initial knowledge structure in terms of structure preservation, semantic consistency, and constraint satisfaction to obtain the transfer-optimized knowledge graph includes: constructing a dynamic structure preservation evaluation module, which generates a dynamic structure deviation matrix based on a graph structure similarity measurement function and a temporal attention mechanism; calculating the structure change trend and dynamically adjusting the optimization objective weight coefficients based on the dynamic structure deviation matrix to obtain a structure preservation score; constructing a multimodal knowledge representation by fusing text semantic vectors, structural feature vectors, and attribute feature vectors; obtaining a unified knowledge representation by learning intermodal associations through a cross-modal attention mechanism; calculating intramodal and intermodal semantic consistency based on the unified knowledge representation; obtaining a semantic consistency score using contrastive learning; mining implicit constraint rules from historical transfer data and extracting local constraint features using a graph neural network; designing an adaptive threshold determination mechanism; calculating a constraint satisfaction score based on a soft constraint mechanism; and substituting the structure preservation score, semantic consistency score, and constraint satisfaction score into a multi-objective optimization function for joint optimization; iteratively updating the knowledge structure by dynamically adjusting the optimization step size to obtain the transfer-optimized knowledge graph.

[0094] For example, the graph structure similarity metric function considers node correspondence, edge consistency, and path preservation rate, calculating a feature vector for the optimized structure in each round. The temporal attention mechanism processes the sequence of structural features across multiple rounds using LSTM and a self-attention layer to identify key changes and trends. Based on the current features and the temporally weighted representation, a structural deviation matrix is ​​calculated, reflecting the degree of deviation in structural relationships between nodes. In insurance knowledge transfer, a decrease in the path preservation rate of "insurance product-inclusion-terms" was observed, which was given high weight through temporal attention, indicating a deviation of the structure from the original template.

[0095] The overall deviation, critical node deviation, and acceleration of change are calculated based on the deviation matrix, and the weights are dynamically adjusted for optimization. When the structure changes too rapidly or the critical node deviation increases, the structure maintenance weight is increased; when the structure is stable, the weight is decreased to increase adaptability. For example, if a rapid change in the "claims process" is detected, the structure maintenance weight is increased from 0.4 to 0.6 to ensure process integrity.

[0096] Three cross-attention modules are implemented to handle text-structure, text-attribute, and structure-attribute interactions. Each module calculates bidirectional attention through a query-key-value mechanism to capture complementary modal information. At the "Critical Illness Insurance" node, the text description and its structural position (connecting "insurance product" and multiple "disease types") are semantically aligned through cross-modal attention.

[0097] Three contrastive tasks are designed to evaluate semantic consistency: intramodal positive and negative sample comparison, intermodal comparison of the same node, and intermodal comparison of different nodes. A cross-modal attention network is trained by minimizing the contrastive loss to obtain a unified representation of semantic consistency. Node semantic consistency scores are calculated based on the unified representation, and the overall consistency score is a weighted average of the node scores.

[0098] The constraint-aware graph neural network comprises three layers of graph convolutions and a constraint detection module, evaluating whether node representations satisfy predefined constraints. An adaptive threshold mechanism adjusts the constraint judgment criteria according to the optimization stage: it is lenient in the initial stage, allowing for structural adjustments; later, it tightens to ensure key constraints are met. The soft constraint mechanism quantifies constraint satisfaction as a continuous score, comprehensively calculating the overall constraint satisfaction score.

[0099] The three scores are fed into a multi-objective optimization function for joint optimization, and the knowledge structure is updated iteratively with a dynamic step size. The optimization process includes adjusting node relationships, modifying attributes, and introducing new nodes, with operation probabilities dynamically adjusted based on the current scores. The step size adjustment mechanism adjusts the step size according to the optimization progress and gradient changes: large step sizes are used initially to accelerate adjustment, and small step sizes are used for fine-tuning as convergence approaches. Multiple stopping conditions are set, such as reaching the maximum number of iterations, the target improvement falling below a threshold, or meeting business requirements.

[0100] Secondly, this invention provides an intelligent customer service dialogue generation and optimization system based on knowledge graphs, comprising:

[0101] The first unit is used to perform entity recognition and intent recognition on the user-input question text using a bidirectional long short-term memory network to obtain the question entity and the initial intent; and to perform multi-hop queries on a preset knowledge graph based on the question entity to obtain the initial knowledge subgraph.

[0102] The second unit is used to construct a user feature vector containing dialogue state features, problem-solving features, and service preference features based on the user-input question text; and to perform hierarchical reconstruction of the initial knowledge subgraph based on the user feature vector to obtain a reconstructed knowledge subgraph.

[0103] The third unit is used to calculate the structural similarity and identify the elements of the existing domain knowledge graph, and extract the general knowledge organization pattern; based on the general knowledge organization pattern, the reconstructed knowledge subgraph is decomposed into structural templates and content filling items, and the knowledge mapping relationship between domains is determined by semantic similarity matching to obtain the transfer-optimized knowledge graph;

[0104] The fourth unit is used to generate candidate responses based on the transfer optimization knowledge graph and the initial intent, evaluate the candidate responses in terms of knowledge accuracy, expression adaptability and domain relevance, and select the candidate response with the highest comprehensive score as the output.

Claims

1. An intelligent customer service dialogue generation optimization method based on a knowledge graph, characterized in that, The method comprises the following steps: applying a bidirectional long short-term memory network to entity recognition and intent recognition of a user input question text, to obtain question entities and an initial intent; performing multi-hop query in a preset knowledge graph based on the question entities, to obtain an initial knowledge subgraph; constructing a user feature vector comprising a dialogue state feature, a question solving feature and a service preference feature based on the user input question text; performing hierarchical reconstruction of the initial knowledge subgraph based on the user feature vector, to obtain a reconstructed knowledge subgraph; specifically comprising: performing multi-modal feature extraction based on the user question text, comprising: performing professional term recognition on the question text to obtain a professional degree score, extracting a user message length sequence and a response time sequence to obtain an interaction mode feature vector, and analyzing an emoticon usage frequency to obtain a sentiment polarity intensity; fusing the professional degree score, the interaction mode feature vector and the sentiment polarity intensity through an attention mechanism to obtain a fused feature vector; constructing a user intent-topic transition matrix based on the initial intent, calculating adjacent topic similarity based on the user intent-topic transition matrix, and generating a conversation coherence index according to the adjacent topic similarity; calculating a question complexity and an answer completeness to obtain a dialogue depth index; constructing a multi-turn dialogue state transition network based on the conversation coherence index and the dialogue depth index; constructing a business knowledge association graph, analyzing a user consultation range according to the business knowledge association graph, identifying a potential service demand, and calculating a question solving path; performing self-organizing mapping clustering on a user interaction vector sequence to obtain an interaction behavior category, and constructing a service preference vector based on the interaction behavior category; and combining the fused feature vector, the multi-turn dialogue state transition network, the question solving path and the service preference vector to form the user feature vector; performing hierarchical division on nodes of the initial knowledge subgraph according to the fused feature vector, to obtain a preliminary hierarchical structure; constructing an inter-layer transition probability matrix using the multi-turn dialogue state transition network, dynamically adjusting a hierarchical structure based on the inter-layer transition probability matrix, to obtain an optimized hierarchical structure; constructing a knowledge transfer graph based on the question solving path, and mapping the optimized hierarchical structure to the knowledge transfer graph to obtain a plurality of possible transfer paths; reordering the transfer paths based on the service preference vector, to obtain an optimal transfer path; constructing a multi-dimensional knowledge network based on the optimal transfer path, performing knowledge redundancy elimination and supplement, to obtain the reconstructed knowledge subgraph; performing structure similarity calculation and element recognition on an existing domain knowledge graph, and extracting a general knowledge organization mode; decomposing the reconstructed knowledge subgraph into a structure template and a content filling item based on the general knowledge organization mode, determining a knowledge mapping relationship between domains through semantic similarity matching, to obtain a migration optimized knowledge graph; generating a candidate reply based on the migration optimized knowledge graph and the initial intent, evaluating the candidate reply in terms of knowledge accuracy, expression adaptability and domain relevance, and selecting a candidate reply with the highest comprehensive score as an output.

2. The method of claim 1, wherein, performing multi-hop query in a preset knowledge graph based on the question entities, to obtain an initial knowledge subgraph comprises: constructing an entity relation importance scoring matrix based on the problem entity; generating an adaptive decay factor related to query path hop count and path score according to the entity relation importance scoring matrix; calculating query path expected return with the problem entity as the starting point based on the entity relation importance scoring matrix and the adaptive decay factor, and generating a query path set with priority; selecting multiple complementary paths with the highest scores from the query path set with priority, and distributing computing resources for parallel query based on path score distribution of the complementary paths to obtain multiple candidate knowledge subgraphs and their feature matrices; calculating the complementarity and redundancy between the candidate knowledge subgraphs based on the feature matrices, weighting and fusing the complementary areas in the candidate knowledge subgraphs, and pruning the redundant branches in the overlapping areas to obtain an initial knowledge subgraph.

3. The method of claim 1, wherein, constructing a multi-dimensional knowledge network based on the optimal transmission path, eliminating and supplementing knowledge redundancy to obtain a reconstructed knowledge subgraph, including: constructing a node semantic similarity matrix and a structure correlation matrix based on the optimal transmission path, and obtaining a hybrid correlation matrix through weighted fusion; identifying knowledge clusters using the hybrid correlation matrix, and calculating the node importance weight within the clusters based on a hierarchical attention mechanism; constructing a multi-dimensional knowledge network in the semantic, structural and functional dimensions according to the node importance weight and the hybrid correlation matrix; using the multi-dimensional knowledge network for cross-dimensional reasoning to identify and supplement knowledge gaps, and optimizing the overall network structure through weighted graph embedding to obtain a reconstructed knowledge subgraph.

4. The method of claim 1, wherein, performing structure similarity calculation and element identification on the existing domain knowledge graph, and extracting a general knowledge organization pattern, including: constructing a structure feature vector of the existing domain knowledge graph, including node degree distribution, path length distribution and local clustering coefficient; performing node embedding on the existing domain knowledge graph based on a graph neural network, and obtaining a graph-level representation through attention pooling; calculating a structure similarity matrix between different domain knowledge graphs using the structure feature vector and the graph-level representation; performing pattern matching on the substructures of the knowledge graphs with a similarity higher than a preset similarity threshold, and identifying structural units and semantic elements with a co-occurrence frequency higher than a preset frequency threshold; abstracting and inducing the identified structural units and semantic elements to form a general knowledge organization pattern.

5. The method of claim 1, wherein, based on the general knowledge organization pattern, decomposing the reconstructed knowledge subgraph into a structure template and a content filling item, determining the inter-domain knowledge mapping relationship through semantic similarity matching, and obtaining a transfer-optimized knowledge graph, including: constructing a structure matching matrix for the reconstructed knowledge subgraph based on the general knowledge organization pattern, the structure matching matrix fusing local structure similarity and semantic similarity, and decomposing the reconstructed knowledge subgraph into a structure template and a corresponding content filling item through maximum bipartite matching; calculating the semantic similarity between the content filling item and the concepts in the target application domain using word vector similarity, knowledge base path similarity and context similarity, and generating an inter-domain knowledge mapping matrix based on the semantic similarity; construct an initial knowledge structure in a target application field based on the structure template and the inter-field knowledge mapping matrix, identify concept types and relationship patterns of the target application field, and fuse and supplement the initial knowledge structure to form an initial knowledge structure enhanced by the field; perform joint optimization of structure preservation degree, semantic consistency, and constraint satisfaction degree on the initial knowledge structure enhanced by the field to obtain a migration-optimized knowledge graph.

6. The method of claim 1, wherein, generate candidate replies based on the migration-optimized knowledge graph and the initial intent, evaluate the candidate replies in terms of knowledge accuracy, expression adaptability, and field relevance, and select a candidate reply with the highest comprehensive score as the output including: extract knowledge path representation, entity relationship representation, and attribute feature representation from the migration-optimized knowledge graph, perform hierarchical attention fusion with the semantic vector of the initial intent, construct a multi-level context vector with knowledge perception capability, adjust a knowledge-enhanced dialogue generation model based on the multi-level context vector, and generate multiple candidate replies; perform multi-dimensional evaluation on the candidate replies: calculate knowledge accuracy score by knowledge graph path verification and entity relationship constraint testing; calculate expression adaptability score based on language style matching degree and professional degree matching degree of the candidate reply based on the user feature vector; calculate field relevance score based on the structure features and field ontology of the migration-optimized knowledge graph. weight and fuse the knowledge accuracy score, expression adaptability score, and field relevance score to obtain a comprehensive score, and select a candidate reply with the highest comprehensive score as the output.

7. The intelligent customer service dialogue generation optimization system based on a knowledge graph, for implementing the method of any one of the preceding claims 1-6, characterized in that, including: The first unit is configured to use a bidirectional long short-term memory network to perform entity recognition and intent recognition on the user input question text, and obtain question entities and an initial intent. Based on the question entities, perform multi-hop query in a preset knowledge graph to obtain an initial knowledge subgraph. The second unit is configured to construct a user feature vector including dialogue state features, question solving features, and service preference features based on the user input question text, and perform hierarchical reconstruction on the initial knowledge subgraph based on the user feature vector to obtain a reconstructed knowledge subgraph. The third unit is configured to perform structure similarity calculation and element recognition on an existing field knowledge graph to extract a general knowledge organization pattern. Based on the general knowledge organization pattern, the reconstructed knowledge subgraph is decomposed into a structure template and content filling items, a field inter-knowledge mapping relationship is determined through semantic similarity matching, and a migration-optimized knowledge graph is obtained. The fourth unit is configured to generate candidate replies based on the migration-optimized knowledge graph and the initial intent, evaluate the candidate replies in terms of knowledge accuracy, expression adaptability, and field relevance, and select a candidate reply with the highest comprehensive score as the output.

Citation Information

Patent Citations

  • Structured search queries based on social-graph information

    CN104903886A

  • Knotarization intelligent question and answer customer service method and system based on knowledge graph

    CN119938816A