A multi-view feature fusion social network user personality detection method
Patent Information
- Application Number
- CN202511812983.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-04
- Publication Date
- 2026-09-25
- Estimated Expiration
- 2045-12-04
AI Technical Summary
[0009]然而现有技术仍存在不足:其一,过度依赖预训练语言模型,忽视了情感信息和心理语言特征的作用,限制了模型理解复杂人格特质的能力;其二,在自动组合多条贴文的过程中,常见的三类策略(单编码器、顺序或层次编码器、无序编码器)各有缺陷:单编码器策略未能区分不同贴文的重要性;顺序或层次编码器虽然考虑了时间顺序,但容易忽视贴文间的交互关系;无序编码器强调交互关系,但完全忽略了用户行为的时间动态特征
[0038](1)为了更深入地探索社交媒体贴文间的复杂交互,本发明提出了贴文-人格特质异构图注意力网络,通过对贴文之间、贴文与人格特质之间、人格特质之间的多层次交互进行建模,能够有效捕捉用户的深层人格特质,解决了传统方法难以分析异构信息关联性的问题。
Smart Images

Figure CN121658948B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of personality profiling technology, natural language processing technology, and graph attention networks, specifically a method for detecting the personality of social network users through multi-perspective feature fusion. Background Technology
[0002] With the continuous development of the internet, it has become an indispensable part of people's lives, and the number of internet users continues to grow. Social networks have gradually become important channels for people to express their opinions, record their lives, and communicate with users worldwide, generating massive amounts of valuable data on these platforms. Analyzing this data can help uncover user attributes and characteristics, and based on this, construct social network user profiles.
[0003] User personas are target user models built from real data. By characterizing, structuring, and tagging user attributes, they provide a basis for personalized services and product optimization. Building upon this, user personality profiling, as a higher-level form of user persona, further depicts users' psychological characteristics and personality traits. This not only provides more precise support for service personalization but also serves as a reference for psychological research and user behavior modeling. The core task of user personality profiling is personality detection, which involves analyzing user-generated text and behavioral traces to reveal their potential personality traits.
[0004] Compared to traditional personality testing methods, social network-based personality testing offers advantages such as abundant data, real-time performance, and the complexity of social relationships, making it a research hotspot in recent years. Personality testing provides crucial clues for explaining an individual's behavior, emotions, and motivations, and has wide-ranging applications in recommender systems, personalized services, social network analysis, mental health diagnosis, and sentiment analysis. However, due to the complexity and multidimensionality of personality structure, automated personality testing still faces significant challenges even with current technological capabilities.
[0005] Currently, commonly used personality theories mainly include the Big Five Personality Model and the Myers-Briggs Type Indicator (MBTI). Personality testing is usually modeled as a multi-label classification task, but its challenges lie in two aspects: firstly, the test subjects are multiple posts published by users on social media, which are short, scattered in topic, and not all contain significant personality cues; secondly, how to effectively integrate information from multiple posts to construct a representative user personality profile remains a technical bottleneck.
[0006] Early personality detection methods based on social text primarily relied on traditional feature-based approaches. These methods first extracted various psycholinguistic attributes or statistical features, then fed these features into machine learning models to predict personality traits. For example, Argamon et al. were among the early attempts in personality detection, classifying words in a corpus into four psychologically meaningful categories: function words, cohesive words, evaluation words, and assessment words. They used Support Vector Machines (SVMs) to perform the personality detection task, with the input being the relative frequency of words in each category. Furthermore, Kumar et al. evaluated different SVM kernels, including radial basis function, linear, sigmoid, and multinomial kernels, to determine the most suitable kernel for personality detection. Next, they used various voting techniques to implement SVM kernel sets, such as soft voting, hard voting, and weighted hard voting, ultimately improving the accuracy of personality detection. Traditional personality detection methods are not limited to basic psycholinguistic attributes but also include more sophisticated text analysis techniques that can more accurately capture language patterns related to individual personality traits. Moraes et al.'s research automated the personality assessment process by analyzing text extracted from job applicants' tweets and recommending job roles that matched the candidates. They used a word frequency-inverse document frequency weighting method to generate word vectors, which were then input into various models such as SVM, decision trees, and K-nearest neighbors for personality classification.
[0007] Traditional personality detection methods primarily rely on feature engineering, extracting psycholinguistic attributes or statistical features, and then inputting these features into various machine learning models for personality prediction. The advantage of these methods lies in their explicit feature extraction process, which can intuitively reflect the correlation between language expression and individual psychological traits. However, these methods also have some drawbacks. First, they heavily depend on precise feature engineering and external dictionaries, which may limit the model's generalization ability and adaptability to new domains. Second, traditional methods often neglect the contextual information of textual data because they primarily focus on static, discrete features rather than sequence patterns or contextual relationships within the text. Furthermore, traditional models typically cannot automatically learn new features from the data, limiting their effectiveness when handling complex or unlabeled data.
[0008] With the development of deep learning, deep learning-based methods have gradually become mainstream, and various post encoding methods have emerged. These methods mainly utilize deep learning models to obtain text embeddings and then use the model for personality prediction. For example, Majumder et al. used word vectors for word embedding and convolutional neural networks (CNNs) for feature extraction of articles. Liu built a database of over 10,000 Chinese microblog personality classifications and also used Word2Vec to vectorize microblog texts. Lin chose to use a Transformer encoder to extract features and then used a Long Short-Term Memory (LSTM) network to build a model for personality classification. Jain et al. fine-tuned a pre-trained language model, Bidirectional Encoder Representation Transformer (BERT), to complete the MBTI personality classification task.
[0009] However, existing technologies still have shortcomings: First, they rely too heavily on pre-trained language models, neglecting the role of emotional information and psycholinguistic features, thus limiting the model's ability to understand complex personality traits. Second, in the process of automatically combining multiple posts, the three common strategies (single encoder, sequential or hierarchical encoder, and unordered encoder) each have their own defects: the single encoder strategy fails to distinguish the importance of different posts; while the sequential or hierarchical encoder considers the temporal order, it easily overlooks the interaction relationships between posts; the unordered encoder emphasizes interaction relationships but completely ignores the temporal dynamic characteristics of user behavior. Patent application CN113837445A, entitled "Personality Prediction Method and System Based on Attention Mechanism," addresses the problem of improving the accuracy of multi-task personality prediction models based on a given user behavior feature vector through an attention mechanism. Research object: user social behavior data; prediction target: scores of each personality dimension in a multi-task attention model. Key technical means: constructing feature vectors from user behavior data.
[0010] A single attention mechanism network; a multi-task learning model. Prediction complexity and modeling accuracy: Prediction relies on a single path: feature vector → attention → multi-task prediction; Overall idea: It is a "feature-driven expert system" that relies on predefined user behavior feature vectors and a single attention network structure to perform personality prediction within a given feature format and fixed modeling framework. This invention addresses the problems of heterogeneous multi-source information, complex node relationships, and difficulty in comprehensively modeling temporal dynamics in social network user personality detection; Research object: real post sequences of users on social platforms; Prediction goal: multi-dimensional personality profile; Key technical means: pre-trained language model, outputting multi-dimensional personality results and extracting two-layer features;
[0011] Post-Personality Trait Heterogeneous Graph Construction; MultiAttnGRU Temporal Dynamic Modeling. Prediction Complexity and Modeling Accuracy: Prediction is based on multi-source fusion, including: semantic features, sentiment knowledge, multi-level interaction of graph structure, time series dynamics, and information sharing among personality traits; Overall Idea: It is a "multi-view fusion intelligent agent" that automatically acquires continuous post information, the relationship structure between posts, and time series behavioral dynamics from the social network environment, and adaptively outputs multi-dimensional personality results. Patent application CN118395989A, entitled "A Personality Detection Method Based on Hypergraph Attention Mechanism," addresses the problems of weak semantic representation capabilities of single text and difficulty in handling long-distance semantic dependencies. Its decision-making complexity is evident in its clear core objective: personality prediction relies on a single path: text features → hypergraph higher-order semantics → GCN representation → classification. The research object is the graph structure constructed from post text nodes and their higher-order semantic features. The research objective is to extract more accurate text semantics to improve personality classification performance. The technical field belongs to text semantic processing and personality recognition, with text representation optimization as its core, utilizing technologies such as BER, hypergraph attention, and GCN. The overall approach is that of a "linguist focused on in-depth semantic mining within text," using post text as the sole center and continuously refining the higher-order semantic structure within the text through hypergraph attention and graph convolution, aiming to obtain clearer personality cues from the semantic representation itself. This invention addresses the problems of incomplete personality detection results, insufficient modeling of emotional factors, and inadequate fusion of temporal dynamics and multidimensional personality correlation information. Its decision-making complexity is high, involving emotion + semantic fusion and heterogeneous... Figure 3 Layered interaction, multi-instance sequential modeling, information sharing among personality traits, and multi-dimensional personality prediction; Research objects: multiple user posts, corresponding emotional knowledge, constructed post-personality trait heterogeneous graphs, and post sequences; Research objectives: to obtain multi-dimensional user personality profiles; Technical fields: belonging to the fields of social network user personality detection, graph neural networks, and multi-perspective feature fusion, emphasizing heterogeneous graphs, multi-instance sequence modeling, and emotional knowledge base fusion; Overall idea: a "comprehensive intelligent agent that collaboratively reasons in a multi-perspective information field," which simultaneously listens to text semantics, emotional cues, personality trait relationships, and temporal behavioral trajectories, and autonomously constructs a more complete user personality profile by integrating information from different perspectives.
[0012] Patent CN110119849B, entitled "A Method and System for Predicting Personality Traits Based on Network Behavior," addresses the problem of how to utilize user network behavior characteristics and combine them with time series models to achieve personality prediction. It focuses on the integration of behavioral sequences and LSTM prediction. Data structure: uses linear time series behavior, without involving graph structures or multimodal representations. Prediction granularity: the prediction target is a traditional classification task, predicting each dimension independently. Key technologies: behavioral data feature engineering; time series integration of behavioral vectors; LSTM prediction of personality scores. Overall concept: a "one-dimensional time prediction model based on behavioral sequence statistics," relying on user behavior patterns and using LSTM to make trend predictions in the time dimension. This invention addresses the challenge of integrating multi-perspective semantic features, sentiment knowledge, heterogeneous graph relationships, and sequence dynamic information in social network scenarios to more comprehensively predict multidimensional personality traits. Data structure: It constructs a heterogeneous graph of posts and personality traits, encompassing both unordered and ordered structures. Prediction granularity: The prediction target supports joint prediction of multidimensional and continuous personality traits. Key technologies: Pre-trained language models, text embedding fused with sentiment knowledge bases, heterogeneous graph construction and GAT networks, MultiAttnGRU sequence modeling, and unordered interaction and sequence feature fusion decision-making. Overall concept: It is a "multi-perspective semantic-sentiment-relationship-temporal collaborative modeling personality understanding agent" that comprehensively integrates multiple aspects to construct a comprehensive and fine-grained personality representation.
[0013] In summary, current research methods for personality detection of social network users mainly fall into two categories: traditional model-based methods and deep learning-based methods. Existing technologies either fail to fully capture the complex interactions between posts, lose crucial temporal information during the modeling process, and do not adequately utilize the multi-level interaction relationships between personality traits. These problems make it difficult for existing models to comprehensively and accurately characterize users' personality traits. Therefore, there is an urgent need for a new personality detection method for social network users that can integrate emotional information while ensuring semantic understanding capabilities, and take into account both disordered interaction features and sequential dynamic features, thereby constructing a more accurate and comprehensive user personality profile. This would allow for more effective integration and utilization of the complex interaction information between posts, ultimately leading to a more comprehensive and accurate user personality profile. Summary of the Invention
[0014] Purpose of the invention: To address the shortcomings of existing technologies, this invention provides a multi-perspective feature fusion method for social network user personality detection. It extracts post fusion features based on a pre-trained language model and an external sentiment knowledge base, performs multi-level interaction modeling based on a post-personality trait heterogeneous graph attention network, and performs sequence analysis based on a gated recurrent unit with an attention mechanism. The two features are then fused and input into a classifier to achieve accurate prediction of the user's multi-dimensional personality.
[0015] Technical solution: To achieve the above-mentioned objectives, the present invention adopts the following technical solution:
[0016] A multi-perspective feature fusion method for social network user personality detection, comprising the following steps:
[0017] (1) Semantic-emotion dual feature extraction module
[0018] Based on pre-trained language models and external sentiment knowledge bases, user posts on social media are converted into a form that deep learning models can understand and process, namely, embedding vectors.
[0019] (2) Heterogeneous graph interaction modeling module
[0020] Embed the post information obtained in step (1) into the input construction layer to construct a post-personality trait heterogeneous graph covering three interaction levels, and obtain a multi-level interactive post modeling graph. Then set three levels of interaction: interaction between post nodes, interaction between personality trait nodes and post nodes, and interaction between personality trait nodes and personality trait nodes.
[0021] (3) Posting timing modeling module
[0022] The post information obtained in step (1) is embedded, and after time series modeling and attention layer, the dynamic information in the sequence of social network posts is understood and mined to obtain a time series vector with user behavior and emotional information.
[0023] (4) Feature fusion and personality classification
[0024] The disordered interaction features of personality traits and the temporal features of posts obtained in steps (2) and (3) are fused together and input into the final classifier to classify personality traits in T dimensions.
[0025] (5) System Function Display Module
[0026] Based on the multi-perspective feature fusion social network user personality detection model proposed above, the system automatically crawls the public data of target users from social network platforms, analyzes it, and generates analysis results, including the MBTI personality type, personality image and related personality introduction of the analyzed social network users. Finally, the system displays the user's personality trait profile and related analysis information on the Web platform.
[0027] As a further improvement to the present invention, step (1) includes the following specific steps:
[0028] (11) Step (1) Use a pre-trained language model (BERT) to semantically encode user posts and obtain global semantic representations. Use the BERT tokenizer to convert all posts into a sequence of Token IDs, and then encode each post in the user's set of all posts to obtain the context vector of each post.
[0029] (12) Step (1) Introduce an external sentiment knowledge base (SenticNet) to perform sentiment analysis on the post. This invention performs sentiment analysis by calculating the average polarity score of all identified positive and negative words in the text, 𝐸𝑠𝑐𝑜𝑟𝑒, which serves as an indicator of the sentiment tendency of the entire sentence or post. To further process this sentiment data, this invention uses a discretization method to subdivide the sentiment polarity score into 20 different levels, and then maps them to a 20-dimensional feature vector.
[0030] As a further improvement of the present invention, step (2) includes the following specific steps:
[0031] (21) Based on the dual fusion features of posts obtained in step (1), this invention constructs a heterogeneous graph F covering three interaction levels of posts and personality traits. Specifically, this invention designs a heterogeneous graph model for each user, placing T special user personality trait nodes in the graph. To aggregate information from other nodes, the initial set of representations of all nodes in the heterogeneous graph becomes .
[0032] (22) The Post-Personality Trait Heterogeneous Graph designs two types of nodes: post nodes and personality trait nodes, and conducts a three-level interaction analysis based on these nodes: interaction between post nodes, interaction between personality trait nodes and post nodes, and interaction between personality trait nodes and personality trait nodes. For interaction between post nodes, after a shared linear transformation, a post self-attention mechanism is executed on each node. After obtaining the normalized attention coefficient, a linear combination of the corresponding features is calculated and activated as the output feature of the post node. For interaction between personality trait nodes and post nodes, a linear transformation is performed on the user's personality trait node and the post node. The attention coefficient between the personality trait and the post is calculated. After obtaining the normalized attention coefficient, a linear combination of the corresponding features is calculated as the interaction feature between the personality trait node and the post node. For interaction between personality trait nodes, this invention introduces personality trait attention, which is similar to the implementation of post attention, and will not be elaborated here.
[0033] As a further improvement to the present invention, step (3) includes the following specific steps:
[0034] (31) Based on the post embedding set obtained in step (1) This invention uses these as the initial post sequence, and then inputs these sequences into T GRUs (AttnGRUs) with attention mechanisms for in-depth analysis.
[0035] (32) An attention mechanism is introduced to assign higher weights to key posts in the sequence, thereby highlighting important semantic and sentiment features. Specifically, by adjusting the output sequence of the GRU... Linear transformation and normalization are applied to obtain the attention weights for each sequence member. This invention uses T AttnGRUs to analyze T individual personality traits, and then outputs the obtained T personality traits as a representation. The input is fed into the personality trait interaction layer, and through the personality trait interaction attention layer, information sharing between different personality traits is promoted to obtain sequence analysis features.
[0036] As a further improvement of the present invention, step (4) obtains the disordered interaction features of personality traits and the temporal features of posts from steps (2) and (3), and then splices them together to obtain the fused features. The data is then input into the final MLP classifier to classify personality traits across T dimensions, resulting in the final personality category.
[0037] Beneficial effects: Compared with the prior art, the present invention adopts the above technical solution and has the following advantages:
[0038] (1) In order to explore the complex interactions between social media posts more deeply, this invention proposes a post-personality trait heterogeneous graph attention network. By modeling the multi-level interactions between posts, between posts and personality traits, and between personality traits, it can effectively capture the deep personality traits of users and solve the problem that traditional methods are difficult to analyze the correlation of heterogeneous information.
[0039] (2) In order to make full use of the dynamic changes in personality traits contained in the post sequence information, this invention designs a multi-dimensional temporal model that combines multiple GRU and attention mechanism, which can capture the subtle changes in user personality traits implied in the post temporal characteristics, and make up for the shortcomings of most existing technologies that ignore the order of text publication.
[0040] (3) In order to apply the technical achievements of this invention to practical scenarios, this invention designed and implemented a complete social network user personality profiling system. The system includes front-end display and back-end management functions, providing reliable technical support for the industrial application of social network user personality profiling and promoting the transformation of theoretical research into practical application. Attached Figure Description
[0041] Figure 1 This is the overall framework diagram of the present invention;
[0042] Figure 2 This is a framework diagram of the semantic-sentiment dual feature extraction module;
[0043] Figure 3 This is a framework diagram of the multi-level interaction module for posts;
[0044] Figure 4 It is a post-personality trait heterogeneity diagram;
[0045] Figure 5 These are diagrams illustrating node interactions at three different levels;
[0046] Figure 6 It is the post sequence analysis module;
[0047] Figure 7 It is a personality classification module;
[0048] Figure 8 This is the entry interface for generating a personality profile;
[0049] Figure 9 This is the interface for the personality profile generation results;
[0050] Figure 10 It is the interface for displaying user posts on social networks;
[0051] Figure 11 It is a system dataset analysis and display. Detailed Implementation
[0052] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. The following embodiments are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0053] The overall framework diagram of the present invention is as follows: Figure 1 As shown in the diagram, the semantic-sentiment dual feature extraction module is as follows: Figure 2 As shown, the multi-level interactive module for posts is as follows: Figure 3 As shown, the post-personality trait heterogeneous diagram structure is as follows: Figure 4 As shown, the interaction between nodes at three different levels is illustrated in the diagram. Figure 5 As shown, the post sequence analysis module is as follows: Figure 6 As shown, the personality classification module is as follows: Figure 7 As shown, the personality profile generation interface is as follows: Figure 8 As shown, the personality profile generation result interface is as follows: Figure 9 As shown, the social network user post display interface is as follows: Figure 10 As shown, the system dataset analysis is displayed as follows. Figure 11 As shown.
[0054] like Figure 1As shown, the social network user personality detection method based on multi-perspective feature fusion of the present invention includes the following steps:
[0055] (1) Semantic-emotion dual feature extraction module
[0056] The main function of this module is to convert user posts on social media into embedded vectors. Specifically, it extracts semantic and sentiment information from the posts. The specific steps are as follows: Figure 2 As shown.
[0057] To address the semantic information of user posts, this invention employs a pre-trained language model (BERT) to semantically encode user posts, obtaining a global semantic representation. The BERT tokenizer is then used to convert all posts into a sequence of token IDs for each user's entire post set. Each post in Encode the result to obtain the final result. One post context vector For a given user's N posts, a set of contextual representations can be obtained: In addition, a post attention mask needs to be introduced. The location containing a valid token is marked as 1, and the invalid location is marked as 0, which will be used in step (2).
[0058] To address the sentiment information of posts, this invention introduces an external sentiment knowledge base (SenticNet) to perform sentiment analysis on the posts. This invention performs sentiment analysis by calculating the average polarity score of all 𝑀′ positive and negative words identified in the text, 𝐸𝑠𝑐𝑜𝑟𝑒, as shown in Formula 1.
[0059]
[0060] To further process this sentiment data, this invention employs a discretization method to subdivide the sentiment polarity score into 20 distinct levels, covering the entire sentiment range from completely negative to completely positive. Each level corresponds to a specific sentiment intensity. All sentiment data is then mapped to a 20-dimensional feature vector. The specific methods are shown in formulas 2, 3, and 4.
[0061]
[0062]
[0063]
[0064] in, It is the emotional score of each post. It is the calculated level of emotion. This is the final sentiment feature representation. Finally, the sentiment vector of each post is appended to the semantic vector space to obtain the final post embedding that integrates semantic and sentiment information. The calculation process of the semantic-sentiment dual feature extraction module is shown in Table 1.
[0065] Table 1. Semantic-Emotion Dual Feature Extraction Module Algorithm
[0066]
[0067] (2) Heterogeneous graph interaction modeling module
[0068] This module's main function is to capture and analyze the potential relationships and interactions between social network posts, independent of their posting order. The main modeling methods include post-level attention, personality trait-post-level attention, and personality trait-level attention. The overall framework of this module is as follows: Figure 3 As shown.
[0069] Based on the dual-fusion features of the posts obtained in step (1), a heterogeneous graph 𝐺 containing the above three interaction levels is constructed, such as Figure 4 As shown. Specifically, this invention designs a heterogeneous graph model for each user, placing T unique user personality trait nodes in the graph. To aggregate information from other nodes, the initial set of representations of all nodes in the heterogeneous graph becomes The representation of each personality trait node By embedding a collection of posts The nodes in the graph represent weighted averages, while the edges represent the interaction relationships between different nodes. The heterogeneous graph design incorporates two node types: post nodes and personality trait nodes, and models a three-tiered interaction based on these nodes, such as... Figure 5 As shown.
[0070] (2-1) Regarding the interaction between post nodes, the core purpose of modeling is to mine and extract richer and deeper post features by analyzing the dynamic interaction between posts. Each node is assigned a weight matrix. Parameterized shared linear transformations and execution of post self-attention mechanisms on nodes. The specific calculation formula is shown in Formula 5, where, This indicates the importance of the features of post node j to post node i.
[0071]
[0072] This invention also employs a masked attention strategy to more effectively integrate the structural characteristics of the graph into the self-attention mechanism. Specifically, the attention coefficient... The computation is limited to the first-order neighborhood of node i. Node j within, i.e., node 𝑗∈ The graph attention mask (i.e., the adjacency matrix) is obtained from step (1). We obtain it by taking the outer product of itself and its transpose. Then, we introduce 𝑚 𝑖𝑗 Update As shown in Formula 6, where 𝑚 𝑖𝑗 Let be the connection values of node i and node j in the adjacency matrix 𝑀.
[0073]
[0074] To make the attention coefficients between different nodes easy to compare, consider all possible attention scores of each node i for its neighbor j. Perform softmax normalization, as shown in Equation 7.
[0075]
[0076] In this invention, the attention mechanism 'a' is a single-layer feedforward neural network, consisting of a weight vector. The parameters are parameterized and processed using the Tanh activation function. After full expansion, a linear combination of the corresponding features is calculated using normalized attention coefficients, and then the activation function 𝜎 is applied as the output feature of the post node, as shown in Equations 8 and 9.
[0077]
[0078]
[0079] This invention also introduces a multi-head attention mechanism to enhance the learning stability and ability to handle complex relationships of the self-attention mechanism. After processing the input features using a linear transformation layer, the processed features are divided into K heads, each head processing a portion of the feature information. For each head, normalized weights between nodes i and j are calculated. and corresponding features These calculation results are weighted and summed to form the output feature representation of post node i, as shown in Formula 10.
[0080]
[0081] In this invention, the post node-level interaction mechanism consists of multiple layers, each of which is processed according to the post interaction attention mechanism described above.
[0082] (2-2) Regarding the interaction between personality trait nodes and post nodes, the core purpose of modeling is to capture how personality traits are manifested in posts. First, a linear transformation is performed on the user's personality trait nodes and post nodes, utilizing... and Weight matrices are used to generate query vectors respectively. and key vector Then, by performing masked attention, the graph structure is injected into the mechanism, and the attention coefficient is calculated only for post nodes j that are connected to personality trait node i, i.e., node i ∈ i. 𝑖 Finally, for each personality trait node i, the attention score for all possible neighboring post nodes j. Softmax normalization is then performed. The specific method is shown in formulas 11, 12, and 13, where 𝑚 𝑗 For post node j in post mask 𝑝 𝑚𝑎𝑠𝑘 ∈ℝ 𝑁 The corresponding value in.
[0083]
[0084]
[0085]
[0086] After obtaining the normalized attention coefficient, the corresponding linear combination of features is then calculated as the interaction feature between personality trait nodes and post nodes, as shown in Formula 14.
[0087]
[0088] In this invention, the personality trait-post node-level interaction mechanism consists of multiple layers, each of which is processed according to the aforementioned personality trait-post interaction mechanism.
[0089] (2-3) Regarding the interaction between personality trait nodes, the core purpose of modeling is to more accurately capture and express the user's overall personality structure. This invention introduces personality trait attention, the implementation of which is similar to that of post attention, and will not be elaborated here.
[0090] (3) Posting time sequence modeling
[0091] The main function of this module is to deeply understand and mine the dynamic information in the sequential order of posts on social networks by analyzing post sequences, capturing subtle changes in users' dynamic behavior and emotions on social platforms. The overall framework of this module is as follows: Figure 6 As shown.
[0092] Based on the post dual fusion features obtained in step (1), this invention embeds the obtained posts into a set. As the initial post sequence, these sequences are then fed into T GRUs (AttnGRUs) with attention mechanisms for in-depth analysis. Specifically, the output sequences of the GRUs are analyzed... A linear transformation and a softmax function are applied to obtain the attention weights for each sequence member, and then a post mask is introduced. 𝑚𝑎𝑠𝑘 Adjust the normalized attention weights as shown in Formulas 15 and 16.
[0093]
[0094]
[0095] This invention uses T AttnGRUs to analyze T individual personality traits, and then outputs the obtained T personality traits as a representation. Input is fed into the personality trait interaction layer. Specifically, this involves defining query, key, and value transformations. Let A and B be the linear transformation matrices of query, key, and value, respectively, and let A, B, and C be the transformed query, key, and value matrices, respectively. Then, calculate the attention weights, as shown in Formulas 17 and 18.
[0096]
[0097]
[0098] In the final step, the calculated attention weights are applied, and the input features of the personality trait interaction layer are used. The residual connection strategy is implemented by adding the processed output to the residual connection strategy, which promotes information sharing among different personality traits and obtains the final post time sequence features. This process is shown in Equation 19.
[0099]
[0100] (4) Feature fusion and personality classification
[0101] The main function of this module is to integrate the disordered interaction features of personality traits and the temporal features of posts extracted in steps (2) heterogeneous graph interaction modeling and (3) post temporal modeling, and input them into the final classifier for T-dimensional personality trait classification. The framework of this module is as follows: Figure 7 As shown.
[0102] Based on the disordered interaction characteristics of personality traits obtained in step (2) and the post timing features obtained in step (3) This invention combines these two features sequentially to form T personality trait representations rich in information. .
[0103] Based on the post dual fusion features obtained in step (1) The features are input into different MLP classifiers for detection. For each fully connected layer (except the last classification layer), the processing procedure is shown in Equation 20, where... , , These are the input, weights, and biases of the l-th layer, respectively. An additional fully connected layer is then used, employing the softmax function to predict each personality trait, as shown in Equation 21. Finally, the cross-entropy loss function is applied to the T personality traits, as shown in Equation 22, where V is the number of training samples. For the true label of the j-th personality trait, This represents the predicted probability of this dimension under parameter φ.
[0104]
[0105]
[0106]
[0107] (5) System Function Demonstration
[0108] The system's functions are mainly divided into a data acquisition module, a user management module, a personality profile analysis module, an analysis result management module, and an analysis result feedback module.
[0109] The data acquisition module is used to automatically scrape publicly available data from target users on social networking platforms, and then filter and organize the scraped data into the format required by the system. Currently, the default social networking platform for this system is Reddit, which is also the main data source for the Pandora dataset. The system can expand to include other data source platforms in the future. To ensure efficient and accurate data acquisition, the system uses the praw library (Python Reddit API Wrapper) to scrape data from Reddit. Before starting, the system needs to be registered as an application on the Reddit platform to obtain the necessary client_id and client_secret credentials to verify communication between the application and the Reddit API. Additionally, a user_agent application identifier needs to be provided to help Reddit monitor API usage. Then, the praw Reddit object is initialized, which serves as the main interface for interacting with the Reddit API, allowing the system to efficiently scrape the required data.
[0110] The user management module provides complete user management functions, including user registration, login, information modification, and access control.
[0111] The personality profile analysis module is the core of the personality profile system. After successful login, users can access the social network personality profile generation interface. Users enter the username of a user on a specified social network platform, and the system can automatically crawl and analyze that user's public information and posts on the corresponding platform, thereby automatically generating their personality profile. Figure 9 As shown. After crawling the data, users only need to wait a short while to receive the generated personality profile. The personality profile includes the MBTI personality type, personality image, and related personality description of the analyzed social network users, such as... Figure 9 , 10 As shown.
[0112] The analysis results management module is used to uniformly store and manage the generated user personality profile results. Administrators can use this module to retrieve, view, and edit various analysis results, ensuring the orderly management and utilization of data. The effect is demonstrated as follows: Figure 11 As shown.
[0113] The analysis results feedback module allows users to evaluate and provide feedback on the personality profile analysis results, thereby improving the system's accuracy and user satisfaction. The system will collect this feedback information to provide valuable data support for subsequent algorithm optimization and model adjustments.
Claims
1. A method for detecting the personality of social network users through multi-perspective feature fusion, characterized in that: Includes the following steps: (1) Semantic-emotion dual feature extraction module; Based on a pre-trained language model and an external sentiment knowledge base, users' posts on social media are converted into a form that can be understood and processed by a deep learning model, namely, embedding vectors. (2) Heterogeneous graph interaction modeling module; The post information obtained in step (1) is embedded into the input construction layer to construct a post-personality trait heterogeneous graph covering three interaction levels, and a multi-level interactive post modeling graph is obtained. Then, three levels of interaction are set: interaction between post nodes, interaction between personality trait nodes and post nodes, and interaction between personality trait nodes and personality trait nodes. Step (2) specifically includes the following steps: (21) Based on the dual fusion features of the posts obtained in step (1), a heterogeneous graph of posts and personality traits covering three interaction levels was constructed. Specifically, a heterogeneous graph model was designed for each user, and T special user personality trait nodes were placed in the graph. To aggregate information from other nodes, the initial set of representations of all nodes in the heterogeneous graph becomes ; (22) The Post-Personality Trait Heterogeneous Graph designs two types of nodes: post nodes and personality trait nodes, and conducts a three-level interaction analysis based on these nodes: interaction between post nodes, interaction between personality trait nodes and post nodes, and interaction between personality trait nodes and personality trait nodes. For interaction between post nodes, after a shared linear transformation is performed on each node, a post self-attention mechanism is executed on the node. After obtaining the normalized attention coefficient, the linear combination of the corresponding features is calculated and activated as the output feature of the post node. For interaction between personality trait nodes and post nodes, a linear transformation is performed on the user's personality trait node and post node, and the attention coefficient between personality trait and post is calculated. After obtaining the normalized attention coefficient, the linear combination of the corresponding features is calculated as the interaction feature between personality trait node and post node. For interaction between personality trait nodes, personality trait attention is introduced to achieve a similar effect to the post self-attention mechanism. (3) Posting timing modeling module; The post information obtained in step (1) is embedded, and after time series modeling and attention layer, the dynamic information in the sequence of social network posts is understood and mined to obtain a time series vector with user behavior and emotional information. Step (3) specifically includes the following steps: (31) Based on the post embedding set obtained in step (1) These are used as the initial post sequence, and then these sequences are fed into T GRUs (AttnGRUs) with attention mechanisms for in-depth analysis. (32) An attention mechanism is introduced to give higher weight to key posts in the sequence, thereby highlighting important semantic and sentiment features; specifically, by adjusting the output sequence of GRU... Linear transformation and normalization are applied to obtain the attention weights for each sequence member; T AttnGRUs are used to analyze the T personality traits respectively, and then the resulting T personality traits are represented as an output. The input is fed into the personality trait interaction layer, and through the personality trait interaction attention layer, information sharing between different personality traits is promoted to obtain sequence analysis features; (4) Feature fusion and personality classification; The disordered interaction features of personality traits and the temporal features of posts obtained in steps (2) and (3) are fused together and input into the final classifier to classify personality traits in T dimensions. (5) System function demonstration; Based on the multi-perspective feature fusion social network user personality detection model proposed above, the system automatically crawls the public data of target users from social network platforms, analyzes it, and generates analysis results, including the MBTI personality type, personality image and related personality introduction of the analyzed social network users. Finally, the system displays the user's personality trait profile and related analysis information on the Web platform.
2. The social network user personality detection method based on multi-perspective feature fusion according to claim 1, characterized in that: Step (1) specifically includes the following steps: (11) Step (1) Use the pre-trained language model BERT to perform semantic encoding on user posts to obtain global semantic representation; use the BERT segmenter to convert all posts into a sequence of Token IDs, and then encode each post in the user's set of all posts to finally obtain the context vector of each post. (12) Step (1) Introduce an external sentiment knowledge base (SenticNet) to perform sentiment analysis on the post; perform sentiment analysis by calculating the average polarity score of all identified positive and negative words in the text, and use it as an indicator to measure the sentiment tendency of the whole sentence or post; in order to further process these sentiment data, a discretization method is used to subdivide the sentiment polarity score into 20 different levels, and then map them to a 20-dimensional feature vector.
3. The social network user personality detection method based on multi-perspective feature fusion according to claim 1, characterized in that: Step (4) obtains the disordered interaction features of personality traits and the temporal features of posts from steps (2) and (3), and then splices them together to obtain the fused features. The data is then input into the final MLP classifier to classify personality traits across T dimensions, resulting in the final personality category.
Citation Information
Patent Citations
A method and system for predicting personality traits based on online behavior
CN110119849B
Personality prediction method and system based on attention mechanism
CN113837445A
Personality detection method based on social text and link
CN116186423A
Content pushing method based on double-layer attention mechanism and heterogeneous graph convolutional network
CN120144874A