CN118153684A - Knowledge-driven large model emotion tracing and propagation path analysis method - Google Patents

Knowledge-driven large model emotion tracing and propagation path analysis method Download PDF

Info

Publication number
CN118153684A
CN118153684A CN202410565104.0A CN202410565104A CN118153684A CN 118153684 A CN118153684 A CN 118153684A CN 202410565104 A CN202410565104 A CN 202410565104A CN 118153684 A CN118153684 A CN 118153684A
Authority
CN
China
Prior art keywords
event
path
user
emotion
model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410565104.0A
Other languages
Chinese (zh)
Other versions
CN118153684B (en
Inventor
宋彦
田元贺
张勇东
程芃森
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Science and Technology of China USTC
Original Assignee
University of Science and Technology of China USTC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by University of Science and Technology of China USTC filed Critical University of Science and Technology of China USTC
Priority to CN202410565104.0A priority Critical patent/CN118153684B/en
Publication of CN118153684A publication Critical patent/CN118153684A/en
Application granted granted Critical
Publication of CN118153684B publication Critical patent/CN118153684B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/02Knowledge representation; Symbolic representation
    • G06N5/022Knowledge engineering; Knowledge acquisition
    • G06N5/025Extracting rules from data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N7/00Computing arrangements based on specific mathematical models
    • G06N7/01Probabilistic graphical models, e.g. probabilistic networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Evolutionary Computation (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Algebra (AREA)
  • Mathematical Analysis (AREA)
  • Computational Mathematics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Computational Linguistics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a knowledge-driven large model emotion tracing and propagation path analysis method, which relates to the technical field of artificial intelligence and is used for conveying events and user emotions into a tracing path model so as to output causal relations between the events and the user emotions and shortest paths for user emotion propagation; the training process of the tracing path model is as follows: constructing a training set, wherein the training set comprises events and user moods; transmitting the event and the user emotion to a causality model, and generating whether causality exists between the event and the user emotion and the strength of the causality; transmitting the causal relationship and the strength of the causal relationship to a propagation path model to predict the shortest path of user emotion propagation, and adjusting model parameters in a tracing path model based on the generated shortest path of user emotion propagation; the emotion tracing and propagation path analysis method improves the accuracy of causal prediction of the event and the user emotion and effectively realizes tracing of the user emotion.

Description

基于知识驱动的大模型情绪溯源及传播路径分析方法A knowledge-driven large-scale model-based emotion tracing and propagation path analysis method

技术领域Technical Field

本发明涉及电数学数据处理技术领域,尤其涉及基于知识驱动的大模型情绪溯源及传播路径分析方法。The present invention relates to the field of electronic mathematical data processing technology, and in particular to a knowledge-driven large-model emotion tracing and propagation path analysis method.

背景技术Background technique

在个体用户情绪与事件之间的因果关系预测方面,由于事件的独特性,现有方法难以有效刻画及表示新事件的特征,从而难以判断用户特定情绪与新事件之间的因果关系。In terms of predicting the causal relationship between individual user emotions and events, due to the uniqueness of events, existing methods find it difficult to effectively characterize and represent the characteristics of new events, making it difficult to determine the causal relationship between user-specific emotions and new events.

情绪传播路径方面,现有方法一般构建情绪与事件之间的图结构实现情绪传播路径分析,在这个过程中忽略图结构中情绪与事件之间关系的强弱,造成传播路径分析不准确的问题。In terms of emotion propagation paths, existing methods generally construct a graph structure between emotions and events to realize emotion propagation path analysis. In this process, the strength of the relationship between emotions and events in the graph structure is ignored, resulting in inaccurate propagation path analysis.

发明内容Summary of the invention

基于背景技术存在的技术问题,本发明提出了基于知识驱动的大模型情绪溯源及传播路径分析方法,有效实现因果关系的预测以及对情绪的溯源。Based on the technical problems existing in the background technology, the present invention proposes a knowledge-driven large-model emotion tracing and propagation path analysis method to effectively realize the prediction of causal relationships and the tracing of emotions.

本发明提出的基于知识驱动的大模型情绪溯源及传播路径分析方法,将事件和用户情绪输送到溯源路径模型中,以输出事件与用户情绪之间的因果关系以及用户情绪传播的最短路径;The knowledge-driven large-model emotion tracing and propagation path analysis method proposed in the present invention transmits events and user emotions to the tracing path model to output the causal relationship between events and user emotions and the shortest path for user emotion propagation;

所述溯源路径模型包括因果关系模型和传播路径模型,溯源路径模型的训练过程如下:The traceability path model includes a causal relationship model and a propagation path model. The training process of the traceability path model is as follows:

S1:构建训练集,训练集中包括事件和用户情绪/>S1: Construct a training set, which includes events and user sentiment/> ;

S2:将事件和用户情绪/>输送到因果关系模型中,生成事件与用户情绪之间是否存在因果关系以及因果关系的强弱;S2: Event and user sentiment/> The data is sent to the causal relationship model to determine whether there is a causal relationship between the generated event and the user's emotion, and the strength of the causal relationship.

S21:对事件进行特征编码,得到事件表征/>,基于历史事件表征构建事件知识库/>,使用语义增强模型中的键映射和值映射将事件知识库/>中的第/>个历史事件的表征/>映射为键向量/>和值向量/>S21: Events Perform feature encoding to obtain event representation/> , build event knowledge base based on historical event representation/> , use the key mapping and value mapping in the semantic enhancement model to transform the event knowledge base/> In the /> A representation of a historical event/> Mapped to key vector /> Sum value vector/> ;

S22:计算事件表征和键向量/>之间的权重/>,并将权重/>应用于值向量/>,加权平均后得到相似特征/>,将相似特征/>与事件表征/>串联,得到增强事件表征/>S22: Computational event representation and key vector/> The weight between , and the weights/> Applied to value vector/> , weighted average to get similar features/> , similar features/> and event representation/> Connect in series to get enhanced event representation/> ;

S23:将增强事件表征与用户情绪/>输入到大模型,生成事件与用户情绪之间是否存在因果关系/>以及因果关系的强弱/>S23: Enhanced event representation and user emotions/> Input into the big model to determine whether there is a causal relationship between the generated event and the user's emotion/> and the strength of the causal relationship/> ;

S3:将因果关系以及因果关系的强弱输送到传播路径模型中,以预测用户情绪传播的最短路径,基于所生成的用户情绪传播的最短路径调整溯源路径模型中的模型参数;S3: transmitting the causal relationship and the strength of the causal relationship to the propagation path model to predict the shortest path of user emotion propagation, and adjusting the model parameters in the traceability path model based on the generated shortest path of user emotion propagation;

S31:构建有向图,有向图/>的节点包括事件和用户情绪,相邻时刻的事件之间通过事件有向边连接,相邻时刻的用户情绪之间通过情绪有向边连接,在同一时刻的事件与用户情绪若存在因果关系/>,则在该时刻的事件与用户情绪之间通过事续有向边连接;S31: Constructing a directed graph , directed graph/> The nodes include events and user emotions. Events at adjacent moments are connected by event directed edges, and user emotions at adjacent moments are connected by emotion directed edges. If there is a causal relationship between events and user emotions at the same moment, , then the event at that moment is connected to the user's emotion through an event-continuing directed edge;

S32:在事件有向边和情绪有向边上均设置权重作为静态权重,在事续有向边上设置因果关系的强弱/>作为动态权重,权重/>为大于0的预设值;S32: Set weights on both event directed edges and sentiment directed edges As a static weight, set the strength of the causal relationship on the event-sequential directed edge/> As a dynamic weight, weight /> is a preset value greater than 0;

S33:基于有向图,以及T时刻的情绪/>,针对每一个事件/>,找到所有事件与用户情绪相连的事续路径,并计算所述事续路径的权重;S33: Based on directed graph , and the emotion at time T/> , for each event/> , find the event-continuation paths connecting all events with user emotions, and calculate the weights of the event-continuation paths;

S34:采用最短路径算法,通过在计算中取该事续路径权重的相反数,计算得到情绪传播路径最短的源头事件/>,同时得到最短的源头事件/>对应的最短路径Z。S34: Using the shortest path algorithm, the emotion is calculated by taking the opposite number of the weight of the event path in the calculation. Source event with the shortest propagation path/> , and get the shortest source event/> The corresponding shortest path Z.

进一步地,相似特征的计算公式如下:Furthermore, similar features The calculation formula is as follows:

其中,表示事件知识库/>中历史事件的表征总数量。in, Representing event knowledge base/> The total number of representations of historical events in .

进一步地,在步骤S33:找到所有事件与用户情绪相连的事续路径,并计算所述事续路径的权重中,对于第个事续路径和事续路径的权重对应如下:Further, in step S33: finding all the event-continuation paths connecting the events and the user's emotions, and calculating the weights of the event-continuation paths, for the The correspondence between individual event paths and event path weights is as follows:

其中,表示事件/>的第/>个事续路径,/>是有向图/>中的节点,表示向图/>的节点总数,/>表示事续路径/>的权重,表示事件/>的第/>个事续路径中第/>个事续有向边,/>,即从/>到/>的事续有向边,其权重为/>,权重/>数值为事件/>与用户情绪/>通过步骤S2计算得到的因果关系的强弱/>,/>表示事件/>的第/>个事续路径中对应的事件,/>表示事件/>的第/>个事续路径中对应的用户情绪,/>是事续路径/>长度的权重惩罚权重,/>in, Indicates an event/> The first/> A continuous path, /> It is a directed graph/> The nodes in Represents a directed graph/> The total number of nodes, /> Indicates the continuation path/> the weight of, Indicates an event/> The first/> The first/> Each event has a directed edge, /> , that is, from/> To/> There is a directed edge with a weight of /> , weight/> The value is the event /> and user sentiment/> The strength of the causal relationship calculated in step S2/> ,/> Indicates an event/> The first/> The corresponding event in the event path, /> Indicates an event/> The first/> The corresponding user emotions in each event path, /> It is a sequential path/> Length weight penalty weight, /> .

进一步地,因果关系的强弱为一个0至1之间的实数。Furthermore, the strength of the causal relationship is a real number between 0 and 1.

本发明提供的基于知识驱动的大模型情绪溯源及传播路径分析方法的优点在于:本发明结构中提供的基于知识驱动的大模型情绪溯源及传播路径分析方法,通过引入历史事件知识,借助历史事件的历史事件表征,增强了当前事件的表征,使当前事件包含的特征更加丰富,帮助因果关系模型对新事件特征的抽取,进而提升了事件和用户情绪的因果预测的准确性。另外,通过构建图结构,并基于因果关系对图之间的边的权重建模,使传播路径模型可以有区别地评估不同事件对情绪的影响,从而更有效地实现对用户情绪的溯源。The advantages of the knowledge-driven large-model emotion tracing and propagation path analysis method provided by the present invention are: the knowledge-driven large-model emotion tracing and propagation path analysis method provided in the structure of the present invention, by introducing historical event knowledge and using the historical event representation of historical events, enhances the representation of current events, enriches the features contained in current events, helps the causal relationship model to extract new event features, and thus improves the accuracy of causal prediction of events and user emotions. In addition, by constructing a graph structure and modeling the weights of the edges between graphs based on causal relationships, the propagation path model can evaluate the impact of different events on emotions differently, thereby more effectively tracing the user's emotions.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1为本发明的结构示意图;Fig. 1 is a schematic diagram of the structure of the present invention;

图2为溯源路径模型的训练流程图。Figure 2 is a training flowchart of the traceability path model.

具体实施方式Detailed ways

下面,通过具体实施例对本发明的技术方案进行详细说明,在下面的描述中阐述了很多具体细节以便于充分理解本发明。但是本发明能够以很多不同于在此描述的其他方式来实施,本领域技术人员可以在不违背本发明内涵的情况下做类似改进,因此本发明不受下面公开的具体实施的限制。Below, the technical solution of the present invention is described in detail through specific embodiments. Many specific details are set forth in the following description to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific implementation disclosed below.

本实施例是对现有大模型进行改进,大模型是指具有大规模参数和复杂计算结构的机器学习模型。这些大模型通常由深度神经网络构建而成,拥有数十亿甚至数千亿个参数。大模型的设计目的是为了提高模型的表达能力和预测性能,能够处理更加复杂的任务和数据。大模型在各种领域都有广泛的应用,包括自然语言处理、计算机视觉、语音识别和推荐系统等。大模型通过训练海量数据来学习复杂的模式和特征,具有更强大的泛化能力,可以对未见过的数据做出准确的预测。This embodiment improves the existing large model, which refers to a machine learning model with large-scale parameters and complex computing structure. These large models are usually built from deep neural networks and have billions or even hundreds of billions of parameters. The purpose of designing large models is to improve the expressiveness and predictive performance of the model and to be able to handle more complex tasks and data. Large models are widely used in various fields, including natural language processing, computer vision, speech recognition, and recommendation systems. Large models learn complex patterns and features by training massive data, have more powerful generalization capabilities, and can make accurate predictions on unseen data.

ChatGPT对大模型的解释更为通俗易懂,也更体现出类似人类的归纳和思考能力:大模型本质上是一个使用海量数据训练而成的深度神经网络模型,其巨大的数据和参数规模,实现了智能的涌现,展现出类似人类的智能。ChatGPT's explanation of the big model is more understandable and more similar to that of humans in induction and thinking: the big model is essentially a deep neural network model trained using massive amounts of data. Its huge data and parameter scale enable the emergence of intelligence and demonstrate human-like intelligence.

如图1和2所示,本发明提出的基于知识驱动的大模型情绪溯源及传播路径分析方法,将事件和用户情绪输送到溯源路径模型中,以输出事件与用户情绪之间的因果关系以及用户情绪传播的最短路径。本实施例主要应用于社交媒体场景下,个体用户情绪原因的识别,以及情绪传播路径的分析。As shown in Figures 1 and 2, the knowledge-driven large-model emotion tracing and propagation path analysis method proposed in the present invention transmits events and user emotions to the tracing path model to output the causal relationship between events and user emotions and the shortest path for user emotion propagation. This embodiment is mainly used in social media scenarios to identify the causes of individual user emotions and analyze the emotion propagation path.

溯源路径模型包括因果关系模型和传播路径模型,因果关系模型主要是用于对事件和用户情绪的因果预测,传播路径模型主要是用于对用户情绪路径传播路径的预测。The traceability path model includes the causal relationship model and the propagation path model. The causal relationship model is mainly used for causal prediction of events and user emotions, and the propagation path model is mainly used to predict the propagation path of user emotion paths.

在因果关系模型中,在时刻,给定事件/>,用户情绪/>,以及事件知识库/>,预测事件/>与用户情绪/>之间是否存在因果关系/>,以及因果关系的强弱/>In the causal model, Moment, given event /> , user sentiment/> , and event knowledge base/> , predict events/> and user emotions/> Is there a causal relationship between , and the strength of the causal relationship/> .

在传播路径模型中,给定T时刻的用户情绪,以及所有时刻1至时刻T的因果关系的强弱/>,分析用户情绪/>传播的路径,得到最短路径/>以及情绪/>传播路径最短的源头事件/>,实现情绪溯源及路径分析。In the propagation path model, given the user sentiment at time T , and the strength of the causal relationship from time 1 to time T/> , analyze user emotions/> The propagation path, get the shortest path/> and emotions/> Source event with the shortest propagation path/> , realizing emotion tracing and path analysis.

溯源路径模型的训练过程如下:The training process of the traceability path model is as follows:

S1:构建训练集,训练集中包括事件和用户情绪/>S1: Construct a training set, which includes events and user sentiment/> ;

S2:将事件和用户情绪/>输送到因果关系模型中,生成事件与用户情绪之间是否存在因果关系以及因果关系的强弱,具体为步骤S21至S23;S2: Event and user sentiment/> The data is transmitted to the causal relationship model to determine whether there is a causal relationship between the generated event and the user's emotion and the strength of the causal relationship, specifically steps S21 to S23;

S21:对事件进行特征编码,得到事件表征/>,基于历史事件表征构建事件知识库/>,使用语义增强模型中的键映射和值映射将事件知识库/>中的第/>个历史事件的表征/>映射为键向量/>和值向量/>S21: Events Perform feature encoding to obtain event representation/> , build event knowledge base based on historical event representation/> , use the key mapping and value mapping in the semantic enhancement model to transform the event knowledge base/> In the /> A representation of a historical event/> Mapped to key vector /> Sum value vector/> ;

使用事件编码器(例如BERT),对事件进行特征编码,得到事件表征/>;事件知识库/>是一个包含了/>个历史事件表征的集合,即/>,/>是第/>个历史事件的表征;因果关系的强弱/>是一个0至1之间的实数。Use an event encoder (such as BERT) to encode events Perform feature encoding to obtain event representation/> ; Event Knowledge Base/> It is a package containing /> A collection of historical event representations, namely/> ,/> It is the first/> The representation of a historical event; the strength of the causal relationship/> is a real number between 0 and 1.

键向量和值向量/>计算如下:Key Vector Sum value vector/> The calculation is as follows:

其中,表示键映射,/>表示值映射。in, Indicates a key mapping, /> Represents a value map.

S22:计算事件表征和键向量/>之间的权重/>,并将权重/>应用于值向量/>,加权平均后得到相似特征/>,将相似特征/>与事件表征/>串联,得到增强事件表征/>S22: Computational event representation and key vector/> The weight between , and the weights/> Applied to value vector/> , weighted average to get similar features/> , similar features/> and event representation/> Connect in series to get enhanced event representation/> ;

权重、相似特征/>和增强事件表征/>的计算如下:Weights , similar features/> and enhanced event representation/> The calculation of is as follows:

其中,表示事件知识库/>中历史事件表征的集合,/>表示串联,/>表示事件知识库/>中的历史事件的序号。in, Representing event knowledge base/> A collection of historical event representations in ,/> Indicates series connection, /> Representing event knowledge base/> The serial number of the historical event in.

S23:将增强事件表征与用户情绪/>输入到大模型,使用标准的大模型文本生成方法,生成事件与用户情绪之间是否存在因果关系/>以及因果关系的强弱/>S23: Enhanced event representation and user emotions/> Input into the big model, use the standard big model text generation method to generate whether there is a causal relationship between the event and the user's emotion/> and the strength of the causal relationship/> ;

通过步骤S21至S23,利用历史相似事件作为事件知识库,用事件知识库/>中的这些知识增强当前事件的表示,实现了事件和用户情绪的因果关系的预测。Through steps S21 to S23, historical similar events are used as event knowledge base , using event knowledge base/> This knowledge enhances the representation of current events and enables the prediction of the causal relationship between events and user emotions.

S3:将因果关系以及因果关系的强弱输送到传播路径模型中,以预测用户情绪传播的最短路径,基于所生成的用户情绪传播的最短路径调整溯源路径模型中的模型参数,包括步骤S31至S34;S3: transmitting the causal relationship and the strength of the causal relationship to the propagation path model to predict the shortest path of user emotion propagation, and adjusting the model parameters in the tracing path model based on the generated shortest path of user emotion propagation, including steps S31 to S34;

S31:构建有向图,有向图/>的节点包括事件和用户情绪,相邻时刻的事件之间通过事件有向边连接,相邻时刻的用户情绪之间通过情绪有向边连接,在同一时刻的事件与用户情绪若存在因果关系/>,则在该时刻的事件与用户情绪之间通过事续有向边连接;S31: Constructing a directed graph , directed graph/> The nodes include events and user emotions. Events at adjacent moments are connected by event directed edges, and user emotions at adjacent moments are connected by emotion directed edges. If there is a causal relationship between events and user emotions at the same moment, , then the event at that moment is connected to the user's emotion through a directed edge;

例如,对于相邻的时刻,/>时刻的事件与/>时刻的事件之间通过事件有向边连接;/>时刻的用户情绪与/>时刻的用户情绪之间通过情绪有向边连接。For example, for adjacent Moment, /> Events and time Events at a certain moment are connected by directed event edges; /> User emotions at the moment and/> The user emotions at different moments are connected by directed emotion edges.

通过步骤S2得到时刻的事件与用户情绪之间是否存在因果关系/>,若/>时刻的事件与用户情绪之间存在因果关系,则在/>时刻的事件与用户情绪之间通过事续有向边连接,如果/>时刻的事件与用户情绪之间不存在因果关系,则在/>时刻的事件与用户情绪之间不通过事续有向边连接。Through step S2, Is there a causal relationship between the event at that moment and the user's emotions/> , if/> There is a causal relationship between the event at that moment and the user's emotion, then in/> The event at the moment is connected to the user's emotion through a sequential directed edge. If/> There is no causal relationship between the event at that moment and the user's emotion, then in/> The event at a moment is not connected to the user's emotion through a sequential directed edge.

S32:在事件有向边和情绪有向边上均设置权重作为静态权重,在事续有向边上设置因果关系的强弱/>作为动态权重,权重/>为大于0的预设值;S32: Set weights on both event directed edges and sentiment directed edges As a static weight, set the strength of the causal relationship on the event-sequential directed edge/> As a dynamic weight, weight /> is a preset value greater than 0;

S33:基于有向图,以及T时刻的情绪/>,针对每一个事件/>,找到所有事件与用户情绪相连的事续路径,并计算所述事续路径的权重;S33: Based on directed graph , and the emotion at time T/> , for each event/> , find the event-continuation paths connecting all events with user emotions, and calculate the weights of the event-continuation paths;

对于第个事续路径和事续路径的权重对应如下:For The correspondence between individual event paths and event path weights is as follows:

其中,表示事件/>的第/>个事续路径,/>是有向图/>中的节点,表示向图/>的节点总数,/>表示事续路径/>的权重,表示事件/>的第/>个事续路径中第/>个事续有向边,/>,即从/>到/>的事续有向边,其权重为/>,权重/>数值为事件/>与用户情绪/>通过步骤S2计算得到的因果关系的强弱/>,/>表示事件/>的第/>个事续路径中对应的事件,/>表示事件/>的第/>个事续路径中对应的用户情绪,/>是事续路径/>长度的权重惩罚权重,/>in, Indicates an event/> The first/> A continuous path, /> It is a directed graph/> The nodes in Represents a directed graph/> The total number of nodes, /> Indicates the continuation path/> the weight of, Indicates an event/> The first/> The first/> Each event has a directed edge, /> , that is, from/> To/> There is a directed edge with a weight of /> , weight/> The value is the event /> and user emotions/> The strength of the causal relationship calculated in step S2/> ,/> Indicates an event/> The first/> The corresponding event in the event path, /> Indicates an event/> The first/> The corresponding user emotions in each event path, /> It is a sequential path/> Length weight penalty weight, /> .

S34:采用最短路径算法,通过在计算中取该事续路径权重的相反数,把问题转换为求解权重最小的路径问题,计算得到情绪传播路径最短的源头事件/>,同时得到最短的源头事件/>对应的最短路径Z。S34: Using the shortest path algorithm, by taking the opposite number of the weight of the successive path in the calculation, the problem is converted into a problem of solving the path with the minimum weight, and the emotion is calculated. Source event with the shortest propagation path/> , and get the shortest source event/> The corresponding shortest path Z.

其中,表示最小函数,/>表示事续路径/>的权重,/>表示事件/>的第/>个事续路径。in, represents the minimum function, /> Indicates the continuation path/> The weight of Indicates an event/> The first/> A continuation path.

根据步骤S1至S3,通过引入历史事件知识,借助历史事件的历史事件表征,增强了当前事件的表征,使当前事件包含的特征更加丰富,帮助因果关系模型对新事件特征的抽取,进而提升了事件和用户情绪的因果预测的准确性。另外,通过构建图结构,并基于因果关系对图之间的边的权重建模,使传播路径模型可以有区别地评估不同事件对情绪的影响,从而更有效地实现对情绪的溯源。According to steps S1 to S3, by introducing historical event knowledge and using historical event representations of historical events, the representation of the current event is enhanced, making the features contained in the current event richer, helping the causal relationship model to extract new event features, thereby improving the accuracy of causal prediction of events and user emotions. In addition, by constructing a graph structure and modeling the weights of the edges between graphs based on causal relationships, the propagation path model can evaluate the impact of different events on emotions differently, thereby more effectively tracing the source of emotions.

以上所述,仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,根据本发明的技术方案及其发明构思加以等同替换或改变,都应涵盖在本发明的保护范围之内。The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims (4)

1.基于知识驱动的大模型情绪溯源及传播路径分析方法,其特征在于,将事件和用户情绪输送到溯源路径模型中,以输出事件与用户情绪之间的因果关系以及用户情绪传播的最短路径;1. A large-model emotion tracing and propagation path analysis method based on knowledge-driven, characterized in that events and user emotions are fed into the tracing path model to output the causal relationship between events and user emotions and the shortest path for user emotion propagation; 所述溯源路径模型包括因果关系模型和传播路径模型,溯源路径模型的训练过程如下:The traceability path model includes a causal relationship model and a propagation path model. The training process of the traceability path model is as follows: S1:构建训练集,训练集中包括事件和用户情绪/>S1: Construct a training set, which includes events and user sentiment/> ; S2:将事件和用户情绪/>输送到因果关系模型中,生成事件与用户情绪之间是否存在因果关系/>以及因果关系的强弱/>S2: Event and user sentiment/> Send it to the causal relationship model to determine whether there is a causal relationship between the generated event and the user's emotion/> and the strength of the causal relationship/> ; S21:对事件进行特征编码,得到事件表征/>,基于历史事件表征构建事件知识库/>,使用语义增强模型中的键映射和值映射将事件知识库/>中的第/>个历史事件的表征/>映射为键向量/>和值向量/>S21: Events Perform feature encoding to obtain event representation/> , build event knowledge base based on historical event representation/> , use the key mapping and value mapping in the semantic enhancement model to transform the event knowledge base/> In the /> A representation of a historical event/> Mapped to key vector /> Sum value vector/> ; S22:计算事件表征和键向量/>之间的权重/>,并将权重/>应用于值向量/>,加权平均后得到相似特征/>,将相似特征/>与事件表征/>串联,得到增强事件表征/>S22: Computational event representation and key vector/> The weight between , and the weights/> Applied to value vector/> , weighted average to get similar features/> , similar features/> and event representation/> Connect in series to get enhanced event representation/> ; S23:将增强事件表征与用户情绪/>输入到大模型,生成事件与用户情绪之间是否存在因果关系/>以及因果关系的强弱/>S23: Enhanced event representation and user emotions/> Input into the big model to determine whether there is a causal relationship between the generated event and the user's emotion/> and the strength of the causal relationship/> ; S3:将因果关系以及因果关系的强弱输送到传播路径模型中,以预测用户情绪传播的最短路径,基于所生成的用户情绪传播的最短路径调整溯源路径模型中的模型参数;S3: transmitting the causal relationship and the strength of the causal relationship to the propagation path model to predict the shortest path of user emotion propagation, and adjusting the model parameters in the traceability path model based on the generated shortest path of user emotion propagation; S31:构建有向图,有向图/>的节点包括事件和用户情绪,相邻时刻的事件之间通过事件有向边连接,相邻时刻的用户情绪之间通过情绪有向边连接,在同一时刻的事件与用户情绪若存在因果关系/>,则在该时刻的事件与用户情绪之间通过事续有向边连接;S31: Constructing a directed graph , directed graph/> The nodes include events and user emotions. Events at adjacent moments are connected by event directed edges, and user emotions at adjacent moments are connected by emotion directed edges. If there is a causal relationship between events and user emotions at the same moment, , then the event at that moment is connected to the user's emotion through a directed edge; S32:在事件有向边和情绪有向边上均设置权重作为静态权重,在事续有向边上设置因果关系的强弱/>作为动态权重,权重/>为大于0的预设值;S32: Set weights on both event directed edges and sentiment directed edges As a static weight, set the strength of the causal relationship on the event-sequential directed edge/> As a dynamic weight, weight /> is a preset value greater than 0; S33:基于有向图,以及T时刻的情绪/>,针对每一个事件/>,找到所有事件与用户情绪相连的事续路径,并计算所述事续路径的权重;S33: Based on directed graph , and the emotion at time T/> , for each event/> , find the event-continuation paths connecting all events with user emotions, and calculate the weights of the event-continuation paths; S34:采用最短路径算法,通过在计算中取该事续路径权重的相反数,计算得到情绪传播路径最短的源头事件/>,同时得到最短的源头事件/>对应的最短路径Z。S34: Using the shortest path algorithm, the emotion is calculated by taking the opposite number of the weight of the event path in the calculation. Source event with the shortest propagation path/> , and get the shortest source event/> The corresponding shortest path Z. 2.根据权利要求1所述的基于知识驱动的大模型情绪溯源及传播路径分析方法,其特征在于,相似特征的计算公式如下:2. The knowledge-driven large-model emotion tracing and propagation path analysis method according to claim 1 is characterized in that similar features The calculation formula is as follows: 其中,表示事件知识库/>中历史事件的表征总数量。in, Representing event knowledge base/> The total number of representations of historical events in . 3.根据权利要求1所述的基于知识驱动的大模型情绪溯源及传播路径分析方法,其特征在于,在步骤S33:找到所有事件与用户情绪相连的事续路径,并计算所述事续路径的权重中,对于第个事续路径和事续路径的权重对应如下:3. The method for tracing the source of emotion and propagation path of a large model based on knowledge-driven analysis according to claim 1 is characterized in that, in step S33: finding the event-continuation paths connecting all events with user emotions and calculating the weights of the event-continuation paths, for the first The correspondence between individual event paths and event path weights is as follows: 其中,表示事件/>的第/>个事续路径,/>是有向图/>中的节点,/>表示向图/>的节点总数,/>表示事续路径/>的权重,表示事件/>的第/>个事续路径中第/>个事续有向边,/>,即从/>到/>的事续有向边,其权重为/>,权重/>数值为事件/>与用户情绪/>通过步骤S2计算得到的因果关系的强弱/>,/>表示事件/>的第/>个事续路径中对应的事件,/>表示事件/>的第/>个事续路径中对应的用户情绪,/>是事续路径/>长度的权重惩罚权重,/>in, Indicates an event/> The first/> A continuous path, /> It is a directed graph/> Nodes in,/> Represents a directed graph/> The total number of nodes, /> Indicates the continuation path/> the weight of, Indicates an event/> The first/> The first/> Each event has a directed edge, /> , that is, from/> To/> There is a directed edge with a weight of /> , weight/> The value is the event /> and user emotions/> The strength of the causal relationship calculated in step S2/> ,/> Indicates an event/> The first/> The corresponding event in the event path, /> Indicates an event/> The first/> The corresponding user emotions in each event path, /> It is a sequential path/> Length weight penalty weight, /> . 4.根据权利要求3所述的基于知识驱动的大模型情绪溯源及传播路径分析方法,其特征在于,因果关系的强弱为一个0至1之间的实数。4. The knowledge-driven large-model emotion tracing and propagation path analysis method according to claim 3 is characterized in that the strength of the causal relationship is a real number between 0 and 1.
CN202410565104.0A 2024-05-09 2024-05-09 A knowledge-driven large-scale model-based emotion tracing and propagation path analysis method Active CN118153684B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410565104.0A CN118153684B (en) 2024-05-09 2024-05-09 A knowledge-driven large-scale model-based emotion tracing and propagation path analysis method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410565104.0A CN118153684B (en) 2024-05-09 2024-05-09 A knowledge-driven large-scale model-based emotion tracing and propagation path analysis method

Publications (2)

Publication Number Publication Date
CN118153684A true CN118153684A (en) 2024-06-07
CN118153684B CN118153684B (en) 2024-07-30

Family

ID=91295229

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410565104.0A Active CN118153684B (en) 2024-05-09 2024-05-09 A knowledge-driven large-scale model-based emotion tracing and propagation path analysis method

Country Status (1)

Country Link
CN (1) CN118153684B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104781837A (en) * 2012-08-15 2015-07-15 汤姆森路透社全球资源公司 System and method for forming predictions using event-based sentiment analysis
KR102029760B1 (en) * 2018-10-17 2019-10-08 전남대학교산학협력단 System for detecting event using user emotion analysis and method thereof
US20200160189A1 (en) * 2018-11-20 2020-05-21 International Business Machines Corporation System and Method of Discovering Causal Associations Between Events
KR20210135378A (en) * 2020-05-04 2021-11-15 한국과학기술원 Method for understanding emotion dynamics in daily life and system therefore
CN114492391A (en) * 2021-12-28 2022-05-13 航天信息股份有限公司 Intention reasoning method and device
CN114722838A (en) * 2022-04-11 2022-07-08 天津大学 Dialogue emotion recognition method based on common sense perception and hierarchical multi-task learning
CN115471036A (en) * 2022-07-04 2022-12-13 中国传媒大学 Group emotion analysis method, storage medium and device for hotspot events
US20230162230A1 (en) * 2021-11-24 2023-05-25 Capital One Services, Llc Systems and methods for targeting content based on implicit sentiment analysis
CN116975290A (en) * 2023-07-21 2023-10-31 腾讯科技(深圳)有限公司 Data processing method, device, electronic equipment and computer readable storage medium
CN117438047A (en) * 2023-10-23 2024-01-23 科大讯飞股份有限公司 Psychological consultation model training and psychological consultation processing method and device and electronic equipment
CN117743586A (en) * 2023-09-07 2024-03-22 四川大学 A mental health auxiliary evaluation method based on emotional event knowledge graph

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104781837A (en) * 2012-08-15 2015-07-15 汤姆森路透社全球资源公司 System and method for forming predictions using event-based sentiment analysis
KR102029760B1 (en) * 2018-10-17 2019-10-08 전남대학교산학협력단 System for detecting event using user emotion analysis and method thereof
US20200160189A1 (en) * 2018-11-20 2020-05-21 International Business Machines Corporation System and Method of Discovering Causal Associations Between Events
KR20210135378A (en) * 2020-05-04 2021-11-15 한국과학기술원 Method for understanding emotion dynamics in daily life and system therefore
US20230162230A1 (en) * 2021-11-24 2023-05-25 Capital One Services, Llc Systems and methods for targeting content based on implicit sentiment analysis
CN114492391A (en) * 2021-12-28 2022-05-13 航天信息股份有限公司 Intention reasoning method and device
CN114722838A (en) * 2022-04-11 2022-07-08 天津大学 Dialogue emotion recognition method based on common sense perception and hierarchical multi-task learning
CN115471036A (en) * 2022-07-04 2022-12-13 中国传媒大学 Group emotion analysis method, storage medium and device for hotspot events
CN116975290A (en) * 2023-07-21 2023-10-31 腾讯科技(深圳)有限公司 Data processing method, device, electronic equipment and computer readable storage medium
CN117743586A (en) * 2023-09-07 2024-03-22 四川大学 A mental health auxiliary evaluation method based on emotional event knowledge graph
CN117438047A (en) * 2023-10-23 2024-01-23 科大讯飞股份有限公司 Psychological consultation model training and psychological consultation processing method and device and electronic equipment

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
GUIMIN HU ET AL.: "UniMEEC: Towards Unified Multimodal Emotion Recognition and Emotion Cause", 《ARXIV:2404.00403V1》, 30 March 2024 (2024-03-30) *
XIAOYU LIU ET AL.: "Large Language Models and Causal Inference in Collaboration: A Comprehensive Survey", 《ARXIV:2403.09606》, 14 March 2024 (2024-03-14) *
YUANHE TIAN ET AL.: "End-to-end Aspect-based Sentiment Analysis with Combinatory Categorial Grammar", 《FINDINGS OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS: ACL 2023》, 31 July 2023 (2023-07-31) *
吕星辰: "基于网络舆情影响的小宗农产品价格预测研究", 《中国博士学位论文全文数据库 经济与管理科学辑》, no. 2024, 15 February 2024 (2024-02-15) *
李源 等: "面向知识图谱和大语言模型的因果关系推断综述", 《计算机科学与探索》, vol. 17, no. 10, 31 October 2023 (2023-10-31) *

Also Published As

Publication number Publication date
CN118153684B (en) 2024-07-30

Similar Documents

Publication Publication Date Title
CN111798991B (en) LSTM-based method for predicting population situation of new coronary pneumonia epidemic situation
JP7438303B2 (en) Deep learning model training methods, natural language processing methods and devices, electronic devices, storage media and computer programs
CN108009285A (en) Forest Ecology man-machine interaction method based on natural language processing
CN113128206B (en) Question generation method based on word importance weighting
CN113726545B (en) Network traffic generation method and device based on knowledge-enhanced generative confrontation network
CN112163715A (en) Training method and device of generative countermeasure network and power load prediction method
CN113821724B (en) Time interval enhancement-based graph neural network recommendation method
CN114780739A (en) Time sequence knowledge graph completion method and system based on time graph convolution network
CN116485501B (en) Graph neural network session recommendation method based on graph embedding and attention mechanism
CN111626060A (en) Product innovation design method and system based on object field analysis and rule reasoning
CN116308219B (en) Generated RPA flow recommendation method and system based on Tranformer
CN117708692A (en) Entity emotion analysis method and system based on dual-channel graph convolutional neural network
CN116011548B (en) Multi-knowledge-graph question-answering model training method, system and storage medium
JP7058202B2 (en) Information processing method and information processing system
CN116882503A (en) Scientific and technological innovation service decision support method based on knowledge reasoning model
Yeung et al. Handling interaction in fuzzy production rule reasoning
CN115049062B (en) Intelligent problem solving method and system for mathematic application problem based on knowledge learning
WO2022126706A1 (en) Method and device for accelerating personalized federated learning
CN118153684B (en) A knowledge-driven large-scale model-based emotion tracing and propagation path analysis method
CN117892711A (en) Method for obtaining text correlation based on large model
CN116629362A (en) An Interpretable Temporal Graph Reasoning Method Based on Path Search
Liu et al. Federated Double Deep Q-Networks for Unbalanced Material Classification in Tactile Internet
Wang et al. A software-hardware co-exploration framework for optimizing communication in neuromorphic processor
Yinan et al. Knowledge-aware path: interpretable graph reasoning in proactive dialogue generation
Xu et al. Research on employment matching based on artificial intelligence and recommendation algorithm

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant