## 2 The Proposed Model Algorithm
### Aggregation Module  
This subsection aggregates the vector representations of the session graph and the global graph to obtain the final representation of the node and, finally, obtains the sequential representation of the conversation. We think that the vector representations of the session graph and the global neighborhood graph are equally important. The final representation vector of each node \(h_{v_{i}}^{\prime}\) is the result of adding the global domain-level representation and the session-level representation, where to avoid overfitting problems, we use the dropout method on both the global domain-level item representation and the session-level vector representation. The calculation formula is as follows:  
\[h_{v_{i}}^{\prime}=dropout\Big{(}h_{v_{i}}^{g}\Big{)}+dropout(h_{v_{i}}) \tag{22}\]  
Since the most recent interactions in a conversation can better represent the user's current preferences, the items involved in these actions are more important for the recommendation results. Therefore, we incorporate both the reverse position information and the node item representation in the process of generating the conversational representation. We regard the reverse position information encoding as a bias vector and add different reverse position vectors to the item representation vectors at different positions in the conversational sequence. Then, we use soft attention to obtain the contribution of each node to the conversational sequence representation, and finally generate the final interest preference representation vector of the conversation. We follow the idea of the GCE-GNN model and use a position embedding matrix \(P=\{P_{1},P_{2},\ldots,P_{l}\}\), where \(P_{i}\in\ R^{d}\) is the position embedding vector, and 1 represents the length of the conversation. The specific calculation formula of the item embedding representation vector containing position information is as follows:  
\[h_{p,\,i}=\tanh\left(W_{3}\left[h^{\prime}_{v_{i}^{2}}\parallel p_{l-i+1}\right] +b_{3}\right) \tag{23}\]  
\(h^{\prime}_{v_{i}^{2}}\) is the item representation vector of all items in the conversation obtained by inputting the conversational sequence \(h^{\prime}_{v_{i}}\) into GNN, \(W_{3}\in\ R^{d*2d}\) and \(b_{3}\in\ R^{d}\) are trainable parameters, and \(\tanh\) is the activation function. Because the length of the conversational sequence is variable, we choose to use the reverse position embedding method, where the smaller the distance between the current item and the predicted item, the more important it is. Similarly, we take the mean of the item representation vectors of all nodes in the conversational sequence output by the GNN to obtain the feature representation vector of the conversation as follows:  
\[s^{\prime}=\frac{1}{l}\sum_{i=1}^{l}h^{\prime}_{v_{i}^{2}} \tag{24}\]  
Then, we use soft attention to obtain the contribution weight of each node to the conversational sequence representation:  
\[\beta_{i}=q_{2}^{2}\sigma\left(W_{4}h_{p,\,i}+W_{5}s^{\prime}+b_{4}\right) \tag{25}\]  
\(W_{4}\), \(W_{5}\in\ R^{d*2d}\), and \(b_{4}\), \(b_{5}\in\ R^{d}\) are all trainable parameters. Finally, by using the contribution weight of each node calculated above to linearly combine the item representations, we can obtain the final interest representation vector of the conversation as follows:  
\[H_{s}=\sum_{i=1}^{l}\beta_{i}h^{\prime}_{v_{i}^{2}} \tag{26}\]  
The conversational representation, \(H_{s}\), obtained by the above process integrates the node representations of the conversational level and the global domain level. In the process of constructing the session graph, it considers the interaction order of the nodes in the conversation as the weight information in the relation matrix and assigns different weights according to the interaction order of the nodes in the conversation.