CN112052869A - User psychological state identification method and system - Google Patents
User psychological state identification method and system Download PDFInfo
- Publication number
- CN112052869A CN112052869A CN202010675638.0A CN202010675638A CN112052869A CN 112052869 A CN112052869 A CN 112052869A CN 202010675638 A CN202010675638 A CN 202010675638A CN 112052869 A CN112052869 A CN 112052869A
- Authority
- CN
- China
- Prior art keywords
- data
- microblog
- user
- analyzed
- feature
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 44
- 230000002996 emotional effect Effects 0.000 claims abstract description 118
- 230000008451 emotion Effects 0.000 claims abstract description 42
- 238000007499 fusion processing Methods 0.000 claims abstract description 39
- 230000004927 fusion Effects 0.000 claims abstract description 35
- 238000003062 neural network model Methods 0.000 claims abstract description 16
- 238000012216 screening Methods 0.000 claims abstract description 9
- 230000006996 mental state Effects 0.000 claims description 18
- 230000006870 function Effects 0.000 claims description 16
- 238000012545 processing Methods 0.000 claims description 15
- 238000000605 extraction Methods 0.000 claims description 12
- 238000004140 cleaning Methods 0.000 claims description 11
- 238000012549 training Methods 0.000 claims description 11
- 230000015654 memory Effects 0.000 claims description 10
- 238000013527 convolutional neural network Methods 0.000 claims description 8
- 238000004590 computer program Methods 0.000 claims description 6
- 238000005516 engineering process Methods 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 10
- 238000004891 communication Methods 0.000 description 6
- 230000014509 gene expression Effects 0.000 description 5
- 239000013598 vector Substances 0.000 description 5
- 238000013528 artificial neural network Methods 0.000 description 3
- 230000011218 segmentation Effects 0.000 description 3
- 238000013145 classification model Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000008909 emotion recognition Effects 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000007781 pre-processing Methods 0.000 description 2
- 239000000126 substance Substances 0.000 description 2
- 240000007594 Oryza sativa Species 0.000 description 1
- 235000007164 Oryza sativa Nutrition 0.000 description 1
- 230000002457 bidirectional effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000000306 recurrent effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 235000009566 rice Nutrition 0.000 description 1
- 239000004576 sand Substances 0.000 description 1
- 230000006403 short-term memory Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012706 support-vector machine Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000000844 transformation Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/906—Clustering; Classification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/951—Indexing; Web crawling techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/25—Fusion techniques
- G06F18/253—Fusion techniques of extracted features
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
- G06F40/284—Lexical analysis, e.g. tokenisation or collocates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/047—Probabilistic or stochastic networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/01—Social networking
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Evolutionary Computation (AREA)
- Health & Medical Sciences (AREA)
- Databases & Information Systems (AREA)
- Computing Systems (AREA)
- Computational Linguistics (AREA)
- Molecular Biology (AREA)
- Biomedical Technology (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Biophysics (AREA)
- Business, Economics & Management (AREA)
- Evolutionary Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Economics (AREA)
- Probability & Statistics with Applications (AREA)
- Human Resources & Organizations (AREA)
- Marketing (AREA)
- Primary Health Care (AREA)
- Strategic Management (AREA)
- Tourism & Hospitality (AREA)
- General Business, Economics & Management (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The embodiment of the invention provides a method and a system for identifying a user psychological state, wherein the method comprises the following steps: performing multi-mode data feature fusion processing on the microblog data of the target user to be analyzed to obtain the user personal microblog emotional features of the target user to be analyzed; screening social information of a target user to be analyzed to obtain vermicelli information and attendee information of the target user to be analyzed, and acquiring vermicelli emotional characteristics and attendee emotional characteristics; and performing social relation feature fusion on the individual microblog emotional features, the fan emotional features and the attention people emotional features of the users to obtain comprehensive user psychological features, and classifying the comprehensive user psychological features through a neural network model to obtain the psychological state of the target user to be analyzed. According to the embodiment of the invention, the social relation characteristic fusion processing is carried out on the personal microblog emotional characteristics of the user and the social relation characteristics of the user, so that the psychological state of the user is analyzed more comprehensively, and the identification accuracy of emotion classification is improved.
Description
Technical Field
The invention relates to the technical field of emotion analysis, in particular to a user psychological state identification method and system.
Background
The microblog data volume is huge, a strong social network relationship exists, and meanwhile, a large number of forwarding texts, pictures, microblog emoticons and the like exist in the microblog. Therefore, the emotion analysis processing is carried out on the microblog in the social network, so that the psychological state of the user when the microblog information is sent can be identified, and the emotion of the user can be classified.
Various algorithms based on text emotion classification emerge continuously, for example, Word2Vec and other technologies are adopted to pre-train Word vectors in traditional machine learning, and after feature extraction, classification models such as support vector machine SVM, Naive Bayesian (NB for short) and the like are used for text emotion classification; with the development of deep learning, a Neural Network is gradually applied to a vocabulary entry embedding technology, and meanwhile, a Convolutional Neural Network (CNN), a Recurrent Neural Network (RNN), a Long Short-Term Memory Network (LSTM), and the like are widely applied to text emotion classification, so that the emotion classification effect is improved.
Currently, most of the microblog emotions are classified by performing emotion classification on microblog texts and pictures through an LSTM and CNN combined method and then performing linear fusion. However, in one piece of microblog information, the picture and the text are integrated and need to be fused; meanwhile, some non-original forwarding contents and emoticons which are not contained in the traditional text exist in the microblog, and social information existing among the users can influence the emotional attitude of the users. Although many researchers research and utilize emoticons, social relationships and the like to improve the performance of microblog emotion recognition in recent years, the characteristics are not integrated, so that the accuracy of psychological state recognition and emotion analysis of a user is low. Therefore, a method and a system for identifying a user mental state are needed to solve the above problems.
Disclosure of Invention
Aiming at the problems in the prior art, the embodiment of the invention provides a user psychological state identification method and system.
In a first aspect, an embodiment of the present invention provides a method for identifying a user mental state, including:
performing multi-mode data feature fusion processing on microblog data of a target user to be analyzed to obtain user personal microblog emotional features of the target user to be analyzed;
screening the social information of the target user to be analyzed to obtain vermicelli information and attendee information of the target user to be analyzed, and acquiring vermicelli emotional characteristics and attendee emotional characteristics according to the vermicelli information and the attendee information;
and performing social relation feature fusion on the user personal microblog emotional features, the fan emotional features and the attention people emotional features to obtain user comprehensive psychological features, and classifying the user comprehensive psychological features through a neural network model to obtain the psychological state of the target user to be analyzed.
Further, the multi-mode data feature fusion processing is performed on the microblog data of the target user to be analyzed to obtain the personal microblog emotional features of the target user to be analyzed, and the method comprises the following steps:
acquiring microblog data of a target user to be analyzed, wherein the microblog data comprises original microblog data and non-original forwarding microblog data;
performing feature extraction processing on the microblog data to obtain first multi-modal feature data and second multi-modal feature data, wherein the first multi-modal feature data are multi-modal feature data of the original microblog data, and the second multi-modal feature data are multi-modal feature data of the non-original forwarded microblog data;
performing multi-modal data feature fusion processing on the first multi-modal feature data to obtain a first emotional feature; performing multi-modal data feature fusion processing on the second multi-modal feature data to obtain a second emotional feature;
and performing microblog multi-source feature fusion processing on the first emotional features and the second emotional features to obtain personal microblog emotional features of the user.
Further, before the obtaining of the microblog data of the target user to be analyzed, the method further includes:
acquiring microblog data of a target user to be analyzed from a social network through a web crawler technology, and performing data cleaning processing on the microblog data to obtain microblog data after the data cleaning processing;
marking emoticons in the microblog data after the data are cleaned;
segmenting text data in the microblog data after the data are cleaned;
and classifying the microblog data subjected to data cleaning to obtain original microblog data and non-original forwarding microblog data.
Further, the performing feature extraction processing on the microblog data to obtain first multi-modal feature data and second multi-modal feature data includes:
extracting text data in the microblog data through a BERT pre-training model to obtain text features;
extracting the emoticons in the microblog data through Word2ecv to obtain emoticon characteristics;
extracting pictures in the microblog data through a convolutional neural network to obtain picture characteristics;
and respectively constructing first multi-mode feature data and second multi-mode feature data according to text features, emoticon features and picture features corresponding to the original microblog data and the non-original forwarded microblog data.
Further, before the social information of the target user to be analyzed is screened to obtain fan information and attendee information of the target user to be analyzed, the method further includes:
the method comprises the steps of obtaining a plurality of target users to be analyzed, judging the number of fans of the target users to be analyzed respectively, judging that the target users to be analyzed are public users if the number of fans of a single target user to be analyzed is larger than a preset threshold value, and removing the public users from the target users to be analyzed.
Further, the classifying the user comprehensive psychological characteristics through a neural network model to obtain the psychological state of the target user to be analyzed includes:
and inputting the comprehensive psychological characteristics of the users into the neural network model, and classifying through a cross entropy function to obtain the psychological state of the target user to be analyzed, wherein the cross entropy function comprises a user personal microblog emotion cross entropy function and a user social network emotion cross entropy.
In a second aspect, an embodiment of the present invention provides a system for recognizing a user mental state, including:
the multi-mode data feature fusion module is used for performing multi-mode data feature fusion processing on the microblog data of the target user to be analyzed to obtain the personal microblog emotional features of the user of the target user to be analyzed;
the social information emotion analysis module is used for screening the social information of the target user to be analyzed to obtain fan information and the information of the attendees of the target user to be analyzed, and acquiring fan emotion characteristics and attendee emotion characteristics according to the fan information and the information of the attendees;
and the psychological state identification module is used for performing social relationship characteristic fusion on the user personal microblog emotional characteristics, the fan emotional characteristics and the attention people emotional characteristics to obtain user comprehensive psychological characteristics, and classifying the user comprehensive psychological characteristics through a neural network model to obtain the psychological state of the target user to be analyzed.
Further, the multimodal data feature fusion module comprises:
the microblog data acquisition unit is used for acquiring microblog data of a target user to be analyzed, wherein the microblog data comprise original microblog data and non-original forwarding microblog data;
the feature extraction unit is used for performing feature extraction processing on the microblog data to acquire first multi-mode feature data and second multi-mode feature data, wherein the first multi-mode feature data are multi-mode feature data of the original microblog data, and the second multi-mode feature data are multi-mode feature data of the non-original forwarded microblog data;
the feature fusion unit is used for performing multi-mode data feature fusion processing on the first multi-mode feature data to obtain a first emotional feature; performing multi-modal data feature fusion processing on the second multi-modal feature data to obtain a second emotional feature;
and the emotional feature fusion unit is used for performing microblog multi-source feature fusion processing on the first emotional feature and the second emotional feature to obtain the personal microblog emotional features of the user.
In a third aspect, an embodiment of the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the method provided in the first aspect when executing the program.
In a fourth aspect, an embodiment of the present invention provides a non-transitory computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps of the method as provided in the first aspect.
According to the method and the system for recognizing the user psychological state, provided by the embodiment of the invention, the text, the picture and the emoticon in the microblog are taken as a whole to be subjected to multi-mode fusion processing, the social relationship is fused, the social relationship characteristic fusion processing is carried out on the user individual microblog emotional characteristic and the user social relationship characteristic, a user psychological state analysis model is constructed, the user psychological state is analyzed more comprehensively, and therefore the recognition accuracy of emotion classification is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a user mental state identification method according to an embodiment of the present invention;
FIG. 2 is an overall framework diagram of a user microblog emotion analysis provided by the embodiment of the invention;
FIG. 3 is a schematic diagram illustrating construction of a user personal microblog emotional characteristic according to an embodiment of the invention;
FIG. 4 is a schematic diagram illustrating a comprehensive flow of social relationships according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a user mental state recognition system according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic flow chart of a user mental state identification method according to an embodiment of the present invention, and as shown in fig. 1, the embodiment of the present invention provides a user mental state identification method, including:
102, screening the social information of the target user to be analyzed to obtain fan information and attendee information of the target user to be analyzed, and acquiring fan emotional characteristics and attendee emotional characteristics according to the fan information and the attendee information;
103, performing social relationship feature fusion on the user personal microblog emotional features, the fan emotional features and the attention people emotional features to obtain user comprehensive psychological features, and classifying the user comprehensive psychological features through a neural network model to obtain the psychological state of the target user to be analyzed.
In the embodiment of the present invention, fig. 2 is an overall frame diagram of user microblog emotion analysis provided by the embodiment of the present invention, which can be referred to as fig. 2, microblog data includes pictures, emoticons and text data, microblog multimodal feature fusion is performed on features such as text data, pictures and emoticons in the microblog data of a user to obtain feature representation of a single piece of microblog data, microblog multisource feature fusion is performed on original microblog features and non-original forwarding microblog features of the user to obtain user personal microblog emotion features, the user personal microblog emotion features and social relation comprehensive features (i.e., fan emotion features and attention people emotion features) are finally fused, and the fused user comprehensive psychological features are classified, so as to determine whether the psychological state of the user is a positive state or a negative state.
According to the method for identifying the user psychological state, provided by the embodiment of the invention, the text, the picture and the emoticons in the microblog are taken as a whole to be subjected to multi-mode fusion processing, the social relationship is fused, the social relationship characteristic fusion processing is carried out on the user personal microblog emotional characteristics and the user social relationship characteristics, a user psychological state analysis model is constructed, the user psychological state is analyzed more comprehensively, and therefore the identification accuracy of emotion classification is improved.
On the basis of the above embodiment, the performing multi-mode data feature fusion processing on the microblog data of the target user to be analyzed to obtain the personal microblog emotional features of the user of the target user to be analyzed includes:
step S1, acquiring microblog data of a target user to be analyzed, wherein the microblog data comprises original microblog data and non-original forwarding microblog data;
step S2, performing feature extraction processing on the microblog data to obtain first multi-modal feature data and second multi-modal feature data, wherein the first multi-modal feature data are multi-modal feature data of the original microblog data, and the second multi-modal feature data are multi-modal feature data of the non-original forwarded microblog data; the method specifically comprises the following steps:
extracting text data in the microblog data through a BERT pre-training model to obtain text features;
extracting the emoticons in the microblog data through Word2ecv to obtain emoticon characteristics;
extracting pictures in the microblog data through a convolutional neural network to obtain picture characteristics;
and respectively constructing first multi-mode feature data and second multi-mode feature data according to text features, emoticon features and picture features corresponding to the original microblog data and the non-original forwarded microblog data.
In the embodiment of the present invention, fig. 3 is a schematic diagram for constructing user individual microblog emotional features according to the embodiment of the present invention, and as shown in fig. 3, a bert (bidirectional Encoder replies from transformations) pre-training model is used to extract text features T in user individual original microblog data from text data in original microblogso=(to1,to2,…tom) (ii) a Then, after the emoticons in the original microblog data are converted into corresponding words, Word2ec is used for training a Word vector aiming at the microblog emoticons, and the feature E of the emoticons in the single original microblog data of the user is extractedo=(eo1,eo2,…eom) (ii) a Finally, inputting the picture in the original microblog data into a CNN convolutional neural network model, thereby extracting and obtaining the picture characteristic P in the single original microblog data of the usero=(po1,po2,…pom) (ii) a Respectively acquiring text characteristic T in single user non-originally forwarded microblog data based on the same stepsr=(tr1,tr2,…trm) Emoji character Er=(er1,er2,…erm) And picture feature Pr=(pr1,pr2,…prm) And respectively acquiring first multi-modal feature data and second multi-modal feature data according to the features. It should be noted that, because different pre-training modes may affect the accuracy of the classification result, in the embodiment of the present invention, the text data after word segmentation is input to the BERT pre-training model, so as to extract the text feature representation of the microblog data of the user, and train a set of emoticon word vector representation for the microblog data, so that the final classification effect is more in line with the actual situation.
Step S3, performing multi-modal data feature fusion processing on the first multi-modal feature data to obtain a first emotional feature; and performing multi-modal data feature fusion processing on the second multi-modal feature data to obtain a second emotional feature.
In the embodiment of the invention, multi-mode feature fusion is carried out on text features, emoticon features and picture features in a single piece of original microblog data to obtain feature representation of the original microblog data, namely, a first emotional feature M is obtainedo:
Meanwhile, multi-mode feature fusion is carried out on text features, emoticon features and picture features in single non-originally forwarded microblog data to obtain feature representation of the single non-originally forwarded microblog data, namely second emotional features Mr:
Step S4, performing microblog multi-source feature fusion processing on the first emotional features and the second emotional features to obtain user personal microblog emotional features.
In the embodiment of the invention, microblog contents of a user in nearly three months are selected as a basis for judging the emotional characteristics of the user, and original microblog multi-modal fusion characteristics (first emotional characteristics) and forwarding microblog multi-modal fusion characteristics (second emotional characteristics) of the user in three months are subjected to microblog multi-source characteristic fusion processing to obtain a user personal microblog emotional characteristic representation Mperson:
And v is the number of microblogs forwarded by the user in the last three months.
According to the embodiment of the invention, the original microblog content and the non-original microblog content of the user are subjected to user microblog feature fusion processing, the user microblog emotion is analyzed from multiple angles, and the accuracy of user emotion recognition is improved.
On the basis of the above embodiment, before the obtaining of the microblog data of the target user to be analyzed, the method further includes:
acquiring microblog data of a target user to be analyzed from a social network through a web crawler technology, and performing data cleaning processing on the microblog data to obtain microblog data after the data cleaning processing;
marking emoticons in the microblog data after the data are cleaned;
segmenting text data in the microblog data after the data are cleaned;
and classifying the microblog data subjected to data cleaning to obtain original microblog data and non-original forwarding microblog data.
In the embodiment of the invention, firstly, the microblog data of the user are crawled from the social network by utilizing a web crawler technology, and the personal microblog of the user is divided into original microblogs WOForwarding microblogs W with non-originalityrThen cleaning the data to remove dumps in the dataAnd the garbage data is used for keeping pictures, emoticons, text data and social network information in the microblog.
Furthermore, because the default expression characters of the microblog platform are composed of HTML image tags, in the data preprocessing stage, the image tags need to be extracted and converted, the converted expression characters are inserted into the original positions of the microblog texts, and then the expression characters are labeled by brackets so as to distinguish the texts and expressions in the microblog; meanwhile, the microblog text is subjected to word segmentation by adopting jieba word segmentation. In one embodiment of the invention, 29 general users who crawl 'rice data' and 168 tens of thousands of left messages are crawled, when preprocessing is carried out, data cleaning is firstly carried out on the data, dirty data in the left messages are deleted, wrongly written characters and expression symbols are replaced, duplicate data are removed, and more than 2000 pieces of data which are automatically graded by a knowledge graph algorithm of a Huang Ching team are used as a training set for training.
On the basis of the above embodiment, before the social information of the target user to be analyzed is filtered to obtain fan information and attendee information of the target user to be analyzed, the method further includes:
the method comprises the steps of obtaining a plurality of target users to be analyzed, judging the number of fans of the target users to be analyzed respectively, judging that the target users to be analyzed are public users if the number of fans of a single target user to be analyzed is larger than a preset threshold value, and removing the public users from the target users to be analyzed.
In the embodiment of the invention, the acquired social information of the microblog users is screened to obtain the effective fans and the effective followers of the users, and the effective fans and the microblogs of the effective followers of the users in the social relationship are subjected to sentiment analysis;
in the embodiment of the invention, firstly, the social network information of the user is extracted, the bloggers with the number of fans more than 5000 are regarded as public characters, and the public characters are removed, so that an effective social relationship network is screened out; then, dividing the social relationship of the user U (namely the public user who does not belong to the public character) into an effective attendee and an effective guan fan; further onSelecting the first 100 microblogs of each user in the last three months of the effective followers of the user U, and according to the first emotional feature M in the embodimentoOr a second emotional feature MrThe formula (2) calculates the individual microblog emotional characteristics of the users of the effective followers, and then extracts the microblog emotional characteristics of each effective follower, which are expressed as MfoiI represents the ith valid attendee; further, the first 200 effective followers of the user U are selected, and the emotional feature vector M of the effective followers is constructedfollow;
Meanwhile, the first 100 microblogs of each user in the last three months in the effective fans of the user U are selected, and the first emotional feature M is obtained according to the embodimentoOr a second emotional feature MrThe formula (2) calculates the individual microblog emotional characteristics of the users of the effective fans, and extracts the microblog emotional characteristics of each effective fan, wherein the microblog emotional characteristics are expressed as MfiI represents the ith valid vermicelli; further, the first 200 effective fans of the user U are selected, and the emotional feature vector M of the effective fans is constructedfan。
In the embodiment of the present invention, fig. 4 is a schematic diagram of a social relationship comprehensive flow provided by the embodiment of the present invention, and as shown in fig. 4, a blogger with a number of fans of users in a data set greater than 5000 is regarded as a public character, the blogger is deleted, the emotional characteristics of the fans and the emotional characteristics of the followers are calculated for fans and followers in common microblog users, the first 200 effective followers and the first 200 effective fans of the user are selected from the emotional characteristics of the effective followers and the effective followers are calculated.
Further, in the embodiment of the present invention, after obtaining the user personal microblog emotional characteristics, the fan emotional characteristics, and the attendee emotional characteristics, social relationship characteristic fusion is performed on the three emotional characteristics, specifically: the obtained effective vermicelli emotional characteristics MfanAnd the emotional characteristics M of the effective attention peoplefollowPerforming social relationship feature fusion; then, the obtained user personal microblog emotional characteristics M are compared with the obtained user personal microblog emotional characteristics MpersonCarrying out comprehensive characteristic fusion to obtain user comprehensive psychological characteristics M fusing social relationss:
Wherein the content of the first and second substances,representing social relationship feature fusion and Θ representing comprehensive feature fusion.
On the basis of the foregoing embodiment, the classifying the user comprehensive psychological characteristics through a neural network model to obtain the psychological state of the target user to be analyzed includes:
and inputting the comprehensive psychological characteristics of the users into the neural network model, and classifying through a cross entropy function to obtain the psychological state of the target user to be analyzed, wherein the cross entropy function comprises a user personal microblog emotion cross entropy function and a user social network emotion cross entropy.
In the embodiment of the invention, the obtained user comprehensive psychological characteristics fusing the social relationship are input into the neural network model for classification, so that the comprehensive psychological state of the user is analyzed. Specifically, the method comprises the following steps: the obtained user comprehensive psychological characteristics MsAnd inputting the output into a neural network classification model, connecting the output to a full connection layer, and classifying through a softmax classifier to obtain a user psychological state classification result fused with social relations. In the embodiment of the invention, the classification task is finished by utilizing a cross entropy function, and L is added at the same time2Regularization terms are used for preventing overfitting, wherein the cross entropy loss function of the personal microblog emotion of the user is as follows:
wherein N is the number of samples of the user's personal microblog emotion, D is the size of the training set, C is the number of categories, y is the prediction category, y' is the actual category, λ | | θ | | Y2Is a regular term;
the cross entropy loss function of the user social network emotion is:
wherein M is the number of samples of the user social network emotion, G is the size of the training set, R is the number of categories, t is the prediction category, t' is the actual category, mu | theta | Y2Is a regular term;
further, a cross entropy loss function of the personal microblog emotion of the user and a cross entropy loss function of the social network emotion of the user are integrated, so that the overall loss function is obtained as follows:
wherein ξ | | O | | Y ceiling2Is a regular term of the overall loss function.
Fig. 5 is a schematic structural diagram of a user mental state recognition system according to an embodiment of the present invention, and as shown in fig. 5, the user mental state recognition system according to an embodiment of the present invention includes a multi-modal data feature fusion module 501, a social information sentiment analysis module 502, and a mental state recognition module 503, where the multi-modal data feature fusion module 501 is configured to perform multi-modal data feature fusion processing on microblog data of a target user to be analyzed, so as to obtain a user personal microblog sentiment feature of the target user to be analyzed; the social information emotion analysis module 502 is configured to screen social information of the target user to be analyzed to obtain fan information and attendee information of the target user to be analyzed, and obtain fan emotion characteristics and attendee emotion characteristics according to the fan information and the attendee information; the psychological state identification module 503 is configured to perform social relationship feature fusion on the user individual microblog emotional features, the fan emotional features, and the attention people emotional features to obtain user comprehensive psychological features, and classify the user comprehensive psychological features through a neural network model to obtain a psychological state of the target user to be analyzed.
According to the user mental state recognition system provided by the embodiment of the invention, the text, the picture and the emoticons in the microblog are taken as a whole to be subjected to multi-mode fusion processing, the social relationship is fused, the social relationship characteristic fusion processing is carried out on the user personal microblog emotional characteristics and the user social relationship characteristics, a user mental state analysis model is constructed, the user mental state is analyzed more comprehensively, and therefore the recognition accuracy of emotion classification is improved.
On the basis of the above embodiment, the multimodal data feature fusion module includes:
the microblog data acquisition unit is used for acquiring microblog data of a target user to be analyzed, wherein the microblog data comprise original microblog data and non-original forwarding microblog data;
the feature extraction unit is used for performing feature extraction processing on the microblog data to acquire first multi-mode feature data and second multi-mode feature data, wherein the first multi-mode feature data are multi-mode feature data of the original microblog data, and the second multi-mode feature data are multi-mode feature data of the non-original forwarded microblog data;
the feature fusion unit is used for performing multi-mode data feature fusion processing on the first multi-mode feature data to obtain a first emotional feature; performing multi-modal data feature fusion processing on the second multi-modal feature data to obtain a second emotional feature;
and the emotional feature fusion unit is used for performing microblog multi-source feature fusion processing on the first emotional feature and the second emotional feature to obtain the personal microblog emotional features of the user.
The system provided by the embodiment of the present invention is used for executing the above method embodiments, and for details of the process and the details, reference is made to the above embodiments, which are not described herein again.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and referring to fig. 6, the electronic device may include: a processor (processor)601, a communication Interface (Communications Interface)602, a memory (memory)603 and a communication bus 604, wherein the processor 601, the communication Interface 602 and the memory 603 complete communication with each other through the communication bus 604. The processor 601 may call logic instructions in the memory 603 to perform the following method: performing multi-mode data feature fusion processing on microblog data of a target user to be analyzed to obtain user personal microblog emotional features of the target user to be analyzed; screening the social information of the target user to be analyzed to obtain vermicelli information and attendee information of the target user to be analyzed, and acquiring vermicelli emotional characteristics and attendee emotional characteristics according to the vermicelli information and the attendee information; and performing social relation feature fusion on the user personal microblog emotional features, the fan emotional features and the attention people emotional features to obtain user comprehensive psychological features, and classifying the user comprehensive psychological features through a neural network model to obtain the psychological state of the target user to be analyzed.
In addition, the logic instructions in the memory 603 may be implemented in the form of software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program is implemented to perform the method for recognizing a user mental state provided in the foregoing embodiments when executed by a processor, and the method includes: performing multi-mode data feature fusion processing on microblog data of a target user to be analyzed to obtain user personal microblog emotional features of the target user to be analyzed; screening the social information of the target user to be analyzed to obtain vermicelli information and attendee information of the target user to be analyzed, and acquiring vermicelli emotional characteristics and attendee emotional characteristics according to the vermicelli information and the attendee information; and performing social relation feature fusion on the user personal microblog emotional features, the fan emotional features and the attention people emotional features to obtain user comprehensive psychological features, and classifying the user comprehensive psychological features through a neural network model to obtain the psychological state of the target user to be analyzed.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (10)
1. A user mental state recognition method is characterized by comprising the following steps:
performing multi-mode data feature fusion processing on microblog data of a target user to be analyzed to obtain user personal microblog emotional features of the target user to be analyzed;
screening the social information of the target user to be analyzed to obtain vermicelli information and attendee information of the target user to be analyzed, and acquiring vermicelli emotional characteristics and attendee emotional characteristics according to the vermicelli information and the attendee information;
and performing social relation feature fusion on the user personal microblog emotional features, the fan emotional features and the attention people emotional features to obtain user comprehensive psychological features, and classifying the user comprehensive psychological features through a neural network model to obtain the psychological state of the target user to be analyzed.
2. The user mental state recognition method according to claim 1, wherein the multi-modal data feature fusion processing is performed on the microblog data of the target user to be analyzed to obtain the user personal microblog emotional features of the target user to be analyzed, and the method comprises the following steps:
acquiring microblog data of a target user to be analyzed, wherein the microblog data comprises original microblog data and non-original forwarding microblog data;
performing feature extraction processing on the microblog data to obtain first multi-modal feature data and second multi-modal feature data, wherein the first multi-modal feature data are multi-modal feature data of the original microblog data, and the second multi-modal feature data are multi-modal feature data of the non-original forwarded microblog data;
performing multi-modal data feature fusion processing on the first multi-modal feature data to obtain a first emotional feature; performing multi-modal data feature fusion processing on the second multi-modal feature data to obtain a second emotional feature;
and performing microblog multi-source feature fusion processing on the first emotional features and the second emotional features to obtain personal microblog emotional features of the user.
3. The method for recognizing the psychological state of the user according to claim 2, wherein before the obtaining of the microblog data of the target user to be analyzed, the method further comprises:
acquiring microblog data of a target user to be analyzed from a social network through a web crawler technology, and performing data cleaning processing on the microblog data to obtain microblog data after the data cleaning processing;
marking emoticons in the microblog data after the data are cleaned;
segmenting text data in the microblog data after the data are cleaned;
and classifying the microblog data subjected to data cleaning to obtain original microblog data and non-original forwarding microblog data.
4. The method for recognizing the psychological state of the user according to claim 2, wherein the performing feature extraction processing on the microblog data to obtain first multi-modal feature data and second multi-modal feature data comprises:
extracting text data in the microblog data through a BERT pre-training model to obtain text features;
extracting the emoticons in the microblog data through Word2ecv to obtain emoticon characteristics;
extracting pictures in the microblog data through a convolutional neural network to obtain picture characteristics;
and respectively constructing first multi-mode feature data and second multi-mode feature data according to text features, emoticon features and picture features corresponding to the original microblog data and the non-original forwarded microblog data.
5. The method for recognizing the psychological state of the user according to claim 1, wherein before the screening of the social information of the target user to be analyzed to obtain fan information and attendee information of the target user to be analyzed, the method further comprises:
the method comprises the steps of obtaining a plurality of target users to be analyzed, judging the number of fans of the target users to be analyzed respectively, judging that the target users to be analyzed are public users if the number of fans of a single target user to be analyzed is larger than a preset threshold value, and removing the public users from the target users to be analyzed.
6. The method for recognizing the psychological state of the user according to claim 1, wherein the classifying the comprehensive psychological characteristics of the user through a neural network model to obtain the psychological state of the target user to be analyzed comprises:
and inputting the comprehensive psychological characteristics of the users into the neural network model, and classifying through a cross entropy function to obtain the psychological state of the target user to be analyzed, wherein the cross entropy function comprises a user personal microblog emotion cross entropy function and a user social network emotion cross entropy.
7. A system for recognizing a psychological state of a user, comprising:
the multi-mode data feature fusion module is used for performing multi-mode data feature fusion processing on the microblog data of the target user to be analyzed to obtain the personal microblog emotional features of the user of the target user to be analyzed;
the social information emotion analysis module is used for screening the social information of the target user to be analyzed to obtain fan information and the information of the attendees of the target user to be analyzed, and acquiring fan emotion characteristics and attendee emotion characteristics according to the fan information and the information of the attendees;
and the psychological state identification module is used for performing social relationship characteristic fusion on the user personal microblog emotional characteristics, the fan emotional characteristics and the attention people emotional characteristics to obtain user comprehensive psychological characteristics, and classifying the user comprehensive psychological characteristics through a neural network model to obtain the psychological state of the target user to be analyzed.
8. The system of claim 7, wherein the multi-modal data feature fusion module comprises:
the microblog data acquisition unit is used for acquiring microblog data of a target user to be analyzed, wherein the microblog data comprise original microblog data and non-original forwarding microblog data;
the feature extraction unit is used for performing feature extraction processing on the microblog data to acquire first multi-mode feature data and second multi-mode feature data, wherein the first multi-mode feature data are multi-mode feature data of the original microblog data, and the second multi-mode feature data are multi-mode feature data of the non-original forwarded microblog data;
the feature fusion unit is used for performing multi-mode data feature fusion processing on the first multi-mode feature data to obtain a first emotional feature; performing multi-modal data feature fusion processing on the second multi-modal feature data to obtain a second emotional feature;
and the emotional feature fusion unit is used for performing microblog multi-source feature fusion processing on the first emotional feature and the second emotional feature to obtain the personal microblog emotional features of the user.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor, when executing the program, carries out the steps of the method for recognizing a mental state of a user according to any of claims 1 to 6.
10. A non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for recognizing a mental state of a user according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010675638.0A CN112052869B (en) | 2020-07-14 | User psychological state identification method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010675638.0A CN112052869B (en) | 2020-07-14 | User psychological state identification method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112052869A true CN112052869A (en) | 2020-12-08 |
CN112052869B CN112052869B (en) | 2024-07-09 |
Family
ID=
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115880698A (en) * | 2023-03-08 | 2023-03-31 | 南昌航空大学 | Depression emotion recognition method based on microblog posting content and social behavior characteristics |
WO2024099098A1 (en) * | 2022-11-07 | 2024-05-16 | 中电科大数据研究院有限公司 | Early warning method and device based on group emotion prediction model, and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104809104A (en) * | 2015-05-11 | 2015-07-29 | 苏州大学 | Method and system for identifying micro-blog textual emotion |
CN108108849A (en) * | 2017-12-31 | 2018-06-01 | 厦门大学 | A kind of microblog emotional Forecasting Methodology based on Weakly supervised multi-modal deep learning |
CN108460153A (en) * | 2018-03-27 | 2018-08-28 | 广西师范大学 | A kind of social media friend recommendation method of mixing blog article and customer relationship |
CN109684646A (en) * | 2019-01-15 | 2019-04-26 | 江苏大学 | A kind of microblog topic sentiment analysis method based on topic influence |
CN109918556A (en) * | 2019-03-08 | 2019-06-21 | 北京工业大学 | A kind of comprehensive microblog users social networks and microblogging text feature depressive emotion recognition methods |
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104809104A (en) * | 2015-05-11 | 2015-07-29 | 苏州大学 | Method and system for identifying micro-blog textual emotion |
CN108108849A (en) * | 2017-12-31 | 2018-06-01 | 厦门大学 | A kind of microblog emotional Forecasting Methodology based on Weakly supervised multi-modal deep learning |
CN108460153A (en) * | 2018-03-27 | 2018-08-28 | 广西师范大学 | A kind of social media friend recommendation method of mixing blog article and customer relationship |
CN109684646A (en) * | 2019-01-15 | 2019-04-26 | 江苏大学 | A kind of microblog topic sentiment analysis method based on topic influence |
CN109918556A (en) * | 2019-03-08 | 2019-06-21 | 北京工业大学 | A kind of comprehensive microblog users social networks and microblogging text feature depressive emotion recognition methods |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024099098A1 (en) * | 2022-11-07 | 2024-05-16 | 中电科大数据研究院有限公司 | Early warning method and device based on group emotion prediction model, and storage medium |
CN115880698A (en) * | 2023-03-08 | 2023-03-31 | 南昌航空大学 | Depression emotion recognition method based on microblog posting content and social behavior characteristics |
CN115880698B (en) * | 2023-03-08 | 2023-05-16 | 南昌航空大学 | Depression emotion recognition method based on microblog posting content and social behavior characteristics |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108984530B (en) | Detection method and detection system for network sensitive content | |
Riba et al. | Table detection in invoice documents by graph neural networks | |
CN110119786B (en) | Text topic classification method and device | |
CN107025284A (en) | The recognition methods of network comment text emotion tendency and convolutional neural networks model | |
CN109522548A (en) | A kind of text emotion analysis method based on two-way interactive neural network | |
CN111401061A (en) | Method for identifying news opinion involved in case based on BERT and Bi L STM-Attention | |
CN107491435B (en) | Method and device for automatically identifying user emotion based on computer | |
JP2005182730A (en) | Automatic document separation | |
CN111767725A (en) | Data processing method and device based on emotion polarity analysis model | |
Roy et al. | Automated detection of substance use-related social media posts based on image and text analysis | |
Sheshikala et al. | Natural language processing and machine learning classifier used for detecting the author of the sentence | |
CN112800225A (en) | Microblog comment emotion classification method and system | |
CN111311364B (en) | Commodity recommendation method and system based on multi-mode commodity comment analysis | |
CN112287240A (en) | Case microblog evaluation object extraction method and device based on double-embedded multilayer convolutional neural network | |
Kabra et al. | Convolutional neural network based sentiment analysis with tf-idf based vectorization | |
CN111460100A (en) | Criminal legal document and criminal name recommendation method and system | |
Dehghani et al. | Sentiment analysis of Persian political tweets using ParsBERT embedding model with convolutional neural network | |
Fersini et al. | Misogynous meme recognition: A preliminary study | |
CN110569495A (en) | Emotional tendency classification method and device based on user comments and storage medium | |
CN116775880A (en) | Multi-label text classification method and system based on label semantics and transfer learning | |
CN115906835B (en) | Chinese question text representation learning method based on clustering and contrast learning | |
CN115640401B (en) | Text content extraction method and device | |
Drishya et al. | Cyberbully image and text detection using convolutional neural networks | |
Ahmed et al. | Hateful meme prediction model using multimodal deep learning | |
Schmitt et al. | Outlier detection on semantic space for sentiment analysis with convolutional neural networks |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant |