CN112241453A - Emotion attribute determining method and device and electronic equipment - Google Patents

Emotion attribute determining method and device and electronic equipment Download PDF

Info

Publication number
CN112241453A
CN112241453A CN202011128740.5A CN202011128740A CN112241453A CN 112241453 A CN112241453 A CN 112241453A CN 202011128740 A CN202011128740 A CN 202011128740A CN 112241453 A CN112241453 A CN 112241453A
Authority
CN
China
Prior art keywords
target
emotion
entity
attribute
word vector
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
Application number
CN202011128740.5A
Other languages
Chinese (zh)
Other versions
CN112241453B (en
Inventor
王欣芝
陈澈
蔡薇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hubo Network Technology Shanghai Co ltd
Original Assignee
Hubo Network Technology Shanghai Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hubo Network Technology Shanghai Co ltd filed Critical Hubo Network Technology Shanghai Co ltd
Priority to CN202011128740.5A priority Critical patent/CN112241453B/en
Publication of CN112241453A publication Critical patent/CN112241453A/en
Application granted granted Critical
Publication of CN112241453B publication Critical patent/CN112241453B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • G06F16/355Class or cluster creation or modification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/29Graphical models, e.g. Bayesian networks
    • G06F18/295Markov models or related models, e.g. semi-Markov models; Markov random fields; Networks embedding Markov models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • G06F40/295Named entity recognition

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Machine Translation (AREA)

Abstract

The invention provides an emotion attribute determination method, an emotion attribute determination device and electronic equipment, wherein the method comprises the following steps: acquiring an entity object contained in a target corpus text; coding the entity object to obtain an entity word vector corresponding to the entity object; clustering and analyzing the entity word vectors and a plurality of word vectors in the word vector set to obtain a target word vector set corresponding to the entity word vectors; performing clustering analysis on an attribute parameter set configured by each target word vector in the target word vector set to obtain a target attribute parameter set corresponding to the entity word vector; inputting the target attribute parameter set and the target corpus text into an emotion analysis model to obtain an emotion analysis result of the target corpus text; the emotion analysis result comprises emotion attributes corresponding to the target corpus text. Compared with the prior art that the corpus text is directly subjected to coarse-grained analysis, the method improves the accuracy of the corpus text emotion analysis and improves the practical value of the emotion analysis.

Description

Emotion attribute determining method and device and electronic equipment
Technical Field
The invention relates to the technical field of emotion analysis, in particular to an emotion attribute determination method, an emotion attribute determination device and electronic equipment.
Background
Sentiment Analysis (Sentiment Analysis) is to extract the entity object of the comment from the text of the comment, and the Sentiment tendency expressed by the comment on the entity object, namely Sentiment attribute. The conventional emotion analysis method mainly adopts an emotion classification model using RNN (Recurrent Neural Network), LSTM (Long-Short Term Memory), transform model, BERT (Bidirectional Encoder from transforms), and the like as main models, and this method can only perform coarse-grained analysis, such as binary or quintuple analysis, which results in an unsatisfactory emotion analysis result.
Disclosure of Invention
In view of the above, the present invention provides a method, an apparatus and an electronic device for determining an emotion attribute, so as to alleviate the above problem.
In a first aspect, an embodiment of the present invention provides an emotion attribute determining method, where an emotion analysis model and a word vector set are provided by a server, and each word vector in the word vector set is configured with an attribute parameter set, the method including: acquiring an entity object contained in a target corpus text; coding the entity object to obtain an entity word vector corresponding to the entity object; clustering the entity word vectors and a plurality of word vectors in the word vector set to obtain a target word vector set corresponding to the entity word vectors; performing clustering analysis on an attribute parameter set configured by each target word vector in the target word vector set to obtain a target attribute parameter set corresponding to the entity word vector; wherein the target attribute parameter set comprises a plurality of target attribute parameters; inputting the target attribute parameter set and the target corpus text into an emotion analysis model to obtain an emotion analysis result of the target corpus text; and the emotion analysis result is the emotion attribute corresponding to the attribute parameter contained in the target corpus text.
With reference to the first aspect, an embodiment of the present invention provides a first possible implementation manner of the first aspect, where the step of obtaining an entity object included in the target corpus text includes: performing entity type identification on the target corpus text based on a named entity identification NER technology to obtain an entity object; wherein the entity object comprises at least one of: person name, product name, organizational structure name, and event name.
With reference to the first aspect, an embodiment of the present invention provides a second possible implementation manner of the first aspect, where the emotion analysis model is a fine-grained emotion analysis model configured with emotion attributes, where the emotion attributes include: like, happy, hurting, fear, surprise and anger, inputting the target attribute parameter set and the target corpus text into the emotion analysis model to obtain the emotion analysis result of the target corpus text, wherein the steps comprise: and inputting the target attribute parameter set and the target corpus text into a fine-grained emotion analysis model to determine attribute parameters contained in the target corpus text, and analyzing the attribute parameters to obtain emotion attributes corresponding to each attribute parameter.
With reference to the second possible implementation manner of the first aspect, an embodiment of the present invention provides a third possible implementation manner of the first aspect, where the emotion attribute is further configured with a weighted value, and the method further includes: and sequencing the attribute parameters based on the weighted values of the emotion attributes corresponding to the attribute parameters to obtain the emotion analysis result of the target corpus text.
With reference to the first aspect, an embodiment of the present invention provides a fourth possible implementation manner of the first aspect, where the step of performing encoding processing on the entity object includes: and coding the entity object based on a pre-trained word2vec model to obtain an entity word vector corresponding to the entity object.
With reference to the first aspect, an embodiment of the present invention provides a fifth possible implementation manner of the first aspect, where the target corpus text is text information and/or speech information.
In a second aspect, an embodiment of the present invention further provides an emotion attribute determining apparatus, where an emotion analysis model and a word vector set are provided by a server, and each word vector in the word vector set is configured with an attribute parameter set, the apparatus including: the acquisition module is used for acquiring entity objects contained in the target corpus text; the encoding module is used for encoding the entity object to obtain an entity word vector corresponding to the entity object; the first clustering analysis module is used for clustering analysis on the entity word vectors and a plurality of word vectors in the word vector set to obtain a target word vector set corresponding to the entity word vectors; the second clustering analysis module is used for clustering analysis on the attribute parameter set configured by each target word vector in the target word vector set to obtain a target attribute parameter set corresponding to the entity word vector; wherein the target attribute parameter set comprises a plurality of target attribute parameters; the emotion attribute analysis module is used for inputting the target attribute parameter set and the target corpus text into the emotion analysis model to obtain an emotion analysis result of the target corpus text; and the emotion analysis result is the emotion attribute corresponding to the attribute parameter contained in the target corpus text.
With reference to the second aspect, an embodiment of the present invention provides a first possible implementation manner of the second aspect, where the obtaining module is further configured to: performing entity type identification on the target corpus text based on a named entity identification NER technology to obtain an entity object; wherein the entity object comprises at least one of: person name, product name, organizational structure name, and event name.
In a third aspect, an embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the emotion attribute determination method in the first aspect when executing the computer program.
In a fourth aspect, the embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the emotion attribute determination method in the first aspect.
The embodiment of the invention has the following beneficial effects:
the embodiment of the invention provides a method, a device and electronic equipment for determining emotion attributes, wherein the method comprises the steps of clustering and mining entity word vectors of entity objects in a target corpus text in a word vector set to obtain a target attribute parameter set corresponding to the target corpus text, and carrying out emotion analysis on the target attribute parameter set and the target corpus text based on an emotion analysis model to obtain an emotion analysis result of the target corpus text, namely emotion attributes corresponding to attribute parameters contained in the target corpus text.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and drawings.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
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 other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flowchart of an emotion attribute determination method provided in an embodiment of the present invention;
FIG. 2 is a schematic diagram of an emotion attribute determination method provided by an embodiment of the present invention;
FIG. 3 is a diagram of an emotion attribute determination apparatus according to an embodiment of the present invention;
fig. 4 is a schematic diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent 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.
Aiming at the problems that the analysis result is not ideal and the practical application requirement cannot be met due to the fact that the existing method, the device and the electronic equipment for determining the emotion attribute are used for directly performing coarse-grained analysis on the corpus text, the method, the device and the electronic equipment are provided to relieve the problems.
To facilitate understanding of the present embodiment, first, a method for determining an emotion attribute provided by an embodiment of the present invention is described in detail below.
The first embodiment is as follows:
the embodiment of the invention provides an emotion attribute determination method, wherein an execution main body is a server, an emotion analysis model and a word vector set are prestored in the server, and each word vector in the word vector set is configured with an attribute parameter set. Fig. 1 is a flowchart of an emotion attribute determining method according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S102, acquiring entity objects contained in the target corpus text.
The target corpus text is text information and/or voice information, for example, comment text information posted by each website or webpage user, such as comment information of a purchased commodity by the user and/or voice information in a chat conversation of the user, and the source of the target corpus text is not limited in the embodiment of the present invention.
Optionally, performing Entity type Recognition on the target corpus text based on a NER (Name Entity Recognition) technology to obtain an Entity object; wherein the entity object comprises at least one of: person name, product name, organizational structure name, and event name; the organization structure name includes but is not limited to a business name, and the event name includes but is not limited to a typhoon event, a rainstorm event, and the like. Therefore, the entity object may be one or more, may be one type, or may include multiple types, such as a business name and a product name produced corresponding to the business name, and the like.
Specifically, a person name, a product name, an organization structure name, an event name, and the like corresponding to a target corpus text can be recognized based on a Cascaded HMM (Hidden Markov Model) method, where a plurality of tasks are determined according to categories of entity objects, such as a person name of an entity object is a task and a product name of an entity object is a task, and during the process of recognizing the entity objects, each task is layered based on the Cascaded HMM Model, each layer of Hidden Markov models executes a task, and the Hidden Markov models of the layers are associated with each other in the following two ways to form a close coupling relationship: (1) each layer of hidden Markov model adopts an N-Best strategy, and a plurality of Best results are sent to a word graph for use by a high-level model; (2) the hidden Markov model of the lower layer provides support for parameter estimation of the hidden Markov model of the higher layer through a generation model of words. Therefore, the Cascade HMM model can be used for carrying out layered recognition on the target corpus text to obtain the entity objects contained in the target corpus text, and the entity objects of each category are obtained by layered recognition, so that mutual interference is avoided, and the efficiency of entity object recognition is improved.
And step S104, coding the entity object to obtain an entity word vector corresponding to the entity object.
Specifically, the entity object is encoded based on a pre-trained word2vec model, and an entity word vector corresponding to the entity object is obtained. The entity object can be subjected to word vector expression by encoding processing, so that unique identification is realized for the entity object, and on one hand, an identification mode can be provided for an entity subjected to clustering mining on a subsequent large-scale corpus text, so that the problem of alignment of massive vocabularies is solved, meanwhile, good disambiguation processing is carried out, and confusion of the entity object in the large-scale corpus text is avoided; on the other hand, sufficient peripheral sample preparation is provided for clustering the following entity objects in the word vector set, for example, the entity objects which are also lipstick are relatively close to each other in the expression of the entity word vector, so that the clustering analysis is facilitated. It should be noted that, besides the word2vec model, other technologies that can encode an entity object may also be used, such as a Glove model, and the embodiment of the present invention does not limit this.
And step S106, carrying out cluster analysis on the entity word vectors and a plurality of word vectors in the word vector set to obtain a target word vector set corresponding to the entity word vectors.
Specifically, the word vector set includes a plurality of word vectors, where the word vectors in the word vector set are entity word vectors and include entity word vectors corresponding to various types of entity objects, so that after performing cluster analysis on the entity word vectors and the word vectors in the word vector set, a target word vector set including a plurality of target word vectors corresponding to the entity word vectors can be obtained, for example, a target word vector set including target word vectors such as "Tom Ford" for an entity object can be obtained by performing cluster analysis in the word vector set. Because each target word vector is also configured with an attribute parameter set, the target corpus text can be further refined through the clustering analysis, and the emotion analysis precision is improved.
It should be noted that, because the word vector set includes a plurality of word vectors, the word vector set can be updated by adding the entity word vector corresponding to the new entity object to the word vector set, and the updating operation is simple and convenient, and is convenient to popularize and implement in practical application.
Step S108, carrying out cluster analysis on the attribute parameter set configured by each target word vector in the target word vector set to obtain a target attribute parameter set corresponding to the entity word vector; wherein the target attribute parameter set comprises a plurality of target attribute parameters.
Each target word vector is also configured with an attribute parameter set, wherein the attribute parameter set comprises attribute parameters of a plurality of target word vectors, and the attribute parameters are also called as side parameters and are used for representing the characteristics of the entity object; for example, the target word vector "fool" is configured with two attribute parameters of color number and package, and the target word vector "jiaolan" is configured with a plurality of attribute parameters of color number, fragrance, genuine products, package, etc., at this time, a target attribute parameter set corresponding to the target word vector set, that is, a target attribute parameter set corresponding to the entity word vector, can be obtained by performing cluster analysis on the attribute parameter set configured for each target word vector in the target word vector set, for example, by using a BERT + Linear line model, because the attribute parameters in the attribute parameter set configured for each target word vector may be the same or different, the target attribute parameter set obtained by cluster analysis includes the attribute parameters of all classified target word vectors, as described above, by performing cluster analysis on the attribute parameter sets of target word vectors such as "saint rowland", "charm", "jiaolan", and "jiaolan", "and the like, and obtaining a target attribute parameter set, wherein the attribute parameters of the target attribute parameter set almost comprise all the attribute parameters of the lipstick product, so that the target attribute parameter set necessarily comprises the attribute parameters contained in the target corpus text.
Step S110, inputting the target attribute parameter set and the target corpus text into an emotion analysis model to obtain an emotion analysis result of the target corpus text; and the emotion analysis result is the emotion attribute corresponding to the attribute parameter contained in the target corpus text.
Specifically, the emotion analysis model is a fine-grained emotion analysis model configured with emotion attributes, and the fine-grained emotion analysis model is a six-dimensional emotion analysis model, where the emotion attributes include: like, happy, hurting heart, fear, surprise and engendering six basic emotions. It should be noted that the emotion attribute may also be set as an emotion other than the six basic emotions according to an actual application scenario, or may also be set as another emotion analysis model, which is not limited in this embodiment of the present invention.
Specifically, the target attribute parameter set and the target corpus text are input into the fine-grained emotion analysis model to determine the attribute parameters contained in the target corpus text, and the attribute parameters are analyzed to obtain the emotion attributes corresponding to each attribute parameter, so that the emotion analysis is performed on each attribute parameter contained in the target corpus text, and compared with the existing method of directly performing coarse-grained emotion analysis on the corpus text, the accuracy of the corpus text emotion analysis is improved. For example, for a target corpus text: although the color of the Tom Ford is reddish and disliked, the outer package is exquisite and commented, the entity object is Tom Ford, the target attribute parameter set including a plurality of target attributes such as package, color number, genuine product and fragrance is obtained by performing cluster analysis on the attribute parameter set of target word vectors such as 'Saint Roland', 'charm', 'Jiaolan' and 'Dior', and the target attribute parameter set and the target corpus text are input into the fine-grained sentiment analysis model, so that sentiment attributes of different attribute parameters can be obtained, such as attribute parameters: packaging, emotional attributes: and the method is happy, so that the fine-grained emotion analysis of the target corpus text is realized.
In addition, some professional emotion analysis models in the existing method can also perform attribute parameter mining on corpus text, such as MemNet (Memory Network), mgan (multi-granular attention Network), and the like, then, emotion analysis is carried out on the mined attribute parameters, but the professional emotion analysis model needs a great deal of prior knowledge of professionals in practical application, the application scene of the emotion analysis model is limited, in the application, the fine-grained emotion analysis model only needs to determine the attribute parameters contained in the target corpus text according to the target attribute parameter set and the target corpus text, and then, the attribute parameters are analyzed without a large amount of prior knowledge, so that the fine-grained emotion analysis model provided by the application can be widely applied to various scenes, and the practical value of emotion analysis is further improved.
According to the method for determining the emotion attribute, the entity word vectors of the entity objects in the target corpus text are clustered and mined in the word vector set to obtain the target attribute parameter set corresponding to the target corpus text, emotion analysis is performed on the target attribute parameter set and the target corpus text based on the emotion analysis model to obtain the emotion analysis result of the target corpus text, namely the emotion attribute corresponding to the attribute parameters contained in the target corpus text.
In one possible embodiment, the emotion attribute is further configured with a weighting value, and the method further includes: and sequencing the attribute parameters based on the weighted values of the emotion attributes corresponding to the attribute parameters to obtain the emotion analysis result of the target corpus text. Specifically, for the emotional attributes of the multiple attribute parameters included in the target corpus text, the configured weighted values are used for sorting, for example, the weighted value of the emotional attribute is happy 1, the weighted value of the emotional attribute is favorite 0.8, the weighted value of the emotional attribute is distressed-1, the weighted value of the emotional attribute is fear-2, and the like, so that the emotional attributes of the attribute parameters of the product are sorted through the weighted values, a manufacturer can know timely which parts of the product are approved and favored by users and which parts of the product are dissatisfied by users, and the manufacturer or a merchant can improve or optimize the product. It should be noted that, the weighted value of each emotion attribute may be set according to an actual situation, and this is not limited in this embodiment of the present invention.
This is illustrated here for ease of understanding. The word vector set pre-stored by the server includes word vectors corresponding to a plurality of computers, and each word vector is configured with an attribute parameter set in terms of the computer, such as attribute parameters including a screen, a system, a memory, a hard disk capacity, a Central Processing Unit (CPU), and the like. As shown in fig. 2, the to-be-processed parsing corpus (i.e. the target corpus text) is obtained on the graphical user interface provided by the server: the XX computer is just started to run very fast, and the screen is still running. However, the system is not very good to use, many software is not available in application stores, and the touch panel is not sensitive and very bad to use, so that the system is suitable for home use. Firstly, identifying the analysis corpus by an NER technology to obtain an entity object XX, wherein XX can be an enterprise name or a product name; then, the entity object is subjected to entity coding processing to obtain an entity word vector corresponding to the entity object, the entity word vector and a plurality of word vectors in the word vector set are subjected to cluster analysis to obtain a target word vector set corresponding to the entity word vector, an attribute parameter set configured by each target word vector in the target word vector set is subjected to cluster analysis to obtain a target attribute parameter set corresponding to the entity word vector, and the target attribute parameter set and an analysis corpus are input to a fine-grained sentiment analysis model (not shown), wherein the analysis corpus comprises attribute parameters (namely side parameters) for side mining to obtain attribute parameters A (namely side A), attribute parameters B (namely side B) and attribute parameters C (namely side C) contained in the analysis corpus, and fine-grained sentiment analysis is performed to obtain sentiment attributes (such as a screen) corresponding to the attribute parameters A (such as a screen) contained in the analysis corpus, The emotion attribute corresponding to the attribute parameter B (such as a system), namely emotion B, and the emotion attribute corresponding to the attribute parameter C (such as a peripheral), namely emotion C, are output: the XX computer is just starting to run very fast and the screen is still running. But the system is not very well used, many software are not available in application stores, and the touch panel is not sensitive and very not well used, so that the system is suitable for household': the system comprises a screen, happiness (1), a system, a damaged heart (-1) and an external device, wherein the damaged heart (-1) is adopted, so that the fine-grained emotion analysis of the analysis corpus is realized, and compared with the method of directly inputting the analysis corpus into an emotion analysis model to perform coarse-grained emotion analysis, the accuracy of the corpus text emotion analysis is improved, and the practical value of the emotion analysis is improved.
Therefore, the emotion attribute determination method provided by the application realizes fine-grained emotion analysis on the target corpus text by determining the target attribute parameter set corresponding to the target corpus text, and has the following advantages in practical application:
(1) by encoding the entity object, on one hand, the entity object can be automatically, rapidly and uniquely identified, and on the other hand, preparation can be made for performing cluster analysis with a word vector set later;
(2) based on a clustering analysis technology, carrying out clustering analysis on an attribute parameter set configured by each target word vector in a target word vector set to obtain a target attribute parameter set corresponding to an entity word vector, so as to conveniently and automatically dig out attribute parameters of a target corpus text; meanwhile, the word vector set is convenient to be automatically updated based on the continuous enrichment of the corpus text;
(3) and the fine-grained emotion analysis model is used for performing fine-grained analysis on the target corpus text, so that the emotion analysis precision is improved.
In summary, the emotion attribute determination method provided in the present application may be applied to: (1) in the field of commodity retail, the evaluation of users (namely corpus text) is very important feedback information for retailers and manufacturers, and the evaluation of massive users is subjected to emotion analysis, so that the degree of acceptance and dispute of the users on products and their competitive products can be quantified, and the retailers and the manufacturers can know the appeal of the users on the products and the comparison quality of the products and the competitive products; (2) in the social public opinion field, public opinion trends can be effectively mastered by analyzing public comments (namely corpus texts) on social hotspot events; (3) in the aspect of enterprise public opinions, the evaluation of the society on the enterprise can be quickly known by utilizing emotional analysis, and the firm basic work and the like of the enterprise in the aspects of brand management and public image are facilitated, so that the method has better practical value.
Based on the method embodiment, the embodiment of the invention also provides an emotion attribute determination device, wherein an emotion analysis model and a word vector set are provided through a server, and each word vector in the word vector set is configured with an attribute parameter set. As shown in fig. 3, the apparatus includes an obtaining module 31, an encoding module 32, a first cluster analysis module 33, a second cluster analysis module 34, and an emotion attribute analysis module 35, which are connected in sequence, wherein the functions of each module are as follows:
an obtaining module 31, configured to obtain an entity object included in the target corpus text;
the encoding module 32 is configured to perform encoding processing on the entity object to obtain an entity word vector corresponding to the entity object;
the first clustering module 33 is configured to perform clustering analysis on the entity word vectors and a plurality of word vectors in the word vector set to obtain a target word vector set corresponding to the entity word vectors;
the second clustering analysis module 34 is configured to perform clustering analysis on the attribute parameter set configured for each target word vector in the target word vector set to obtain a target attribute parameter set corresponding to the entity word vector; wherein the target attribute parameter set comprises a plurality of target attribute parameters;
the emotion attribute analysis module 35 is configured to input the target attribute parameter set and the target corpus text into the emotion analysis model, so as to obtain an emotion analysis result of the target corpus text; and the emotion analysis result is the emotion attribute corresponding to the attribute parameter contained in the target corpus text.
The emotion attribute determination device provided by the embodiment of the invention obtains a target attribute parameter set corresponding to the target corpus text by clustering and mining the entity word vectors of the entity objects in the target corpus text in a word vector set, and performs emotion analysis on the target attribute parameter set and the target corpus text based on the emotion analysis model to obtain an emotion analysis result of the target corpus text, namely, the emotion attribute corresponding to the attribute parameters contained in the target corpus text.
In one possible embodiment, the obtaining module 31 is further configured to: performing entity type identification on the target corpus text based on a named entity identification NER technology to obtain an entity object; wherein the entity object comprises at least one of: person name, product name, organizational structure name, and event name.
In another possible embodiment, the emotion analysis model is a fine-grained emotion analysis model configured with emotion attributes, where the emotion attributes include: like, happy, sad, fear, surprise and angry, the emotion attribute analysis module 35 is further configured to: and inputting the target attribute parameter set and the target corpus text into a fine-grained emotion analysis model to determine attribute parameters contained in the target corpus text, and analyzing the attribute parameters to obtain emotion attributes corresponding to each attribute parameter.
In another possible embodiment, the emotion attribute is further configured with a weighting value, and the apparatus is further configured to: and sequencing the attribute parameters based on the weighted values of the emotion attributes corresponding to the attribute parameters to obtain the emotion analysis result of the target corpus text.
In another possible embodiment, the encoding module 32 is further configured to: and coding the entity object based on a pre-trained word2vec model to obtain an entity word vector corresponding to the entity object.
In another possible embodiment, the target corpus text is text information and/or voice information.
The emotion attribute determination device provided by the embodiment of the invention has the same technical characteristics as the emotion attribute determination method provided by the embodiment, so that the same technical problems can be solved, and the same technical effects can be achieved.
The embodiment of the invention also provides electronic equipment which comprises a processor and a memory, wherein the memory stores machine executable instructions capable of being executed by the processor, and the processor executes the machine executable instructions to realize the emotion attribute determination method.
Referring to FIG. 4, the electronic device comprises a processor 40 and a memory 41, wherein the memory 41 stores machine executable instructions capable of being executed by the processor 40, and the processor 40 executes the machine executable instructions to implement the emotion attribute determination method.
Further, the electronic device shown in fig. 4 further includes a bus 42 and a communication interface 43, and the processor 40, the communication interface 43 and the memory 41 are connected through the bus 42.
The Memory 41 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 43 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, etc. may be used. The bus 42 may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Enhanced Industry Standard Architecture) bus, or the like. The above-mentioned bus may be classified into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one double-headed arrow is shown in FIG. 4, but that does not indicate only one bus or one type of bus.
The processor 40 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 40. The Processor 40 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory 41, and the processor 40 reads the information in the memory 41 and completes the steps of the method of the foregoing embodiment in combination with the hardware thereof.
The present embodiments also provide a machine-readable storage medium having stored thereon machine-executable instructions that, when invoked and executed by a processor, cause the processor to implement the method for emotion attribute determination described above.
The method, the apparatus, and the computer program product of the electronic device for determining an emotion attribute provided in the embodiments of the present invention include a computer-readable storage medium storing a program code, where instructions included in the program code may be used to execute the method described in the foregoing method embodiments, and specific implementation may refer to the method embodiments, and will not be described herein again.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In addition, in the description of the embodiments of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. 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 the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. An emotion attribute determination method, wherein an emotion analysis model and a word vector set are provided by a server, and each word vector in the word vector set is configured with an attribute parameter set, the method comprising:
acquiring an entity object contained in a target corpus text;
coding the entity object to obtain an entity word vector corresponding to the entity object;
clustering analysis is carried out on the entity word vectors and a plurality of word vectors in the word vector set, and a target word vector set corresponding to the entity word vectors is obtained;
performing cluster analysis on an attribute parameter set configured for each target word vector in the target word vector set to obtain a target attribute parameter set corresponding to the entity word vector; wherein the set of target attribute parameters comprises a plurality of target attribute parameters;
inputting the target attribute parameter set and the target corpus text into the emotion analysis model to obtain an emotion analysis result of the target corpus text; and the emotion analysis result is the emotion attribute corresponding to the attribute parameter contained in the target corpus text.
2. The method according to claim 1, wherein the step of obtaining the entity object contained in the target corpus text comprises:
performing entity type identification on the target corpus text based on a named entity identification NER technology to obtain the entity object; wherein the entity object comprises at least one of: person name, product name, organizational structure name, and event name.
3. The method of claim 1, wherein the emotion analysis model is a fine-grained emotion analysis model configured with emotion attributes, wherein the emotion attributes include: like, happy, hurting, fear, surprise and anger, inputting the target attribute parameter set and the target corpus text into the emotion analysis model to obtain an emotion analysis result of the target corpus text, wherein the step of obtaining the emotion analysis result comprises the following steps:
and inputting the target attribute parameter set and the target corpus text into the fine-grained emotion analysis model to determine attribute parameters contained in the target corpus text, and analyzing the attribute parameters to obtain the emotion attribute corresponding to each attribute parameter.
4. The method of claim 3, wherein the sentiment attributes are further configured with weighting values, the method further comprising:
and sequencing the attribute parameters based on the weighted values of the emotion attributes corresponding to the attribute parameters to obtain emotion analysis results of the target corpus text.
5. The method of claim 1, wherein the step of encoding the physical object comprises:
and coding the entity object based on a pre-trained word2vec model to obtain an entity word vector corresponding to the entity object.
6. The method according to claim 1, wherein said target corpus text is text information and/or speech information.
7. An emotion attribute determination apparatus, wherein an emotion analysis model and a word vector set are provided by a server, each word vector in the word vector set being configured with a set of attribute parameters, the apparatus comprising:
the acquisition module is used for acquiring entity objects contained in the target corpus text;
the encoding module is used for encoding the entity object to obtain an entity word vector corresponding to the entity object;
the first clustering analysis module is used for clustering analysis on the entity word vectors and a plurality of word vectors in the word vector set to obtain a target word vector set corresponding to the entity word vectors;
the second clustering analysis module is used for clustering analysis on the attribute parameter set configured by each target word vector in the target word vector set to obtain a target attribute parameter set corresponding to the entity word vector; wherein the set of target attribute parameters comprises a plurality of target attribute parameters;
the emotion attribute analysis module is used for inputting the target attribute parameter set and the target corpus text into the emotion analysis model to obtain an emotion analysis result of the target corpus text; and the emotion analysis result is the emotion attribute corresponding to the attribute parameter contained in the target corpus text.
8. The emotion attribute determination device of claim 7, wherein the obtaining module is further configured to:
performing entity type identification on the target corpus text based on a named entity identification NER technology to obtain the entity object; wherein the entity object comprises at least one of: person name, product name, organizational structure name, and event name.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method for determining emotional properties according to any of the preceding claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, performs the steps of the method for determining an emotional property of any of the claims 1 to 6.
CN202011128740.5A 2020-10-20 2020-10-20 Emotion attribute determining method and device and electronic equipment Active CN112241453B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011128740.5A CN112241453B (en) 2020-10-20 2020-10-20 Emotion attribute determining method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011128740.5A CN112241453B (en) 2020-10-20 2020-10-20 Emotion attribute determining method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN112241453A true CN112241453A (en) 2021-01-19
CN112241453B CN112241453B (en) 2023-10-13

Family

ID=74169276

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011128740.5A Active CN112241453B (en) 2020-10-20 2020-10-20 Emotion attribute determining method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112241453B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113204643A (en) * 2021-06-23 2021-08-03 北京明略软件***有限公司 Entity alignment method, device, equipment and medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105740382A (en) * 2016-01-27 2016-07-06 中山大学 Aspect classification method for short comment texts
WO2017040867A1 (en) * 2015-09-01 2017-03-09 Quantum Interface, Llc. Apparatuses, systems and methods for constructing unique identifiers
CN110222185A (en) * 2019-06-13 2019-09-10 哈尔滨工业大学(深圳) A kind of emotion information representation method of associated entity
CN110472042A (en) * 2019-07-02 2019-11-19 桂林电子科技大学 A kind of fine granularity sensibility classification method
CN110704622A (en) * 2019-09-27 2020-01-17 北京明略软件***有限公司 Text emotion classification method and device and electronic equipment
CN110728153A (en) * 2019-10-15 2020-01-24 天津理工大学 Multi-category emotion classification method based on model fusion
CN110866087A (en) * 2019-08-12 2020-03-06 上海大学 Entity-oriented text emotion analysis method based on topic model
CN111241842A (en) * 2018-11-27 2020-06-05 阿里巴巴集团控股有限公司 Text analysis method, device and system
CN111507789A (en) * 2019-01-31 2020-08-07 阿里巴巴集团控股有限公司 Method and device for determining commodity attribute words and computing equipment
US20200272791A1 (en) * 2019-02-26 2020-08-27 Conversica, Inc. Systems and methods for automated conversations with a transactional assistant

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017040867A1 (en) * 2015-09-01 2017-03-09 Quantum Interface, Llc. Apparatuses, systems and methods for constructing unique identifiers
CN105740382A (en) * 2016-01-27 2016-07-06 中山大学 Aspect classification method for short comment texts
CN111241842A (en) * 2018-11-27 2020-06-05 阿里巴巴集团控股有限公司 Text analysis method, device and system
CN111507789A (en) * 2019-01-31 2020-08-07 阿里巴巴集团控股有限公司 Method and device for determining commodity attribute words and computing equipment
US20200272791A1 (en) * 2019-02-26 2020-08-27 Conversica, Inc. Systems and methods for automated conversations with a transactional assistant
CN110222185A (en) * 2019-06-13 2019-09-10 哈尔滨工业大学(深圳) A kind of emotion information representation method of associated entity
CN110472042A (en) * 2019-07-02 2019-11-19 桂林电子科技大学 A kind of fine granularity sensibility classification method
CN110866087A (en) * 2019-08-12 2020-03-06 上海大学 Entity-oriented text emotion analysis method based on topic model
CN110704622A (en) * 2019-09-27 2020-01-17 北京明略软件***有限公司 Text emotion classification method and device and electronic equipment
CN110728153A (en) * 2019-10-15 2020-01-24 天津理工大学 Multi-category emotion classification method based on model fusion

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
ANURAG ILLENDULA 等: "Multimodal Emotion Classification", 《WWW \'19: COMPANION PROCEEDINGS OF THE 2019 WORLD WIDE WEB CONFERENCE》, pages 439 - 449 *
刘存涛 等: "一种基于概念逻辑树的异构信息结构化描述模型", 《通信技术 》, pages 2725 - 2733 *
田煜: "基于语义情感分析的网络热点爬虫舆情分析***", 《软件》, pages 89 - 93 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113204643A (en) * 2021-06-23 2021-08-03 北京明略软件***有限公司 Entity alignment method, device, equipment and medium

Also Published As

Publication number Publication date
CN112241453B (en) 2023-10-13

Similar Documents

Publication Publication Date Title
CN109471938B (en) Text classification method and terminal
CN110827129B (en) Commodity recommendation method and device
US20130191395A1 (en) Social media data analysis system and method
CN115204183B (en) Knowledge enhancement-based two-channel emotion analysis method, device and equipment
CN111680165B (en) Information matching method and device, readable storage medium and electronic equipment
US20160140389A1 (en) Information extraction supporting apparatus and method
JP2017182663A (en) Content management device, content management method, and program
CN113268667B (en) Chinese comment emotion guidance-based sequence recommendation method and system
CN109299276B (en) Method and device for converting text into word embedding and text classification
CN113312468A (en) Conversation mode-based conversation recommendation method, device, equipment and medium
KR101656741B1 (en) Method, device, computer program and computer readable recording medium for determining opinion spam based on frame
CN113435182A (en) Method, device and equipment for detecting conflict of classification labels in natural language processing
CN111435369A (en) Music recommendation method, device, terminal and storage medium
WO2023129339A1 (en) Extracting and classifying entities from digital content items
CN117112909A (en) Big data recommendation method and big data mining system applied to cloud digital service
CN112241453A (en) Emotion attribute determining method and device and electronic equipment
JP2006004098A (en) Evaluation information generation apparatus, evaluation information generation method and program
WO2024021685A1 (en) Reply content processing method and media content interactive content interaction method
CN110674020B (en) APP intelligent recommendation method and device and computer readable storage medium
CN116680401A (en) Document processing method, document processing device, apparatus and storage medium
CN113535939A (en) Text processing method and device, electronic equipment and computer readable storage medium
CN112541357B (en) Entity identification method and device and intelligent equipment
TWI681308B (en) Apparatus and method for predicting response of an article
CN113515704A (en) Recommendation effect evaluation method, device and system and computer program product
CN109740671B (en) Image identification method and device

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
GR01 Patent grant