A network user intention recognition method
By combining the BERT pre-trained model, Text-Inception, and Bi-LSTM modules to extract text features from social networks, and by using the SENet network and residual cross-attention mechanism to fuse sentiment features, the problem of identifying malicious user intent in social networks is solved, achieving more efficient user intent identification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XI AN JIAOTONG UNIV
- Filing Date
- 2024-09-25
- Publication Date
- 2026-07-03
AI Technical Summary
Existing technologies struggle to effectively identify the carefully disguised malicious intent of users on social networks. Traditional methods are time-consuming, labor-intensive, and ill-suited to the sparsity of features in open and short texts.
We employ a BERT pre-trained model combined with Text-Inception and Bi-LSTM modules to extract text features, fuse features through an improved SENet network, and utilize residual cross-attention mechanism to fuse sentiment features, thereby achieving efficient recognition of user intent.
It improves the accuracy and efficiency of user intent recognition, enabling a better understanding of users' potential motivations and purposes, and is suitable for applications such as malicious user analysis in social networks.
Smart Images

Figure CN119179783B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence technology, and specifically relates to a method and system for recognizing network user intent. Background Technology
[0002] Social media, with its common communication methods, is accompanied by some negative impacts, particularly the emergence of malicious users. These users distort information dissemination and damage the healthy online environment by manipulating topics, spreading misinformation, and creating harmful online opinions. Therefore, user identification has become an urgent problem to solve.
[0003] Currently, many social media platforms rely on traditional user behavior analysis and personal information verification to identify user intent. However, these methods often struggle to effectively identify malicious users who are carefully disguised and express veiled malice. Unlike traditional technologies, analyzing the content and sentiment of user posts on social networks can provide more multi-dimensional information, enabling a more accurate identification of user intent. Intent recognition technology can gain insights into users' underlying motivations and purposes, thereby effectively identifying user intent.
[0004] Intent recognition is an important research area in natural language processing, aiming to identify users' intentions from natural language text. Intent recognition has wide applications in the social network field, such as sentiment monitoring, negative purchase intention analysis, and suicide prevention. Typically, social network intent recognition technology analyzes text posts published by users on social networks to identify their potential intentions.
[0005] Commonly used intent recognition methods include dictionary-based and rule-based classification methods, statistical classification methods, and deep learning-based classification methods.
[0006] While dictionary- and rule-based classification methods do not require training on large amounts of data, they are time-consuming, labor-intensive, and have limited scalability. They also struggle to identify intentions that deviate slightly from predefined templates, making them unsuitable for supporting open text in social networks.
[0007] In statistical classification methods, statistical models have significant limitations, including high dependence on large amounts of labeled data, complex and time-consuming feature engineering requirements, and difficulty in effectively capturing complex semantic relationships and contextual dependencies. With the development of deep learning technology, these limitations have become more prominent.
[0008] In deep learning-based classification methods, the short text intent recognition based on social media posts such as Weibo suffers from sparse text features due to the small number of texts and the presence of non-standard words such as internet slang. Directly applying deep learning models to the field of user intent recognition will inevitably be affected. Summary of the Invention
[0009] In order to overcome the shortcomings of the prior art, the present invention aims to provide a method and system for identifying network user intent, so as to achieve rapid and accurate identification of user intent.
[0010] To achieve the above objectives, this invention proposes a method for identifying network user intent. It employs two BERT pre-trained models to vectorize text content and sentiment, respectively. By combining Text-Inception and Bi-LSTM modules, it efficiently extracts global and local features of the text. Furthermore, it dynamically fuses local and global text features based on an improved SENet network, and organically combines text and sentiment features through a residual cross-attention mechanism, thereby enhancing the model's understanding and recognition of user intent. Ultimately, this invention can accurately identify user intent, thus supporting a wide range of application scenarios, such as malicious user analysis on social media.
[0011] The technical solution adopted in this invention is:
[0012] A method for identifying network user intent includes the following steps:
[0013] Collect data on specific social media events, and format and preprocess it;
[0014] For the preprocessed data, text entities are identified, and external knowledge is introduced based on entity description generation models and knowledge graphs to achieve text content enhancement, resulting in a knowledge-enhanced dataset.
[0015] For knowledge-enhanced datasets, sentiment features, local and global text features are extracted, and text features at different scales are fused to obtain text fusion features;
[0016] Based on the residual cross-attention mechanism, text fusion features and sentiment features are fused to obtain text-sentiment fusion features, and user intent recognition on social networks is performed based on text-sentiment fusion features.
[0017] The present invention also provides a system for implementing the aforementioned social network user intent recognition system, comprising:
[0018] The data acquisition module collects data on specific events on social media.
[0019] The data preprocessing module formats and preprocesses the collected data;
[0020] The external knowledge introduction module identifies text entities in the preprocessed data and introduces external knowledge based on entity description generation models and knowledge graphs to enhance text content, resulting in a knowledge-enhanced dataset.
[0021] The text feature extraction module extracts local and global features from the knowledge-enhanced dataset and fuses text features at different scales to obtain text fusion features.
[0022] The sentiment feature extraction module extracts sentiment features from the knowledge-enhanced dataset;
[0023] The text-sentiment feature fusion module, based on the residual cross-attention mechanism, fuses text fusion features and sentiment features to obtain text-sentiment fusion features;
[0024] The social network user intent recognition module recognizes user intent based on text-sentiment fusion features.
[0025] Compared with the prior art, the present invention has the following technical effects:
[0026] This invention achieves improved accuracy in user intent recognition tasks on social networks by utilizing the ENT-DESC entity description generation model combined with a Wiki knowledge graph to describe the entity content of text, enriching the semantics of the text. It employs a TwHIN-BERT pre-trained model combined with an architecture of Bi-LSTM, Text-Inception, and an improved SENet network to describe text features, uses the Twitter_Emotions_Bert pre-trained model to generate sentiment features, and fuses sentiment features and text features through a feature fusion method based on residual cross-attention to enrich the description of user intent. Attached Figure Description
[0027] The following will further explain the concept, specific structure, and technical effects of the present invention in conjunction with the accompanying drawings, so as to fully understand the purpose, features, and effects of the present invention.
[0028] Figure 1 This is a flowchart of the present invention.
[0029] Figure 2 Introduce module diagrams for external knowledge.
[0030] Figure 3 This is a module diagram of the self-attention mechanism.
[0031] Figure 4 This is a diagram of the Text-Inception module.
[0032] Figure 5 This is a diagram of the Bi-LSTM module.
[0033] Figure 6 An improved SENet network diagram.
[0034] Figure 7 This is a module diagram of the residual cross-attention mechanism. Detailed Implementation
[0035] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0036] Within the framework of deep learning-based classification methods, short text intent recognition for social media posts faces unique challenges. Due to the relatively small volume of such text data and the frequent inclusion of non-standard terminology, such as internet slang, these factors contribute to the sparsity of text features, indirectly affecting the effectiveness of directly applying deep learning models to user intent analysis.
[0037] To this end, this invention uses two BERT pre-trained models to achieve vectorized representation of text content and sentiment. It uses Text-Inception and Bi-LSTM modules to extract local and global features of the text, respectively. It uses an improved SENet network to fuse text features and fuses text features and sentiment features through a residual cross-attention mechanism to identify the user's intent.
[0038] Specifically, please refer to Figure 1 The present invention provides a method for identifying network user intent, which can fully uncover the intent of users in malicious events. The method mainly includes the following steps:
[0039] S1: Data Acquisition.
[0040] Collect various types of data for specific social media events, including: tweet text content, tweet posting time, number of comments, number of likes, number of retweets, username, user self-introduction, user follower list, user fan list, etc.
[0041] In this embodiment, the open-source web crawler Scweet is used to collect text data of social media posts during a specific event, and the collected data is converted into CSV format for formatting processing before proceeding to step S3.
[0042] S2: Data preprocessing.
[0043] Data cleaning is achieved by removing irrelevant characters and unifying formats, such as special characters, hyperlinks, and user mentions; text segmentation is realized by splitting each tweet text into basic units or symbols (tokens); data noise reduction is achieved by removing stop words, for example, removing common words that contribute little to semantic analysis, such as "的", "是", "在", etc.; stemming or lemmatization is performed on the words in the text to maintain their original meanings, for example, the verb "running" is reduced to "run"; special symbol normalization is realized by uniformly mapping these emojis or special constructs to preset tags. After preprocessing all the data, it is transferred to S3.
[0044] S3: Introduction of external knowledge.
[0045] Entity recognition is performed on the preprocessed training corpus to identify text entities, and external knowledge is introduced based on entity descriptions to generate models and knowledge graphs to enhance the text content, resulting in a knowledge-enhanced dataset.
[0046] Specifically, in order to identify the implicit semantics of users in social media texts, such as related historical events, figures, and new network words cited in Weibo posts, etc., this embodiment uses the ENT-DESC entity description generation model combined with the Wiki knowledge graph to generate specific texts corresponding to the entity. In addition, since a post may contain multiple entities, this model can integrate multiple entities, provide certain guidance and restrictions on the generated main entity description, generate entity descriptions more in line with the current context, and add them to the original text as external knowledge to enrich the text semantics and achieve knowledge enhancement of the training corpus. ENT-DESC is an entity generation model based on knowledge graphs proposed at EMNLP in 2020. This method proposes a multi-graph structure that can more comprehensively represent the original graph information, and combines an aggregation method for learning to extract rich graph information to achieve the generation of thematic natural language descriptions of entities.
[0047] The processing flow of the external knowledge introduction module is as Figure 2 shown, and the specific processing steps are as follows:
[0048] 1. Input the preprocessed text dataset T′, and based on NER technology, perform entity recognition on the current text in the text dataset T′;
[0049] 2. Judge the number of entities in the current text. If there are none, go to 5; if there are, go to 3;
[0050] 3. For the current text, use the ENT-DESC entity description generation model, and sequentially use the identified entities as the main entities, and other entities as the guidance and restriction of the main entity description to generate thematic entity descriptions;
[0051] 4. After generating entity descriptions for all entities in the current text, add all entity descriptions to the original text and replace the original text;
[0052] 5. Determine if the current dataset has been traversed. If it has, output the new dataset. If it has not, go back to step 1.
[0053] After knowledge augmentation of all data, proceed to S4 and S5.
[0054] S4: Text feature extraction.
[0055] In this step, local and global features of the text are extracted from the S3 knowledge-enhanced dataset, and text features at different scales are fused to obtain text fusion features.
[0056] Specifically, the pre-trained model Twitter_Emotions_BERT, trained on a large amount of multilingual sentiment text from Twitter, is used to extract and represent the sentiment features of the text. The pre-trained model TwHIN-BERT is then used to convert the text into dynamic word vectors. The word vector sequences are passed through a Text-Inception module and a Bi-LSTM network to obtain local and global features of the text. An improved SENet network is then used to achieve dynamic feature fusion, resulting in fused text features.
[0057] To achieve the above process, this invention employs a text feature extraction architecture consisting of a pre-trained language model layer, a local feature extraction layer, a global feature extraction layer, and a text feature fusion layer. Based on a knowledge-enhanced dataset, the pre-trained language model layer obtains dynamic character vectors of the text. The local and global feature extraction layers acquire the local and global features of the text. The text feature fusion layer then fuses text features at different scales. Each layer is further described below:
[0058] Pre-trained language model layer: The TwHIN-BERT pre-trained model, designed for social media, is employed. Proposed at SIGKDD in 2023, this model was trained on 7 billion data points from over 100 different languages. In addition to utilizing text data, it also constructs a heterogeneous information network to enrich social behavior data. Based on its accurate understanding of tweet semantics and multilingual characteristics, this invention uses this pre-trained model as the generated text vector as output, obtaining the output text feature vector.
[0059] Self-Attention Layer: Employing a Self-Attention mechanism, this layer weights the importance of each word within its context, interacting the current word vector with other word vectors in the sentence to better understand the overall meaning. This allows the model to go beyond relying solely on local word context information and understand broader semantic relationships across the text. This global semantic understanding enables the subsequent Text-Inception and Bi-LSTM modules to perform deep feature extraction within a rich semantic context. The Self-Attention mechanism module is as follows... Figure 3 As shown, the implementation is as follows:
[0060] 1. Vector Transformation. The Self-Attention mechanism involves three matrices: query (Q), key (K), and value (V), used to transform text vectors, xxx (function). The specific calculation is as follows:
[0061] Q i =W Q x i
[0062] K i =W K x i
[0063] V i =W V x i
[0064] Where, x i W represents the vector corresponding to the i-th token. Q W K W V It is the weight matrix, which contains parameters that can be learned during training.
[0065] 2. Calculate the output. This is done by calculating the dot product of the query (Q) and all keys (K) in the sequence, and then scaling the result using a scaling factor. After scaling and applying the softmax function, the result is multiplied by the vector V:
[0066]
[0067] Where Softmax is the normalization operation, d k It is the dimension of Q and K.
[0068] Local Feature Extraction Layer: Utilizing the Text-Inception module, the depth and width of the network are increased while controlling computational cost, enabling the extraction of local semantics from tweets. The Text-Inception module consists of a two-layer structure, capturing text features of varying lengths by using convolutional kernels of different sizes and network layers to obtain local semantic information. This ensures not only the extraction of key fine-grained information but also the capture of long-range dependencies in the text, enhancing the model's overall understanding of the text. The first layer uses 1×1 and 1×3 convolutional kernels, focusing on capturing key fine-grained features. In the second layer, based on the feature extraction structure of the first layer, convolutional kernels of the same and larger sizes are introduced to further expand the network's perceptual range. The Text-Inception module is as follows: Figure 4 As shown, the implementation is as follows:
[0069] y1=F 1 (x,W 1 )
[0070] y2=F 3 [F 1 (x,W 1 ),W 3 ]+B bn+relu
[0071] y3=F 5 [F 3 (x,W 3 ),W 5 ]+B bn+relu
[0072] y4=F 3 (x,W 3 )
[0073] Y = [y1, y2, y3, y4]
[0074] Among them, W g These are the weights of the convolution kernel with size g, where g is the size of the convolution kernel, and x represents the vector corresponding to a token. F g B represents the convolution process with a kernel size of g. bn+relu This indicates that a BN layer and ReLU activation function are used for processing after the convolution process, y i Y represents the output of the i-th channel.
[0075] Global Feature Extraction Layer: Utilizing a Bi-LSTM network, by combining forward and backward LSTM structures, it better captures long-term dependencies in text sequences, obtaining more comprehensive contextual semantic information. The Bi-LSTM module is as follows: Figure 5 As shown, the implementation is as follows:
[0076]
[0077] in, and They represent x respectively t As the state vectors of the forward and backward LSTMs when input, x t h represents the vector corresponding to the t-th token. t express and The final output of the current layer is obtained by splicing the components.
[0078] The workflow of Bi-LSTM is as follows:
[0079] 1. The forward LSTM iterates through the word embedding matrix X step by step, from the first token to the last token, capturing and accumulating the forward context information of the sequence one by one, generating a series of forward state vectors.
[0080] 2. The backward LSTM starts from the end of the sequence and traverses backward from the last token to the first token. This process aims to capture the backward context information of the sequence and generate a set of backward state vectors accordingly.
[0081] 3. To obtain a comprehensive representation of each position that integrates forward and backward context information, this invention uses vector concatenation to merge the forward and backward state vectors at corresponding positions, forming the final output state vector (h1, h2, h3, ..., h...). n ),in This represents the bidirectional state vector corresponding to the t-th token.
[0082] Text Feature Fusion Layer: By improving the SENet network and introducing a channel attention mechanism, dynamic fusion of text features is achieved, aiming to refine the processing of text information and enhance the model's performance. The SENet network introduces a Squeeze-and-Excitation (SE) module to recalibrate the response intensity of each feature channel, effectively enhancing the model's ability to capture key information and suppressing interference from unimportant features. This process is based on the multi-scale text features extracted in previous stages by the Text-Inception and Bi-LSTM modules. Building upon this, SENet dynamically allocates weights to different channels to achieve optimized feature integration.
[0083] To better adapt to the fusion requirements of text features, this invention modifies the Squeeze stage of SENet. Specifically, given that text feature vectors contain rich semantic information, with each dimension potentially carrying different semantic features and contextual dependencies—similar to the visual information carried by different color channels in image processing—this invention treats each text feature vector as a channel. Unlike global max pooling, it performs global average pooling on these channels, thereby better preserving and fusing information. The improved SENet network is more suitable for text features, enabling dynamic fusion of local and global text features, such as... Figure 6 As shown, its specific implementation is as follows:
[0084] 1. Feature Concatenation. By adjusting the number of convolutional kernels in the Text-Inception module and the size of the Bi-LSTM hidden layers, the output features of the two modules are concatenated: the features output by the Text-Inception module... The feature dimension of the output of Bi-LSTM is The splicing feature is obtained by splicing the two together. Where batch represents the batch size, n1 and n2 represent the sequence lengths of the two sets of feature vectors respectively, and m is the dimension of the feature.
[0085] 2. Modified SENet network.
[0086] In the Squeeze phase of SENet, for X concat element x concat Compression is performed along the last dimension to obtain a new feature z:
[0087]
[0088] Where m is the dimension of the feature, x concat It is X concat The element z is One of the elements.
[0089] In the excitation stage of SENet, two fully connected layers are used to limit model complexity and promote generalization. The first layer is a compression layer, which reduces the feature dimension, followed by a ReLU activation function; the second layer is an expansion layer, which restores the original feature dimension and applies a sigmoid function to obtain the importance weights for each channel.
[0090] S = F ex (Z,W)=σ(W2δ(W1Z))
[0091] Where δ is a nonlinear function, taking the ReLU activation function, and σ represents the Sigmoid function. The dimensionality reduction ratio is r.
[0092] For the vector x, which is considered as a channel of text features concat By associating the importance weights s of each channel with the channel vector x concat Multiply, that is
[0093]
[0094] Therefore, the text fusion features are ultimately obtained. Switch to S6.
[0095] S5: Sentiment feature extraction.
[0096] In this step, the open-source Twitter_Emotions_Bert pre-trained model is used on the S3 knowledge-enhanced dataset to extract and represent sentiment features, thus obtaining the sentiment features. Where u represents the number of tokens and v represents the dimension of each token, proceed to S6.
[0097] S6: Text-sentiment feature fusion.
[0098] Based on the residual cross-attention mechanism, this approach fully leverages the complementarity between different features. By calculating the attention scores between text features and sentiment features, and then weighting and summing the sentiment features, the most relevant sentiment information is fused into the text features. Residual connections are introduced to alleviate the vanishing gradient problem, deepening the understanding of text and sentiment. Finally, the text-sentiment fusion features are obtained by fusing the text fusion features and sentiment features. The residual cross-attention mechanism module is as follows: Figure 7 As shown, the implementation method for fusing text fusion features and sentiment features is as follows:
[0099] 1. Obtain Q, K, and V through linear transformation.
[0100] For the text fusion features obtained from S4 and S5 and emotional characteristics because Since the dimensions of Y and Y are inconsistent, linear transformations or other methods are used to map them to a common dimensional space d. k Ensure that Q, K, and V have the same dimensions for easier subsequent calculations:
[0101] Q = XW Q
[0102] K = YW K
[0103] V = YW V
[0104] Among them, W Q WK W V It is the weight matrix, which consists of parameters that can be learned during training.
[0105] 2. Calculate the Attention score
[0106] The attention score between Q and K is calculated, which represents the correlation between each text fusion feature and all sentiment features, as shown in the following formula:
[0107]
[0108] Among them, matrix multiplication QK T Generate an m×n score matrix, where each element represents x. i and y j The correlation between them. Divide by This is to prevent gradient problems caused by excessively large dot product results. Finally, the Softmax function is applied to each row to convert the score into a probability distribution, which is used to measure each x. i The importance of the corresponding elements in Y.
[0109] 3. Feature fusion
[0110] The output is obtained by weighted summation of V using the Attention scores. Each x in i For each, it incorporates the emotional information most relevant to it. Furthermore, in order to integrate features with the text... To perform addition, this invention introduces a weight matrix. The matrix undergoes dimensionality transformation. Furthermore, to mitigate the vanishing gradient problem and achieve feature fusion and enhancement, residual connections are introduced to obtain the final output:
[0111]
[0112] Where Output represents the final output, i.e., the text-sentiment fusion feature, W out Represents the weight matrix. The text fusion features of the input are represented by d. x Representing text fusion features Dimensions.
[0113] S7: User intent recognition.
[0114] Based on the text-sentiment fusion features obtained from S6, user intent is identified using functions such as the Softmax function. Specifically, the Softmax function converts the scores into probabilities, and the text is ultimately classified into the intent category with the highest probability to determine whether the user to whom the current text belongs has a specific intent.
[0115] This invention selects a publicly available dataset of hate speech with specific intent from Twitter for testing. This dataset is built based on a hate speech dictionary provided by Hatebase. Tweets containing terms from the dictionary were searched and collected on the Twitter social platform via the Twitter API. The dataset is labeled by the CrowdFlower platform and contains a total of 25,000 tweets, clearly identifying whether each tweet has a specific intent.
[0116] This invention selects seven representative methods for comparison:
[0117] SVM: This method generates text features using N-grams and then uses an SVM as a classifier.
[0118] BiLSTM: This method constructs an input vector based on FastText, passes the input vector through a Bi-LSTM layer and an average pooling layer respectively, concatenates the outputs of the two channels, passes through a fully connected layer, and uses the Softmax function to generate the final prediction.
[0119] CNN-GRU: This method uses CNN convolutional layers with max pooling to extract local n-gram features, then uses a single GRU to further extract sequence features, and finally uses the Softmax function to classify statements with specific intent.
[0120] Neural Ensemble: This method is a CNN-based ensemble learning approach that combines 10 convolutional neural networks with different weight initializations. The convolutional results with a kernel size of 3 are pooled, followed by a global max pooling layer, a fully connected layer, and a softmax function. Finally, the softmax results from the 10 sub-models are combined, and the class with the highest average value is selected as the winning class to generate the final classification result.
[0121] RoBERTa: This model improves upon BERT by removing the NSP (Next Sentence Prediction) task, adjusting the dynamic mask generation strategy, and using a larger dataset and longer training time. The model focuses on improving the language understanding ability and is more suitable for short text scenarios.
[0122] HateBERT: This model is based on the RALE dataset, a large dataset of banned comments from the Reddit community. It contains English comments from the Reddit community that have been banned for being offensive, abusive, or hateful. It is retrained on BERT and the model's output embedding vectors are classified by passing them through fully connected layers and a Softmax function.
[0123] BERT+BiLSTM: To understand the semantics of the whole text, this method connects a BiLSTM layer after BERT. For the output sequence of the BERT model, the output corresponding to each token in the sequence is used as the input of BiLSTM. The final hidden state is classified through a fully connected layer and a Softmax function.
[0124] This invention selects precision, recall, and F1 score as more comprehensive and impartial evaluation metrics to accurately assess the performance of user intent recognition. Precision focuses on the proportion of text (TP) that actually possess a specific intent among the texts (TP+FP) identified by the model. Recall measures the proportion of texts (TP) correctly identified by the model out of all texts (TP+FN) that actually possess a specific intent. The F1 score serves as a harmonic mean of precision and recall, providing a single performance metric to achieve an optimal balance between precision and recall. The calculation formula is as follows:
[0125]
[0126] The results of different user intent recognition are shown in the table below.
[0127] Table 1. User Intent Recognition Performance Table
[0128]
[0129]
[0130] As shown in the table, the proposed method outperforms seven baseline methods, demonstrating that the user intent recognition model based on multi-feature fusion effectively integrates the textual semantic and sentiment features in user statements on social networks. The improvement of the proposed method compared to other methods using pre-trained models proves that it effectively mines the local, global, and sentiment features of the text.
[0131] The above description is a further detailed explanation of the present invention in conjunction with specific preferred embodiments. It should not be considered that the specific embodiments of the present invention are limited to this. For those skilled in the art, several simple deductions or substitutions can be made without departing from the concept of the present invention, and all of these should be considered to fall within the patent protection scope defined by the claims submitted by the present invention.
Claims
1. A network user intent recognition method, characterized by, Includes the following steps: Collect data on specific social media events, and format and preprocess it; For the preprocessed data, text entities are identified, and external knowledge is introduced based on entity description generation models and knowledge graphs to achieve text content enhancement, resulting in a knowledge-enhanced dataset. For knowledge-enhanced datasets, sentiment features, local and global text features are extracted, and text features at different scales are fused to obtain text fusion features; Based on the residual cross-attention mechanism, text fusion features and sentiment features are fused to obtain text-sentiment fusion features, and social network user intent classification is achieved based on text-sentiment fusion features; The method for extracting emotional features is as follows: The Twitter_Emotions_Bert pre-trained model, trained on a large amount of sentiment text in multiple languages on Twitter, is used to extract and represent the sentiment features of the text. The method for obtaining the text fusion features is as follows: The pre-trained model TwHIN-BERT is used to transform text into dynamic character vectors. The character vector sequence is passed through the Text-Inception module and the Bi-LSTM network to obtain the local and global features of the text. The improved SENet network is used to achieve dynamic feature fusion to obtain the text fusion features. The improved SENet network modifies the Squeeze stage of SENet by treating the vector of each text feature as a channel and performing global average pooling on the channel. The method for achieving dynamic feature fusion using the improved SENet network is as follows: 1) Adjust the number of convolutional kernels in the Text-Inception module and the size of the hidden layers in the Bi-LSTM network, and concatenate their output features: The features output by the Text-Inception module are... The output of the Bi-LSTM network is characterized by The splicing features are obtained by combining the two. ,in, and These represent the sequence lengths of the two sets of feature vectors, respectively. The dimension of the feature; 2) In the Squeeze phase of SENet, for elements Compression is performed along the last dimension to obtain a new feature. : in, yes One of the elements; 3) In the SENet excitation stage, two fully connected layers are used to limit model complexity and promote generalization. The first layer is a compression layer that reduces the feature dimension, followed by a ReLU activation function; the second layer is an expansion layer that restores the original feature dimension and applies the Sigmoid function to obtain the importance weights for each channel. in, Represents the ReLU activation function. This represents the Sigmoid function. , , For dimensionality reduction ratio; For vectors of text features considered as channels By weighting the importance of each channel With channel vector Multiply them, that is: Therefore, the text fusion features are ultimately obtained. .
2. The network user intent recognition method according to claim 1, characterized in that, The method for collecting, formatting, and preprocessing data from specific social media events is as follows: Based on the open-source web crawler Scweet, we collect text data of social media posts during specific events and convert the data into CSV format. The data is preprocessed through data cleaning, text segmentation, stop word removal, stemming, and special symbol normalization. The social media-specific event data includes: tweet text content, tweet posting time, number of comments, number of likes, number of retweets, username, user bio, user follower list, and user fan list.
3. The network user intent recognition method according to claim 1, characterized in that, The method for enhancing text content is as follows: By combining the ENT-DESC entity description generation model with a Wiki knowledge graph, descriptions of entities in text content are generated and added to the original text as external knowledge, enriching the semantics of the text and achieving knowledge enhancement of the collected data.
4. The network user intent recognition method according to claim 3, characterized in that, The descriptions of entities in the generated text content are added to the original text as external knowledge, as follows: Using the ENT-DESC entity description generation model, the identified entities are used as the main entities, and other entities are used as guides and constraints for the main entity description to generate thematic entity descriptions. After generating entity descriptions for all entities in the current text, add all entity descriptions to the original text and replace the original text.
5. The network user intent recognition method according to claim 1, characterized in that, The text-sentiment fusion feature is obtained by fusing text fusion features and sentiment features based on the residual cross-attention mechanism, as follows: 1) Integrating text features and emotional characteristics Mapped to a common dimensional space ,make sure Q , K and V They have the same dimensions; 2) Calculation Q and K The attention score between each text fusion feature and all sentiment features represents the correlation between each text fusion feature and all sentiment features; 3) Utilize attention scores to V We perform a weighted summation and introduce a weight matrix. The matrix obtained by summation is transformed in dimension, and a residual join is introduced to obtain the final output: in, This represents the final output, namely the text-sentiment fusion features. Representing text fusion features Dimensions.
6. The network user intent recognition method according to claim 1, characterized in that, Intent recognition based on fused features is performed as follows: The score is converted into a probability using the Softmax function, and the text is finally classified into the intent category with the highest probability, which is used to determine whether the user to whom the current text belongs has any intent.
7. A network user intent recognition system that implements the network user intent recognition method according to any one of claims 1 to 6, characterized in that, include: The data acquisition module collects data on specific events on social media. The data preprocessing module formats and preprocesses the collected data; The external knowledge introduction module identifies text entities in the preprocessed data and introduces external knowledge based on entity description generation models and knowledge graphs to enhance text content, resulting in a knowledge-enhanced dataset. The text feature extraction module extracts local and global features from the knowledge-enhanced dataset and fuses text features at different scales to obtain text fusion features. The sentiment feature extraction module extracts sentiment features from the knowledge-enhanced dataset; The text-sentiment feature fusion module, based on the residual cross-attention mechanism, fuses text fusion features and sentiment features to obtain text-sentiment fusion features; The intent recognition module determines intent based on text-emotion fusion features.
Citation Information
Patent Citations
Text sentiment analysis method of two-channel Attention model based on Bert
CN115906816A
Multi-modal emotion recognition method and device
CN116955601A