A dynamic map and state machine interaction method
By using multimodal data fusion and dynamic knowledge graph interaction methods, the shortcomings of existing systems in intent understanding and state tracking are addressed, achieving efficient and accurate personalized interaction and improving the coherence and accuracy of the interaction system.
Patent Information
- Application Number
- CN202611058463.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-16
- Publication Date
- 2026-11-06
- Estimated Expiration
- 2046-07-16
AI Technical Summary
Existing interactive systems based on large language models struggle to fully capture users' real-world contexts and physiological states. Their intent understanding is limited to a single dimension, and they lack factual logic verification when generating responses. Furthermore, their state tracking in multi-turn dialogues lacks dynamic linkage, resulting in a rigid interaction process with low efficiency and accuracy.
User interaction data and physiological data are acquired through multimodal acquisition devices, feature space alignment is performed to obtain fused modal features, intent deconstruction processing is performed and mapped to a dynamic knowledge graph for multi-hop walks, and speech is synthesized by combining logical arbitration and sentiment parameters, and state machine is used for state tracking and knowledge reverse writing.
It significantly improves the accuracy of intent understanding and the reliability of semantic enhancement, effectively alleviates the problems of factual conflict and interaction discontinuity, and realizes a dynamic closed loop of personalized and coherent interaction and knowledge.
Smart Images

Figure CN122572689B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence interaction, specifically to a dynamic graph and state machine interaction method. Background Technology
[0002] Existing interactive systems based on large language models are mostly limited to a single text modality, making it difficult to fully capture the user's real-world context and physiological state. This results in a single dimension of intent understanding and limited accuracy. Furthermore, existing systems lack rigorous factual logic verification mechanisms for model outputs when generating responses, easily leading to factual conflicts and logical illusions. In multi-turn dialogues, state tracking lacks dynamic linkage with the knowledge base, making it difficult to maintain the coherence of long-term contexts. The interaction process is stiff, and the overall question-and-answer efficiency and accuracy fail to meet practical needs. Summary of the Invention
[0003] This invention proposes a method for interaction between dynamic graphs and state machines, comprising: S1. The user's interaction data and physiological data are acquired by the multimodal acquisition device. The interaction data and physiological data are aligned in feature space to obtain fused modal features. The fused modal features are subjected to intent deconstruction processing to obtain intent probability distribution. S2. Perform a traffic splitting decision based on the intent probability distribution to obtain a routing result, and use the routing result to map the current intent to a dynamic knowledge graph to perform multi-hop walks to obtain semantic enhancement information; S3. The semantic enhancement information and the output content of the generation model are compared logically to obtain a conflict determination result. When the conflict determination result indicates that there is a conflict, logical arbitration is performed to obtain the corrected content. The corrected content and the emotional parameters calculated based on the physiological data are combined to obtain the driving response speech. S4. The driving response dialogue input state machine executes a transition decision to obtain the next round of action instructions. The memory network tracks the execution state of the driving response dialogue and the next round of action instructions to obtain coherent interaction data. The coherent interaction data is used to extract entity relationships and write them into the dynamic knowledge graph to obtain structured storage data.
[0004] Further, the step of aligning the interaction data and the physiological data to obtain the fusion modal features by performing feature space alignment includes: mapping the interaction data to a first latent space to obtain an interaction semantic vector, mapping the physiological data to a second latent space to obtain a physiological representation vector, eliminating redundant components between the interaction semantic vector and the physiological representation vector through an orthogonal projection operator, and performing tensor concatenation on the vectors after eliminating redundancy to obtain the fusion modal features.
[0005] Further, the step of obtaining the routing result by performing a traffic splitting decision based on the intent probability distribution includes: extracting the maximum probability value in the intent probability distribution as a confidence level; when the confidence level is greater than a high threshold, the routing result indicates routing to the knowledge graph retrieval branch; when the confidence level is less than a low threshold, the routing result indicates routing to the manual intervention branch; when the confidence level is between the high threshold and the low threshold, the routing result indicates routing to the large model generation branch.
[0006] Furthermore, the step of mapping the current intent to the dynamic knowledge graph using the routing result to perform multi-hop walks to obtain semantic enhancement information includes: extracting key entity nodes of the current intent based on the routing result; performing adjacency edge expansion in the dynamic knowledge graph starting from the key entity nodes; performing multi-hop walks according to the weights of entity relationships to obtain a related subgraph; and performing vectorized encoding on the related subgraph to obtain the semantic enhancement information.
[0007] Furthermore, the step of performing logical arbitration correction to obtain the corrected content when the conflict determination result indicates that a conflict exists includes: when a conflict exists, extracting the first factual assertion in the semantic enhancement information and the second factual assertion in the output content of the generation model, comparing the first factual assertion and the second factual assertion based on the authority weight of the dynamic knowledge graph, retaining the factual assertion with higher weight and replacing the factual assertion with lower weight to obtain the corrected content.
[0008] Furthermore, the emotional parameters calculated based on the physiological data include: extracting the heart rate variability coefficient and skin conductance level from the physiological data, inputting the heart rate variability coefficient and skin conductance level into a pre-trained emotional classifier, outputting an emotional polarity probability distribution, and mapping the emotional polarity probability distribution to continuous emotional parameters.
[0009] Furthermore, the step of obtaining the next round of action instructions by executing the transition decision of the driving response dialogue input state machine includes: parsing the current dialogue intent tag of the driving response dialogue, matching the current dialogue intent tag with the current state node of the state machine, triggering the state transition condition to generate the next round of action instructions, wherein the next round of action instructions includes a question instruction, a clarification instruction, or an end instruction.
[0010] Furthermore, the step of obtaining coherent interaction data by tracking the execution state of the driving response statement and the next round action instruction through the memory network includes: encoding the driving response statement and the next round action instruction into state feature vectors, writing the state feature vectors into long-term memory slots of the memory network, calculating attention weights by combining them with historical vectors in the long-term memory slots, and outputting the weighted and aggregated coherent interaction data.
[0011] Furthermore, this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned dynamic graph and state machine interaction method.
[0012] Furthermore, this application discloses a dynamic knowledge graph and state machine interaction system, comprising: a multimodal alignment and deconstruction module for acquiring interaction data and physiological data to perform feature space alignment and intent deconstruction; a knowledge graph traversal module for performing triage decisions and mapping to a dynamic knowledge graph to perform multi-hop traversal; a logic arbitration and speech synthesis module for performing logic comparison, arbitration correction, and speech synthesis; and a state machine and memory tracking module for performing transition decisions, state tracking, and entity relationship extraction and reverse writing.
[0013] This invention proposes a dynamic graph and state machine interaction method, which integrates multimodal interaction data and physiological data for intent deconstruction and maps it to a dynamic knowledge graph to perform multi-hop walks. It combines logical arbitration and sentiment parameters to synthesize speech and uses a state machine for state tracking and knowledge rewriting, which significantly improves the accuracy of intent understanding and the reliability of semantic enhancement, effectively alleviates the problems of factual conflict and interaction discontinuity, and realizes a dynamic closed loop of personalized coherent interaction and knowledge. Attached Figure Description
[0014] Figure 1 This is a schematic diagram of the interactive dynamic graph and state machine interaction method of the present invention; Figure 2 This is a schematic diagram of the feature space alignment and intent deconstruction logic of the present invention; Figure 3 This is a schematic diagram of the multi-hop walk of the dynamic knowledge graph of this invention; Figure 4 This is a schematic diagram of the logic comparison and speech synthesis of the present invention; Figure 5 This is a schematic diagram of the state machine and memory network structure of the present invention. Detailed Implementation
[0015] Please see Figure 1 As shown, the present invention provides a method for interaction between dynamic graphs and state machines, including: S1. The user's interaction data and physiological data are acquired by the multimodal acquisition device. The interaction data and physiological data are aligned in feature space to obtain fused modal features. The fused modal features are subjected to intent deconstruction processing to obtain intent probability distribution.
[0016] The multimodal acquisition device is a hardware front-end device capable of acquiring text, voice, image, and bioelectrical signals; the interactive data is an unstructured data stream representing user operation behavior and input content; the physiological data is a sequence of physiological electrical signals representing the user's vital signs; the fused modal features are high-dimensional tensor representations that eliminate redundant components between modalities and complete spatial dimension splicing; the intent probability distribution is a discrete probability vector representing the confidence level of each preset intent category, generated after mapping by a classification network. A unified-dimensional joint representation space is established through independent spatial mapping of different modal data and alignment with cross-modal features, and nonlinear dimensionality reduction and probability mapping are performed on the joint representation using a multilayer perceptron or attention network.
[0017] Specifically, the multimodal acquisition device captures the user's voice input, facial images, and heart rate signals, performs feature extraction and vectorization encoding on each, eliminates common redundant features between modalities through projection operators, merges the remaining independent feature vectors by tensor concatenation, and outputs the probability values of each intent category to the input intent deconstruction network.
[0018] In a specific implementation scenario, such as Figure 1 As shown, when a user issues a voice command "check account balance" in front of the smart customer service terminal, the camera captures the user's tense micro-expressions on their face, and the wristband collects physiological data showing an increase in heart rate. The system spatially aligns and concatenates the voice text vector with the heart rate and facial feature vectors, and outputs the intent probability distribution after intent deconstruction, where the intent probability of "account inquiry" is 0.92.
[0019] In a specific implementation scenario, the distribution differences before and after heterogeneous modal feature space alignment are recorded in Table 1 below: Table 1. Record of Distribution Differences Before and After Heterogeneous Modal Feature Space Alignment
[0020] S2. A routing result is obtained by performing a traffic splitting decision based on the intent probability distribution. The current intent is then mapped to a dynamic knowledge graph using the routing result to perform a multi-hop walk and obtain semantic enhancement information.
[0021] The routing decision is a routing distribution logic based on a preset threshold boundary to determine the range of probability extreme values; the routing result is a branch identifier indicating the direction of subsequent processing; the dynamic knowledge graph is a graph structure data storage format containing entity nodes and weighted relation edges; the multi-hop walk is a graph search algorithm process that traverses along adjacent edges from the starting node according to a preset number of hops; the semantic enhancement information is a structured context representation obtained by vectorizing the associated subgraphs obtained by the walk. Traffic scheduling is achieved by comparing the maximum value of the probability distribution with two thresholds, performing breadth-first or depth-first traversal in the graph database based on relation weights, and converting the discrete graph structure into a continuous vector representation through an encoder.
[0022] Specifically, the maximum value in the intention probability distribution is extracted and compared with a high preset threshold of 0.85 and a low preset threshold of 0.45 to generate branch routing instructions. If a graph branch is entered, a Cypher or SPARQL multi-hop query is performed in the graph database starting from the extracted entity to extract the adjacency subgraph and call the graph neural network model to generate semantic enhancement vectors.
[0023] In a specific implementation scenario, such as Figure 2 As shown, the system determines that the intent confidence level of 0.92 is greater than the high preset threshold of 0.85. The routing result indicates that the system enters the knowledge graph retrieval branch. The system uses "account balance" as the key entity node and performs a two-hop walk to the "account type" and "interest rate policy" nodes in the dynamic knowledge graph, encoding the obtained related subgraphs into semantically enhanced information.
[0024] In a specific implementation scenario, the performance test records for multi-hop walk inference are shown in Table 2 below: Table 2 Multi-hop walking inference performance test record table
[0025] S3. The semantic enhancement information and the output content of the generation model are compared by the execution logic to obtain the conflict determination result. When the conflict determination result indicates that there is a conflict, the logic arbitration correction is performed to obtain the correction content. The correction content and the emotional parameters calculated based on the physiological data are combined to obtain the driving response speech.
[0026] The generative model outputs a text sequence generated by a large language model based on natural language. The conflict determination result is a Boolean value or difference score representing whether factual assertions are consistent. The logical arbitration correction is a rewriting operation that selectively retains conflicting facts based on authority weights. The sentiment parameter is a continuous numerical value representing the polarity and intensity of user sentiment. The driving response is the final interactive text that integrates the corrected factual content with sentiment-matched vocabulary. Factual contradictions between two information sources are identified through entity alignment and attribute comparison. Low-confidence content is covered based on graph node weights, and the text content and sentiment scalar are input into the conditional text generation network for lexical-level adjustment.
[0027] Specifically, the fact triples extracted from the semantic enhancement information are compared with the fact triples output by the generative model. If there is an attribute conflict, the authority weight of the triple node in the dynamic knowledge graph is queried. The high-weight facts are retained and the low-weight facts are replaced to generate the corrected content. At the same time, physiological data features are extracted and input into the sentiment classifier to output sentiment parameters. The corrected content and sentiment parameters are used as conditions to input into the speech synthesis model to generate the final text.
[0028] In a specific implementation scenario, such as Figure 3 and Figure 5 As shown, the semantic enhancement information indicates "account balance is 10,000 yuan," while the generated model outputs "account balance is 12,000 yuan." The system determines there is a conflict, and the authority weight of the query graph determines that the semantic enhancement information has a higher weight. Therefore, a replacement is performed, retaining 10,000 yuan to obtain the corrected content. Simultaneously, based on the increase in heart rate, the emotional parameter is calculated to be "anxiety." The system inputs the "anxiety" emotional parameter and the corrected content into the speech synthesis model to generate a reassuring speech: "We have found that your current balance is 10,000 yuan. Would you like assistance with financial management?" In a specific implementation scenario, the record of conflict resolution performed by the logic arbitration correction module is shown in Table 3 below: Table 3 Logical Arbitration Modification Conflict Resolution Record Table
[0029] S4. The next round of state parameters are obtained by updating the interaction state flow based on the driving response dialogue, and the interaction information is output based on the next round of state parameters. The dialogue data is then subjected to structured persistent storage to obtain the dialogue archive record.
[0030] The interactive state transition update is based on the implicit state iteration operation of the multi-turn dialogue context performed by reinforcement learning and memory networks; the next-turn state parameters are a tensor set containing action decision probabilities and gating weight vectors; the interactive information is output data converted into speech, text, or multimodal forms and fed back to the user; the dialogue archive record is a persistent data entity serialized into a key-value pair structure and written into a relational or non-relational database. Reward signals are calculated using historical dialogue feedback to optimize action strategies, the forgetting and writing ratio of memory units is controlled through a gating mechanism, and the final generated decision data is converted into a standardized format and persisted to the storage medium.
[0031] Specifically, the current round's driving response script and user feedback are used as input to calculate the current state action score. The probability of follow-up questioning and the probability of ending action are calculated by combining the exploration temperature parameter. The forget gate weight and input gate weight are updated using a long short-term memory network to generate the state parameters for the next round. The interaction information is output through a speech synthesis module or a text display module. The dialogue decision results are processed using JSON serialization rules to convert the intent field, entity field, and inference field into a key-value structure. The INSERT operation of a relational database is used to write the data into a preset data table to form the dialogue archive record.
[0032] In a specific implementation scenario, such as Figure 4 As shown, the system calculates the current state action score as 7.2 through the multi-round interaction state tracking module. Combined with the exploration temperature parameter of 1.0, the probability of the follow-up action is calculated to be 0.75, and the probability of the end action is 0.25. At the same time, the forget gate weight is updated to 0.15, and the input gate weight is updated to 0.85. Based on this, the system decides to continue to follow up and provide interaction information. Finally, the intent of this round, "account query", the entity "balance", and the score are serialized and written into the database table for storage.
[0033] In a specific implementation scenario, the records of state transitions and memory updates performed by the multi-turn interaction state tracking module are shown in Table 4 below: Table 4. Multi-round interactive state transition and memory update record table
[0034] Furthermore, the step of performing feature space alignment between the interactive data and the physiological data to obtain the fused modal features includes: performing text vectorization and speech acoustic feature extraction on the interactive data to obtain a first modal feature set; performing signal filtering and frequency band energy extraction on the physiological data to obtain a second modal feature set; and performing orthogonal transformation and dimensional unification on the first modal feature set and the second modal feature set to obtain the fused modal features.
[0035] The first modality feature set is a set of high-dimensional vectors output after independent encoding of text and speech; the second modality feature set is a set of frequency domain feature vectors extracted after denoising of physiological electrical signals; the orthogonal transformation is a matrix operation that uses singular value decomposition to eliminate cross-modal linear correlations; the dimensionality unification is a dimensionality reduction operation that uses fully connected layers to map heterogeneous features to the same dimension. By constructing an orthogonal basis projection space, the inner product of feature vectors of different modalities in this space is minimized, thereby filtering out common redundant information, retaining the independent discriminative features of each modality, and performing tensor concatenation.
[0036] Specifically, a pre-trained language model is used to convert interactive text into a 768-dimensional vector, and the MFCC algorithm is used to extract speech features and convert them into a 512-dimensional vector to form the first modality feature set. Bandpass filtering is performed on physiological data to remove baseline drift, and the frequency band energy is extracted using fast Fourier transform to obtain a 256-dimensional vector to form the second modality feature set. The covariance matrix of the two feature sets is calculated and singular value decomposition is performed to obtain the orthogonal transformation matrix. All features are projected onto a unified 1024-dimensional space and then spliced.
[0037] In one specific implementation scenario, the text vectorization output dimension is 768, the speech acoustic feature output dimension is 512, and the physiological signal feature output dimension is 256. After orthogonal transformation, the variance of the text features decreased from 12.45 to 1.02, and the mean offset decreased from 3.41 to 0.05, proving that redundant features have been effectively removed.
[0038] Further, the intention deconstruction processing performed on the fused modal features to obtain the intention probability distribution includes: performing multi-head attention calculation on the fused modal features to obtain a semantic association weight matrix, performing weighted summation and layer normalization on the semantic association weight matrix to obtain an intention representation vector, and performing fully connected mapping and Softmax activation on the intention representation vector to obtain the intention probability distribution.
[0039] The multi-head attention computation involves parallel execution of multiple sets of self-attention mechanisms to capture semantic dependencies in different subspaces. The semantic association weight matrix is a probability matrix representing the correlation between elements within the fused modality features. The intent representation vector is a scale-invariant intermediate hidden layer representation after normalization. The fully connected mapping is a transformation operation that linearly projects high-dimensional hidden layer features onto the intent category space. Attention weights between features are obtained by calculating the dot product of the query matrix and the key matrix. After Softmax normalization, the value matrix is weighted and summed. Then, a feedforward network and residual connections are used to enhance the nonlinear expressive power, ultimately mapping to the discrete category probability space.
[0040] Specifically, the fused modal features are multiplied by three sets of learnable parameter matrices to generate query vectors, key vectors, and value vectors. The dot product of the query vector and the transpose of the key vector is calculated and divided by the square root of the dimension. After activation by the Softmax function, the semantic association weight matrix is obtained. The weight matrix is multiplied by the value vector and the residuals are stacked and connected. After layer normalization, the intent representation vector is output. The intent representation vector is input into a two-layer fully connected network. Finally, the confidence values of each preset intent are output through the Softmax function.
[0041] In a specific implementation scenario, such as Figure 1 As shown, the specific method for calculating semantic relevance through dynamic graph and state machine interaction is as follows: ,in, Represented as semantic relevance, Represented as a query vector, Represented as a key vector, Represented as a value vector, The dimension is represented as a vector; after the system calculates the intent representation vector, it is then processed... The probability of activating the "account inquiry" intent in the output is 0.92.
[0042] Further, the step of performing traffic splitting decision to obtain routing results from the intent probability distribution includes: extracting the maximum probability value in the intent probability distribution; generating a first routing instruction when the maximum probability value is greater than a high preset threshold; generating a second routing instruction when the maximum probability value is less than a low preset threshold; and generating a third routing instruction when the maximum probability value is between the high preset threshold and the low preset threshold.
[0043] The high and low preset thresholds are manually set parameters used to define the boundaries of intent clarity. The first routing instruction is a flow indicator indicating the direct invocation of the large language model to generate a response. The second routing instruction is a flow indicator indicating the transfer to human agent processing. The third routing instruction is a flow indicator indicating the triggering of knowledge graph retrieval and inference branches. By dividing the probability interval into three parts through dual threshold boundaries, differentiated processing paths are adopted for intents with different confidence levels to balance computational resource consumption and response accuracy.
[0044] Specifically, the system retrieves the maximum value from the intent probability distribution and compares the maximum value with a high preset threshold of 0.85 and a low preset threshold of 0.45. If the maximum value exceeds 0.85, the intent is determined to be clear, and a first routing instruction is output. If the maximum value is below 0.45, the intent is determined to be ambiguous or beyond the scope of the business, and a second routing instruction is output. If the maximum value is between 0.45 and 0.85, knowledge assistance is required, and a third routing instruction is output.
[0045] In one specific implementation scenario, the maximum value of the intent probability distribution is 0.92, which is greater than the high preset threshold of 0.85. The system generates the first routing instruction, which directly calls the large model for initial generation and simultaneously triggers the graph verification logic to ensure the accuracy of the facts.
[0046] Furthermore, the step of mapping the current intent to the dynamic knowledge graph using the routing result to perform a multi-hop walk to obtain semantic enhancement information includes: extracting the target entity from the routing result, mapping the target entity to the starting node of the dynamic knowledge graph, performing a neighborhood traversal with a preset number of hops along the relation edges from the starting node to obtain an associated subgraph, and performing graph neural network encoding on the associated subgraph to obtain the semantic enhancement information.
[0047] The target entity is a core semantic unit extracted from user-input text through sequence labeling; the starting node is a node in the knowledge graph that shares the same unique identifier as the target entity; the associated subgraph is a local graph structure containing the starting node, its multi-hop neighbor nodes, and connecting edges; the graph neural network encoding is a vector transformation process that aggregates the features of subgraph nodes using graph convolution or graph attention mechanisms. A breadth-first search is performed on the graph structure using the target entity as an anchor point to collect structured facts within the topological neighborhood, and then the discrete graph structure is compressed into a continuous dense vector representation through a neighbor feature aggregation operator.
[0048] Specifically, the system performs named entity recognition on the user-input text to extract target entities, matches the corresponding starting node in the graph database using the Cypher query language, starts from the starting node, traverses adjacent entity nodes and relation edges according to a preset number of hops (such as two hops), and extracts the entire neighborhood as an associated subgraph, inputs the subgraph into a graph attention network, calculates the attention coefficients between nodes and weights and aggregates the neighbor features, and outputs a semantic enhancement vector at the subgraph level.
[0049] In a specific implementation scenario, such as Figure 2 and Figure 5 As shown, the system performs a two-hop walk starting with "account balance", covering 38% of entity nodes, 76% of feature aggregation coverage, and an average inference latency of 25ms. The obtained association subgraph covers "account type" and "interest rate policy" nodes, which are then encoded to generate semantically enhanced information.
[0050] Furthermore, the step of obtaining a conflict determination result by performing logical comparison between the semantic enhancement information and the output content of the generation model includes: extracting a set of generated facts by performing triple extraction on the output content of the generation model, obtaining a set of graph facts by performing graph mapping on the semantic enhancement information, and obtaining the conflict determination result by performing entity alignment and attribute value comparison between the set of generated facts and the set of graph facts.
[0051] The generated fact set is a list of (subject, predicate, object) triples extracted from natural language text; the graph fact set is a structured fact constraint extracted from a knowledge graph subgraph; the entity alignment is a disambiguation process to determine whether entities from different sources point to the same real-world object; and the attribute value comparison is a logical operation to check whether the values of the same attribute of corresponding entities are consistent. After converting unstructured text into structured triples, attribute-level precise matching is performed within a unified entity space, and the factual consistency between the two information sources is quantified using Boolean variables or difference scores.
[0052] Specifically, the dependency parser is used to parse the output of the generative model and extract subject-verb-object triples to form a generative fact set; node attributes and relationships are extracted from the subgraph corresponding to the semantic enhancement information to form a graph fact set; entities in the two sets are aligned based on string similarity and context embedding. If the alignment is successful, the values of the same attribute are further compared. If the values are inconsistent, the conflict determination result is set to 1 (conflict exists), otherwise it is set to 0 (no conflict).
[0053] In a specific implementation scenario, the output of the generative model is "account balance is 12,000 yuan". The extracted generative fact triple is (account, balance, 12,000 yuan). The graph fact set contains the triple (account, balance, 10,000 yuan). After aligning the "account" entity, the system compares the "balance" attribute and finds that 12,000 yuan is inconsistent with 10,000 yuan. The system outputs a conflict judgment result of 1 and records a logical conflict Boolean value of 1.
[0054] Furthermore, the step of performing logical arbitration correction to obtain the corrected content when the conflict determination result indicates that a conflict exists includes: when the conflict determination result indicates that a conflict exists, calculating the confidence level of the graph facts and the confidence level of the generated content respectively, performing a difference comparison between the confidence level of the graph facts and the confidence level of the generated content to obtain a conflict resolution score, and when the conflict resolution score is lower than a safety threshold, forcibly replacing the generated content with graph facts to obtain the corrected content.
[0055] The graph fact confidence score is a confidence rating calculated based on the source authority and update timestamp of the graph node; the generated content confidence score is a probability estimate when the large language model outputs the fact; the conflict resolution score is a quantitative indicator measuring the confidence gap between two conflicting facts; and the safety threshold is a critical parameter that determines whether to trigger a forced rewrite. When a factual conflict is detected, a third-party authoritative metric is introduced to assess the confidence of both conflicting parties, using high-confidence facts to cover low-confidence facts, thereby eliminating the illusion phenomenon in the content generated by the large model.
[0056] Specifically, the system queries the timestamp and source weight of the corresponding node in the dynamic knowledge graph, and calculates the confidence level of the graph fact to be 0.95 through weighted calculation; extracts the average token probability when the large language model generates the fact as the confidence level of the generated content to be 0.42; calculates the difference between the two to obtain the conflict resolution score of 0.53; the preset security threshold is 0.2. Since 0.53 is greater than 0.2, the system determines that the credibility of the graph fact is significantly higher, and the system forcibly replaces "12,000 yuan" with "10,000 yuan" to generate the corrected content.
[0057] In a specific implementation scenario, the process and score of conflict resolution executed by the logic arbitration correction module are shown in Table 3 below: For entity attribute conflicts, the graph fact confidence is 0.95, the generated content confidence is 0.42, the conflict resolution score is 0.53, and the output confidence after arbitration is increased to 0.95, effectively eliminating factual contradictions.
[0058] Furthermore, the step of synthesizing the driving response speech from the modified content and the emotional parameters calculated based on the physiological data includes: performing emotional polarity classification from the physiological data to obtain the emotional parameters; inputting the modified content and the emotional parameters into a conditional text generation network; and performing lexical-level attention adjustment from the conditional text generation network to obtain the driving response speech.
[0059] The emotional polarity classification is a regression or classification operation that maps physiological electrical signals to a discrete or continuous emotional space; the emotional parameters are labels or values representing the user's emotional states such as anxiety, calmness, and anger; the conditional text generation network is a sequence-to-sequence generation model with modified content and emotional parameters as joint constraints; and the lexical-level attention adjustment is a mechanism that dynamically adjusts the word list distribution based on emotional parameters during the decoding process. By combining objective factual correction with subjective emotional perception, emotional vectors are introduced as conditional inputs at each step of the language model decoding, changing the generation probability distribution of candidate words, so that the output text is both factually accurate and emotionally appropriate.
[0060] Specifically, the extracted physiological data features are input into a support vector machine or long short-term memory network for sentiment classification, and the sentiment parameters (such as "anxiety", intensity 0.8) are output. The corrected content "current balance is 10,000 yuan" and the sentiment parameters are used as input to the encoder. The attention weight of sentiment parameters and candidate words is calculated at the decoder to increase the generation probability of reassuring words such as "please rest assured" and "we will assist you", and reduce the probability of awkward words. Finally, the response is synthesized and driven.
[0061] In a specific implementation scenario, such as Figure 3 and Figure 5As shown, the system detected that the emotional parameter caused by the increase in heart rate was "anxiety (0.8)". When generating a response, the conditional text generation network combined the corrected content "balance of 10,000 yuan" with the emotional parameter, adjusted the word attention distribution, and finally output the driving response: "We found that your current balance is 10,000 yuan. Would you like our assistance with financial management?" The above are merely preferred embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for interaction between dynamic graphs and state machines, characterized in that, include: S1. User interaction data and physiological data are acquired by a multimodal acquisition device. Feature space alignment is performed between the interaction data and the physiological data to obtain fused modal features. The interaction data is an unstructured data stream representing user operation behavior and input content. The feature space alignment includes: mapping the interaction data to a first latent space to obtain an interaction semantic vector, mapping the physiological data to a second latent space to obtain a physiological representation vector, eliminating redundant components between the interaction semantic vector and the physiological representation vector using an orthogonal projection operator, performing tensor concatenation on the vectors after eliminating redundancy to obtain the fused modal features, and performing intent deconstruction processing on the fused modal features to obtain an intent probability distribution. S2. A routing result is obtained by performing a traffic splitting decision based on the intent probability distribution. The traffic splitting decision includes: extracting the maximum probability value in the intent probability distribution as a confidence level; when the confidence level is greater than a high threshold, the routing result indicates routing to the knowledge graph retrieval branch; when the confidence level is less than a low threshold, the routing result indicates routing to the manual intervention branch; when the confidence level is between the high threshold and the low threshold, the routing result indicates routing to the large model generation branch; the current intent is mapped to the dynamic knowledge graph based on the routing result to perform multi-hop walks to obtain semantic enhancement information. The multi-hop walks include: extracting key entity nodes of the current intent based on the routing result; performing adjacency edge expansion in the dynamic knowledge graph starting from the key entity nodes; performing multi-hop walks according to the weights of entity relationships to obtain a related subgraph; and performing vectorized encoding on the related subgraph to obtain the semantic enhancement information. S3. A conflict determination result is obtained by performing a logical comparison between the semantic enhancement information and the output content of the generative model. The logical comparison includes: extracting a set of generated facts from the output content of the generative model using triplet extraction; obtaining a set of graph facts from the semantic enhancement information using graph mapping; and comparing entity alignment and attribute values between the generated fact set and the graph fact set to obtain the conflict determination result. When the conflict determination result indicates a conflict, a logical arbitration correction is performed to obtain corrected content. The logical arbitration correction includes: when a conflict exists, extracting the first fact assertion from the semantic enhancement information and comparing it with the first fact assertion from the output content of the generative model. The second factual assertion is compared with the first factual assertion based on the authority weight of the dynamic knowledge graph. The factual assertion with higher weight is retained and the factual assertion with lower weight is replaced to obtain the corrected content. The corrected content and the emotional parameters calculated based on the physiological data are used to synthesize the driving response speech. The calculation of the emotional parameters includes: extracting the heart rate variability coefficient and skin conductance level from the physiological data, inputting the heart rate variability coefficient and skin conductance level into a pre-trained emotion classifier, outputting an emotion polarity probability distribution, and mapping the emotion polarity probability distribution to the continuous emotion parameters. S4. The state machine inputting the driving response dialogue executes a transition decision to obtain the next round of action instructions. The transition decision includes: parsing the current dialogue intent tag of the driving response dialogue, matching the current dialogue intent tag with the current state node of the state machine, triggering a state transition condition to generate the next round of action instructions. The next round of action instructions includes a question instruction, a clarification instruction, or an end instruction. The state tracking of the driving response dialogue and the next round of action instructions through a memory network is used to obtain coherent interaction data. The state tracking includes: encoding the driving response dialogue and the next round of action instructions into state feature vectors, writing the state feature vectors into long-term memory slots of the memory network, calculating attention weights by combining them with historical vectors in the long-term memory slots, and outputting the weighted and aggregated coherent interaction data. Entity relations are extracted from the coherent interaction data and written into the dynamic knowledge graph to obtain structured storage data.
2. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the dynamic graph and state machine interaction method of claim 1.
Citation Information
Patent Citations
Emotional disorder detection method and device based on multi-modal heterogeneous graph convolutional neural network
CN119949829A
AI interaction intelligent module based on hybrid architecture
CN120508546A
Dialogue interaction system based on multi-modal emotion perception and knowledge graph dynamic enhancement
CN120745853A
Multi-round intelligent customer service dialogue optimization method based on multi-hop knowledge tracking
CN121412344A
