Game experience sentiment classification method based on transformer and stacked ensemble learning

By constructing a user game behavior graph and combining it with graph neural networks and the Transformer architecture, game context and user behavior information are integrated, and the graph structure is dynamically updated. This solves the context fusion and adaptability problems of sentiment classification in existing technologies, and achieves more consistent and stable game experience sentiment classification.

CN121197814BActive Publication Date: 2026-03-03NEIJIANG NORMAL UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511757477.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-03-03
Estimated Expiration
2045-11-27

AI Technical Summary

Technical Problem

Existing technologies fail to effectively integrate game context information in game experience sentiment classification, lack adaptive processing mechanisms for complex samples, and the models cannot dynamically self-optimize, resulting in inconsistent classification results and insufficient stability.

Method used

A user game behavior graph is constructed and encoded using a graph neural network. It combines game context vectors and user behavior path vectors, integrates text information through a neural collaborative network with a Transformer architecture, and introduces a temporal evolution perception integration mechanism and personalized processing flow to dynamically update the graph structure to form an adaptive closed loop.

Benefits of technology

It improves the contextual consistency between emotion classification results and user game experience, enhances the stability and adaptability to complex and personalized emotion expressions, and realizes the long-term self-optimization capability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121197814B_ABST
    Figure CN121197814B_ABST
Patent Text Reader

Abstract

The application relates to the field of artificial intelligence and data processing technology, and discloses a game experience sentiment classification method based on a Transformer and stacked ensemble learning, which comprises the following steps: constructing a user game behavior graph, adopting a graph neural network coding to obtain game situation and user behavior information; based on a game situation perception neural collaborative network, fusing the aforementioned information and original text content, and outputting a preliminary sentiment probability distribution; through a time sequence evolution perception integration mechanism, combining multiple probability distributions and time sequence characteristics, outputting a time sequence correction result and prediction uncertainty; according to the comparison result of the prediction uncertainty and a preset threshold, triggering a personalized processing process; finally, generating a final sentiment classification result, and feeding back and updating the user game behavior graph to form a closed loop. The application combines game context and time sequence dynamics, improves the consistency of the sentiment classification result, enhances the adaptability of the method when processing complex samples, and realizes self-adaptive optimization of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and data processing technology, specifically to a game experience sentiment classification method based on Transformer and stacked ensemble learning. Background Technology

[0002] In the fields of online games and esports, sentiment analysis of players' textual feedback during gameplay is one of the technical means to understand user experience, optimize game design, and improve user retention. Existing technologies typically employ deep learning-based natural language processing models, such as recurrent neural networks (RNNs) or Transformer models, to directly classify the sentiment of users' text content.

[0003] However, such methods have limitations when dealing with the specific scenario of game experience. They often treat text as isolated data, ignoring the specific game context in which emotional expression occurs. The same sentence from a user can convey drastically different emotions in different game situations (such as exploration, combat, or social interaction) or different sequences of actions. Due to the lack of effective integration of non-textual contextual information, existing technologies struggle to accurately capture these context-dependent emotional changes, thus limiting the consistency of their classification results.

[0004] Furthermore, existing technologies typically employ a fixed processing flow in their model architecture, using a single classification model for judgment regardless of the complexity of the input samples or the model's prediction confidence. This approach lacks mechanisms for identifying and processing complex samples. When encountering user feedback with ambiguous emotional expressions or high personalization, the single model may produce low-confidence predictions, but the system has no alternative solutions, which affects the overall stability and adaptability of the method.

[0005] Furthermore, most current sentiment classification models are static. These models are deployed immediately after offline training, and their internal parameters and knowledge structure remain unchanged throughout subsequent use. They lack an effective feedback and iteration mechanism, making it impossible to use new sentiment classification results to continuously optimize the model itself. As game content updates and player community language evolves, static models cannot adaptively adjust, risking long-term performance degradation. Summary of the Invention

[0006] To address the shortcomings of existing technologies, this invention provides a game experience sentiment classification method based on Transformer and stacked ensemble learning. This method solves the main problems of existing technologies in handling game experience sentiment classification, namely, the failure to effectively integrate game context, the lack of adaptive processing mechanisms for complex samples, and the inability of the model itself to dynamically self-optimize.

[0007] To address the aforementioned technical problems, this invention proposes a novel method for classifying game experience emotions, comprising the following steps:

[0008] Step S1: Construct a user game behavior graph and encode the user game behavior graph using a graph neural network to output a game context vector and a user behavior path aggregation vector;

[0009] Step S2: Based on a game context-aware neural collaborative network, the original text content, the game context vector, and the user behavior path aggregation vector are fused to output a preliminary sentiment probability distribution;

[0010] Step S3: Based on a temporal evolution perception integration mechanism, combining multiple preliminary emotion probability distributions with temporal feature information extracted from the user game behavior graph, output the temporally corrected emotion classification result and prediction uncertainty;

[0011] Step S4: Compare the predicted uncertainty with a preset uncertainty threshold. When the predicted uncertainty exceeds the uncertainty threshold, trigger the personalized processing flow.

[0012] Step S5: Based on the temporal correction of the emotion classification result or the result of the personalized processing flow, generate the final emotion classification result, perform the emotion state-driven graph dynamic update processing, and feed the final emotion classification result back to the user game behavior graph to form an adaptive closed loop.

[0013] In one specific embodiment, in step S1, the user game behavior graph includes four types of nodes: user nodes, behavior event nodes, game context nodes, and text feedback nodes.

[0014] Preferably, step S1 specifically includes:

[0015] Using game data as input, the user game behavior graph is constructed by identifying four types of entities: users, behavioral events, game contexts, and text feedback, as well as the relationships between them.

[0016] Furthermore, the graph neural network is used to encode the user game behavior graph, learn context-related embedding representations for the nodes in the user game behavior graph, and generate the game context vector and the user behavior path aggregation vector based on the embedding representations.

[0017] In one specific embodiment, in step S2, the game context-aware neural co-working network employs an encoder based on the Transformer architecture. Through a multi-head context and behavior injection attention mechanism built into the encoder, the non-textual context information carried by the game context vector and the user behavior path aggregation vector is fused with the semantic information of the original text content to generate a context-behavior-enhanced text embedding. Based on the context-behavior-enhanced text embedding, the preliminary sentiment probability distribution is output.

[0018] In one specific embodiment, in step S3, the temporal evolution-aware ensemble mechanism constitutes a stacked ensemble learning architecture, implemented through a temporal meta-learner as a meta-model, which specifically includes:

[0019] The multiple preliminary emotional probability distributions are combined with the temporal feature information extracted from the user game behavior graph to construct a sequence meta-feature vector;

[0020] Furthermore, the sequence meta-feature vector is input into the temporal meta-learner for processing to capture temporal dependencies and output the temporally corrected sentiment classification result and the prediction uncertainty.

[0021] Preferably, the temporal feature information includes: time interval, changes in behavioral density, frequency of context switching, and aggregated representation of historical emotional states.

[0022] In one specific embodiment, step S4 specifically includes:

[0023] The predicted uncertainty is compared with the preset uncertainty threshold;

[0024] If the prediction uncertainty does not exceed the uncertainty threshold, then the temporal-corrected sentiment classification result is determined as the basis for generating the final sentiment classification result;

[0025] If the prediction uncertainty exceeds the uncertainty threshold, the personalized processing flow is triggered, and the result of the flow is used as the basis for generating the final sentiment classification result.

[0026] The uncertainty threshold is a pre-set value based on the distribution of prediction uncertainty between high-confidence and low-confidence predictions in historical sample data, obtained through statistical analysis.

[0027] Preferably, the personalized processing flow includes:

[0028] Extract user behavior subgraphs related to the current text to be analyzed from the user game behavior graph;

[0029] Furthermore, a user adapter module is used to combine the representation vector of the user behavior subgraph with the contextual behavior-enhanced text embedding to output a personalized sentiment probability distribution as the result of the personalized processing flow.

[0030] In one specific embodiment, step S5, the dynamic update process of the emotion state-driven graph, specifically includes:

[0031] The final sentiment probability distribution is determined based on the temporally corrected sentiment classification result or the result of the personalized processing flow, and the final sentiment label is generated.

[0032] Furthermore, the final sentiment tag is used to update the node sentiment history state attribute of the relevant nodes in the user game behavior graph.

[0033] Furthermore, the emotion state-driven graph dynamic update process also includes:

[0034] A learnable dynamic edge weight function is used to adjust the dynamic edge weights in the user game behavior graph based on the updated node sentiment history state attributes.

[0035] The dynamic edge weights are used in the subsequent representation learning of the graph neural network to influence the message passing process of the graph neural network.

[0036] This invention provides a game experience sentiment classification method based on Transformer and stacked ensemble learning. It has the following beneficial effects:

[0037] 1. This invention constructs a user game behavior graph and encodes it using a graph neural network. It integrates the extracted game context vector and user behavior path aggregation vector into the subsequent text processing flow, so that sentiment classification no longer depends solely on the literal semantics of the text content, but combines the specific game context and historical behavior sequence information of the user. This results in a higher consistency between the generated sentiment classification results and the user's actual game experience context.

[0038] 2. This invention introduces a personalized processing routing mechanism based on prediction uncertainty. By quantifying the uncertainty of the prediction results in the time-series integration step and comparing it with a preset threshold, this method can identify fuzzy or atypical samples that are difficult to handle by standard processes. For these samples, the system will automatically switch to a dedicated personalized processing flow, thereby improving the stability and adaptability of the entire method when dealing with complex and personalized emotional expressions.

[0039] 3. This invention designs a closed loop for dynamic graph update driven by emotion state, which feeds back the final emotion classification result to the user's game behavior graph. The edge weights in the graph are dynamically adjusted through a learnable function, so that the graph structure can adaptively evolve according to the continuously acquired emotion classification data, thereby affecting the subsequent graph neural network encoding process and realizing the long-term self-optimization capability of the model. Attached Figure Description

[0040] Figure 1 This is a flowchart of the game experience sentiment classification method based on Transformer and stacked ensemble learning of the present invention;

[0041] Figure 2 This is a flowchart illustrating the routing decision logic for uncertainty judgment in this invention.

[0042] Figure 3 This is a flowchart of the dynamic update process of the emotion state-driven graph according to the present invention. Detailed Implementation

[0043] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0044] Please see the appendix Figure 1 -Appendix Figure 3 This invention provides a game experience sentiment classification method based on Transformer and stacked ensemble learning, comprising the following steps:

[0045] Step S100: Data collection and construction of user game behavior graph.

[0046] This step performs UGBG construction and initial representation learning via GNN. Multi-source heterogeneous game data, such as game background logs, player community text, and in-game interaction records, are used as input. Through structured processing, a User Game Behavior Graph (UGBG) is generated. This UGBG contains four types of entities: user nodes, behavior event nodes, game context nodes, and text feedback nodes. Subsequently, a graph neural network is used to encode the UGBG, learning the embedding representations of each node. This step ultimately outputs a game context vector and a user behavior path aggregation vector for subsequent processing.

[0047] Step S200: Basic sentiment classification based on attention injection.

[0048] This step executes game context-aware neural co-processing. The original text content, the game context vector output from step S100, and the user behavior path aggregation vector are taken as input. The core of this step is a multi-head context and behavior injection attention mechanism, which, within a standard Transformer encoder, fuses text semantics with the external game behavior context.

[0049] The mechanism first generates a gate vector based on the gate vector calculation formula, which is used to dynamically adjust the injection strength of external information. The gate vector calculation formula is as follows:

[0050] ;

[0051] In the formula: This is the gate vector; Use the Sigmoid activation function; For use in calculating the gate vector The learnable weight matrix; For use in calculating the gate vector Learnable bias vector; Embed a representation matrix for the word sequence of the text feedback content; This is the pooling function; This represents a game context vector; Aggregate vectors for user behavior paths; This is a vector concatenation operator.

[0052] Subsequently, based on the formula for constructing augmented key-value vectors and the formula for calculating contextual behavior-injected attention, the mechanism generates an attention output that integrates multi-dimensional information. The formula for constructing augmented key-value vectors is as follows:

[0053] ;

[0054] ;

[0055] In the formula: The enhanced key matrix; The enhanced value matrix; and For use in The projection is a learnable weight matrix of the original keys and values; and For use in Learnable weight matrices projected onto the key and value spaces; and For use in Learnable weight matrix projected onto the key and value space.

[0056] The formula for calculating contextual behavior-based attention is as follows:

[0057] ;

[0058] In the formula: To enhance attention output; , and For the reason The original query, key, and value matrix obtained by projection; This is the matrix transpose operator; is the dimension of the key vector.

[0059] This step ultimately generates context-enhanced text embeddings and obtains a preliminary sentiment probability distribution.

[0060] Step S300: Dynamic Evolution Modeling Based on Temporal Integration. This step executes a temporal evolution-aware ensemble mechanism. The initial set of sentiment probability distributions output by multiple base classifiers is combined with temporal features extracted from the User Game Behavior Graph (UGBG). A sequence meta-feature vector is generated based on the temporal meta-feature vector construction formula. The temporal meta-feature vector construction formula is as follows:

[0061] ;

[0062] In the formula: In time step Serial element feature vector; For the first The basic classifiers at time step The output is the sentiment probability distribution vector; For time step The time interval between the previous event; For time step The change in user behavior intensity during the period; For time step During this period, the frequency of user context switching; For the deadline step This represents an aggregated representation of a user's historical emotional state.

[0063] The sequence of meta-feature vectors is input into a temporal meta-learner for processing. This learner captures temporal dependencies and ultimately outputs temporally corrected sentiment classification results and prediction uncertainty.

[0064] Step S400: Uncertainty-Based Personalized Routing Decision. This step performs uncertainty-aware personalized routing processing and is a condition-triggered step. The predicted uncertainty output from step S300 is compared with a preset uncertainty threshold. If the predicted uncertainty exceeds the threshold, the personalized processing flow is triggered, calling the user adapter module to generate a personalized sentiment probability distribution for the specific user. If the uncertainty does not exceed the threshold, the output of step S300 is directly adopted.

[0065] Step S500: Dynamic graph update based on emotional feedback. This step performs emotional state-driven dynamic graph update processing, forming an adaptive closed loop for the system. The final emotional classification result is transformed into a final emotional label, which is then used as a dynamic attribute to update the corresponding node in the user game behavior graph (UGBG), forming an emotional history state attribute.

[0066] The core of this mechanism is to calculate the dynamic edge weights in the graph based on the adaptive adjustment formula for dynamic edge weights. The adaptive adjustment formula for dynamic edge weights is as follows:

[0067] ;

[0068] In the formula: For the node To the node Dynamic edge weights; This is a neural network function used to calculate dynamic edge weights; and For nodes and nodes The original or static feature vector; For nodes and The type representation of the edges between them; and For nodes and Current and latest emotional history status attributes; Neural network function The set of learnable parameters.

[0069] This dynamic edge weight will be used to optimize the representation learning process of the User Game Behavior Graph (UGBG) in the next round of analysis, thereby completing closed-loop feedback and enabling the entire method to be adaptive.

[0070] Step S100, namely the construction and representation learning of the user's game behavior graph, may specifically include the following sub-steps:

[0071] Step S110: Data Source Acquisition and Preprocessing. This step acquires the data needed to construct the graph from multiple data sources. These data sources include, but are not limited to: game background logs recording player action sequences and system events, community forum text containing player comments and feedback, and in-game instant chat logs. After acquiring the raw data, preprocessing operations are performed, including data cleaning to remove irrelevant or redundant information, data alignment to ensure that records from different data sources are correlated in timestamps, and data standardization to unify the format of different events and attributes.

[0072] Step S120: Graph Structure Definition and Instantiation. This step defines the heterogeneous graph structure of the User Game Behavior Graph (UGBG), which contains four types of nodes:

[0073] User node: Represents an independent game player entity.

[0074] Behavioral event node: Represents a specific action taken by the player in the game or an event triggered by the system, such as defeating a specific boss, obtaining a rare item, or failing a mission.

[0075] Game context nodes: represent the game environment, scene, or specific game stage in which the action or event occurs, such as: PVP arena, new player tutorial quest, or final story chapter.

[0076] Text feedback nodes: Represent text content generated by players at a specific point in time, such as a forum post or a chat message.

[0077] These nodes are connected by predefined edges to represent their semantic and temporal relationships. For example, a record of player A performing action C and posting text D in scene B will be instantiated as follows: a user node A is connected to an action event node C, which is connected to a game context node B. At the same time, user node A is also connected to a text feedback node D, and the text feedback node D is also associated with the game context node B at the time of its occurrence.

[0078] Step S130: Graph Representation Learning Based on Graph Neural Networks. This step uses a Graph Neural Network (GNN) to learn the representation of the User Game Behavior Graph (UGBG) instantiated in Step S120. The aim is to generate a low-dimensional, dense vector representation, i.e., embedding, for each node in the graph. This process is implemented through multi-layer message passing and aggregation mechanisms, enabling the final embedding vector of each node to capture the structural and attribute information of its neighboring nodes and even more distant neighbors.

[0079] In one embodiment of the present invention, the graph neural network may employ a Graph Attention Network (GAT) or a GraphSAGE model. Using a GAT allows for the adaptive allocation of different weights based on the importance of neighboring nodes, thereby aggregating neighborhood information more precisely. The specific network structure and training methods for the GAT or GraphSAGE can be implemented by those skilled in the art based on publicly available information; these are well-known technologies in the field and will not be elaborated upon here.

[0080] After multiple rounds of iterative graph neural network processing, each node obtains its final embedding vector. The embedding of the game context node directly associated with a given text feedback node is defined as the game context vector for that text. Simultaneously, the embedding vectors of all user nodes associated with that text feedback node are aggregated (e.g., through average pooling, max pooling, or attention-weighted summation) within a specific time window prior to the text's generation; the result is defined as the user behavior path aggregation vector for that text. These two embedding vectors serve as key inputs for subsequent steps.

[0081] Step S200, namely the processing of the Game Context-Aware Cooperative Network (GCAN), aims to address the problem that traditional text sentiment classification models ignore non-textual behavioral context. This step deeply integrates game context with user behavior information within the underlying network structure of text encoding. Specifically, it may include the following sub-steps:

[0082] Step S210: Initial Text Encoding. The original text content of a text feedback node to be analyzed is input into a pre-trained Transformer encoder. This encoder can be BERT (Bidirectional Encoder Representations from Transformers), RoBERTa, or other similar models well-known to those skilled in the art. After processing by this encoder, each token in the text is converted into a context-dependent initial embedding vector. The embedding vectors of all tokens together form a token sequence embedding representation matrix of the text feedback content. .

[0083] Step S220: Calculation of Multi-Head Contextual and Behavioral Injection Attention. This step is the core of the game context-aware neural collaborative network, which modifies the standard Transformer multi-head self-attention mechanism to inject external contextual information. This mechanism relies on a gating vector and enhancements to the key-value matrix.

[0084] In one embodiment, a gating vector is first computed. This vector is used to adaptively control the strength of external information injection. The gating vector is calculated according to the gating vector calculation formula:

[0085] ;

[0086] In the formula: This is the gate vector; Use the Sigmoid activation function; For use in calculating the gate vector The learnable weight matrix; For use in calculating the gate vector Learnable bias vector; Embed a representation matrix for the word sequence of the text feedback content; Pooling functions, such as average pooling, are used to embed sequences. They are aggregated into a vector representing the overall semantics; This is the game context vector related to the current text obtained from step S100; This is the aggregated vector of user behavior paths related to the current text obtained from step S100; This is a vector concatenation operator.

[0087] Next, we will enhance the key and value matrices in the Transformer attention mechanism. This involves adding the game context vector... User behavior path aggregation vector Each element is transformed to the same dimensionality as the text's key-value vectors using its own independent projection matrix, and then concatenated with the original text's key-value matrix. This process is based on the formula for enhancing key-value vector construction:

[0088] ;

[0089] ;

[0090] In the formula: The enhanced key matrix; The enhanced value matrix; and For use in The projection is a learnable weight matrix of the original keys and values; and For use in Learnable weight matrices projected onto the key and value spaces; and For use in Learnable weight matrix projected onto the key and value space.

[0091] Finally, the calculated gating vector is used and the enhanced bond matrix Sum matrix The final attention output is calculated. This calculation is achieved by weighting and summing the plain text self-attention and the enhanced attention that includes external information; the weights are the gating vectors. This process is based on the formula for calculating situational behavior-based attention:

[0092] ;

[0093] In the formula: To enhance attention output; , and For the reason The original query, key, and value matrix obtained by projection; This is the matrix transpose operator; is the dimension of the key vector.

[0094] Step S230: Output the basic sentiment classification results. This involves enhancing the attention output of all attention heads in the game context-aware neural co-operation network. The text embeddings are concatenated and linearly transformed to obtain context-enhanced text embeddings. The vectors corresponding to the special classifiers (e.g., the [CLS] token) in the embedding sequence are taken and input into a classification head (e.g., a fully connected layer followed by a Softmax activation function). The final output is a vector representing the probability of different sentiment categories, i.e., the preliminary sentiment probability distribution.

[0095] Step S300, the processing of the sequential evolution perception integration mechanism (TEAM), aims to solve the technical problem that a single classification model treats each text feedback as an independent event, thus failing to capture the trajectory of the user's emotional state over time.

[0096] From an architectural perspective, step S300 implements a stacked ensemble learning framework, comprising two core layers:

[0097] The first layer (Level 0) consists of multiple game context-aware neural collaborative networks as described in step S200, which serve as base classifiers. They generate their own preliminary emotion probability distributions in parallel for the same input sample.

[0098] The second layer (Level 1) consists of a temporal meta-learner as the meta-model. This meta-model does not directly process the original text, but instead uses the outputs of all the base classifiers in the first layer (i.e., the preliminary sentiment probability distribution) as one of its core input features, and combines it with other temporal information to learn how to correct and optimize the ensemble results of the base classifiers.

[0099] This structure enables the temporal evolution-aware ensemble mechanism to functionally constitute a stacked ensemble learning architecture, aiming to improve the overall classification accuracy and robustness through higher-level learning.

[0100] This step S300 may specifically include the following sub-steps:

[0101] Step S310: Construction of Sequence Meta Feature Vectors. This step constructs the input features for the subsequent temporal meta learner. In a time series, for a specific user at a specific time step... The generated text feedback is used to construct a sequence meta-feature vector. The vector is composed of two parts: ensemble prediction information from the base classifier and dynamic temporal features extracted from the User Game Behavior Graph (UGBG).

[0102] In one embodiment, deployment The game context-aware neural collaborative network described in step S200 serves as the base classifier. Each classifier can be initialized with different parameters or trained on different subsets of training data to ensure its diversity. Input a text feedback sample into this... From the classifiers, we get A preliminary emotional probability distribution This is the first part of the sequence element feature vector.

[0103] The second part of the sequence meta-feature vector, namely the dynamic temporal features, is extracted from the User Game Behavior Graph (UGBG), specifically including:

[0104] Time interval : The time difference between the current text feedback event and the user's previous action event or text feedback event.

[0105] Changes in behavioral density The difference between the number of user action event nodes in the preset time window before the current event and the number of action event nodes in the previous time window.

[0106] Context switching frequency The number of different game scenario nodes experienced by the user within a preset time window before the current event occurs.

[0107] Historical sentiment state aggregation representation This is a representation obtained by aggregating all historical sentiment classification results for the user up to the current time step. In one embodiment, this representation can be a weighted average distribution of all final sentiment labels within a previous time step, or a hidden state vector obtained by aggregating previous states through a recurrent neural network.

[0108] By concatenating the two pieces of information above, and using the formula for constructing time-series meta-feature vectors, the final sequence meta-feature vector is obtained. :

[0109] ;

[0110] In the formula: In time step Serial element feature vector; For the first The basic classifiers at time step The output is the sentiment probability distribution vector; For time step The time interval between the previous event; For time step The change in user behavior intensity during the period; For time step During this period, the frequency of user context switching; For the deadline step This represents an aggregated representation of a user's historical emotional state.

[0111] A time series of sequence metafeature vectors is constructed by generating such a sequence metafeature vector from a series of text responses from users. This provides sufficient feature input for modeling the dynamic evolution of emotions.

[0112] Step S320: Temporal Meta-Learning and Result Generation. The time series of the sequence meta-feature vectors generated in step S310 are then processed. The data is then input into a temporal meta-learner for processing. This learner is used to learn and capture the dependencies and transition patterns of emotional states over time.

[0113] In one embodiment, the temporal meta-learner can be a Transformer decoder or a Long Short-Term Memory (LSTM) network. The specific network structure and training method of the Transformer decoder or LSTM can be implemented by those skilled in the art based on publicly available information; these are well-known technologies in the field and will not be elaborated upon here.

[0114] This time-series meta-learner processes time steps. Sequence element feature vector At that time, historical sequence information will be taken into account. After processing the entire sequence, the output state of the last time step is taken and passed through a classification layer (e.g., a fully connected layer followed by a Softmax activation function), finally yielding a temporally corrected sentiment probability distribution, which is the temporally corrected sentiment classification result.

[0115] Step S330: Quantification of Prediction Uncertainty. While obtaining the prediction results from the base classifier, this step also quantifies the prediction uncertainty to generate a signal that triggers subsequent personalized processing. This uncertainty reflects the degree of consistency among the ensemble model members regarding the current prediction.

[0116] In one embodiment, the predictive uncertainty can be calculated by... The difference in the initial emotional probability distribution is used as a measure.

[0117] One specific implementation is to first calculate this The average of the probability distribution vectors is used to obtain an average prediction distribution, and then the entropy of this average prediction distribution is calculated. The higher the entropy value, the closer the distribution is to uniformity, and the higher the uncertainty.

[0118] Another specific implementation is to calculate this The variances of probability distribution vectors across various sentiment categories are calculated, and these variances are aggregated (e.g., summed or averaged) to obtain a comprehensive measure of discrepancy. A larger variance indicates greater prediction divergence among the base classifiers and higher uncertainty.

[0119] Regardless of the method used, a scalar value will ultimately be obtained, which is defined as the prediction uncertainty. The uncertainty of this forecast Together with the temporally corrected sentiment classification results generated in step S320, they will serve as the final output of the temporally evolved perception integration mechanism.

[0120] Step S400, namely the uncertainty-aware personalized routing (UAPR) process, is a condition-triggered process used to identify and specifically address samples where the ensemble model struggles to make consistent judgments. It addresses the differences in behavior and expression habits among different users by introducing personalized modeling. Specifically, it may include the following sub-steps:

[0121] Step S410, Route Trigger Decision. This step addresses the prediction uncertainty quantified in step S330. Make decisions and judgments. Address the uncertainty of forecasting. With a preset uncertainty threshold Compare this uncertainty threshold. This is a hyperparameter, the specific value of which can be determined during the model validation phase by conducting experiments on the validation set.

[0122] like If so, the current sample is determined to be a high-uncertainty sample, and the subsequent personalized processing step S420 is executed. If the prediction results of the current ensemble model are considered to have sufficient consistency, the personalization process is skipped, and the temporally corrected sentiment classification result obtained in step S320 is directly used as one of the final prediction outputs of the current sample.

[0123] Step S420: Extraction of User Behavior Subgraph. When the personalized processing flow is triggered, the system will extract the user behavior subgraph related to the user to which the current text feedback node belongs from the User Game Behavior Graph (UGBG) constructed in step S100.

[0124] In one specific embodiment, the extraction process can start from a specified user node and perform a breadth-first search (BFS) or depth-first search (DFS) at a predetermined depth to obtain a local graph structure containing the user and the nodes and edges of their recent interactions.

[0125] This user behavior subgraph is a partial view of the main graph, containing only the user node of the specific user, as well as all behavior event nodes, game context nodes, and text feedback nodes that are directly or indirectly associated with the user node, and all edges connecting these nodes.

[0126] Step S430: Personalized Adjustment Based on the User Adapter Module. This step uses a lightweight User Adapter Module (UAM) to fine-tune the sentiment classification results. The input to the User Adapter Module consists of two parts: the context-enhanced text embedding generated in step S220 without temporal correction, and the personalized representation vector of the user obtained by encoding the user behavior subgraph extracted in step S420.

[0127] In one embodiment, the user adapter module can be a multi-layer perceptron (MLP) or a small attention network. Encoding the user behavior subgraph can be accomplished by a separate, small-scale graph neural network, or by aggregating the embedding vectors of all its nodes (e.g., average pooling) to obtain the user's personalized representation vector.

[0128] The user adapter module interacts with the user's personalized representation vector and context-enhanced text embeddings (e.g., by concatenating the vectors and inputting them into an MLP, or by weighted fusion using an attention mechanism), thereby adjusting the text embeddings to suit the user's behavioral patterns. The adjusted embedding vectors are then processed by a separate classification head, ultimately outputting a personalized sentiment probability distribution. This probability distribution, compared to the output of a general model, better reflects the specific user's expression habits and sentiment patterns.

[0129] Step S500, namely the Emotional State Driven Graph Dynamic Update (ESDGU) process, constructs a self-learning, adaptive closed-loop feedback system. This step feeds the model's final classification result back into the User Game Behavior Graph (UGBG), adjusting the graph's intrinsic attributes and structural parameters to enable continuous evolution, thereby providing more timely and personalized knowledge representations for subsequent analysis. Specifically, it may include the following sub-steps:

[0130] Step S510: Generation of the final sentiment label. This step first performs decision integration, determining the final sentiment probability distribution based on the execution status of step S400. If personalized routing is triggered in step S410, the personalized sentiment probability distribution generated in step S430 is used; otherwise, the time-corrected sentiment classification result generated in step S320 is used. The maximum probability index (argmax) operation is performed on the selected probability distribution vector to obtain a discrete sentiment category, which is defined as the final sentiment label. .

[0131] Step S520: Update the node's sentiment history state attributes. Obtain the final sentiment tag. Subsequently, this tag was used to update the properties of the relevant nodes in the User Game Behavior Graph (UGBG).

[0132] Specifically, the final emotional label Update the data to the user node that generated the text feedback as part of its emotional history state attribute. Part of it.

[0133] In one embodiment, the update may be achieved by appending new sentiment tags to a historical sentiment sequence, or by calculating a moving average distribution that includes historical sentiments to reflect the user's long-term sentiment tendencies.

[0134] Step S530: Adaptive Adjustment of Dynamic Edge Weights. The core of this step lies in using the updated node attributes from step S520 to dynamically adjust the edge weights in the graph, thereby influencing the subsequent message passing process of the graph neural network. This adjustment process is achieved through a learnable dynamic edge weight function. accomplish.

[0135] This function calculates the value of any two connected nodes in the graph based on the dynamic edge weight adaptive adjustment formula. and Dynamic edge weights between :

[0136] ;

[0137] In the formula: For the node To the node Dynamic edge weights; This is a neural network function used to compute dynamic edge weights, such as a multilayer perceptron; and For nodes and nodes The original or static feature vector; For nodes and The type representation of the edges between them; and For nodes and Current and latest emotional history status attributes; Neural network function The set of learnable parameters.

[0138] The dynamic edge weight function Learnable parameters The parameters are learned along with those of other modules, such as the game context-aware neural co-processing network and the temporal evolution-aware ensemble mechanism, during the end-to-end training process of the entire method. Specifically, the final sentiment classification loss (e.g., cross-entropy loss) is backpropagated, which not only updates the parameters of the classification model but also propagates the gradient back to the graph neural network in step S130. Since the message passing process of the graph neural network relies on... Calculated dynamic edge weights Therefore, the loss gradient will propagate further to parameters In order to optimize it.

[0139] The dynamic edge weight In subsequent graph neural network representation learning (such as step S130), the fixed or initial edge weights will be replaced. In this way, if a user node consistently exhibits negative emotions in a certain game context (reflected in its emotional history state attributes), the weights will be used to replace the fixed or initial edge weights. If the edges connecting these two nodes are adjusted accordingly, the strong correlation will be more fully reflected in the next GNN message pass. This completes the closed-loop feedback from the prediction results to the graph structure parameters, giving the entire method dynamic adaptive capabilities.

[0140] This invention discloses a game experience sentiment classification method based on Transformer and stacked ensemble learning. The method utilizes a game context-aware neural collaborative network, leveraging its multi-head context and behavior-injected attention mechanism, to fuse textual semantics with game context information obtained from a game graph. Subsequently, a temporal evolution-aware ensemble mechanism models the dynamic evolution of sentiment. For high-uncertainty samples, an uncertainty-aware personalized routing mechanism activates a user adapter module for personalized processing. Finally, a sentiment state-driven dynamic graph update mechanism feeds the classification results back to the user's game behavior graph, forming an adaptive closed loop by adjusting graph parameters.

[0141] In summary, this invention achieves in-depth, dynamic, personalized, and adaptive classification of emotional game experiences through the collaborative work of multiple modules, and its overall technical solution has innovative and practical value.

Claims

1. A game experience sentiment classification method based on Transformer and stacked ensemble learning, characterized in that, The method comprises the following steps: Step S1, constructing a user game behavior graph, and encoding the user game behavior graph by using a graph neural network to output a game context vector and a user behavior path aggregation vector; Step S2, based on a game context perception neural collaborative network, fusing original text content, the game context vector and the user behavior path aggregation vector to output a preliminary sentiment probability distribution; In the S2 step, the game context perception neural collaborative network adopts an encoder based on a Transformer architecture, and through a multi-head context and behavior injection attention mechanism built in the encoder, fuses the non-text context information carried by the game context vector and the user behavior path aggregation vector with the semantic information of the original text content to generate a context behavior enhanced text embedding, and outputs the preliminary sentiment probability distribution based on the context behavior enhanced text embedding; Step S3, based on a time evolution perception integration mechanism, combining multiple preliminary sentiment probability distributions and time sequence feature information extracted from the user game behavior graph to output a time sequence corrected sentiment classification result and a prediction uncertainty; The S3 step specifically comprises: The time evolution perception integration mechanism constitutes a stacked ensemble learning architecture, and is realized by a time sequence meta-learner as a meta-model; The multiple preliminary sentiment probability distributions and the time sequence feature information extracted from the user game behavior graph are combined to construct a sequence meta-feature vector; The sequence meta-feature vector is input into the time sequence meta-learner for processing to capture time dependence and output the time sequence corrected sentiment classification result and the prediction uncertainty; Step S4, comparing the prediction uncertainty with a preset uncertainty threshold, and when the prediction uncertainty exceeds the uncertainty threshold, triggering a personalized processing procedure; The personalized processing procedure comprises: Extracting a user behavior subgraph related to the current text to be analyzed from the user game behavior graph; Using a user adapter module to combine the representation vector of the user behavior subgraph and the context behavior enhanced text embedding to output a personalized sentiment probability distribution as the result of the personalized processing procedure; Step S5, generating a final sentiment classification result according to the time sequence corrected sentiment classification result or the result of the personalized processing procedure, and performing sentiment state driven graph dynamic updating processing, and feeding back the final sentiment classification result to the user game behavior graph to form a self-adaptive closed loop.

2. The method of claim 1, wherein the method is based on a Transformer and stacked ensemble learning for game experience sentiment classification. In the S1 step, the user game behavior graph comprises four types of nodes, namely user nodes, behavior event nodes, game context nodes and text feedback nodes.

3. The method of claim 1, wherein the method is based on a Transformer and stacked ensemble learning for game experience sentiment classification. The S1 step specifically comprises: Taking game data as input, constructing the user game behavior graph by recognizing four types of entities and relationships, namely user, behavior event, game context and text feedback; The user game behavior graph is encoded by using the graph neural network, a context-related embedding representation is learned for a node in the user game behavior graph, and the game context vector and the user behavior path aggregation vector are generated based on the embedding representation.

4. The method of claim 1, wherein the method is characterized by, The timing feature information includes: a time interval, a behavior intensity change, a context switching frequency, and a historical emotion state aggregation representation.

5. The method of claim 1, wherein the method is based on a Transformer and stacked ensemble learning for game experience sentiment classification. The S4 step specifically includes: comparing the prediction uncertainty with the preset uncertainty threshold; if the prediction uncertainty does not exceed the uncertainty threshold, directly taking the timing-corrected emotion classification result as the basis for generating the final emotion classification result; if the prediction uncertainty exceeds the uncertainty threshold, triggering the personalized processing flow, and taking the result of the flow as the basis for generating the final emotion classification result; wherein the uncertainty threshold is a preset value according to the prediction uncertainty distribution of high-confidence prediction and low-confidence prediction in historical sample data through statistical analysis.

6. The method of claim 1, wherein the method is based on a Transformer and stacked ensemble learning for game experience sentiment classification. In the S5 step, the dynamic updating of the emotion state driven graph specifically includes: determining a final emotion probability distribution according to the timing-corrected emotion classification result or the result of the personalized processing flow, and generating a final emotion label; the final emotion label is used to update the node emotion history state attribute of the related node in the user game behavior graph.

7. The method of claim 6, wherein the method is characterized by, The dynamic updating of the emotion state driven graph also includes: using a learnable dynamic edge weight function to adjust the dynamic edge weight in the user game behavior graph according to the updated node emotion history state attribute; the dynamic edge weight is used in subsequent representation learning of the graph neural network to affect the message passing process of the graph neural network.

Citation Information

Patent Citations

  • Learner emotional evolution analysis method and system based on causal graph neural network

    CN115374790A

  • Multi-modal emotion recognition and interaction adjusting system and method based on uncertainty evaluation

    CN120850084A

  • KR20230115731A