Dialogue emotion reason alignment method based on sensory clue reasoning

By constructing a sensory cue-driven dialogue emotion cause alignment model, the problem of sensory cue neglect in existing methods is solved, the ability to identify dialogue emotion causes is improved, especially the identification of implicit and long-distance causal relationships, and higher recognition accuracy and interpretability are achieved.

CN121503501APending Publication Date: 2026-02-10NANJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511654262.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-12
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Existing dialogue emotion cause alignment methods ignore sensory cues in language, limiting the model's ability to understand and reason about implicit emotions. Furthermore, they lack effective modeling of the transmission and attenuation of sensory information in multi-turn dialogues, resulting in insufficient ability to identify distant or indirect emotional triggers.

Method used

A dialogue emotion cause alignment model based on sensory cues is constructed, including a sensory perception adapter, a sensory-guided knowledge enhancement module, a turn perception map, and an intermediate information compensation module. It is trained through a multi-loss joint optimization strategy, which integrates common sense knowledge and turn modeling to improve the recognition accuracy and interpretability of implicit emotion triggers.

Benefits of technology

It significantly improves the ability to identify implicit, metaphorical, or long-distance causal relationships and the interpretability of the judgment. Its performance is superior to large language models. It has a lightweight structure, clear logic, and better practical deployment advantages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121503501A_ABST
    Figure CN121503501A_ABST
Patent Text Reader

Abstract

The invention discloses a dialogue emotion reason alignment method based on sensory clue reasoning, which comprises the following steps: acquiring dialogue data containing multiple rounds of utterances, preprocessing the dialogue data, and establishing a dialogue emotion reason alignment data set; constructing a dialogue emotion reason alignment model taking sensory reasoning as a core, wherein the model comprises a sensory perception adapter, a sensory guidance knowledge enhancement module, a round perception graph and an intermediate information compensation module; based on the established data set, a multi-loss joint optimization strategy is adopted to train the constructed model, and a trained dialogue emotion reason alignment model is obtained; and inputting to-be-aligned emotion reason dialogue data by using the trained dialogue emotion reason alignment model, and generating an emotion-reason pair of the dialogue. According to the method, sensory clues are systematically introduced into a dialogue emotion reason alignment task, a multi-module collaborative framework with sensory reasoning as a core is established, and the limitation that an existing method only depends on semantic or contextual features for emotion reason recognition is broken through.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of natural language processing and sentiment computing, and in particular to a dialogue sentiment cause alignment method based on sensory cue reasoning, which is applicable to identifying and aligning the causal discourse that causes the change in sentiment of the target discourse in multi-turn dialogue scenarios. Background Technology

[0002] Emotional understanding in dialogue is a key component of perceptual artificial intelligence. Accurately identifying emotions and their causes within a conversation helps the dialogue agent respond with greater empathy and context-relevant information, thereby enhancing the user experience. This task has significant applications in areas such as mental health support, intelligent customer service, and the generation of empathetic dialogue. For example, in intelligent assistants for psychological counseling, identifying potential emotional triggers helps provide targeted reassurance and guidance; in intelligent customer service systems, timely perception of user dissatisfaction and pinpointing its semantic causes can effectively reduce negative experiences and the risk of complaints.

[0003] Existing methods for aligning emotional causes in dialogues typically rely on textual semantics, dialogue context, or common-sense reasoning. However, these methods generally overlook the "sensory cues" inherent in language. Sensory cues encompass six dimensions: visual, auditory, tactile, olfactory, gustatory, and interoceptive, representing a significant potential way for humans to express emotions. In reality, people often convey emotional states through direct sensory descriptions (such as "the melody of this music is gentle and moving"), indirect sensory metaphors (such as "her words were like a cold wind"), or interoceptive experiences (such as "my chest tightened"). While these expressions do not contain explicit emotional words like "happy," "angry," "sad," or "fear," they reflect subtle changes in emotion. Emotional experience is inherently closely related to sensory perception; therefore, ignoring sensory cues limits a model's ability to understand and reason about implicit emotions.

[0004] Furthermore, dialogues are dynamic—emotions and topics change with each turn. The turn-based propagation characteristics of dialogues, and the intermediate dialogue flow between candidate causes and targets, affect the transmission and attenuation of sensory information. Locational context (especially locational information from sensory cues) is crucial, but existing research has insufficient modeling of it: most methods rely on simple absolute location encoding, limiting the model's ability to track distant or indirect implicit emotional triggers. To improve the recognition of implicit / indirect emotional triggers, a systematic approach is needed that is driven by sensory cues, integrates common sense knowledge, turn-based modeling, and intermediate compensation, and utilizes a multi-loss joint optimization strategy during the training phase to achieve information co-learning, thereby improving the recognition accuracy and interpretability of implicit emotional triggers. Summary of the Invention

[0005] The present invention aims to at least partially solve the technical problems existing in the related art.

[0006] The purpose of this invention is to provide a method for aligning the causes of emotions in dialogue, which can effectively identify and align the causal discourse that leads to the target emotion in the dialogue, especially improving the ability to identify implicit, metaphorical or long-distance causal relationships and the interpretability of the judgment.

[0007] To achieve the above objectives, the present invention provides a method for aligning dialogue emotional causes based on sensory cue reasoning, comprising the following steps:

[0008] S1. Obtain dialogue data containing multiple turns of speech, preprocess the data, and establish a dialogue sentiment-cause alignment dataset, which is divided into a training set and a validation set; the dialogue data also includes multiple pairs of labeled sentiment-cause pairs;

[0009] S2. Construct a dialogue emotion cause alignment model with sensory reasoning as the core. The model includes a sensory perception adapter, a sensory-guided knowledge enhancement module, a turn perception map, and an intermediate information compensation module.

[0010] S3. Based on the established dialogue sentiment cause alignment dataset, a multi-loss joint optimization strategy is used to train the constructed model to obtain a well-trained dialogue sentiment cause alignment model.

[0011] S4. Using the trained dialogue sentiment-cause alignment model, input the dialogue data to be aligned with sentiment causes, and generate sentiment-cause pairs for the dialogue.

[0012] A further preferred embodiment of the present invention is that step S1, which involves preprocessing the data, specifically includes:

[0013] S11. Perform word segmentation, semantic encoding, and speaker role labeling on each utterance, and convert speaker information into binary one-hot vector form;

[0014] S12. Calculate the relative round distance between each utterance and the target utterance, and construct the inter-round interaction mask and the intra-sentence mask;

[0015] S13. Construct a token-based two-dimensional attention mask to mask tokens located after the target utterance, so that the model cannot access future utterances during self-attention computation.

[0016] As a preferred embodiment, the specific construction process of the dialogue sentiment cause alignment model in step S2 is as follows:

[0017] S21. Based on the established dialogue sentiment reason alignment dataset, sentence-level feature representations are obtained through role addition and semantic encoding of sentiment information;

[0018] S22. Based on the established dialogue sentiment cause alignment dataset, extract the sensory vectors of words in the discourse, map them to the same vector space as the sentence-level feature representation, and fuse them with the sentence-level feature representation through a multi-head attention mechanism to generate sensory enhancement representation;

[0019] S23. Based on the sensory enhancement representation, knowledge items related to the utterance are selected from the common sense knowledge base, and the knowledge items are weighted and fused according to the sensory similarity and relative position information between the sensory enhancement representation and the candidate knowledge items to form a sensory knowledge enhancement representation.

[0020] S24. Construct a round-perception graph structure using utterances in the dialogue as nodes and round distance as the relationship type, and perform sensory aggregation on adjacent nodes in the graph structure to obtain round-perception representation;

[0021] S25. Perform temporal encoding on the dialogue sensory cues between candidate causal discourse and target emotional discourse to generate intermediate information compensation representation;

[0022] S26. Based on sensory enhancement representation, sensory knowledge enhancement representation, round sensory representation and intermediate information compensation representation, jointly determine whether the candidate discourse is the triggering cause of the target emotional discourse and output the candidate causal probability.

[0023] Preferably, the sensory vector in step S22 includes information from six dimensions: vision, hearing, touch, smell, taste, and interoception. It is obtained from a sensory rating dictionary by looking up a table. The sensory vector mapping includes at least two layers of linear transformation and nonlinear activation function, and a multi-head attention mechanism is used to fuse the mapped sensory representation with the sentence-level feature representation.

[0024] Preferably, the common sense knowledge base mentioned in step S23 is ATOMIC, from which four types of social interaction relationships, including influence, intention, reaction and need, and one type of event relationship are selected.

[0025] Preferably, the candidate knowledge items in step S23 are knowledge obtained by reasoning from a common sense reasoning model; the selection of the knowledge items is based on the product of sensory similarity score and relative position decay weight, wherein the relative position decay weight is calculated by rotation position encoding.

[0026] Preferably, the round-perception graph structure in step S24 is a directed heterogeneous relation graph, and the relation types are divided according to the interval of round distance, with different relation types corresponding to different graph aggregation weights; the sensory aggregation adopts a relation graph convolutional network.

[0027] Preferably, the joint discrimination in step S26 is based on a discrimination network of a multilayer perceptron, and its output is the candidate causal probability.

[0028] Preferably, the multi-loss joint optimization in step S3 includes at least one causal alignment loss and at least one sentiment classification loss, and the GradNorm method is used to dynamically weight and balance each loss term; wherein the causal alignment loss uses binary cross-entropy loss to supervise the cause prediction task, and the sentiment classification loss uses cross-entropy loss for sentiment classification.

[0029] Preferably, the discrimination in the trained model further includes binarizing the probability based on a threshold determined by the validation set to output the final judgment result.

[0030] Beneficial Effects: This invention is the first to systematically introduce sensory cues into the task of aligning emotional causes in dialogue, establishing a multi-module collaborative framework centered on sensory reasoning. This overcomes the limitations of existing methods that rely solely on semantic or contextual features for emotional cause identification. By explicitly modeling three types of cues—direct sensory, indirect sensory, and intrinsic—in the model, this invention can capture metaphorical, implicit, and cross-turn propagation emotional triggering mechanisms, thereby achieving emotional causal reasoning that is more consistent with human cognitive logic. Based on this, the proposed Sensory-Guided Knowledge Enhancement (SKE) module utilizes sensory similarity to filter common-sense knowledge and integrates social relationship information, effectively reducing noise introduced by the knowledge; the Turn Perception Map (RG) characterizes the sensory transmission path between dialogue turns, enabling the model to possess turn-sensitive sensory propagation modeling capabilities; and the Intermediate Information Compensation (IIC) module further captures the intermediate dialogue flow between candidate and target utterances, compensating for the attenuation of long-distance emotional dependence. By employing a multi-loss joint optimization training strategy, this invention achieves collaborative learning of causal discrimination and sentiment classification, achieving Pos F1 = 70.25 and Macro F1 = 80.79 on the standard dataset RECCON-DD, significantly outperforming several text / knowledge augmentation baselines and the few-shot results of the large-scale language model ChatGPT. Compared to large-scale language model methods that rely on massive parameters and implicit inference, this invention features a lightweight structure, clear logic, and strong interpretability. It not only achieves comparable or even superior performance but also offers advantages in model transparency, computational cost, and practical deployment, providing reproducible and understandable reasoning paths for sentiment dialogue analysis and controllable generation tasks. Attached Figure Description

[0031] Figure 1 This is a flowchart of a dialogue emotion reasoning alignment method based on sensory cue reasoning in an embodiment of the present invention.

[0032] Figure 2 This is a sensory-guided knowledge enhancement module (SKE module) of a dialogue emotion cause alignment method based on sensory cue reasoning in an embodiment of the present invention.

[0033] Figure 3This is a turn-based perception graph module (RG module) of a dialogue emotion cause alignment method based on sensory cue reasoning in an embodiment of the present invention.

[0034] Figure 4 This is an intermediate information compensation module (IIC module) of a dialogue emotion cause alignment method based on sensory cue reasoning in an embodiment of the present invention.

[0035] in, - The i-th line of dialogue; - Sensory enhancement representation of the i-th sentence; taking a dialogue containing 5 sentences as an example, , , , , -Sentences 1 through 5 indicate sensory enhancement; , , , , -Sentences 1 to 5 represent the integration of knowledge about "influence from others"; , , , , -Sentences 1 to 5 represent the integration of "self-influence" knowledge; - The target sentence that integrates knowledge of "events"; , , , , - Compensation for information in sentences 1 to 5; Figure 3 In Chinese: 1 - a round of dialogue where the distance to the target sentence is 1; 2 - a round of dialogue where the distance to the target sentence is 2. Detailed Implementation

[0036] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, embodiments of this invention, and should not be construed as limiting the invention. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention. In the description of this invention, it should be understood that the terminology used is for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0037] The following is combined with Figures 1-4The present invention aims to provide a dialogue emotion cause alignment method based on sensory cue reasoning. This method takes sensory cues as the core, constructs a sensory perception adapter (SPA), a sensory-guided knowledge enhancement module (SKE), a turn perception map (RG), and an intermediate information compensation module (IIC), and through multi-loss joint optimization training, it can effectively identify and align the causal discourses that lead to the target emotion in the dialogue, especially improving the ability to identify implicit, metaphorical, or long-distance causal relationships and the interpretability of the judgment.

[0038] Example 1: As Figure 1 As shown, this embodiment provides a dialogue sentiment reasoning alignment method based on sensory cue reasoning, including the following steps:

[0039] S1. Obtain dialogue data containing multiple turns of speech, preprocess the data, and establish a dialogue sentiment-cause alignment dataset, which is divided into a training set and a validation set; the dialogue data also includes multiple pairs of labeled sentiment-cause pairs;

[0040] The data is preprocessed as follows: First, each utterance is segmented and semantically encoded, and its speaker, sentiment category, and turn position in the dialogue are extracted. Speaker information is represented using binary one-hot encoding ([1,0] and [0,1]), where different speakers correspond to different independent channels to model the interaction between speakers. Second, the relative turn position between each utterance and the target sentiment utterance is calculated, and an inter-turn interaction mask and an intra-sentence interaction mask are generated based on this distance. Among them, the inter-round interaction mask is used to control the information flow between different utterances, allowing only the target utterance and its preceding historical utterances to interact with each other, while completely blocking future utterances after the target utterance; the intra-sentence interaction mask is used to limit the scope of word-level self-attention within the same sentence; at the same time, a token-based two-dimensional attention mask is constructed in the input layer to block all tokens after the target utterance, so that the model cannot access future information during the self-attention calculation process, thereby achieving temporal causal constraints at the token level.

[0041] S2. Construct a dialogue emotion cause alignment model with sensory reasoning as the core. The model includes a sensory perception adapter, a sensory-guided knowledge enhancement module, a turn perception map, and an intermediate information compensation module.

[0042] The specific steps for constructing a dialogue sentiment cause alignment model are as follows:

[0043] Step 1: First, process each sentence in the dialogue into the input format. (in Mark the beginning of a sentence. (Sentence delimiters are first defined), then each word is converted into ID tokens and input into the RoBERTa model for encoding. The representations of each word in the last layer of the model are then max-pooled to obtain the sentence-level feature representation of each dialogue utterance, calculated as follows:

[0044]

[0045] in, , The dimension of the feature vector. This represents the position of each sentence in the dialogue. To better capture dialogue-specific features, two vectors with the same dimension as the sentence encoding are randomly initialized. As a feature of the dialogue participant, 7 vectors are randomly initialized. These represent seven sentiment expressions, including neutral. Ultimately, we obtained the basic sentence feature representation as follows:

[0046] .

[0047] Step 2: As shown in Table 1, each word in the text is associated with a six-dimensional sensory vector. These correspond to the scores of six sensory modalities: touch, taste, smell, vision, hearing, and interoception. To more effectively integrate them into the model, we use two linear transformations to map the sensory vectors ( The word embeddings are reduced to the same dimension of 300 as those of RoBERTa after MaxPooling. The transformation process can be described as follows:

[0048]

[0049] Wherein, linear1 will from -> linear2 will from -> , Represents the activation function, and the transformed sensory vector. The query vector Q, and vectors K and V, used in the multi-head attention mechanism of the sensory perception adapter, are derived from the sentence feature representation in step 1. The original sentence representation is transformed into a sensory-enhanced representation by combining emotions with sensory cues through a sensory perception adapter. The formula for the attention mechanism is as follows:

[0050]

[0051] in, Indicates the first The sentence indicates enhanced sensory expression. This represents a multi-head attention mechanism.

[0052] Table 1 Sensory ratings for six example words

[0053]

[0054] Step 3: We selected four social interaction relationships ([effect], [intent], [react], and [want]) and one event relationship ([isBefore], representing an event that may have occurred before the event mentioned in the current dialogue) from the common sense knowledge base ATOMIC-2020. For example... Figure 2 As shown, we combine the candidate knowledge inferred by the COMET model with sentence representations that incorporate sensory cues. The fusion yields new characterization and As shown below:

[0055]

[0056]

[0057] in, , , , It indicates the embedding of knowledge about the impact of the event on the speaker, their intentions, reactions, and expectations. , , This represents the embedded knowledge of the impact, reactions, and expected outcomes of an event on others. This represents a vector concatenation operation; This represents a fully connected linear mapping layer, used to unify the feature space of representations from different sources; To integrate sensory-social joint representations of "self-influence" knowledge, To integrate sensory-social joint representations of knowledge of "influence of others".

[0058] We then added rotational position encoding (ROPE) to encode the temporal decay effect of sensory cues; that is, the greater the relative distance, the lower the weight assigned to such sentences at the model level. Thus, we obtained a new representation. and As shown below:

[0059]

[0060]

[0061] Among them, superscript Let ROPE be the semantic representation, and let these two semantic representations be K and V in the attention mechanism, where Q is the target sentence processed by ROPE and incorporates knowledge of a strict isBefore relation. :

[0062]

[0063] in, This indicates the emotional representation of the target sentence. This indicates the embedding of knowledge about events that may have occurred prior to the events mentioned in the current dialogue.

[0064] The semantic similarity scores between social interaction knowledge and sensory cues are calculated as follows:

[0065]

[0066]

[0067] in, This represents the representation of the i-th sentence incorporating knowledge of "self-influence". This represents the representation of the knowledge of "influence of others" incorporated in the i-th sentence. Represents the dot product of vectors. Let represent the normalization function, such that the sum of the attention weights is 1. This represents the scaling factor. This indicates that statements spoken by a different speaker than the target sentence should be ignored. This indicates that statements consistent with the speaker of the target sentence are ignored, and is calculated as follows. and The weighted distribution of attentional importance for others and the speaker's own words:

[0068]

[0069]

[0070] in, Indicates the speaker.

[0071] This process filters knowledge relevant to the sensory cues and emotional context of the current dialogue, helping the model better allocate weights to historical dialogue sentences that are as causal as possible. The final result is a filtered, enhanced representation of sensory knowledge. As shown below:

[0072] .

[0073] Step 4: The number of rounds is a unique characteristic of dialogue scenarios. The position of each round of dialogue has different impacts on the transmission of sensory cues and the generation of emotions. Therefore, we constructed a directed heterogeneous relationship graph. To model the co-occurrence and propagation of sensory cues in adjacent rounds. For example... Figure 3 As shown, sensory enhancement represents Initialize as vertices in the graph, i.e. For each edge We categorize them into different relationships based on the number of dialogue rounds.

[0074] For sentences exceeding the round-position distance threshold `win`, we consider their sentiment influence to be roughly equal and assign these edges the same relation type. We employ a relational graph convolutional network (RGCN) to aggregate high-intensity sensory cues between neighboring nodes, enhancing the interaction of sensory cues within neighboring rounds. The aggregation process is as follows:

[0075]

[0076] in, Represents a non-linear activation function. Indicates a certain relationship Next, node All neighboring nodes. These are learnable parameters used to aggregate neighboring nodes. It is a learnable parameter used to determine the impact of oneself on oneself. This represents a normalization constant, here a relation type. Next node The number of neighboring nodes. Represents a node Sensory enhancement representation of adjacent nodes, Represents a node Sensory enhancement representation of the node itself.

[0077] Step 5: Intermediate Information Compensation (IIC module) is used to compensate for the attenuation of long-distance sensory cues and enhance the cumulative effect of sensory cues across rounds. Specifically, we use LSTM as the encoder to encode the sensory cues of the dialogue between the candidate cause sentence and the target sentiment sentence to form semantic representations. These representations are then added between the candidate cause sentence and the target sentiment sentence during representation pairing, allowing the model to perceive the complete flow of dialogue information. For example... Figure 4 As shown, we obtain intermediate information compensation. As shown below.

[0078]

[0079] in, This indicates that the output of each time step will be summed.

[0080] Step 6: After encoding the above modules, we obtain... , , Three different sentence representations. Candidate reason sentences. Is it the trigger for the target sentence? The reasons for these emotions are calculated using the following formula:

[0081]

[0082] in, Indicating candidate discourse Evoking target emotions through words The possibility of emotions, It is an activation function that outputs a probability value between 0 and 1. This indicates concatenating vectors a and b. MLP2 represents performing dimensional mapping and non-linear transformation on the semantics of the concatenation, while MLP1 represents transforming the vector dimension from 3*d to 1.

[0083] S3. Based on the established dialogue sentiment cause alignment dataset, a multi-loss joint optimization strategy is used to train the constructed model to obtain a well-trained dialogue sentiment cause alignment model.

[0084] Multiple loss functions are used to jointly calculate the difference between the model's predicted values ​​and the true labels, and gradient descent is employed to update the model's parameters. Specifically, the model updates the model by jointly optimizing the cause alignment loss (…). ) and emotional context loss ( This approach leverages sentiment semantic constraints to optimize the modeling of sensory cues, thereby enhancing the encoder's causal reasoning ability. The causal alignment loss uses the BCELoss loss function; the sentiment context loss, i.e., sentiment classification loss, uses the CrossEntropyLoss loss function as a regularization term to guide the model in capturing sentiment-related features. Finally, the final loss is calculated using a dynamic loss weighting method. There are many methods for weighting the total loss; here, we choose the GradNorm method for dynamic weighting. The specific loss calculation is as follows:

[0085]

[0086]

[0087]

[0088] in, This represents the total number of samples in a batch. Indicates the true label, if the candidate statement It is the target discourse If the reason is stated, the value is 1; otherwise, it is 0. This represents the causal probability predicted by the model, i.e., candidate discourse. It is the target discourse The probability value of the emotional reason; This indicates that the model performs well on samples in the sentiment context task. Genuine Emotional Category The predicted probability; The model represents the samples In the The predicted scores for each sentiment category, where c represents the sentiment category index. This represents the total loss of data within a batch. , This represents the dynamic weights, which are dynamically learned by the GradNorm method and are used to balance the gradient scales of the two tasks.

[0089] S4. Using the trained dialogue sentiment-cause pair alignment model, input the dialogue data to be aligned with sentiment causes, and generate the sentiment-cause pairs for the dialogue.

[0090] To verify the advantages of this embodiment, the method described in this embodiment is experimentally compared with advanced methods in recent years.

[0091] First, all experiments used the RECCON benchmark dataset. This dataset contains over 1000 everyday dialogues and over 10,000 labeled sentiment-cause pairs. Furthermore, the experiments focused on the RECCON-DD subset—derived from the widely used, fully manually annotated DailyDialog dataset in the field of sentiment computing. The raw data was preprocessed to ensure that the model, when predicting the causes of sentiment utterances, only considers the dialogue history preceding the target sentiment utterance. Key statistical information of the dataset is shown in Table 2.

[0092] surface RECCON-DD Dataset Statistics

[0093]

[0094] Table 3 compares the proposed method with state-of-the-art methods of recent years. The results of these benchmark methods were obtained through re-experimentation based on open-source code. Overall, the proposed method achieves the highest scores in both Pos. F1 (70.25) and Macro F1 (80.79), surpassing all existing benchmark models in the ECPE, CEE, and ICL paradigms.

[0095] surface Performance comparison of models on the RECCON-DD dataset

[0096]

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

Claims

1. A method for aligning dialogue emotional causes based on sensory cue reasoning, characterized in that, Includes the following steps: S1. Obtain dialogue data containing multiple turns of speech, preprocess the data, and establish a dialogue sentiment-cause alignment dataset, which is divided into a training set and a validation set; the dialogue data also includes multiple pairs of labeled sentiment-cause pairs; S2. Construct a dialogue emotion cause alignment model with sensory reasoning as the core. The model includes a sensory perception adapter, a sensory-guided knowledge enhancement module, a turn perception map, and an intermediate information compensation module. S3. Based on the established dialogue sentiment cause alignment dataset, a multi-loss joint optimization strategy is used to train the constructed model to obtain a well-trained dialogue sentiment cause alignment model. S4. Using the trained dialogue sentiment-cause alignment model, input the dialogue data to be aligned with sentiment causes, and generate sentiment-cause pairs for the dialogue.

2. The dialogue emotion cause alignment method based on sensory cue reasoning according to claim 1, characterized in that, Step S1 involves preprocessing the data, specifically as follows: S11. Perform word segmentation, semantic encoding, and speaker role labeling on each utterance, and convert speaker information into binary one-hot vector form; S12. Calculate the relative round distance between each utterance and the target utterance, and construct the inter-round interaction mask and the intra-sentence mask; S13. Construct a token-based two-dimensional attention mask to mask tokens located after the target utterance, so that the model cannot access future utterances during self-attention computation.

3. The dialogue emotion cause alignment method based on sensory cue reasoning according to claim 2, characterized in that, The specific construction process of the dialogue sentiment cause alignment model described in step S2 is as follows: S21. Based on the established dialogue sentiment reason alignment dataset, sentence-level feature representations are obtained through role addition and semantic encoding of sentiment information; S22. Based on the established dialogue sentiment cause alignment dataset, extract the sensory vectors of words in the discourse, map them to the same vector space as the sentence-level feature representation, and fuse them with the sentence-level feature representation through a multi-head attention mechanism to generate sensory enhancement representation; S23. Based on the sensory enhancement representation, knowledge items related to the utterance are selected from the common sense knowledge base, and the knowledge items are weighted and fused according to the sensory similarity and relative position information between the sensory enhancement representation and the candidate knowledge items to form a sensory knowledge enhancement representation. S24. Construct a round-perception graph structure using utterances in the dialogue as nodes and round distance as the relationship type, and perform sensory aggregation on adjacent nodes in the graph structure to obtain round-perception representation; S25. Perform temporal encoding on the dialogue sensory cues between candidate causal discourse and target emotional discourse to generate intermediate information compensation representation; S26. Based on sensory enhancement representation, sensory knowledge enhancement representation, round sensory representation and intermediate information compensation representation, jointly determine whether the candidate discourse is the triggering cause of the target emotional discourse and output the candidate causal probability.

4. The dialogue emotion cause alignment method based on sensory cue reasoning according to claim 3, characterized in that, The sensory vectors mentioned in step S22 include information from six dimensions: vision, hearing, touch, smell, taste, and interoception. They are obtained by looking up a sensory rating dictionary. The sensory vector mapping includes at least two layers of linear transformation and nonlinear activation functions, and a multi-head attention mechanism is used to fuse the mapped sensory representation with the sentence-level feature representation.

5. The dialogue emotion cause alignment method based on sensory cue reasoning according to claim 4, characterized in that, The common sense knowledge base mentioned in step S23 is ATOMIC, from which four types of social interaction relationships, including influence, intention, reaction and need, and one type of event relationship are selected.

6. The dialogue emotion cause alignment method based on sensory cue reasoning according to claim 5, characterized in that, The candidate knowledge items mentioned in step S23 are knowledge obtained by reasoning from the common sense reasoning model; the selection of the knowledge items is based on the product of sensory similarity score and relative position decay weight, wherein the relative position decay weight is calculated by rotation position encoding.

7. The dialogue emotion cause alignment method based on sensory cue reasoning according to claim 6, characterized in that, The round-perception graph structure mentioned in step S24 is a directed heterogeneous relation graph. The relation types are divided according to the interval of round distance, and different relation types correspond to different graph aggregation weights. The sensory aggregation adopts a relation graph convolutional network.

8. The dialogue emotion cause alignment method based on sensory cue reasoning according to claim 7, characterized in that, The joint discrimination described in step S26 is based on a multilayer perceptron-based discrimination network, and its output is the candidate causal probability.

9. The dialogue emotion cause alignment method based on sensory cue reasoning according to claim 8, characterized in that, Step S3 involves joint optimization of multiple losses, including at least one causal alignment loss and at least one sentiment classification loss. The GradNorm method is used to dynamically weight and balance the loss terms. The causal alignment loss uses binary cross-entropy loss to supervise the cause prediction task, and the sentiment classification loss uses cross-entropy loss for sentiment classification.

10. The dialogue emotion cause alignment method based on sensory cue reasoning according to claim 9, characterized in that, The discrimination in the trained model also includes binarizing the probability based on a threshold determined by the validation set to output the final judgment result.