A method, device, equipment and medium of an intelligent recommendation algorithm knowledge interaction question and answer system based on a digital image person
Patent Information
- Application Number
- CN202610977185.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-02
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2046-07-02
AI Technical Summary
[0003]然而,上述现有技术仍存在以下根本性缺陷:在知识检索阶段,系统缺乏对知识图谱路径发散程度的结构性感知,仅依赖语义相似度的单点匹配进行知识召回,导致当用户问题涉及跨领域、多跳推理的复杂知识关联时,系统无法识别最优知识路径,容易召回语义相近但意图偏离的知识内容
[0051]本发明相对于现有技术产生的有益效果为:本发明提供的基于数字形象人的智能推荐算法知识交互问答系统的方法,通过在多跳知识图谱检索中引入分支密度、语义距离和关系类型多样性熵的乘积融合机制生成知识路径拓扑熵,使系统能够感知检索路径的发散程度并据此筛选最优知识路径,克服了现有技术中仅依赖单点语义匹配导致知识召回意图偏离的缺陷;同时,通过将用户多轮交互映射为情感极坐标轨迹并计算认知轨迹曲率,与知识路径拓扑熵耦合关联确定认知导航偏转角,实现知识相关性与情感一致性的正交加权融合,使推荐策略能随用户认知状态动态自适应调节,克服了现有技术中推荐策略固化、无法响应用户认知矛盾的缺陷,显著提升了多轮交互场景下的推荐准确率和用户体验满意度。
Smart Images

Figure CN122633880B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital human and artificial intelligence interaction technology, and in particular to a method, apparatus, device and medium for a knowledge interaction question-and-answer system based on a digital human-based intelligent recommendation algorithm. Background Technology
[0002] In the field of digital human and artificial intelligence interaction, intelligent recommendation and question-answering systems based on digital human avatars have been widely applied in scenarios such as intelligent customer service, online education, and virtual assistants. Existing technologies typically employ a basic architecture of "multimodal input parsing—knowledge base retrieval—large model generation—digital human multimodal output." For example, existing solutions have implemented features such as maintaining session state through a dialogue manager, recalling candidate content, and performing multi-dimensional feature fusion scoring, while combining digital humans to output recommendation results and interpretable text in multimodal ways, including voice, facial expressions, and actions. Such solutions provide users with a preliminary intelligent interactive experience.
[0003] However, the aforementioned existing technologies still suffer from the following fundamental flaws: In the knowledge retrieval stage, the system lacks a structural awareness of the divergence of knowledge graph paths, relying solely on single-point matching based on semantic similarity for knowledge recall. This leads to the system's inability to identify the optimal knowledge path when user questions involve complex knowledge associations across domains and multiple hops of reasoning, easily recalling semantically similar but intentionally misaligned knowledge content. Furthermore, during multi-round interactions, the system cannot perceive contradictory behaviors generated by the user at the cognitive level, nor can it quantify such cognitive conflicts into parameters that can participate in recommendation decisions. This results in the recommendation strategy remaining fixed on a single logic, unable to dynamically adapt and adjust according to the user's real-time cognitive state, thereby reducing the naturalness of the interaction and user satisfaction.
[0004] Therefore, this invention proposes a method, apparatus, device, and medium for a knowledge interaction question-and-answer system based on an intelligent recommendation algorithm for digital human-like figures. Summary of the Invention
[0005] This invention provides a method, apparatus, device, and medium for a knowledge interaction question-and-answer system based on an intelligent recommendation algorithm for digital human figures. This enables the digital human system to perceive the knowledge path structure and dynamically adjust the recommendation strategy according to the user's cognitive state, significantly improving the recommendation accuracy and user experience in multi-round interaction scenarios.
[0006] This invention provides a method for a knowledge-based interactive question-answering system based on an intelligent recommendation algorithm using a digital avatar, comprising:
[0007] Acquire multimodal interaction data from user input and extract user intent vectors and user sentiment vectors;
[0008] Input the user intent vector into the preset domain knowledge graph to link entities, perform multi-hop graph queries starting from the core entity, and multiply the branch density, semantic distance to the core entity, and relationship type diversity entropy on the query path of each candidate entity according to the preset weight ratio to generate the knowledge path topology entropy corresponding to each candidate entity.
[0009] Target entities are filtered and associated subgraphs are constructed based on the knowledge path topological entropy. Multimodal knowledge data is then retrieved from the multimodal fusion knowledge base based on the associated subgraphs. The user intent vector, the structural information of the associated subgraphs, and the retrieved multimodal knowledge data are then input into the large language model to generate an initial recommended answer.
[0010] Acquire user interaction data from multiple consecutive rounds, determine the polar angle based on the user's emotional polarity in each round of interaction, determine the polar radius based on the user's behavioral intensity in each round of interaction, map each round of interaction to trajectory points in polar coordinates, interpolate the trajectory points to obtain the emotional trajectory curve, and generate the cognitive trajectory curvature by weighting and amplifying the instantaneous curvature and cumulative curvature of the emotional trajectory curve in combination with the distribution ratio of positive and negative curvature points within a preset window.
[0011] The ratio is calculated by using the curvature of the cognitive trajectory as the numerator and the topological entropy of the knowledge path of the target entity as the denominator. The arctangent function is then calculated based on the ratio, and the result is used as the cognitive navigation deflection angle.
[0012] Based on the cognitive navigation deflection angle, cosine weights and sine weights are determined. The knowledge relevance score and sentiment consistency score of the recalled multimodal knowledge data are weighted and summed using cosine weights and sine weights respectively to obtain the fusion score. The data are then reordered according to the fusion score to obtain the target recommended answer.
[0013] The system controls a digital avatar to provide interactive, multimodal output based on the target's recommended answer.
[0014] Furthermore, the preset weighting ratio is determined according to the following steps:
[0015] Obtain the global in-degree distribution of all entities in the preset domain knowledge graph, calculate the first statistical variance of the global in-degree distribution, and convert the first statistical variance into the first candidate value of the first weight coefficient according to the first preset mapping relationship. The first candidate value is positively correlated with the first statistical variance, and the first preset mapping relationship is a monotonically increasing non-linear function relationship.
[0016] Obtain the embedding vector distance distribution of all entity pairs in the preset domain knowledge graph, calculate the second statistical variance of the embedding vector distance distribution, and convert the second statistical variance into the second candidate value of the second weight coefficient according to the second preset mapping relationship. The second candidate value is negatively correlated with the second statistical variance. The second preset mapping relationship is a monotonically decreasing non-linear function relationship.
[0017] Obtain the frequency distribution of all relation types in the preset domain knowledge graph, calculate the third statistical variance of the frequency distribution, and convert the third statistical variance into the third candidate value of the third weight coefficient according to the third preset mapping relationship. The third candidate value is positively correlated with the third statistical variance, and the third preset mapping relationship is a monotonically increasing non-linear function relationship.
[0018] The first, second, and third candidate values are normalized so that the sum of the normalized first, second, and third weight coefficients is a constant value, and the normalized first weight coefficient is greater than the second weight coefficient and the third weight coefficient.
[0019] Furthermore, the branch density corresponding to the candidate entity is determined according to the following steps:
[0020] Starting from the core entity, obtain the first number of all first-level candidate entities directly associated with the core entity and the first weight sum of all first-level relation edges. Perform a calculation on the first number and the first weight sum using a composite function that includes logarithmic operations to obtain the initial branch density of the first hop.
[0021] Obtain the number of directly related branches that each candidate entity expands outward, as well as the total weight of the relationship edges between the corresponding candidate entity and the directly superior entity. Perform a composite function operation on the number of directly related branches and the total weight to obtain the single-point branch density of the corresponding candidate entity.
[0022] The weighted sum of the initial branch density of the first hop and the single-point branch density of the corresponding candidate entity is used as the branch density of the corresponding candidate entity.
[0023] Furthermore, the semantic distance between the candidate entity and the core entity is determined according to the following steps:
[0024] Obtain the first embedding vector of the candidate entity in the embedding space of the preset domain knowledge graph, obtain the second embedding vector of the core entity in the embedding space, and calculate the cosine distance between the first embedding vector and the second embedding vector.
[0025] Obtain the shortest path length between candidate entities and core entities in the preset domain knowledge graph. Use the shortest path length as an exponential coefficient to correct the cosine distance to obtain the semantic distance between candidate entities and core entities. The corrected semantic distance is positively correlated with both the cosine distance and the shortest path length.
[0026] Furthermore, the entropy of relation type diversity along the query path where the candidate entity is located is determined according to the following steps:
[0027] Obtain the set of relation type labels for all relation edges on the query path where the corresponding candidate entity is located, and count the frequency of each relation type label in all relation edges;
[0028] Calculate the proportion of each relation type label in all relation edges based on the frequency of occurrence of each relation type label;
[0029] Get the total number of different relation type labels in the relation type label set, and use the logarithm of the corresponding total number as the maximum possible entropy value;
[0030] Shannon entropy is calculated based on the proportion of each relation type label, and the ratio of Shannon entropy to the maximum possible entropy value is used as the relation type diversity entropy.
[0031] Furthermore, the polar angle is determined based on the user's emotional polarity in each round of interaction, and the polar radius is determined based on the user's behavioral intensity in each round of interaction, including:
[0032] Obtain the emotional polarity score of the user's emotional vector in each round of interaction. The emotional polarity score is a continuous value and ranges from negative to positive. The product of the emotional polarity score and pi is used as the polar angle corresponding to each round of interaction.
[0033] The interaction duration, operation frequency, and input complexity in each round of interaction are obtained. The interaction duration, operation frequency, and input complexity are normalized respectively. The weighted sum of the normalized interaction duration, normalized operation frequency, and normalized input complexity is used as the comprehensive value of behavior intensity. The product of the ratio of the comprehensive value of behavior intensity to the preset maximum behavior intensity value and the preset maximum value of the extreme radius is used as the extreme radius corresponding to each round of interaction.
[0034] Furthermore, based on the instantaneous and cumulative curvature of the emotional trajectory curve, and combined with the weighted amplification of the distribution ratio of positive and negative curvature points within a preset window, a cognitive trajectory curvature is generated, including:
[0035] Cubic spline interpolation is performed on the trajectory points to obtain a continuous emotional trajectory curve;
[0036] Calculate the first and second derivatives of the emotion trajectory curve at the current moment's endpoint, and use the ratio of the magnitude of the second derivative to the cube of the magnitude of the first derivative as the instantaneous curvature.
[0037] The cumulative curvature is obtained by integrating the instantaneous curvature of the emotion trajectory curve over the integral interval from the beginning to the end.
[0038] The instantaneous curvature values of the emotional trajectory curve at multiple sampling points within a preset historical window are obtained. The sign of the instantaneous curvature values at each sampling point is determined. Sampling points with instantaneous curvature values greater than zero are marked as positive curvature points, and sampling points with instantaneous curvature values less than zero are marked as negative curvature points.
[0039] The ratio of the first number of positive curvature points to the second number of negative curvature points is calculated. When the ratio is greater than the first preset swing threshold, the cumulative curvature is multiplied by the first swing amplification factor and used as the initial cognitive trajectory curvature. When the ratio is less than the second preset swing threshold, the cumulative curvature is multiplied by the second swing amplification factor and used as the initial cognitive trajectory curvature. When the ratio is not less than the second preset swing threshold and not greater than the first preset swing threshold, the cumulative curvature is directly used as the initial cognitive trajectory curvature.
[0040] When the topological entropy of the knowledge path of the target entity is less than the preset entropy threshold, the initial cognitive trajectory curvature is reduced to zero according to the decay function determined by the ratio of the topological entropy of the knowledge path of the target entity to the preset entropy threshold, and the cognitive trajectory curvature is obtained; otherwise, the initial cognitive trajectory curvature is directly used as the cognitive trajectory curvature.
[0041] This invention provides an apparatus for a knowledge-interactive question-answering system based on an intelligent recommendation algorithm using a digital avatar, comprising:
[0042] The acquisition module is used to acquire multimodal interaction data input by the user and extract the user intent vector and the user sentiment vector.
[0043] The knowledge retrieval module is used to input user intent vectors into a preset domain knowledge graph for entity linking. Starting from the core entity, it performs multi-hop graph queries and multiplies the branch density, semantic distance to the core entity, and relationship type diversity entropy on the query path of each candidate entity according to a preset weight ratio to generate the knowledge path topology entropy for each candidate entity. Based on the knowledge path topology entropy, it filters target entities and constructs a relational subgraph. Based on the relational subgraph, it retrieves multimodal knowledge data from the multimodal fusion knowledge base.
[0044] The answer generation module is used to input the user intent vector, the structural information of the association subgraph, and the recalled multimodal knowledge data into the large language model to generate the initial recommended answer;
[0045] The trajectory curvature calculation module is used to acquire user interaction data in multiple rounds, determine the polar angle based on the user's emotional polarity in each round of interaction, determine the polar radius based on the user's behavioral intensity in each round of interaction, map each round of interaction to trajectory points in polar coordinates, interpolate the trajectory points to obtain the emotional trajectory curve, and generate the cognitive trajectory curvature by weighting and amplifying the instantaneous curvature and cumulative curvature of the emotional trajectory curve in combination with the distribution ratio of positive and negative curvature points within a preset window.
[0046] The deflection angle calculation module is used to calculate the ratio by using the curvature of the cognitive trajectory as the numerator and the topological entropy of the knowledge path of the target entity as the denominator. The ratio is then used to calculate the arctangent function, and the result is used as the cognitive navigation deflection angle.
[0047] The re-ranking module is used to determine the cosine weight and sine weight based on the cognitive navigation deflection angle. It then uses the cosine weight and sine weight to sum the knowledge relevance score and sentiment consistency score of the recalled multimodal knowledge data to obtain the fusion score. Finally, it re-ranks the data according to the fusion score to obtain the target recommended answer.
[0048] The output control module is used to control the digital avatar to perform interactive multimodal output based on the target recommended answer.
[0049] This invention provides a computer device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of any of the above-mentioned methods for a knowledge-interactive question-and-answer system based on a digital human-based intelligent recommendation algorithm.
[0050] This invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned methods for a knowledge-interactive question-and-answer system based on a digital human-based intelligent recommendation algorithm.
[0051] The beneficial effects of this invention compared to existing technologies are as follows: The method of the intelligent recommendation algorithm knowledge interaction question answering system based on digital human image provided by this invention generates knowledge path topological entropy by introducing a product fusion mechanism of branch density, semantic distance, and relation type diversity entropy in multi-hop knowledge graph retrieval. This enables the system to perceive the divergence of the retrieval path and select the optimal knowledge path accordingly, overcoming the defect of existing technologies that rely solely on single-point semantic matching, leading to deviation of knowledge recall intent. At the same time, by mapping user multi-round interactions to emotional polar coordinate trajectories and calculating the curvature of cognitive trajectories, and coupling and associating them with knowledge path topological entropy to determine the cognitive navigation deflection angle, orthogonal weighted fusion of knowledge relevance and emotional consistency is achieved. This allows the recommendation strategy to dynamically and adaptively adjust according to the user's cognitive state, overcoming the defects of existing technologies where recommendation strategies are fixed and unable to respond to user cognitive contradictions, significantly improving the recommendation accuracy and user experience satisfaction in multi-round interaction scenarios.
[0052] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in this application.
[0053] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0054] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0055] Figure 1 This is an overall flowchart of the method for the knowledge interaction question-and-answer system based on the intelligent recommendation algorithm of digital avatar in this embodiment of the invention;
[0056] Figure 2 This is a schematic diagram illustrating the principle of the knowledge path topology entropy generation process in an embodiment of the present invention;
[0057] Figure 3 This is a schematic diagram illustrating the principle of cognitive trajectory curvature generation and cognitive navigation deflection angle calculation in an embodiment of the present invention. Detailed Implementation
[0058] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0059] The following is combined Figure 1 , Figure 2 , Figure 3 This invention provides a detailed description of embodiments of the method for a knowledge-interactive question-answering system based on a digital avatar intelligent recommendation algorithm. For example... Figure 1 As shown, the method includes the following steps:
[0060] Acquire multimodal interaction data from user input and extract user intent vectors and user sentiment vectors;
[0061] Input the user intent vector into the preset domain knowledge graph to link entities, perform multi-hop graph queries starting from the core entity, and multiply the branch density, semantic distance to the core entity, and relationship type diversity entropy on the query path of each candidate entity according to the preset weight ratio to generate the knowledge path topology entropy corresponding to each candidate entity.
[0062] Target entities are filtered and associated subgraphs are constructed based on the knowledge path topological entropy. Multimodal knowledge data is then retrieved from the multimodal fusion knowledge base based on the associated subgraphs. The user intent vector, the structural information of the associated subgraphs, and the retrieved multimodal knowledge data are then input into the large language model to generate an initial recommended answer.
[0063] Acquire user interaction data from multiple consecutive rounds, determine the polar angle based on the user's emotional polarity in each round of interaction, determine the polar radius based on the user's behavioral intensity in each round of interaction, map each round of interaction to trajectory points in polar coordinates, interpolate the trajectory points to obtain the emotional trajectory curve, and generate the cognitive trajectory curvature by weighting and amplifying the instantaneous curvature and cumulative curvature of the emotional trajectory curve in combination with the distribution ratio of positive and negative curvature points within a preset window.
[0064] The ratio is calculated by using the curvature of the cognitive trajectory as the numerator and the topological entropy of the knowledge path of the target entity as the denominator. The arctangent function is then calculated based on the ratio, and the result is used as the cognitive navigation deflection angle.
[0065] Based on the cognitive navigation deflection angle, cosine weights and sine weights are determined. The knowledge relevance score and sentiment consistency score of the recalled multimodal knowledge data are weighted and summed using cosine weights and sine weights respectively to obtain the fusion score. The data are then reordered according to the fusion score to obtain the target recommended answer.
[0066] The system controls a digital avatar to provide interactive, multimodal output based on the target's recommended answer.
[0067] In this embodiment, the multimodal interaction data input by the user refers to the multimodal input information provided by the user during the question-and-answer interaction with the digital avatar. Multimodal interaction data includes at least one of the following: user-inputted voice data, text data, image data, video data, and motion / pose data. Voice data is collected via a microphone array, text data is collected through the interactive interface, image and video data are collected via a camera, and motion / pose data is collected via a depth sensor or inertial sensing unit. All types of data are synchronized and aligned using timestamps as indexes to form a multimodal data frame sequence with temporal correspondence, serving as the raw input for subsequent feature extraction.
[0068] In this embodiment, the user intent vector is a vectorized representation generated after semantic understanding of the multimodal interaction data input by the user, used to represent the target and category of the user's current question. The user sentiment vector is a vectorized representation generated after identifying the emotional information contained in the multimodal interaction data, used to represent the user's current emotional state. Both the intent vector and the sentiment vector are represented in floating-point vector form. The intent vector reflects the type of knowledge the user wants to acquire and the expected interaction method, while the sentiment vector reflects the user's emotional tendency during the interaction process. They are used to guide the selection of knowledge retrieval strategies and the subsequent weight allocation for recommended answers, respectively.
[0069] In this embodiment, after acquiring multimodal interaction data input by the user, the user intent vector and user sentiment vector are extracted respectively through a preset feature extraction model. The feature extraction model adopts a deep learning model combining convolutional neural networks and Transformer architecture. The model is constructed as follows: first, spatial features are extracted from image and video data using a convolutional neural network; temporal features are extracted from speech data using a pre-trained speech recognition model; semantic features are extracted from text data using a text encoder; and then the extraction results of each modality are input into a cross-modal attention fusion layer, outputting a unified multimodal fusion feature. The user intent vector is extracted as follows: the multimodal fusion feature is input into an intent classification network, which adopts a multilayer perceptron structure and outputs a user intent vector. Each dimension of the user intent vector corresponds to a confidence score of a preset intent category, and the confidence score is used to characterize the probability that the user's current question belongs to that intent category. The extraction method for user sentiment vectors is as follows: multimodal fusion features are input into a sentiment analysis network. The sentiment analysis network adopts a multilayer perceptron structure and outputs user sentiment vectors. Each dimension of the user sentiment vector corresponds to a confidence score of a preset sentiment category. The confidence score is used to represent the probability that the user's current emotional state belongs to that sentiment category. This feature extraction model is trained using supervised learning. The training data is constructed as follows: a large amount of multimodal interaction sample data is acquired, and each sample data is labeled with its corresponding user intent category label and user sentiment category label. The labeled sample data is divided into training set and validation set according to a preset ratio. During training, the multimodal interaction sample data in the training set is input into the feature extraction model to obtain the predicted intent vector and the predicted sentiment vector. The first loss function value is calculated based on the difference between the predicted intent vector and the labeled intent category label, and the second loss function value is calculated based on the difference between the predicted sentiment vector and the labeled sentiment category label. The weighted sum of the first loss function value and the second loss function value is used as the total loss function value. With the goal of minimizing the total loss function value, the network parameters of the feature extraction model are updated using the backpropagation algorithm. Repeat the iterations until the total loss function value converges, and you will get the trained feature extraction model.
[0070] In this embodiment, the pre-constructed domain knowledge graph is a pre-built domain knowledge representation system organized in a graph structure. The pre-constructed domain knowledge graph contains multiple entity nodes and relationship edges connecting these entity nodes. Each entity node corresponds to a knowledge concept or knowledge object, and each relationship edge corresponds to a semantic association between two entities. Entity nodes have entity type labels, and relationship edges have relationship type labels. The pre-constructed domain knowledge graph adopts a bottom-up construction approach: first, entities and relationships are extracted from multi-source heterogeneous domain data; then, entity alignment and relationship fusion are performed; finally, the entity-relationship-entity structure is stored in triples, forming a knowledge representation foundation that can be used for graph queries.
[0071] In this embodiment, the branch density corresponding to each candidate entity, the semantic distance to the core entity, and the relation type diversity entropy on the query path are three factors used to calculate the topological entropy of the knowledge path. Branch density characterizes the degree of branch divergence in the knowledge graph path during the expansion from the core entity to the candidate entity. Semantic distance characterizes the similarity between the candidate entity and the core entity in the semantic space. Relation type diversity entropy characterizes the richness of different relation types on the expansion path. These three factors describe the characteristics of the knowledge path associated with the candidate entity from three dimensions: path structure divergence, semantic relevance, and relation diversity, respectively, and together constitute the product factor of the topological entropy of the knowledge path.
[0072] Knowledge path topological entropy, formally a weighted product of three dimensionless factors, is essentially a comprehensive measure of the risk of a graph query path deviating from the user's core intent. Branch density characterizes the risk of structural divergence in the path; the higher the density, the more divergent the path. Semantic distance characterizes the risk of semantic deviation in the path; the greater the distance, the weaker the relevance. Relationship type diversity entropy characterizes the risk of logical jumps in the path; the more diverse the relationship types involved, the less stable the reasoning chain. These three factors collectively characterize the same risk from different dimensions, and their product form ensures that an increase in any single risk significantly increases the total risk value. A smaller product value indicates a concentrated query path structure, semantic similarity, and high consistency in relationship types, resulting in higher retrieval confidence; conversely, a larger product value indicates a path full of uncertainty, resulting in lower retrieval confidence.
[0073] In this embodiment, the preset weight ratio refers to the exponential weights corresponding to branch density, semantic distance, and relation type diversity entropy when multiplying and fusing them. The preset weight ratio includes a first weight coefficient, a second weight coefficient, and a third weight coefficient, which correspond to the exponents of branch density, semantic distance, and relation type diversity entropy, respectively. All three weight coefficients are greater than zero and satisfy the normalization constraint, meaning their sum is 1. The specific values of the weight coefficients can be configured with equal weights or differentiated based on domain knowledge. The specific method for determining the preset weight ratio is described in subsequent embodiments and will not be repeated here.
[0074] In this embodiment, inputting the user intent vector into a preset domain knowledge graph for entity linking refers to matching the user intent vector with each entity node in the preset domain knowledge graph, and selecting the entity node with the highest semantic matching degree with the user intent vector as the core entity. After the core entity is determined, a multi-hop graph query is performed in the preset domain knowledge graph starting from the core entity: first, all first-level candidate entities directly associated with the core entity are queried; then, all second-level candidate entities directly associated with each first-level candidate entity are queried starting from the first-level candidate entity, and so on. Each candidate entity is associated with a query path extending from the core entity to that candidate entity. On the query path corresponding to each candidate entity, the branch density, semantic distance between the candidate entity and the core entity, and the relation type diversity entropy on the query path are calculated respectively. The calculated branch density, semantic distance, and relation type diversity entropy are multiplied by exponentiation of the first weight coefficient, the second weight coefficient, and the third weight coefficient respectively, to obtain the knowledge path topology entropy of the candidate entity. Figure 2 As shown, the knowledge path topological entropy is obtained by multiplying the above three factors according to a preset weight ratio. The specific calculation methods for branch density, semantic distance, and relation type diversity entropy are described in subsequent embodiments and will not be repeated here.
[0075] The knowledge path topological entropy is fused using the product of three factors. Its underlying principle lies in the amplifying effect of product fusion: when the risk of any dimension—branch density, semantic distance, or relation type diversity entropy—increases, the total entropy value after multiplying the three factors significantly increases. This characteristic better aligns with the practical needs of knowledge path reliability assessment—the reliability of a path is determined by its weakest link; deterioration in any dimension is sufficient to render the entire path unreliable, without waiting for multiple dimensions to simultaneously exhibit anomalies. Unlike the offsetting effect of long-board compensation in weighted summation, product fusion can accurately identify knowledge paths with high risk in a single dimension.
[0076] In this embodiment, selecting target entities based on knowledge path topological entropy means sorting candidate entities according to their knowledge path topological entropy values and selecting the top N candidate entities with the smallest knowledge path topological entropy as target entities, where N is a preset positive integer. A smaller knowledge path topological entropy indicates lower structural divergence, higher semantic relevance, and more reasonable relational diversity in the query path containing the candidate entity, meaning a higher reliability of the path. After the target entities are determined, using the core entity and target entity as nodes and the relational edges on the query paths between nodes as connections, all relational edges between the core entity, target entity, and both are extracted to form an association subgraph. Based on the entity type of each entity node and the relational type of each relational edge in the association subgraph, multimodal knowledge data associated with the entity nodes and relational edges is retrieved from the multimodal fusion knowledge base, including text data, image data, video data, and structured data. The user intent vector, the graph structure description information of the association subgraph, and the recalled multimodal knowledge data are input into the large language model, which generates an initial recommended answer. The graph structure description information of the associated subgraph is represented in the form of a text sequence, which is used to provide the topological context of knowledge paths to the large language model.
[0077] The statistical value of the knowledge path topology entropy of the target entity can be obtained by taking the arithmetic mean, weighted average, or median of the knowledge path topology entropy of all target entities. The weight of the weighted average is positively correlated with the correlation strength between each target entity and the core entity.
[0078] In this embodiment, the multimodal fusion knowledge base refers to a data storage system that uniformly stores knowledge data from multiple modalities. The multimodal fusion knowledge base includes text storage partitions, image storage partitions, video storage partitions, and structured data storage partitions, used to store text data, image data, video data, and structured data, respectively. During storage, various types of data are associated and labeled using entity node identifiers and relation edge identifiers from the knowledge graph as indexes, enabling the retrieval of all related multimodal data content across partitions via entity node identifiers or relation edge identifiers.
[0079] In this embodiment, multimodal knowledge data refers to the knowledge content retrieved from the multimodal fusion knowledge base that is associated with each node and edge in the related subgraph. Multimodal knowledge data includes one or more of text data, image data, video data, and structured data. Text data consists of descriptive text related to entity nodes and explanatory text related to relational edges; image data consists of image data related to entity nodes; video data consists of video data related to entity nodes; and structured data consists of quantitative data or attribute data related to entity nodes stored in tabular or key-value pair format.
[0080] In this embodiment, the target entity refers to the entity node selected from the candidate entities according to the knowledge path topological entropy. The target entity is a knowledge node that is highly relevant to the user's intent, other than the core entity. The target entity and the core entity together constitute the node set of the association subgraph, which is used to limit the scope of knowledge retrieval.
[0081] In this embodiment, the structural information of the association subgraph refers to the graph structure data used to describe the topological relationships between nodes and edges in the association subgraph. The structural information of the association subgraph includes the entity type identifier of each node, the direction identifier and relationship type identifier of each relation edge, and the connection relationship data between nodes and edges. The structural information is organized in a graph structure data format to provide the topological context of knowledge paths when the large language model generates recommended answers.
[0082] In this embodiment, the large language model refers to a large-scale pre-trained language model based on the Transformer architecture. This model is obtained through self-supervised pre-training on massive amounts of text corpora and possesses text understanding and text generation capabilities. In this embodiment, the input to the large language model is a sequence of prompt texts that integrates user intent vectors, structural information from relational subgraphs, and multimodal knowledge data; the output is an initial recommended answer. The prompt text sequence is constructed as follows: the user intent vector is converted into intent description text; the structural information from relational subgraphs is converted into graph structure description text; the text content in the multimodal knowledge data is directly used as knowledge text; image data, video data, and structured data are converted into corresponding text descriptions and used as knowledge text; and the intent description text, graph structure description text, and various types of knowledge text are combined according to a preset template into a unified prompt text sequence.
[0083] In this embodiment, the initial recommended answer refers to the preliminary recommended content generated by the large language model based on the prompt text sequence, tailored to the user's current question. The initial recommended answer is presented in natural language text format, including the recommended knowledge content, the reasons for the recommendation, and an explanation of the relationship between the recommended content and the user's question. The initial recommended answer will subsequently undergo a reordering process to optimize the presentation order of the recommended content.
[0084] In this embodiment, continuous multi-round user interaction data refers to the multi-round question-and-answer interaction records between the user and the digital avatar continuously collected during the current interaction session. Each round of interaction records includes the user's input of questions, the digital avatar's output of responses, and user behavior data during the interaction process.
[0085] In this embodiment, the user sentiment polarity in each round of interaction refers to the sentiment tendency direction extracted from the user's multimodal interaction data during each round of interaction. Sentiment polarity is used to indicate whether the user's emotion in the current round of interaction is positive or negative. Sentiment polarity is determined after the multimodal interaction data is identified by a sentiment analysis network, and the output form is a sentiment polarity score. A negative sentiment polarity score indicates negative emotion, a positive score indicates positive emotion, and a zero score indicates neutral emotion.
[0086] In this embodiment, the polar angle refers to the angle value obtained after mapping the user's emotional polarity to polar coordinate space. The polar angle is determined by multiplying the emotional polarity score of the user's emotional vector in each round of interaction by pi, and the product is taken as the polar angle corresponding to that round of interaction. The value range of the polar angle is from negative pi to positive pi, where positive values correspond to positive emotional tendencies and negative values correspond to negative emotional tendencies.
[0087] In this embodiment, the intensity of user behavior in each round of interaction refers to the level of activity of user behavior during each round of interaction. The intensity of user behavior is jointly determined by the interaction duration, operation frequency, and input complexity in that round of interaction. Interaction duration reflects the time spent by the user in that round of interaction, operation frequency reflects the number of operations performed by the user in that round of interaction, and input complexity reflects the richness of the user's input content. These three factors are normalized separately and then weighted and summed according to preset weights to obtain a comprehensive value of behavior intensity, which is used to quantify the user's level of participation and engagement in that round of interaction.
[0088] In this embodiment, the polar radius refers to the radial distance obtained after mapping the user behavior intensity to polar coordinate space. The polar radius is determined as follows: First, the interaction duration, operation frequency, and input complexity in each round of interaction are obtained. These three are then normalized so that each normalized value ranges from 0 to 1. Next, the weighted sum of the normalized interaction duration, normalized operation frequency, and normalized input complexity is used as the comprehensive behavior intensity value. The ratio of this comprehensive behavior intensity value to a preset maximum behavior intensity value is multiplied by a preset maximum polar radius value. The resulting product is the polar radius corresponding to that round of interaction. The polar radius ranges from 0 to the preset maximum polar radius value; a larger polar radius indicates a higher user behavior intensity in that round of interaction.
[0089] In this embodiment, mapping each round of interaction to a trajectory point in polar coordinates means constructing a polar coordinate point by using the polar angle and polar radius corresponding to each round of interaction. The position of this polar coordinate point is determined by both the polar angle and polar radius, and it represents the state of that round of interaction in the two-dimensional space of emotion and behavior. The polar coordinate points corresponding to each round of interaction are arranged sequentially according to their chronological order, forming a point sequence in polar coordinate space. This point sequence is used to subsequently generate the emotion trajectory curve.
[0090] In this embodiment, the instantaneous curvature and cumulative curvature of the emotion trajectory curve are used. The instantaneous curvature characterizes the degree of bending of the emotion trajectory curve at the current moment, reflecting the drastic change in the user's emotional state in the current round of interaction compared to the previous moment. The cumulative curvature characterizes the total amount of bending of the emotion trajectory curve from the starting moment to the current moment, reflecting the overall fluctuation range of the user's cognitive state throughout the entire interaction process. The instantaneous curvature is calculated by taking the first and second derivatives of the emotion trajectory curve at the current moment's endpoint, and the cumulative curvature is obtained by integrating the instantaneous curvature over the integral interval from the starting point to the endpoint.
[0091] In this embodiment, the preset window refers to a pre-defined time window length used to limit the range of historical data selected when analyzing the distribution of positive and negative curvature points. The preset window is expressed in units of interaction rounds and takes a positive integer value. The value of the preset window can be pre-configured in the system, for example, set to the most recent 10 interaction rounds.
[0092] In this embodiment, the distribution ratio of positive and negative curvature points refers to the ratio of the number of sampling points with instantaneous curvature values greater than zero to the number of sampling points with instantaneous curvature values less than zero within a preset window. A positive curvature point indicates that the emotional trajectory curve bends in a positive direction at that moment, reflecting a positive change in the user's emotional state; a negative curvature point indicates that the emotional trajectory curve bends in a negative direction at that moment, reflecting a negative change in the user's emotional state. This distribution ratio is used to determine the overall direction and degree of cognitive oscillation within the preset window.
[0093] The sign of the instantaneous curvature corresponds to the direction of curvature of the emotional trajectory curve. A value greater than zero indicates that the emotional trajectory curve is curving in a positive direction at the current moment, reflecting an accelerated change in the user's emotional state towards a positive direction at that moment; a value less than zero indicates that the emotional trajectory curve is curving in a negative direction, reflecting an accelerated change in the user's emotional state towards a negative direction at that moment. The degree to which the ratio of the number of positive curvature points to the number of negative curvature points deviates from 1 reflects the unidirectional strength of the user's cognitive swing—a ratio significantly greater than 1 indicates that positive cognitive swing is dominant, and a ratio significantly less than 1 indicates that negative cognitive swing is dominant. The first and second swing amplification coefficients are used to strengthen the impact of this unidirectional trend on the overall recommendation strategy, enabling the recommendation strategy to respond promptly to the dominant direction of cognitive swing.
[0094] In this embodiment, the initial cognitive trajectory curvature refers to the curvature value obtained after selectively weighting and amplifying the cumulative curvature of the emotional trajectory curve. The initial cognitive trajectory curvature is generated as follows: first, the instantaneous curvature values of the emotional trajectory curve at multiple sampling points within a preset window are obtained; the sign of each instantaneous curvature value at each sampling point is determined; the number of positive curvature points and the number of negative curvature points are counted; the ratio of the number of positive curvature points to the number of negative curvature points is calculated; when the ratio is greater than a first preset swing threshold, the cumulative curvature is multiplied by a first swing amplification factor to obtain the initial cognitive trajectory curvature; when the ratio is less than a second preset swing threshold, the cumulative curvature is multiplied by a second swing amplification factor to obtain the initial cognitive trajectory curvature; when the ratio is between the second preset swing threshold and the first preset swing threshold, the cumulative curvature is directly used as the initial cognitive trajectory curvature. The initial cognitive trajectory curvature is used to characterize the degree of cognitive fluctuation after swing amplification processing during continuous interaction and is an intermediate result in generating the cognitive trajectory curvature. The initial cognitive trajectory curvature is then subjected to zero-attenuation processing controlled by the statistical value of the knowledge path topology entropy of the target entity, resulting in the final cognitive trajectory curvature used to calculate the cognitive navigation deflection angle.
[0095] In this embodiment, the ratio of cognitive trajectory curvature to knowledge path topological entropy is calculated using the cognitive trajectory curvature as the numerator and the statistical value of the target entity's knowledge path topological entropy as the denominator. The arctangent function is then calculated based on the ratio, and the result is used as the cognitive navigation deflection angle. Specifically, when the statistical value of the target entity's knowledge path topological entropy is greater than zero, the ratio of cognitive trajectory curvature to knowledge path topological entropy is first calculated. When the statistical value of the target entity's knowledge path topological entropy is equal to or less than a preset minimum threshold, it indicates that the reliability of the knowledge retrieval path is extremely high. In this case, there is no need for emotional deflection, and the cognitive navigation deflection angle is directly set to zero. When the statistical value of the target entity's knowledge path topological entropy is equal to zero, to avoid division by zero errors, the cognitive navigation deflection angle is directly set to 0. The obtained ratio is used as the independent variable of the arctangent function to calculate the arctangent function value, which ranges from 0 to half of pi. Half of pi is used as the maximum deflection angle to normalize the arctangent function value, resulting in the cognitive navigation deflection angle, which ranges from 0 to 90 degrees. Figure 3 As shown, the cognitive trajectory curvature and the knowledge path topological entropy are compared and then transformed using an arctangent to obtain the cognitive navigation deflection angle. This angle is used to determine the relative proportions of the knowledge relevance dimension and the emotional consistency dimension in the subsequent fusion weights.
[0096] The arctangent function maps the ratio of the cognitive trajectory curvature to the topological entropy statistics of the target entity's knowledge path from a range of zero to positive infinity to an angular range of 0 to 90 degrees. This mapping exhibits non-linear smoothness: when the cognitive trajectory curvature is much smaller than the topological entropy statistics, the deflection angle approaches 0 degrees, indicating a high bias towards knowledge accuracy; when the cognitive trajectory curvature is much larger than the topological entropy statistics, the deflection angle approaches 90 degrees, indicating a high bias towards emotional consistency; a smooth transition is achieved in the intermediate range, avoiding the abrupt policy shifts that linear mapping might introduce.
[0097] In this embodiment, cosine weight and sine weight refer to the first-dimensional fusion weight and the second-dimensional fusion weight determined based on the cognitive navigation deflection angle. The cosine weight is the cosine function value of the cognitive navigation deflection angle, and the sine weight is the sine function value of the cognitive navigation deflection angle. The sum of the squares of the cosine weight and the sine weight is a constant value of 1, and they are used to weight the knowledge relevance score and the sentiment consistency score, respectively.
[0098] In this embodiment, the knowledge relevance score and sentiment consistency score of the recalled multimodal knowledge data are used to characterize the degree of relevance between each multimodal knowledge data point and the user's current question in terms of knowledge content, and the sentiment consistency score is used to characterize the degree of matching between each multimodal knowledge data point and the user's current emotional state in terms of emotional tendency. Each multimodal knowledge data point corresponds to a knowledge relevance score and a sentiment consistency score. The higher the score, the higher the degree of matching of the data in that dimension.
[0099] In this embodiment, cosine and sine weights are determined based on the cognitive navigation deflection angle. The knowledge relevance score and sentiment consistency score of the recalled multimodal knowledge data are weighted and summed using cosine and sine weights respectively to obtain a fusion score. The data are then reordered according to the fusion score to obtain the target recommended answer. Specifically, for each recalled multimodal knowledge data, the product of its knowledge relevance score and cosine weight is added to the product of its sentiment consistency score and sine weight to obtain its fusion score. The multimodal knowledge data are sorted in descending order of fusion score, and the recommended content corresponding to each sorted multimodal knowledge data is arranged sequentially according to the sorting order to generate the target recommended answer.
[0100] In this embodiment, controlling the digital avatar to perform interactive multimodal output according to the target recommended answer means driving the digital avatar to output recommendation results to the user through at least one modality of voice, facial expression, and action, according to the recommended content and its sorting order in the target recommended answer. Voice output converts the recommended content text into a speech signal through a speech synthesis engine; facial expression output uses the digital avatar's facial expression driving module to present facial expressions that match the semantic emotion of the recommended content; and action output uses the digital avatar's body movement driving module to present body movements that match the semantics of the recommended content. The speech synthesis engine uses a neural network-based vocoder model to convert text into audio waveforms; the facial expression driving module generates facial expression animation by controlling the displacement of facial grid vertices through parameters; and the body movement driving module generates a sequence of body movements by controlling the rotation angle of skeletal joints through parameters. The voice signal, facial expression, and body movement are synchronized on the time axis during output, enabling the digital avatar to present coordinated multimodal output at the same time.
[0101] In another embodiment of the present invention, the preset weighting ratio is determined according to the following steps:
[0102] Obtain the global in-degree distribution of all entities in the preset domain knowledge graph, calculate the first statistical variance of the global in-degree distribution, and convert the first statistical variance into the first candidate value of the first weight coefficient according to the first preset mapping relationship. The first candidate value is positively correlated with the first statistical variance, and the first preset mapping relationship is a monotonically increasing non-linear function relationship.
[0103] Obtain the embedding vector distance distribution of all entity pairs in the preset domain knowledge graph, calculate the second statistical variance of the embedding vector distance distribution, and convert the second statistical variance into the second candidate value of the second weight coefficient according to the second preset mapping relationship. The second candidate value is negatively correlated with the second statistical variance. The second preset mapping relationship is a monotonically decreasing non-linear function relationship.
[0104] Obtain the frequency distribution of all relation types in the preset domain knowledge graph, calculate the third statistical variance of the frequency distribution, and convert the third statistical variance into the third candidate value of the third weight coefficient according to the third preset mapping relationship. The third candidate value is positively correlated with the third statistical variance, and the third preset mapping relationship is a monotonically increasing non-linear function relationship.
[0105] The first, second, and third candidate values are normalized so that the sum of the normalized first, second, and third weight coefficients is a constant value, and the normalized first weight coefficient is greater than the second weight coefficient and the third weight coefficient.
[0106] In this embodiment, obtaining the global in-degree distribution of all entities in a preset domain knowledge graph refers to statistically analyzing the number of in-degree edges and out-degree edges possessed by each entity node in the preset domain knowledge graph. An in-degree edge is a relational edge that points from other entity nodes to the entity node, with the entity node as the endpoint; an out-degree edge is a relational edge that points from the entity node to other entity nodes, with the entity node as the starting point. Each entity node corresponds to one in-degree value and one out-degree value, and the sum of the in-degree and out-degree values is the total degree of the entity node. The total degree of all entity nodes is summarized according to the entity nodes to form the global in-degree distribution of all entities. This distribution is represented in the form of a set of values, where each value in the set corresponds to the total degree of an entity node.
[0107] In this embodiment, the first statistical variance is a statistic obtained by calculating the variance of the global in-degree distribution. The variance is calculated as follows: first, the average of all total degrees in the global in-degree distribution is calculated; then, the square of the difference between the total degree of each entity node and the average is calculated; finally, all squared values are summed and divided by the total number of entity nodes. The result is the first statistical variance. The first statistical variance is used to characterize the dispersion of the degree distribution of entity nodes in the preset domain knowledge graph.
[0108] In this embodiment, the first preset mapping relationship refers to the corresponding rule that maps the first statistical variance from its original numerical range to the numerical range of the first weight coefficient candidate values. The first preset mapping relationship is a monotonically increasing nonlinear function relationship, that is, as the value of the first statistical variance increases, the first weight coefficient candidate value obtained after mapping also increases accordingly, and the rate of change between the two is not constant. The specific functional form of the first preset mapping relationship can be one of a logarithmic function, an exponential function, or a power function. For example, when a Sigmoid mapping function is used, the first candidate value = 1 / (1+e^(-k×first statistical variance)), where k is a preset scaling coefficient. This formula is only an exemplary implementation and does not constitute a limitation on the scope of protection of this invention. This ensures that the candidate value changes more smoothly when the first statistical variance is small, and changes more drastically when the value is large, or vice versa. For example, the first preset mapping relationship can use a S-shaped nonlinear mapping function to map the first statistical variance to a first candidate value between zero and one. The above implementation is only an example and does not constitute a limitation on the scope of protection of this invention.
[0109] In this embodiment, the first weight coefficient refers to the exponential weight corresponding to the branch density in the preset weight allocation. The first weight coefficient is a normalized value, ranging from 0 to 1. The value of the first weight coefficient determines the contribution of branch density to the fusion of knowledge path topological entropy products; a larger first weight coefficient indicates a more significant impact of branch density on knowledge path topological entropy.
[0110] In this embodiment, the first statistical variance is converted into a first candidate value of the first weight coefficient according to a first preset mapping relationship. The first candidate value is positively correlated with the first statistical variance, and the first preset mapping relationship is a monotonically increasing non-linear function relationship. Specifically, the first statistical variance is first input into the first preset mapping relationship, and the first candidate value is obtained after mapping calculation. This first candidate value is the unnormalized raw value. The specific meaning of the first candidate value is: when the in-degree distribution of entity nodes in the preset domain knowledge graph is more dispersed, the contribution weight of branch density in the knowledge path topological entropy should be greater, because a highly dispersed graph structure means that the path branches have a more significant impact on the retrieval results. The magnitude of the first candidate value is only used for relative comparison in subsequent normalization processing, and its absolute value itself is not directly used as a weight.
[0111] In this embodiment, obtaining the embedding vector distance distribution of all entity pairs in the preset domain knowledge graph refers to forming an entity pair by pairing each entity node with another entity node in the preset domain knowledge graph, traversing all possible entity pair combinations, and calculating the vector distance of each pair of entity nodes in the embedding space. The vector distance in the embedding space is used to characterize the semantic similarity between two entity nodes. The vector distances corresponding to all entity pairs are summarized according to the entity pairs to form the embedding vector distance distribution of all entity pairs. This distribution is represented in the form of a numerical set, where each numerical value in the set corresponds to the embedding vector distance of a pair of entity nodes.
[0112] In this embodiment, the second statistical variance is a statistic obtained by calculating the variance of the embedded vector distance distribution. The variance is calculated as follows: first, the average distance of all vectors in the embedded vector distance distribution is calculated; then, the square of the difference between each vector distance and this average is calculated; finally, all squared values are summed and divided by the total number of entity pairs. The result is the second statistical variance. The second statistical variance is used to characterize the degree of dispersion of the semantic distance distribution between entity nodes in the preset domain knowledge graph.
[0113] In this embodiment, the second preset mapping relationship refers to the corresponding rule that maps the second statistical variance from its original numerical range to the numerical range of the candidate values of the second weighting coefficients. The second preset mapping relationship is a monotonically decreasing non-linear function relationship; that is, as the value of the second statistical variance increases, the candidate values of the second weighting coefficients obtained after mapping decrease accordingly, and the rate of change between the two is not constant. The specific functional form of the second preset mapping relationship can be one of a negative logarithmic function, a negative exponential function, or an inverse proportional function, such that the candidate values after mapping are larger when the second statistical variance is small, and smaller when the value is large. For example, the second preset mapping relationship can use a negative exponential non-linear mapping function to map the second statistical variance to a second candidate value between zero and one. The above implementation is merely an example and does not constitute a limitation on the scope of protection of this invention.
[0114] In this embodiment, the second weighting coefficient refers to the exponential weight corresponding to semantic distance in the preset weighting ratio. The second weighting coefficient is a normalized value, ranging from 0 to 1. The value of the second weighting coefficient determines the contribution of semantic distance to the fusion of knowledge path topological entropy products; a larger second weighting coefficient indicates a more significant impact of semantic distance on the knowledge path topological entropy.
[0115] In this embodiment, the second statistical variance is converted into a second candidate value of the second weight coefficient according to a second preset mapping relationship. The second candidate value is negatively correlated with the second statistical variance, and the second preset mapping relationship is a monotonically decreasing nonlinear function relationship. Specifically, the second statistical variance is first input into the second preset mapping relationship, and the second candidate value is obtained after mapping calculation. This second candidate value is the unnormalized raw value. The specific meaning of the second candidate value is: when the distribution of the embedding vector distance between entity pairs in the preset domain knowledge graph is more dispersed, the contribution weight of semantic distance in the knowledge path topological entropy should be smaller, because an overly dispersed semantic space means that it is difficult to effectively distinguish the correlation between entities by relying solely on semantic distance. The magnitude of the second candidate value is only used for relative comparison in subsequent normalization processing, and its absolute value itself is not directly used as a weight.
[0116] In this embodiment, obtaining the frequency distribution of all relation types in a preset domain knowledge graph refers to statistically analyzing the number of times each relation type label appears in all relation edges. Relation type labels are used to identify the specific category of semantic association between two entity nodes. Each relation type label is mapped to its frequency to form the frequency distribution of all relation types. This distribution is represented as a set of key-value pairs, where the key is the relation type label and the value is the frequency of that relation type label appearing in all relation edges.
[0117] In this embodiment, the relation type refers to the category identifier of the relation edge between two entity nodes in a preset domain knowledge graph. The relation type is used to describe the semantic association properties between two entity nodes, and different categories of association correspond to different relation type labels.
[0118] In this embodiment, the third statistical variance is a statistic obtained by calculating the variance of the frequency distribution. The variance is calculated as follows: first, the average of all frequencies in the frequency distribution is calculated; then, the square of the difference between the frequency of each relation type label and this average is calculated; finally, all squared values are summed and divided by the total number of relation type labels. The result is the third statistical variance. The third statistical variance is used to characterize the dispersion of the relation type frequency distribution in the preset domain knowledge graph.
[0119] In this embodiment, the third preset mapping relationship refers to the corresponding rule that maps the third statistical variance from its original numerical range to the numerical range of the candidate values of the third weighting coefficient. The third preset mapping relationship is a monotonically increasing non-linear function relationship; that is, as the value of the third statistical variance increases, the candidate values of the third weighting coefficient obtained after mapping also increase accordingly, and the rate of change between the two is not constant. The specific functional form of the third preset mapping relationship can be one of a logarithmic function, an exponential function, or a power function, so that the change in the candidate values after mapping is relatively gradual when the value of the third statistical variance is small, and more drastic when the value is large, or vice versa. For example, the third preset mapping relationship can use a logarithmic non-linear mapping function to map the third statistical variance to a third candidate value between zero and one. The above implementation is merely an example and does not constitute a limitation on the scope of protection of this invention.
[0120] In this embodiment, the third weight coefficient refers to the exponential weight corresponding to the relation type diversity entropy in the preset weight allocation. The third weight coefficient is a normalized value, ranging from 0 to 1. The value of the third weight coefficient determines the contribution of relation type diversity entropy to the product fusion of knowledge path topological entropy; a larger third weight coefficient indicates a more significant impact of relation type diversity entropy on knowledge path topological entropy.
[0121] In this embodiment, the third statistical variance is converted into a third candidate value of the third weight coefficient according to a third preset mapping relationship. The third candidate value is positively correlated with the third statistical variance, and the third preset mapping relationship is a monotonically increasing non-linear function relationship. Specifically, the third statistical variance is first input into the third preset mapping relationship, and the third candidate value is obtained after mapping calculation. This third candidate value is the unnormalized raw value. The specific meaning of the third candidate value is: when the frequency distribution of relation types in the preset domain knowledge graph is more dispersed, the contribution weight of relation type diversity entropy in the knowledge path topology entropy should be greater, because a dispersed frequency distribution means that the relation types on the query path are richer and more diverse, and relation type diversity entropy has a more significant distinguishing effect on the search results. The magnitude of the third candidate value is only used for relative comparison in subsequent normalization processing, and its absolute value itself is not directly used as a weight.
[0122] In this embodiment, the first, second, and third candidate values are normalized so that the sum of the normalized first, second, and third weight coefficients is a constant value, and the normalized first weight coefficient is greater than the second weight coefficient and greater than the third weight coefficient. The normalization process is as follows: first, the sum of the first, second, and third candidate values is calculated; then, each candidate value is divided by this sum to obtain the corresponding normalized weight coefficient. The sum of the three normalized weight coefficients is 1. The order of magnitude among the three weight coefficients is: first weight coefficient > second weight coefficient > third weight coefficient. This order reflects that in digital human interaction scenarios, branch density contributes the most to the topological entropy of the knowledge path, followed by semantic distance, and relation type diversity entropy is the lowest. Since branch density directly reflects the degree of structural divergence of knowledge graph paths and is the most important indicator for distinguishing the reliability of paths containing different candidate entities, it has the highest weight. Semantic distance measures the semantic proximity between candidate entities and core entities and is an important indicator for ensuring the semantic relevance of search results. However, due to the limitations of the embedding space, its reliability is lower than that of branch density, so it has the second highest weight. Relationship type diversity entropy only reflects the richness of relation categories on the query path and is an auxiliary indicator, so it has the lowest weight.
[0123] In another embodiment of the present invention, the branch density corresponding to the candidate entity is determined according to the following steps:
[0124] Starting from the core entity, obtain the first number of all first-level candidate entities directly associated with the core entity and the first weight sum of all first-level relation edges. Perform a calculation on the first number and the first weight sum using a composite function that includes logarithmic operations to obtain the initial branch density of the first hop.
[0125] Obtain the number of directly related branches that each candidate entity expands outward, as well as the total weight of the relationship edges between the corresponding candidate entity and the directly superior entity. Perform a composite function operation on the number of directly related branches and the total weight to obtain the single-point branch density of the corresponding candidate entity.
[0126] The weighted sum of the initial branch density of the first hop and the single-point branch density of the corresponding candidate entity is used as the branch density of the corresponding candidate entity.
[0127] In this embodiment, the core entity refers to the entity node with the highest semantic matching degree with the user intent vector, selected from the preset domain knowledge graph after matching the user intent vector with each entity node in the preset domain knowledge graph. The core entity serves as the starting node for multi-hop graph queries and is the starting point for all subsequent query path expansions.
[0128] In this embodiment, obtaining the first number of all first-layer candidate entities directly associated with the core entity and the first weight sum of all first-layer relation edges means, starting from the core entity in the preset domain knowledge graph, querying all entity nodes directly connected to the core entity through a relation edge, taking these entity nodes as first-layer candidate entities, and counting the total number of first-layer candidate entities as the first number; at the same time, obtaining all relation edges between the core entity and each first-layer candidate entity, and counting the sum of the weight values of these relation edges as the first weight sum.
[0129] In this embodiment, all first-layer candidate entities directly associated with the core entity refer to all entity nodes in the preset domain knowledge graph that are directly connected to the core entity through a relational edge. The first-layer candidate entities are the first-hop expansion results relative to the core entity, and each first-layer candidate entity has a direct association with the core entity.
[0130] In this embodiment, all first-layer relation edges refer to all relation edges in the preset domain knowledge graph that connect the core entity to each first-layer candidate entity. Each first-layer relation edge corresponds to one first-layer candidate entity, and the number of first-layer relation edges is equal to the number of first-layer candidate entities.
[0131] In this embodiment, the first weight of the first-layer relation edges refers to the weight value carried by each first-layer relation edge. The weight value of a relation edge is used to characterize the association strength between the two entities connected by the relation edge; the larger the weight value, the stronger the association between the two entities. The weight value is determined by comprehensively considering the co-occurrence frequency, semantic relevance, or manually labeled association strength between the two entity nodes when constructing the preset domain knowledge graph.
[0132] In this embodiment, the composite function containing logarithmic operations refers to a computational function that performs a mathematical transformation on the input value, including logarithmic operations, and then outputs the result. This composite function is used to convert the sum of the number of branches and the weights into a branch density value. The introduction of logarithmic operations causes the marginal contribution of the number of branches to decrease as the number of branches increases, avoiding excessive inflation of the branch density value when the number of branches is too large. For example, the composite function can be implemented by multiplying the product of the number of branches and the sum of the weights by one and then taking the natural logarithm. The above implementation is merely an example and does not constitute a limitation on the scope of protection of this invention.
[0133] In this embodiment, the first quantity and the sum of the first weights are processed using a composite function that includes logarithmic operations to obtain the first hop initial branch density. This involves inputting the first quantity of the first-layer candidate entities and the sum of the first weights of all first-layer relation edges into a composite function that includes logarithmic operations. After mathematical transformation by the composite function, a numerical value is output, which is used as the first hop initial branch density. The first hop initial branch density is used to characterize the degree of path divergence of the core entity in the first hop expansion direction. Its value is positively correlated with the first quantity and the sum of the first weights, and the marginal contribution of the first quantity decreases as the first quantity increases.
[0134] In this embodiment, obtaining the number of directly related branches extending outward from each candidate entity, and the sum of the weights of the relationship edges between the corresponding candidate entity and its direct parent entity, refers to, in a preset domain knowledge graph, for each candidate entity whose branch density is to be calculated, counting the number of directly related branches possessed by the candidate entity when it expands from its parent entity to the candidate entity, and simultaneously obtaining the weight values of the relationship edges between the candidate entity and its parent entity. A directly related branch refers to a relationship edge that directly points from the candidate entity to other entity nodes.
[0135] In this embodiment, the number of directly associated branches of a candidate entity refers to the total number of all relational edges pointing to other entity nodes in the preset domain knowledge graph, starting from the candidate entity.
[0136] In this embodiment, the relationship edge between the parent entity and the corresponding candidate entity refers to the relationship edge traversed when the parent entity expands to the current candidate entity during the expansion process of the multi-hop graph query. One end of this relationship edge is the parent entity, and the other end is the current candidate entity.
[0137] In this embodiment, the single-point branch density of the corresponding candidate entity is obtained by performing a composite function operation on the number of directly related branches and the sum of their weights. This involves inputting the statistically obtained number of directly related branches of the candidate entity and the weight values of the relationship edges between the candidate entity and the previous-level entity into a composite function containing logarithmic operations. After mathematical transformation by the composite function, a numerical value is output, which is used as the single-point branch density of the candidate entity. The single-point branch density is used to characterize the degree of path divergence of the candidate entity in the local expansion direction.
[0138] In this embodiment, using the weighted sum of the initial branch density of the first hop and the single-point branch density of the corresponding candidate entity as the branch density of the candidate entity means multiplying the initial branch density of the first hop and the single-point branch density of the candidate entity by their respective weight coefficients and then adding them together. The result is used as the branch density corresponding to the candidate entity. The weight coefficient of the initial branch density of the first hop is negatively correlated with the number of hops from the core entity to the candidate entity; that is, the larger the number of hops, the smaller the contribution of the initial branch density of the first hop. Similarly, the weight coefficient of the single-point branch density is negatively correlated with the number of hops from the core entity to the candidate entity; that is, the larger the number of hops, the smaller the contribution of the single-point branch density. The sum of the values of the two weight coefficients is 1.
[0139] In another embodiment of the present invention, the semantic distance between the candidate entity and the core entity is determined according to the following steps:
[0140] Obtain the first embedding vector of the candidate entity in the embedding space of the preset domain knowledge graph, obtain the second embedding vector of the core entity in the embedding space, and calculate the cosine distance between the first embedding vector and the second embedding vector.
[0141] Obtain the shortest path length between candidate entities and core entities in the preset domain knowledge graph. Use the shortest path length as an exponential coefficient to correct the cosine distance to obtain the semantic distance between candidate entities and core entities. The corrected semantic distance is positively correlated with both the cosine distance and the shortest path length.
[0142] In this embodiment, obtaining the first embedding vector of a candidate entity in the embedding space of a preset domain knowledge graph refers to extracting the vector representation corresponding to the candidate entity from the embedding space of the preset domain knowledge graph. The embedding space is formed by mapping each entity node in the preset domain knowledge graph to a continuous vector space using a graph embedding algorithm. The dimension of this vector space is a preset fixed value. The graph embedding algorithm uses a graph convolutional network model. This model is constructed by taking the adjacency matrix and entity feature matrix of the preset domain knowledge graph as input, aggregating the neighbor information of each entity node through multi-layer graph convolution operations, and outputting the vector representation of each entity node in the embedding space. The vector representation of the candidate entity in the embedding space is the first embedding vector.
[0143] In this embodiment, obtaining the second embedding vector of the core entity in the embedding space refers to extracting the vector representation corresponding to the core entity from the embedding space of the preset domain knowledge graph. The core entity and candidate entities reside in the same embedding space and have the same vector dimension. The vector representation of the core entity is obtained using the same graph embedding algorithm, which is the second embedding vector.
[0144] In this embodiment, calculating the cosine distance between the first embedding vector and the second embedding vector involves substituting the first and second embedding vectors into the cosine distance calculation formula to calculate their cosine similarity, and then subtracting this cosine similarity from 1 to obtain the cosine distance. The cosine distance ranges from 0 to 2. The smaller the cosine distance, the closer the candidate entity and the core entity are in the embedding space, and the higher their semantic relevance.
[0145] In this embodiment, obtaining the shortest path length between the candidate entity and the core entity in the preset domain knowledge graph refers to the minimum number of relation edges traversed from the candidate entity node to the core entity node in the preset domain knowledge graph. The shortest path length can be obtained through a graph search algorithm, specifically a breadth-first search algorithm. Starting from the candidate entity node and targeting the core entity node, the algorithm traverses the graph, and the number of relation edges traversed by the first path found is the shortest path length. The shortest path length is used to quantify the topological distance between the candidate entity and the core entity in the graph structure.
[0146] In this embodiment, the shortest path length is used as the exponential coefficient to correct the cosine distance, resulting in the semantic distance between the candidate entity and the core entity. The corrected semantic distance is positively correlated with both the cosine distance and the shortest path length. Specifically, the shortest path length is used as the exponential coefficient to operate on an exponential function with the natural constant e as the base. The result is multiplied by the cosine distance, and the product is the corrected semantic distance. As the shortest path length increases, the result of the exponential function increases, and the semantic distance increases accordingly; that is, the greater the topological distance of the graph, the stronger the amplification effect of the semantic distance. The corrected semantic distance reflects both the directional differences between the candidate entity and the core entity in the semantic space and their topological distance in the knowledge graph. For example, the corrected semantic distance can be obtained by multiplying the cosine distance by the exponential function value with the shortest path length as the exponent. The above implementation is merely an example and does not constitute a limitation on the scope of protection of this invention.
[0147] In another embodiment of the present invention, the relation type diversity entropy on the query path where the candidate entity is located is determined according to the following steps:
[0148] Obtain the set of relation type labels for all relation edges on the query path where the corresponding candidate entity is located, and count the frequency of each relation type label in all relation edges;
[0149] Calculate the proportion of each relation type label in all relation edges based on the frequency of occurrence of each relation type label;
[0150] Get the total number of different relation type labels in the relation type label set, and use the logarithm of the corresponding total number as the maximum possible entropy value;
[0151] Shannon entropy is calculated based on the proportion of each relation type label, and the ratio of Shannon entropy to the maximum possible entropy value is used as the relation type diversity entropy.
[0152] In this embodiment, the query path refers to the continuous path formed by all entity nodes and relation edges traversed from the core entity to the current candidate entity. A query path starts from the core entity and ends at the current candidate entity. The path contains multiple entity nodes and multiple relation edges, which are arranged alternately to form a complete path from the start to the end.
[0153] In this embodiment, all relation edges on the query path refer to the set of all relation edges contained in the query path. Each relation edge connects two adjacent entity nodes on the path, and the number of relation edges is equal to the number of entity nodes on the path minus 1. All relation edges are arranged sequentially from the core entity to the current candidate entity.
[0154] In this embodiment, obtaining the set of relation type labels for all relation edges on the query path where the corresponding candidate entity is located means extracting the relation type labels corresponding to each relation edge on the query path and summarizing all relation type labels into a label set. The relation type labels are used to identify the semantic association category between the two entities represented by the relation edge.
[0155] In this embodiment, counting the frequency of each relation type label in all relation edges means counting the number of times each relation type label in the relation type label set appears in all relation edges of the query path. The frequency counting method is as follows: traverse all relation edges, count the relation type labels of each relation edge, and finally obtain the number of times each relation type label appears.
[0156] In this embodiment, calculating the proportion of each relation type label in all relation edges based on the frequency of its occurrence means dividing the frequency of each relation type label by the total number of all relation edges, and using the resulting ratio as the proportion of that relation type label in all relation edges. The total number of all relation edges is equal to the total number of relation edges on the query path. The sum of the proportions of all relation type labels is 1.
[0157] In this embodiment, obtaining the total number of different relation type labels in the relation type label set and using the logarithm of the corresponding total as the maximum possible entropy value means counting the number of different relation type label categories in the relation type label set, taking this number as the total, and then taking the logarithm of this total with the natural constant e as the logarithm value. The maximum possible entropy value represents the maximum Shannon entropy value that can be achieved when all relation type labels are uniformly distributed across all relation edges.
[0158] In this embodiment, calculating Shannon entropy based on the proportion of each relation type label means substituting the proportion of each relation type label in all relation edges into the Shannon entropy calculation formula. Specifically, for each relation type label, the proportion of that label is multiplied by the natural logarithm of that proportion, and then all products are negativeed and summed. The result is the Shannon entropy. Shannon entropy is used to characterize the dispersion of relation types along the query path. The more uniform the proportion of each relation type label, the greater the Shannon entropy; the more concentrated the proportion of each relation type label, the smaller the Shannon entropy.
[0159] In this embodiment, using the ratio of Shannon entropy to the maximum possible entropy value as the relation type diversity entropy means dividing the calculated Shannon entropy by the maximum possible entropy value, and the resulting ratio is used as the relation type diversity entropy. The relation type diversity entropy ranges from 0 to 1. The closer the value is to 1, the more uniform the distribution of relation types and the higher the diversity on the query path. The closer the value is to 0, the more concentrated the distribution of relation types and the lower the diversity.
[0160] In another embodiment of the present invention, determining the polar angle based on the user's emotional polarity in each round of interaction and determining the polar radius based on the user's behavioral intensity in each round of interaction includes:
[0161] Obtain the emotional polarity score of the user's emotional vector in each round of interaction. The emotional polarity score is a continuous value and ranges from negative to positive. The product of the emotional polarity score and pi is used as the polar angle corresponding to each round of interaction.
[0162] The interaction duration, operation frequency, and input complexity in each round of interaction are obtained. The interaction duration, operation frequency, and input complexity are normalized respectively. The weighted sum of the normalized interaction duration, normalized operation frequency, and normalized input complexity is used as the comprehensive value of behavior intensity. The product of the ratio of the comprehensive value of behavior intensity to the preset maximum behavior intensity value and the preset maximum value of the extreme radius is used as the extreme radius corresponding to each round of interaction.
[0163] In this embodiment, the user sentiment vector in each round of interaction refers to the user sentiment vector extracted from the multimodal interaction data of each round of interaction. Each round of interaction corresponds to one user sentiment vector, which is represented in floating-point vector form, and the vector dimension is consistent with the number of preset sentiment categories. The sum of the confidence scores of each dimension in the user sentiment vector is 1, and each dimension corresponds to the confidence score of a preset sentiment category.
[0164] In this embodiment, obtaining the emotional polarity score of the user's emotional vector in each round of interaction refers to extracting the confidence score of the emotional polarity dimension from the user's emotional vector as the emotional polarity score. The emotional polarity score is a continuous value and ranges from negative to positive; specifically, the range is from -1 to +1. A negative emotional polarity score indicates that the user's current emotional state is negative, a positive score indicates that the user's current emotional state is positive, and a zero score indicates that the user's current emotional state is neutral. The emotional polarity score is multiplied by pi, and the product is used as the polar angle corresponding to that round of interaction. The polar angle ranges from negative to positive pi, with positive values corresponding to positive emotional tendencies and negative values corresponding to negative emotional tendencies.
[0165] In this embodiment, obtaining the interaction duration, operation frequency, and input complexity in each round of interaction refers to extracting three behavioral indicators from the interaction records of each round of interaction. Interaction duration refers to the length of time elapsed from the start to the end of that round of interaction, measured in seconds. Operation frequency refers to the number of operations performed by the user in that round of interaction, including user-initiated interactive actions such as clicking buttons, swiping the interface, and switching pages. Input complexity refers to the richness of the content input by the user in that round of interaction, quantified by the number of words or characters in the input text.
[0166] In this embodiment, normalizing the interaction duration, operation frequency, and input complexity means converting the interaction duration, operation frequency, and input complexity of each round of interaction to a value range of 0 to 1. The normalization process uses a minimum-maximum normalization method: for interaction duration, the interaction duration of the current round is divided by a preset maximum interaction duration value to obtain the normalized interaction duration; for operation frequency, the operation frequency of the current round is divided by a preset maximum operation frequency value to obtain the normalized operation frequency; for input complexity, the input complexity of the current round is divided by a preset maximum input complexity value to obtain the normalized input complexity. Each normalized value is limited to the range of 0 to 1. Using the weighted sum of the normalized interaction duration, normalized operation frequency, and normalized input complexity as the comprehensive behavior intensity value means multiplying each of the normalized interaction duration, normalized operation frequency, and normalized input complexity by their respective preset weight coefficients and then summing the results. The resulting value is used as the comprehensive behavior intensity value. All three preset weighting coefficients are positive numbers, and their sum is 1. In this embodiment, the preset maximum behavior intensity value refers to the upper limit of the overall behavior intensity value preset in the system. The value of the preset maximum behavior intensity value is determined based on the distribution of the overall behavior intensity values in historical interaction data, and is used to normalize the overall behavior intensity values of each round of interaction to the range of 0 to 1. The specific value of the preset maximum behavior intensity value can be obtained from historical data statistics during system initialization, or dynamically updated based on actual data during operation.
[0167] In this embodiment, the preset maximum value of the polar radius refers to the maximum value that the polar radius can take in polar coordinate space. The preset maximum value of the polar radius is a pre-set positive number used to map the normalized comprehensive value of behavior intensity to the polar radius value in polar coordinate space, so that the value of the polar radius can intuitively reflect the magnitude of the user's behavior intensity.
[0168] In this embodiment, using the product of the ratio of the comprehensive behavior intensity value to the preset maximum behavior intensity value and the preset maximum extreme diameter as the extreme diameter for each round of interaction means first calculating the comprehensive behavior intensity value divided by the preset maximum behavior intensity value to obtain a normalized behavior intensity value, then multiplying the normalized behavior intensity value by the preset maximum extreme diameter, and the resulting product is used as the extreme diameter for that round of interaction. The normalized behavior intensity value ranges from 0 to 1, and the extreme diameter ranges from 0 to the preset maximum extreme diameter. A larger extreme diameter indicates a higher user behavior intensity in that round of interaction.
[0169] In another embodiment of the present invention, a cognitive trajectory curvature is generated by weighting and amplifying the instantaneous curvature and cumulative curvature of the emotional trajectory curve, combined with the distribution ratio of positive and negative curvature points within a preset window, including:
[0170] Cubic spline interpolation is performed on the trajectory points to obtain a continuous emotional trajectory curve;
[0171] Calculate the first and second derivatives of the emotion trajectory curve at the current moment's endpoint, and use the ratio of the magnitude of the second derivative to the cube of the magnitude of the first derivative as the instantaneous curvature.
[0172] The cumulative curvature is obtained by integrating the instantaneous curvature of the emotion trajectory curve over the integral interval from the beginning to the end.
[0173] The instantaneous curvature values of the emotional trajectory curve at multiple sampling points within a preset historical window are obtained. The sign of the instantaneous curvature values at each sampling point is determined. Sampling points with instantaneous curvature values greater than zero are marked as positive curvature points, and sampling points with instantaneous curvature values less than zero are marked as negative curvature points.
[0174] The ratio of the first number of positive curvature points to the second number of negative curvature points is calculated. When the ratio is greater than the first preset swing threshold, the cumulative curvature is multiplied by the first swing amplification factor and used as the initial cognitive trajectory curvature. When the ratio is less than the second preset swing threshold, the cumulative curvature is multiplied by the second swing amplification factor and used as the initial cognitive trajectory curvature. When the ratio is not less than the second preset swing threshold and not greater than the first preset swing threshold, the cumulative curvature is directly used as the initial cognitive trajectory curvature.
[0175] When the topological entropy of the knowledge path of the target entity is less than the preset entropy threshold, the initial cognitive trajectory curvature is reduced to zero according to the decay function determined by the ratio of the topological entropy of the knowledge path of the target entity to the preset entropy threshold, and the cognitive trajectory curvature is obtained; otherwise, the initial cognitive trajectory curvature is directly used as the cognitive trajectory curvature.
[0176] In this embodiment, obtaining a continuous emotional trajectory curve by performing cubic spline interpolation on the trajectory points refers to arranging the polar coordinate trajectory points corresponding to each round of interaction in chronological order, and then using the cubic spline interpolation method to construct a cubic polynomial between adjacent trajectory points. This ensures that all piecewise cubic polynomials have continuous first and second derivatives at the connection points, thus forming a continuous and smooth curve extending from the starting trajectory point to the ending trajectory point. This curve is the emotional trajectory curve. The specific implementation of the cubic spline interpolation method is as follows: using the chronological order of the trajectory points as the independent variable and the polar coordinates of the trajectory points as the dependent variable, a cubic polynomial is constructed within each interval of adjacent trajectory points. All cubic polynomials in all intervals satisfy the following conditions at their internal nodes: continuous function values, continuous first derivatives, and continuous second derivatives.
[0177] In this embodiment, calculating the first and second derivatives of the emotion trajectory curve at the current moment's endpoint, and using the ratio of the magnitude of the second derivative to the cube of the magnitude of the first derivative as the instantaneous curvature, involves first calculating the first and second directional derivatives of the emotion trajectory curve at the current moment's endpoint, obtaining first and second derivative vectors. Then, the magnitudes of the first and second derivative vectors are calculated separately. The magnitude of the second derivative vector is divided by the cube of the magnitude of the first derivative vector, and the resulting value is taken as the instantaneous curvature of the emotion trajectory curve at the current moment's endpoint. When the magnitude of the first derivative vector approaches zero, the instantaneous curvature is set to a preset maximum curvature value. The instantaneous curvature is used to quantify the degree of curvature of the emotion trajectory curve at the current moment.
[0178] In this embodiment, the magnitude of the second derivative refers to the length of the second derivative vector, which is obtained by taking the square root of the sum of the squares of the components of the second derivative vector. The magnitude of the first derivative refers to the length of the first derivative vector, which is obtained by taking the square root of the sum of the squares of the components of the first derivative vector.
[0179] In this embodiment, the cumulative curvature is obtained by integrating the instantaneous curvature of the emotion trajectory curve over the integration interval from the starting point to the ending point. This is achieved by using the instantaneous curvature as the integrand, with the parameter value corresponding to the starting point of the emotion trajectory curve as the lower limit of integration and the parameter value corresponding to the ending point of the emotion trajectory curve as the upper limit of integration. The resulting integral value is the cumulative curvature. The cumulative curvature is used to characterize the total amount of curvature of the emotion trajectory curve from the starting moment to the current moment.
[0180] In this embodiment, the preset history window refers to the length of a pre-defined time window in the system, used to limit the range of historical data covered when selecting sampling points from the emotion trajectory curve. The preset history window is in units of interaction rounds, and its value is a positive integer, representing the selection of trajectory segments corresponding to several rounds prior to the current moment as the sampling interval. The specific value of the preset history window can be configured during system initialization, for example, set to 10 rounds.
[0181] In this embodiment, obtaining the instantaneous curvature value of the emotional trajectory curve at multiple sampling points within a preset historical window means selecting multiple sampling points on the emotional trajectory curve within the time interval corresponding to the preset historical window according to a preset sampling interval, calculating the instantaneous curvature value at each sampling point, and obtaining multiple instantaneous curvature values.
[0182] In this embodiment, the instantaneous curvature values at each sampling point are sign-determined. Sampling points with instantaneous curvature values greater than zero are marked as positive curvature points, and those with instantaneous curvature values less than zero are marked as negative curvature points. This means that for each sampling point within a preset history window, the sign of its instantaneous curvature value is determined. A curvature value greater than zero indicates that the emotional trajectory curve at that point bends in a positive direction, reflecting a positive change in the user's emotional state at that moment; a curvature value less than zero indicates that the emotional trajectory curve at that point bends in a negative direction, reflecting a negative change in the user's emotional state at that moment. Sampling points with instantaneous curvature values equal to zero are marked as zero curvature points, indicating that the emotional trajectory curve at that point has no curvature.
[0183] In this embodiment, the first preset swing threshold refers to a first critical value of the ratio of the number of positive curvature points to the number of negative curvature points preset in the system. The first preset swing threshold is a positive number greater than 1. When the ratio of the number of positive curvature points to the number of negative curvature points is greater than the first preset swing threshold, it is determined that the user is in a positive cognitive swing state, indicating that the user's positive emotional changes within the preset historical window are dominant, and the intensity of positive changes significantly exceeds that of negative changes.
[0184] In this embodiment, the first swing amplification factor is a multiplier used to amplify the cumulative curvature when the ratio of the number of positive curvature points to the number of negative curvature points is greater than a first preset swing threshold. The first swing amplification factor is a positive number greater than 1, and its specific value is preset in the system.
[0185] In this embodiment, the second preset swing threshold refers to a second critical value of the ratio of the number of positive curvature points to the number of negative curvature points preset in the system. The second preset swing threshold is a positive number less than 1. When the ratio of the number of positive curvature points to the number of negative curvature points is less than the second preset swing threshold, the user is determined to be in a negative cognitive swing state, indicating that the user's negative emotional changes dominate within a preset historical window, and the intensity of the negative changes significantly exceeds that of the positive changes.
[0186] In this embodiment, the second swing amplification factor is a multiplier used to amplify the cumulative curvature when the ratio of the number of positive curvature points to the number of negative curvature points is less than a second preset swing threshold. The second swing amplification factor is a positive number greater than 1, and its specific value is preset in the system. The first swing amplification factor and the second swing amplification factor are not equal to each other to distinguish the different amplification degrees of positive and negative cognitive swing.
[0187] In this embodiment, the preset entropy threshold refers to the critical value of the knowledge path topology entropy pre-set in the system. The preset entropy threshold is a positive number, used to determine whether the current knowledge path topology entropy is too low. When the statistical value of the knowledge path topology entropy of the target entity is less than the preset entropy threshold, it indicates that the reliability of the knowledge retrieval path is relatively high. At this time, it is necessary to suppress the contribution of cognitive trajectory curvature, so that the recommendation strategy is more knowledge-oriented.
[0188] In this embodiment, the decay function determined by the ratio of the statistical value of the knowledge path topological entropy of the target entity to a preset entropy threshold refers to dividing the knowledge path topological entropy by the preset entropy threshold to obtain a normalized ratio, and then using this normalized ratio as the independent variable to construct the decay function. The output value of the decay function increases as the normalized ratio increases and decreases as the normalized ratio decreases. When the normalized ratio approaches zero, the output value of the decay function approaches zero. The specific form of the decay function can be a linear function or a nonlinear function. For example, the normalized ratio itself can be used as the decay coefficient, or the square of the normalized ratio can be used as the decay coefficient.
[0189] In this embodiment, the zeroing-down of the cognitive trajectory curvature according to the attenuation function determined by the ratio of the statistical value of the knowledge path topology entropy of the target entity to the preset entropy threshold means that when the statistical value of the knowledge path topology entropy of the target entity is less than the preset entropy threshold, the output value of the attenuation function is used as the attenuation coefficient, and the current cognitive trajectory curvature is multiplied by the attenuation coefficient, and the product is used as the cognitive trajectory curvature after zeroing-down. When the statistical value of the knowledge path topology entropy of the target entity is less than the preset entropy threshold and approaches zero, the output value of the attenuation function approaches zero, and the cognitive trajectory curvature approaches zero. When the statistical value of the knowledge path topology entropy of the target entity is greater than or equal to the preset entropy threshold, no zeroing-down is performed, and the cognitive trajectory curvature remains at its original value.
[0190] The topological entropy statistics of the knowledge path and the curvature of the cognitive trajectory employ a negative feedback coupling logic. When the topological entropy statistics of the target entity's knowledge path are low, it indicates a high reliability of the knowledge retrieval path. In this case, the influence of user emotional fluctuations on the recommendation results should be suppressed, prioritizing the accuracy of knowledge output. Therefore, a significant attenuation is applied to the curvature of the cognitive trajectory. When the topological entropy statistics of the target entity's knowledge path are high, it indicates a high degree of uncertainty in the knowledge retrieval path. In this case, the weight of emotional consistency should be increased, prioritizing the interactive experience and avoiding user confusion due to knowledge uncertainty. Therefore, a smaller degree of attenuation or no attenuation is applied to the curvature of the cognitive trajectory. The technical rationale for this mechanism is that when the confidence of the knowledge path is high enough, prioritizing the accuracy of the output information is a core requirement in digital human knowledge question-answering scenarios, avoiding the output of incorrect or deviated knowledge content due to following temporary user emotional fluctuations. When the uncertainty of the knowledge path is high, emotional adaptation is used to improve the interactive experience, achieving a layered adaptation strategy that prioritizes accuracy and supplements experience.
[0191] This invention provides an embodiment of a device for an intelligent recommendation algorithm-based knowledge interaction question-answering system using a digital human-like image, comprising:
[0192] The acquisition module is used to acquire multimodal interaction data input by the user and extract the user intent vector and the user sentiment vector.
[0193] The knowledge retrieval module is used to input user intent vectors into a preset domain knowledge graph for entity linking. Starting from the core entity, it performs multi-hop graph queries and multiplies the branch density, semantic distance to the core entity, and relationship type diversity entropy on the query path of each candidate entity according to a preset weight ratio to generate the knowledge path topology entropy for each candidate entity. Based on the knowledge path topology entropy, it filters target entities and constructs a relational subgraph. Based on the relational subgraph, it retrieves multimodal knowledge data from the multimodal fusion knowledge base.
[0194] The answer generation module is used to input the user intent vector, the structural information of the association subgraph, and the recalled multimodal knowledge data into the large language model to generate the initial recommended answer;
[0195] The trajectory curvature calculation module is used to acquire user interaction data in multiple rounds, determine the polar angle based on the user's emotional polarity in each round of interaction, determine the polar radius based on the user's behavioral intensity in each round of interaction, map each round of interaction to trajectory points in polar coordinates, interpolate the trajectory points to obtain the emotional trajectory curve, and generate the cognitive trajectory curvature by weighting and amplifying the instantaneous curvature and cumulative curvature of the emotional trajectory curve in combination with the distribution ratio of positive and negative curvature points within a preset window.
[0196] The deflection angle calculation module is used to calculate the ratio by using the curvature of the cognitive trajectory as the numerator and the topological entropy of the knowledge path of the target entity as the denominator. The ratio is then used to calculate the arctangent function, and the result is used as the cognitive navigation deflection angle.
[0197] The re-ranking module is used to determine the cosine weight and sine weight based on the cognitive navigation deflection angle. It then uses the cosine weight and sine weight to sum the knowledge relevance score and sentiment consistency score of the recalled multimodal knowledge data to obtain the fusion score. Finally, it re-ranks the data according to the fusion score to obtain the target recommended answer.
[0198] The output control module is used to control the digital avatar to perform interactive multimodal output based on the target recommended answer.
[0199] The present invention provides an embodiment of a computer device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of any of the above-mentioned methods for a knowledge interaction question-and-answer system based on a digital image human intelligent recommendation algorithm.
[0200] This invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned methods for a knowledge-interactive question-and-answer system based on a digital human-based intelligent recommendation algorithm.
[0201] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of this invention and its equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method for a knowledge-interactive question-and-answer system based on an intelligent recommendation algorithm using a digital avatar, characterized in that, include: Acquire multimodal interaction data from user input and extract user intent vectors and user sentiment vectors; Input the user intent vector into the preset domain knowledge graph to link entities, perform multi-hop graph queries starting from the core entity, and multiply the branch density, semantic distance to the core entity, and relationship type diversity entropy on the query path of each candidate entity according to the preset weight ratio to generate the knowledge path topology entropy corresponding to each candidate entity. Target entities are filtered and associated subgraphs are constructed based on the knowledge path topological entropy. Multimodal knowledge data is then retrieved from the multimodal fusion knowledge base based on the associated subgraphs. The user intent vector, the structural information of the associated subgraphs, and the retrieved multimodal knowledge data are then input into the large language model to generate an initial recommended answer. Acquire user interaction data from multiple consecutive rounds, determine the polar angle based on the user's emotional polarity in each round of interaction, determine the polar radius based on the user's behavioral intensity in each round of interaction, map each round of interaction to trajectory points in polar coordinates, interpolate the trajectory points to obtain the emotional trajectory curve, and generate the cognitive trajectory curvature by weighting and amplifying the instantaneous curvature and cumulative curvature of the emotional trajectory curve in combination with the distribution ratio of positive and negative curvature points within a preset window. The ratio is calculated by using the curvature of the cognitive trajectory as the numerator and the topological entropy of the knowledge path of the target entity as the denominator. The arctangent function is then calculated based on the ratio, and the result is used as the cognitive navigation deflection angle. Based on the cognitive navigation deflection angle, cosine weights and sine weights are determined. The knowledge relevance score and sentiment consistency score of the recalled multimodal knowledge data are weighted and summed using cosine weights and sine weights respectively to obtain the fusion score. The data are then reordered according to the fusion score to obtain the target recommended answer. The system controls a digital avatar to provide interactive, multimodal output based on the target-recommended answer.
2. The method of the intelligent recommendation algorithm knowledge interaction question-answering system based on digital image human as described in claim 1, characterized in that, The preset weighting ratio is determined according to the following steps: Obtain the global in-degree distribution of all entities in the preset domain knowledge graph, calculate the first statistical variance of the global in-degree distribution, and convert the first statistical variance into the first candidate value of the first weight coefficient according to the first preset mapping relationship. The first candidate value is positively correlated with the first statistical variance, and the first preset mapping relationship is a monotonically increasing non-linear function relationship. Obtain the embedding vector distance distribution of all entity pairs in the preset domain knowledge graph, calculate the second statistical variance of the embedding vector distance distribution, and convert the second statistical variance into the second candidate value of the second weight coefficient according to the second preset mapping relationship. The second candidate value is negatively correlated with the second statistical variance. The second preset mapping relationship is a monotonically decreasing non-linear function relationship. Obtain the frequency distribution of all relation types in the preset domain knowledge graph, calculate the third statistical variance of the frequency distribution, and convert the third statistical variance into the third candidate value of the third weight coefficient according to the third preset mapping relationship. The third candidate value is positively correlated with the third statistical variance, and the third preset mapping relationship is a monotonically increasing non-linear function relationship. The first, second, and third candidate values are normalized so that the sum of the normalized first, second, and third weight coefficients is a constant value, and the normalized first weight coefficient is greater than the second weight coefficient and the third weight coefficient.
3. The method of the intelligent recommendation algorithm knowledge interaction question-answering system based on digital image human as described in claim 1, characterized in that, The branch density corresponding to the candidate entity is determined according to the following steps: Starting from the core entity, obtain the first number of all first-level candidate entities directly associated with the core entity and the first weight sum of all first-level relation edges. Perform a calculation on the first number and the first weight sum using a composite function that includes logarithmic operations to obtain the initial branch density of the first hop. Obtain the number of directly related branches that each candidate entity expands outward, as well as the total weight of the relationship edges between the corresponding candidate entity and the directly superior entity. Perform a composite function operation on the number of directly related branches and the total weight to obtain the single-point branch density of the corresponding candidate entity. The weighted sum of the initial branch density of the first hop and the single-point branch density of the corresponding candidate entity is used as the branch density of the corresponding candidate entity.
4. The method of the intelligent recommendation algorithm knowledge interaction question-answering system based on digital image human as described in claim 1, characterized in that, The semantic distance between candidate entities and core entities is determined according to the following steps: Obtain the first embedding vector of the candidate entity in the embedding space of the preset domain knowledge graph, obtain the second embedding vector of the core entity in the embedding space, and calculate the cosine distance between the first embedding vector and the second embedding vector. Obtain the shortest path length between candidate entities and core entities in the preset domain knowledge graph. Use the shortest path length as an exponential coefficient to correct the cosine distance to obtain the semantic distance between candidate entities and core entities. The corrected semantic distance is positively correlated with both the cosine distance and the shortest path length.
5. The method of the intelligent recommendation algorithm knowledge interaction question-answering system based on digital image human as described in claim 1, characterized in that, The entropy of relation type diversity along the query path containing candidate entities is determined according to the following steps: Obtain the set of relation type labels for all relation edges on the query path where the corresponding candidate entity is located, and count the frequency of each relation type label in all relation edges; Calculate the proportion of each relation type label in all relation edges based on the frequency of occurrence of each relation type label; Get the total number of different relation type labels in the relation type label set, and use the logarithm of the corresponding total number as the maximum possible entropy value; Shannon entropy is calculated based on the proportion of each relation type label, and the ratio of Shannon entropy to the maximum possible entropy value is used as the relation type diversity entropy.
6. The method of the intelligent recommendation algorithm knowledge interaction question-answering system based on digital image human as described in claim 1, characterized in that, The polar angle is determined based on the user's emotional polarity in each round of interaction, and the polar radius is determined based on the intensity of user behavior in each round of interaction, including: Obtain the emotional polarity score of the user's emotional vector in each round of interaction. The emotional polarity score is a continuous value and ranges from negative to positive. The product of the emotional polarity score and pi is used as the polar angle corresponding to each round of interaction. The interaction duration, operation frequency, and input complexity in each round of interaction are obtained. The interaction duration, operation frequency, and input complexity are normalized respectively. The weighted sum of the normalized interaction duration, normalized operation frequency, and normalized input complexity is used as the comprehensive value of behavior intensity. The product of the ratio of the comprehensive value of behavior intensity to the preset maximum behavior intensity value and the preset maximum value of the extreme radius is used as the extreme radius corresponding to each round of interaction.
7. The method of the intelligent recommendation algorithm knowledge interaction question-answering system based on digital image human as described in claim 1, characterized in that, Based on the instantaneous and cumulative curvature of the emotional trajectory curve, and combined with the weighted amplification of the distribution ratio of positive and negative curvature points within a preset window, a cognitive trajectory curvature is generated, including: Cubic spline interpolation is performed on the trajectory points to obtain a continuous emotional trajectory curve; Calculate the first and second derivatives of the emotion trajectory curve at the current moment's endpoint, and use the ratio of the magnitude of the second derivative to the cube of the magnitude of the first derivative as the instantaneous curvature. The cumulative curvature is obtained by integrating the instantaneous curvature of the emotion trajectory curve over the integral interval from the beginning to the end. The instantaneous curvature values of the emotional trajectory curve at multiple sampling points within a preset history window are obtained. The sign of the instantaneous curvature values at each sampling point is determined. Sampling points with instantaneous curvature values greater than zero are marked as positive curvature points, and sampling points with instantaneous curvature values less than zero are marked as negative curvature points. The ratio of the first number of positive curvature points to the second number of negative curvature points is calculated. When the ratio is greater than the first preset swing threshold, the cumulative curvature is multiplied by the first swing amplification factor and used as the initial cognitive trajectory curvature. When the ratio is less than the second preset swing threshold, the cumulative curvature is multiplied by the second swing amplification factor and used as the initial cognitive trajectory curvature. When the ratio is not less than the second preset swing threshold and not greater than the first preset swing threshold, the cumulative curvature is directly used as the initial cognitive trajectory curvature. When the topological entropy of the knowledge path of the target entity is less than the preset entropy threshold, the initial cognitive trajectory curvature is reduced to zero according to the decay function determined by the ratio of the topological entropy of the knowledge path of the target entity to the preset entropy threshold, and the cognitive trajectory curvature is obtained; otherwise, the initial cognitive trajectory curvature is directly used as the cognitive trajectory curvature.
8. A device for an intelligent recommendation algorithm-based knowledge interaction question-and-answer system using digital avatars, characterized in that, include: The acquisition module is used to acquire multimodal interaction data input by the user and extract the user intent vector and the user sentiment vector. The knowledge retrieval module is used to input user intent vectors into a preset domain knowledge graph for entity linking. Starting from the core entity, it performs multi-hop graph queries and multiplies the branch density, semantic distance to the core entity, and relationship type diversity entropy on the query path of each candidate entity according to a preset weight ratio to generate the knowledge path topology entropy for each candidate entity. Based on the knowledge path topology entropy, it filters target entities and constructs a relational subgraph. Based on the relational subgraph, it retrieves multimodal knowledge data from the multimodal fusion knowledge base. The answer generation module is used to input the user intent vector, the structural information of the association subgraph, and the recalled multimodal knowledge data into the large language model to generate the initial recommended answer; The trajectory curvature calculation module is used to acquire user interaction data in multiple rounds, determine the polar angle based on the user's emotional polarity in each round of interaction, determine the polar radius based on the user's behavioral intensity in each round of interaction, map each round of interaction to trajectory points in polar coordinates, interpolate the trajectory points to obtain the emotional trajectory curve, and generate the cognitive trajectory curvature by weighting and amplifying the instantaneous curvature and cumulative curvature of the emotional trajectory curve in combination with the distribution ratio of positive and negative curvature points within a preset window. The deflection angle calculation module is used to calculate the ratio by using the curvature of the cognitive trajectory as the numerator and the topological entropy of the knowledge path of the target entity as the denominator. The ratio is then used to calculate the arctangent function, and the result is used as the cognitive navigation deflection angle. The reordering module is used to determine the cosine weight and sine weight based on the cognitive navigation deflection angle. It then uses the cosine weight and sine weight to sum the knowledge relevance score and sentiment consistency score of the recalled multimodal knowledge data to obtain the fusion score. Finally, it reorders the data according to the fusion score to obtain the target recommended answer. The output control module is used to control the digital avatar to perform interactive multimodal output based on the target recommended answer.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, The steps of implementing the method of the intelligent recommendation algorithm knowledge interaction question answering system based on digital image human as described in any one of claims 1 to 7 when the processor executes the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that, The steps of implementing the method of the intelligent recommendation algorithm knowledge interaction question answering system based on digital image human as described in any one of claims 1 to 7 when the computer program is executed by a processor.
Citation Information
Patent Citations
Digital interactive exhibition method and system based on VR technology
CN120909435A
Scenic area intelligent question answering and recommendation method based on integration of knowledge graph and large model
CN121880532A
