## 3 Methodology
### Dialogue Interaction Module  
The research work of conversation-level emotion recognition should not only consider textual information but also consider the emotional interaction between interlocutors. However, for long-distance multi-speaker conversations with multiple discourses, the use of ordinary RNN and LSTM networks cannot effectively alleviate the gradient disappearance problem, so we need to build a separate module to handle the emotional communication of the conversation. In our work, we construct dialogue graphs for multi-speaker dialogues. The nodes are initialized using the syntax-enhanced and topic-aware sentence representation \(x^{f}\) outputted by the previous module, and nodes are connected in dialogue order. We already obtain the conversation topic category \(c\) of the node from the topic module and segment the dialogue according to \(c\). When the category \(c\) of the \(m-th\) node \(x_{m}\) is different from that of the subsequent node \(x_{m+1}(m\in(1,n-1))\), it means that \(x_{m}\) is irrelevant to what \(x_{m+1}\) is talking about. Based on this, the long-distance conversation \(D\) is divided into several short-distance conversation sub-segments, and then the conversation sub-segments are processed. Each conversation sub-segment \(D^{s}=\{x_{1},x_{2},\cdots,x_{n}\}\) is constructed as a conversation subgraph(CSG) in this module. The specific method is as follows. Each vertex is initialized with the corresponding sequentially encoded feature vector \(x^{f}\). The edges of the CSG are divided into two types: \(e^{0}\) and \(e^{1}\). \(e^{0}\) means that the two vertices of the edge are spoken by the same speaker, and \(e^{1}\) for otherwise. We construct the edges in the following way: nodes are arranged in strict dialogue order, and the previous node can be connected to a future node, but a future node cannot be connected to the previous node in reverse. Detect each node \(i(1\leq i<n)\) and each subsequent node. If the speaker of the post node \(j(i+1\leq j\leq n)\) is different from that of the node \(i\), these two nodes are connected to construct the edge \(e^{1}_{ij}\). Until it is detected that the post node \(k(i+1\leq k\leq n)\) and the node \(i\) have the same speaker, then construct the edge \(e^{0}_{ik}\). Whenever we construct an edge \(e^{0}\) for the current node, we stop subsequent operations and start processing the next node \(i+1\). A sample of CSG is shown in Figure 3.  
It should be noted that since subgraphs are subsets of multi-speaker conversations, they are continuous in dialogue states so that starting from the second subgraph, the first node of each subgraph will have an edge over the previous subgraph. The specific steps are shown in Algorithm 2. Figure 3: The sample of CSG. The utterances of the five speakers are represented by different colors. The red lines denote the edge \(e^{0}\), and black lines represents the edge \(e^{1}\). ```
0: the dialogue \(\left\{x_{1}^{f},x_{2}^{f},\dots,x_{n}^{f}\right\}\), speaker identity \(p(\cdot)\), topic category \(c(\cdot)\)
0: Dialogue graph \(\mathcal{G}\)
1:\(\mathcal{V}=\left\{x_{1}^{f},x_{2}^{f},\dots,x_{n}^{f}\right\}\);
2:\(\mathcal{E}=\mathcal{O},\mathcal{G}=\mathcal{O}\);
3:\(\mathcal{R}=\{0,1\}\);
4:for\(i\in\{1,2,\cdots,n-1\}\)do:
5:\(j=i+1\);
6:while\(j\leq n\)do:
7:if\(c(j)\
eq c(i)\)then:
8: append\((\mathcal{G},(\mathcal{V},\mathcal{E},\mathcal{R}))\)
9: break;
10:else:
11:if\(p(j)\
eq p(i)\)then:
12:\(\mathcal{E}=\mathcal{E}\cup\left\{(i,j,1)\right\}\)
13:else:\(\mathcal{E}=\mathcal{E}\cup\left\{(i,j,0)\right\}\)
14:endif
15:endif
16:\(j=j+1\)
17:endwhile
18:endfor;
19:return\(\mathcal{G}\);
```  
**Algorithm 2** conversation subgraph construction algorithm. We update the graph nodes via a graph convolutional network (GCN) to control the propagation of node information, while the sentence vector \(x^{f}\) is treated as the input hidden state of the first GCN layer.