Network user intention recognition method

Through the combination of Bert pre-training model and SENet network, the global and local features of the intention of social network users are extracted, and emotional features are integrated through the residual cross attention mechanism, which solves the problem that the existing technology is difficult to identify the intention of malicious users in social networks. , realizes efficient and accurate user intention recognition.

CN119179783AActive Publication Date: 2024-12-24XI AN JIAOTONG UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411341326.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2024-12-24
Estimated Expiration
2044-09-25

AI Technical Summary

Technical Problem

The prior art is difficult to effectively identify malicious user intentions carefully disguised or expressed obscurely in social networks. Traditional methods such as dictionary and rules, statistical classification and deep learning methods have limited scalability, high data dependence, and difficulty in capturing complex semantic relationships. question.

Method used

The Bert pre-trained model is used to vectorize text content and emotions, combine Text-Inception and Bi-LSTM modules to extract global and local features, and integrate features through improved SENet network and residual cross attention mechanism to enhance user intention understanding and recognition.

Benefits of technology

It realizes the rapid and accurate identification of user intentions in social networks, improves recognition accuracy, and is suitable for a wide range of applications such as malicious user analysis on social media.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119179783A_ABST
    Figure CN119179783A_ABST
Patent Text Reader

Abstract

The invention provides a network user intention recognition method, which comprises the following steps of: respectively realizing vectorization expression of text content and emotion through two Bert pre-training models, efficiently extracting global and local features of a text by adopting a Text-Inception module and a Bi-LSTM network, further realizing dynamic fusion of the local features and the global features of the text based on an improved SENet network, and finally, extracting the local features and the global features of the text based on the improved SENet network. And dynamically combining the text and the emotional characteristics through a residual cross attention mechanism to realize the understanding and identification of the user intention of the social network. Finally, the user intention can be accurately identified, and support is provided for wide application situations, such as social media malicious user analysis and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of artificial intelligence technology, and in particular relates to a method and system for identifying network user intentions. Background Art

[0002] The common communication methods of social media are accompanied by some negative effects, especially the emergence of malicious users such as users. These users distort the dissemination of information and damage the health of the network environment by manipulating topics, spreading false information, and forming harmful online public opinion. Therefore, the identification of users has become an urgent problem that needs to be solved.

[0003] Currently, many social platforms rely on traditional user behavior analysis and personal information verification to identify user intentions. However, these methods are often difficult to effectively identify malicious users who are carefully disguised and express themselves obscurely. Unlike traditional technologies, by analyzing the content and emotions of social network user posts, more dimensional information can be provided to achieve more accurate identification of user intentions. Intent recognition technology can provide insights into users' potential motivations and purposes, thereby effectively identifying user intentions.

[0004] Intent recognition is an important research area in the field of natural language processing, which aims to identify the user's intention from natural language text. Intent recognition has a wide range of applications in the field of social networks, such as public opinion monitoring, negative purchase intention analysis, suicide prevention, etc. Generally, social network intent recognition technology analyzes the text posts posted by users in social networks to identify their potential intentions.

[0005] Commonly used intent recognition methods include dictionary and rule-based classification methods, statistics-based classification methods, and deep learning-based classification methods.

[0006] Among the dictionary and rule-based classification methods, although these methods do not require training on a large amount of data, they are time-consuming, labor-intensive, and have limited scalability. They have difficulty in identifying intents that slightly deviate from predefined templates and are therefore not suitable for supporting open text in social networks.

[0007] In statistics-based classification methods, statistical models have significant limitations, mainly 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, the limitations of these methods have become more prominent.

[0008] In the classification method based on deep learning, for the short text intent recognition based on social media posts such as Weibo, due to the small amount of text and the presence of some non-standard words such as Internet buzzwords, the text features are sparse, and directly applying the deep learning model to the field of user intent recognition will inevitably be affected. Summary of the invention

[0009] In order to overcome the above-mentioned shortcomings of the prior art, an object of the present invention is to provide a method and system for identifying network user intentions, so as to realize rapid and accurate identification of user intentions.

[0010] In order to achieve the above-mentioned purpose, the present invention proposes a method for identifying network user intentions. It adopts two Bert pre-training models to respectively realize the vectorized representation of text content and emotion, and efficiently extracts the global and local features of the text by combining the Text-Inception and Bi-LSTM modules. Furthermore, the dynamic fusion of local and global features of the text is realized based on the improved SENet network, and the text and emotional features are organically combined through the residual cross-attention mechanism, thereby enhancing the model's understanding and recognition of user intentions. Finally, the present invention can accurately identify user intentions, and then provide support for a wide range of application scenarios, such as malicious user analysis on social media.

[0011] The technical solution adopted by the present invention is:

[0012] A method for identifying network user intentions comprises the following steps:

[0013] Collect, format and pre-process specific event data from social media;

[0014] For the preprocessed data, identify text entities, and introduce external knowledge based on the entity description generation model and knowledge graph to enhance the text content and obtain a knowledge-enhanced dataset;

[0015] For the knowledge-enhanced dataset, sentiment features as well as local and global features of the text are extracted, and text features of different scales are fused to obtain text fusion features;

[0016] Based on the residual cross-attention mechanism, the text fusion features and sentiment features are fused to obtain the text-sentiment fusion features, and social network user intentions are identified based on the text-sentiment fusion features.

[0017] The present invention also provides a system for realizing the social network user intention recognition, comprising:

[0018] Data collection module, which collects data on specific events on social media;

[0019] A data preprocessing module formats and preprocesses the collected data;

[0020] The external knowledge introduction module identifies text entities for the preprocessed data, and introduces external knowledge based on the entity description generation model and knowledge graph to enhance the text content and obtain a knowledge-enhanced data set;

[0021] The text feature extraction module extracts local and global features of the text from the knowledge-enhanced dataset and fuses text features of different scales to obtain text fusion features.

[0022] The sentiment feature extraction module extracts sentiment features from the knowledge-enhanced dataset;

[0023] The text-emotion feature fusion module fuses the text fusion feature with the emotion feature based on the residual cross-attention mechanism to obtain the text-emotion fusion feature;

[0024] The social network user intention recognition module realizes user intention recognition based on text-emotion fusion features.

[0025] Compared with the prior art, the present invention has the following technical effects:

[0026] The present invention realizes the user intention recognition task in social network by using the ENT-DESC entity description generation model combined with the Wiki knowledge graph to perform entity description of text content and enrich text semantics, using the TwHIN-BERT pre-trained model combined with the Bi-LSTM, Text-Inception and improved SENet network architecture to describe text features, using the Twitter_Emotions_Bert pre-trained model to generate emotion features, and fusion of emotion features and text features through a feature fusion method based on residual cross-attention, enriching the description of user intention and achieving the purpose of improving the accuracy of user intention recognition tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The concept, specific structure and technical effects of the present invention will be further described below in conjunction with the accompanying drawings to fully understand the purpose, characteristics and effects of the present invention.

[0028] Figure 1 It is a flow chart of the present invention.

[0029] Figure 2 Introducing module graphs for external knowledge.

[0030] Figure 3 Module diagram of the self-attention mechanism.

[0031] Figure 4 This is the Text-Inception module diagram.

[0032] Figure 5 This is the Bi-LSTM module diagram.

[0033] Figure 6 This is the improved SENet network diagram.

[0034] Figure 7 Module diagram of the residual cross attention mechanism. DETAILED DESCRIPTION

[0035] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0036] In the framework of deep learning-based classification methods, short text intent recognition for social media posts faces unique challenges. Since the amount of such text data is relatively small and often contains non-standard terms such as new words on the Internet, these factors cause the sparsity of text features, which indirectly affects the effectiveness of directly applying deep learning models to user intent analysis.

[0037] To this end, the present invention realizes the vectorized representation of text content and emotion based on two Bert pre-training models, realizes local and global feature extraction of text based on Text-Inception and Bi-LSTM modules respectively, realizes the fusion of text features through the improved SENet network, and fuses text features and emotion features through the residual cross-attention mechanism, so as to identify the user's intention.

[0038] Specifically, see Figure 1 The embodiment of the present invention provides a method for identifying the intention of a network user, which can fully mine the intention of the user in a malicious event, and mainly includes the following steps:

[0039] S1: Data collection.

[0040] Collect various types of data under specific events in social media, including: tweet text content, tweet release time, number of comments, number of likes, number of reposts, user name, user self-introduction, user follower list, user fan list, etc.

[0041] In this embodiment, based on the open source crawler tool Scweet, the text data of social media posts in a specific event is collected, and the collected data is converted into CSV format to achieve formatting processing, and then transferred to 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 achieved by splitting each tweet text into basic units or symbols (tokens); reducing data noise is achieved by removing stop words, for example, removing common words that contribute little to semantic analysis, such as "的", "是", "在", etc.; stemming or lemmatizing the words in the text is used to maintain their original meaning. For example, the verb "running" is reduced to "run"; special symbol normalization is achieved by uniformly mapping these emojis or special constructs to predefined tokens. 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 relevant historical events, figures, and new network terms 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, the 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 as external knowledge to the original text 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 successively 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 to replace the original text;

[0052] 5. Determine whether the current data set has been traversed. If it has been completed, output the new data set. If not, go to 1.

[0053] After all data are enhanced with knowledge, proceed to S4 and S5.

[0054] S4: Text feature extraction.

[0055] In this step, the local features and global features of the text are extracted from the S3 knowledge-enhanced dataset, and the text features of different scales are fused to obtain the text fusion features.

[0056] Specifically, the pre-trained model Twitter_Emotions_Bert, which is trained on a large number of multi-language emotional texts from Twitter, is used to extract and represent text emotional features. The pre-trained model TwHIN-BERT is used to transform text into dynamic word vectors, and the word 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 realize dynamic feature fusion and obtain text fusion features.

[0057] To achieve the above process, the present invention adopts 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. According to the knowledge-enhanced data set, the dynamic word vector of the text is obtained through the pre-trained language model layer, the local and global features of the text are obtained through the local feature extraction layer and the global feature extraction layer, and the fusion of text features of different scales is achieved through the text feature fusion layer. The above layers are further introduced one by one as follows:

[0058] Pre-trained language model layer: The TwHIN-BERT pre-trained model for social media is adopted. The model was proposed in SIGKDD in 2023 and trained on 7 billion data from more than 100 different languages. In addition to using text data, a heterogeneous information network is also constructed to enrich social behavior data. Based on its accurate understanding of Tweet semantics and multilingual characteristics, the present invention uses this pre-trained model as the output to generate a text vector and obtain an output text feature vector.

[0059] Self-attention layer: The Self-Attention mechanism is used to weight the importance of each word in its context, that is, the current word vector interacts with other word vectors in the sentence to better understand the overall meaning of the sentence, so that the model not only relies on the local context information of the word, but also understands the semantic association at a broader text level. This global semantic understanding enables the subsequent Text-Inception module and Bi-LSTM module to perform deep feature extraction in a rich semantic context. Self-Attention mechanism modules such as Figure 3 As shown, the implementation is as follows:

[0060] 1. Vector transformation. The structure of the Self-Attention mechanism involves three matrices, query (Q), key (K) and value (V), which are 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] Among them, x i Represents the vector corresponding to the i-th token, W Q , W K , W V is the weight matrix, a parameter 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 the keys (K) in the sequence, and scaling by a factor Scaling is performed and multiplication with vector V after Softmax:

[0066]

[0067] Among them, Softmax is a normalization operation, d k It is the dimension of Q and K.

[0068] Local feature extraction layer: Using the Text-Inception module, the depth and width of the network are increased while controlling the amount of calculation, so as to extract the local semantics of the tweets. The Text-Inception module consists of a two-layer structure. By using convolution kernels of different sizes and network layers, it captures text features of different lengths at the same time to obtain local semantic information of the text. This not only ensures that key fine-grained information is extracted, but also captures long-distance dependencies in the text and enhances the model's overall understanding of the text. In the first layer, 1×1 and 1×3 convolution kernels are used to focus on capturing key fine-grained features. In the second layer, based on the feature extraction structure of the first layer, convolution kernels of the same and larger sizes are introduced to further expand the network's perception 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 is the weight of the convolution kernel size g, g is the size of the convolution kernel, x represents the vector corresponding to a token, F g represents the convolution process when the convolution kernel size is g, B bn+relu Indicates that the convolution process is followed by the use of the BN layer and the ReLU activation function. i represents the output of the i-th channel, and Y represents the output.

[0075] Global feature extraction layer: By using the Bi-LSTM network and combining the forward and backward LSTM structures, it can better capture the long-term dependencies in the text sequence and obtain more comprehensive contextual semantic information. Figure 5 As shown, the implementation is as follows:

[0076]

[0077] in, and Respectively represent x t As input, the state vector of the forward LSTM and the backward LSTM, x t represents the vector corresponding to the tth token, h t express and The final output of the current layer is obtained by concatenation.

[0078] The workflow of Bi-LSTM is as follows:

[0079] 1. The forward LSTM gradually traverses the word embedding matrix X, 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 backwards, 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. In order to obtain a comprehensive representation of the forward and backward context information at each position, the present invention combines the forward and backward state vectors of the corresponding positions through a vector concatenation method to form the final output state vector (h1, h2, h3, ..., h n ),in Represents the bidirectional state vector corresponding to the t-th token.

[0082] Text feature fusion layer: By improving the SENet network and introducing the channel attention mechanism, the dynamic fusion of text features is realized, aiming to refine the processing of text information and improve the expressiveness of the model. The SENet network introduces the Squeeze-and-Excitation (SE) module to recalibrate the response strength of each feature channel, thereby effectively enhancing the model's ability to capture key information and suppressing the interference of unimportant features. This process is based on the multi-scale text features extracted by the Text-Inception module and the Bi-LSTM module in the previous stage. On this basis, SENet dynamically assigns weights to different channels to achieve optimal integration of features.

[0083] In order to better meet the needs of text feature fusion, the present invention modifies the Squeeze stage of SENet. Specifically, given that the vector of text features contains rich semantic information, each dimension may carry different aspects of semantic features and contextual dependencies, similar to the visual information carried by different color channels in image processing. The present invention treats the vector of each text feature as a channel, and performs global average pooling on these channels, which is different from the global maximum pooling method, so as to better retain and fuse information. The improved SENet network is more suitable for text features and realizes the 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 convolution kernels in the Text-Inception module and the size of the Bi-LSTM hidden layer, the output features of the two are concatenated: The feature dimension of the output of Bi-LSTM is After splicing the two, we get the splicing feature Where batch represents the batch size, n1 and n2 represent the sequence lengths of the two sets of feature vectors, and m is the dimension of the feature.

[0085] 2. Modified SENet network.

[0086] In the Squeeze stage of SENet, for X concat The element x concat , compress along the last dimension to obtain a new feature z:

[0087]

[0088] Among them, m is the dimension of the feature, x concat Yes X concat The element of z is an element of .

[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 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 a Sigmoid function to obtain the importance weight of each channel:

[0090] S=F ex (Z,W)=σ(W2δ(W1Z))

[0091] Among them, δ is a nonlinear function, taking the ReLU activation function, σ represents the Sigmoid function, The dimensionality reduction ratio is r.

[0092] For the vector x of text features considered as channels concat , by adding the importance weight s of each channel to the channel vector x concat Multiply them, that is

[0093]

[0094] Therefore, we finally get the text fusion feature Transfer to S6.

[0095] S5: Emotional feature extraction.

[0096] In this step, the open source Twitter_Emotions_Bert pre-trained model is used to extract and represent the emotion features of the S3 knowledge-enhanced dataset. Where u represents the number of tokens, and v represents the dimension of each token, which is transferred to S6.

[0097] S6: Text-sentiment feature fusion.

[0098] Based on the residual cross attention mechanism, the complementarity between different features is fully utilized. By calculating the attention score between text features and sentiment features, the sentiment features are weighted and summed, and the most relevant sentiment information is integrated into the text features. The residual connection is introduced to alleviate the gradient vanishing problem, deepen the understanding of text and sentiment, and finally integrate the text fusion feature and the sentiment feature to obtain the text-sentiment fusion feature. Figure 7 As shown, the implementation method of fusing text fusion features with sentiment features is as follows:

[0099] 1. Obtain Q, K, and V through linear transformation.

[0100] For the text fusion features obtained by S4 and S5 and emotional characteristics because The dimensions of d and Y are inconsistent, so they are mapped to a common dimensional space d through linear transformation and other methods. k , ensuring that Q, K, and V have the same dimensions for subsequent calculations:

[0101] Q=XW Q

[0102] K=YW K

[0103] V=YW V

[0104] Among them, W Q , WK , W V is the weight matrix, which is the parameter that can be learned during the training process.

[0105] 2. Calculate Attention score

[0106] Calculate the attention score between Q and K, which represents the correlation between each text fusion feature and all sentiment features. The calculation formula is as follows:

[0107]

[0108] Among them, the matrix multiplication QK T Generate an m×n score matrix, where each element represents x i and j Divided by This is to prevent the gradient problem caused by the dot product result being too large. Finally, the Softmax function is used on each row to convert the score into a probability distribution, which is used to measure the probability of each x. i The importance of the corresponding element in Y.

[0109] 3. Feature Fusion

[0110] The output pair is obtained by weighted summing V using the Attention score. For each x in i In addition, in order to integrate features with text To add, the present invention introduces the weight matrix The matrix is ​​transformed in dimension. In addition, in order to alleviate the gradient vanishing problem and realize feature fusion and enhancement, residual connection is introduced to obtain the final output:

[0111]

[0112] Among them, Output represents the final output, that is, the text-emotion fusion feature, W out represents the weight matrix, represents the input text fusion feature, d x Represents text fusion features Dimension.

[0113] S7: User intent recognition.

[0114] Based on the text-emotion fusion features obtained in S6, the user intent is identified using the Softmax function. Specifically, the score is converted into a probability through 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 a specific intent.

[0115] The present invention selects a public dataset of Twitter specific intention speech for testing. The dataset is constructed based on the hate speech dictionary provided by Hatebase. Tweets containing terms in the dictionary are searched and collected through the Twitter API on the Twitter social platform. After being annotated by the CrowdFlower platform, the dataset contains a total of 25,000 tweets, which clearly identify whether each tweet has a specific intention.

[0116] The present invention selects seven representative methods for comparison:

[0117] SVM: This method generates text features by using N-gram and then uses SVM as a classifier.

[0118] BiLSTM: This method constructs an input vector based on FastText, passes the input vector through the Bi-LSTM layer and the 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 a CNN convolutional layer with a maximum pooling function to extract local n-gram features, and then further extracts sequence features through a single GRU. Finally, the Softmax function is used to classify speech with specific intent.

[0120] Neural Ensemble: This method is an integrated learning method based on CNN. It combines 10 convolutional neural networks with different weight initializations, aggregates the convolution results with a convolution kernel size of 3, and sequentially performs the global maximum pooling layer, fully connected layer and Softmax function. Finally, the Softmax results from the 10 sub-models are combined, and the category with the highest average value is selected as the winning category to generate the final classification result.

[0121] RoBERTa: This model is improved on the basis of BERT. By removing the NSP (Next Sentence Prediction) task, adjusting the dynamic mask generation strategy, and using a larger data set and longer training time, the model focuses on improving the model's language understanding ability and is more suitable for short text scenarios.

[0122] HateBERT: This model is based on RALE, a large dataset of banned comments in the Reddit community. It contains English comments from the Reddit community that were banned for being offensive, abusive, or hateful. It is retrained on Bert and the embedding vector output by the model is classified through a fully connected layer and a Softmax function.

[0123] BERT+BiLSTM: This method uses a BiLSTM layer after Bert to understand the semantics of the entire text. For the output sequence of the BERT model, the output corresponding to each token in the sequence is used as the input of the BiLSTM. The final hidden state is classified through a fully connected layer and a Softmax function.

[0124] The present invention selects precision, recall, and F1-score as more comprehensive and fair evaluation indicators to accurately evaluate the performance of user intent recognition. Precision focuses on the proportion of texts (TP) that actually have specific intent tendencies among the texts (TP+FP) recognized by the model. Recall is used to measure the proportion of texts (TP) correctly recognized by the model among all texts (TP+FN) that actually have specific intent tendencies. F1-score is the harmonic average of precision and recall, providing a single performance measurement standard to achieve the optimal balance between precision and recall. The calculation formula is as follows:

[0125]

[0126] The recognition effects of different user intentions are shown in the following table.

[0127] Table 1 User intention recognition effect table

[0128]

[0129]

[0130] From the recognition results in the table, it can be seen that the performance of the method proposed in this paper exceeds that of 7 baseline methods, proving that the user intention recognition model based on multi-feature fusion effectively integrates the text semantics and emotional feature information in the speech content of social network users; the improvement of the method in this paper compared with other methods using pre-training models proves that it effectively mines the local features, global features and emotional features of the text.

[0131] The above content is a further detailed description of the present invention in combination with a specific preferred embodiment. It cannot be determined that the specific embodiments of the present invention are limited to this. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as belonging to the scope of patent protection determined by the claims submitted by the present invention.

Claims

1. A method for identifying network user intentions, characterized in that: The steps include: Collect, format and pre-process specific event data from social media; For the preprocessed data, identify text entities, and introduce external knowledge based on the entity description generation model and knowledge graph to enhance the text content and obtain a knowledge-enhanced dataset; For the knowledge-enhanced dataset, sentiment features as well as local and global features of the text are extracted, and text features of different scales are fused to obtain text fusion features; Based on the residual cross-attention mechanism, the text fusion features and sentiment features are fused to obtain the text-sentiment fusion features, and the social network user intention classification is realized based on the text-sentiment fusion features.

2. The method for identifying network user intentions according to claim 1, characterized in that: The method for collecting social media specific event data and formatting and preprocessing it is as follows: Based on the open source crawler tool Scweet, collect text data of social media posts in specific events and convert the data into CSV format; Preprocess the data through data cleaning, text segmentation, stop word removal, stemming, and special symbol normalization operations; The social media specific event data includes: tweet text content, tweet publishing time, number of comments, number of likes, number of reposts, user name, user self-introduction, user follower list, and user fan list.

3. The method for identifying network user intentions according to claim 1, characterized in that: The method for implementing text content enhancement is as follows: The ENT-DESC entity description generation model is combined with the Wiki knowledge graph to generate descriptions of entities in the text content and add them to the original text as external knowledge to enrich the text semantics and achieve knowledge enhancement of the collected data.

4. The method for identifying network user intentions according to claim 3, characterized in that: The description of the entity in the generated text content is added to the original text as external knowledge, and the method is as follows: Using the ENT-DESC entity description generation model, the identified entity is used as the main entity, and other entities are used as the guide and restriction of the main entity description to generate thematic entity descriptions; After generating entity descriptions for all entities in the current text, all entity descriptions are added to the original text to replace the original text.

5. The method for identifying network user intentions according to claim 1, characterized in that: The method for extracting emotional features is as follows: The pre-trained model Twitter_Emotions_Bert, which is trained on a large amount of multilingual emotional text from Twitter, is used to extract and represent text emotional features.

6. The method for identifying network user intentions according to claim 1, characterized in that: The method for obtaining the text fusion feature is as follows: The pre-trained model TwHIN-BERT is used to transform text into dynamic word vectors. The word 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 realize dynamic feature fusion and obtain text fusion features; The improved SENet network is a modification of the Squeeze stage of SENet, treating each text feature vector as a channel and performing a global average pooling operation on the channel.

7. The method for identifying network user intentions according to claim 6, characterized in that: The method for realizing dynamic feature fusion using the improved SENet network is as follows: 1) Adjust the number of convolution kernels of the Text-Inception module and the size of the hidden layer of the Bi-LSTM network, and concatenate the output features of the two: The output features of the Text-Inception module are The output characteristics of the Bi-LSTM network are After splicing the two, we get the splicing feature Among them, n1 and n2 represent the sequence lengths of the two sets of feature vectors, and m is the dimension of the feature; 2) In the Squeeze stage of SENet, for X concat The element x concat , compress along the last dimension to obtain a new feature z: Where z is an element of 3) In the Excitation stage of SENet, two fully connected layers are used to limit the 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 weight of each channel: S=F ex (Z,W)=σ(W2δ(W1Z)) Among them, δ represents the ReLU activation function, σ represents the Sigmoid function, r is the dimensionality reduction ratio; For the vector x of text features considered as channels concat , by adding the importance weight s of each channel to the channel vector x concat Multiply them, that is: x concat =sx concat Therefore, we finally get the text fusion feature X concat =[x1,x2,...,x n1+n2 ] Τ .

8. The method for identifying network user intentions according to claim 1, characterized in that: Based on the residual cross attention mechanism, the text fusion feature and the sentiment feature are fused to obtain the text-sentiment fusion feature, and the method is as follows: 1) Fusion of text features and emotional characteristics Mapped to a common dimensional space d k , make sure Q, K and V have the same dimensions; 2), calculate the attention score between Q and K, which represents the correlation between each text fusion feature and all sentiment features; 3) Use the attention score to perform weighted summation on V and introduce the weight matrix The matrix obtained by summing is transformed in dimension and a residual connection is introduced to obtain the final output: Output=Attention(Q,K)·V·W out +X concat Among them, Output represents the final output, that is, the text-sentiment fusion feature, d x Represents the text fusion feature X concat Dimension.

9. The method for identifying network user intentions according to claim 1, characterized in that: The method for performing intention recognition based on fusion features is as follows: The scores are converted into probabilities through 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 intent.

10. An intention recognition system implementing any one of claims 1 to 9, characterized in that: include: Data collection module, which collects data on specific events on social media; A data preprocessing module formats and preprocesses the collected data; The external knowledge introduction module identifies text entities for the preprocessed data, and introduces external knowledge based on the entity description generation model and knowledge graph to enhance the text content and obtain a knowledge-enhanced data set; The text feature extraction module extracts local and global features of the text from the knowledge-enhanced dataset and fuses text features of different scales to obtain text fusion features. The sentiment feature extraction module extracts sentiment features from the knowledge-enhanced dataset; The text-emotion feature fusion module fuses the text fusion feature with the emotion feature based on the residual cross-attention mechanism to obtain the text-emotion fusion feature; The intention recognition module determines the intention based on the text-sentiment 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

  • Face and situational emotion recognition method based on attention mechanism

    CN117636426A

  • Short text sentiment analysis method based on multi-head attention mechanism and multi-model fusion

    CN117764084A

  • Semantic sentiment analysis method fusing in-depth features and time sequence models

    US11194972B1