CN112241453B - 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
CN112241453B
CN112241453B CN202011128740.5A CN202011128740A CN112241453B CN 112241453 B CN112241453 B CN 112241453B CN 202011128740 A CN202011128740 A CN 202011128740A CN 112241453 B CN112241453 B CN 112241453B
Authority
CN
China
Prior art keywords
emotion
target
entity
word vector
attribute
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.)
Active
Application number
CN202011128740.5A
Other languages
Chinese (zh)
Other versions
CN112241453A (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

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 application provides an emotion attribute determination method, an emotion attribute determination device and electronic equipment, wherein the method comprises the following steps: acquiring entity objects contained in a target corpus text; encoding the entity object to obtain an entity word vector corresponding to the entity object; performing cluster analysis on the entity word vector and a plurality of word vectors in the word vector set to obtain a target word vector set corresponding to the entity word vector; performing 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; 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 existing method for directly carrying out coarse granularity analysis on the corpus text, the accuracy of emotion analysis on the corpus text is improved, and the practical value of emotion analysis is improved.

Description

Emotion attribute determining method and device and electronic equipment
Technical Field
The application relates to the technical field of emotion analysis, in particular to an emotion attribute determination method and device and electronic equipment.
Background
Emotion analysis (Sentiment Analysis) is to extract a comment entity object from the comment text, and emotion tendencies expressed by the comment entity object, namely emotion attributes. The existing emotion analysis method mainly adopts an emotion classification model which takes RNN (Recurrent Neural Network ), LSTM (Long-Short Term Memory, long-short-term memory network), a transducer model, BERT (Bidirectional Encoder Representations from Transformers, multi-layer bidirectional transducer encoder) and the like as main models, and the method can only carry out coarse-grained analysis, such as bisection or fifthly, and the like, so that the emotion analysis result is not ideal.
Disclosure of Invention
Accordingly, the present application is directed to a method and apparatus for determining emotion attributes, and an electronic device, so as to alleviate the above-mentioned problems.
In a first aspect, an embodiment of the present application provides a method for determining emotion attributes, where an emotion analysis model and a set of word vectors are provided by a server, and each word vector in the set of word vectors is configured with an attribute parameter set, the method includes: acquiring entity objects contained in a target corpus text; encoding the entity object to obtain an entity word vector corresponding to the entity object; performing cluster analysis on the entity word vector and a plurality of word vectors in the word vector set to obtain a target word vector set corresponding to the entity word vector; performing 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; 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 is emotion attributes corresponding to attribute parameters contained in the target corpus text.
With reference to the first aspect, an embodiment of the present application 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 category recognition on the target corpus text based on a named entity recognition NER technology to obtain an entity object; wherein the entity object comprises at least one of: name of person, product, organization structure, and event name.
With reference to the first aspect, an embodiment of the present application provides a second possible implementation manner of the first aspect, where the emotion analysis model is a fine granularity emotion analysis model configured with emotion attributes, where the emotion attributes include: the method comprises the steps of inputting a target attribute parameter set and a target corpus text into a emotion analysis model to obtain an 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-granularity 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 application provides a third possible implementation manner of the first aspect, where the emotion attribute is further configured with a weighting value, and the method further includes: and sorting the attribute parameters based on the weighted values of the emotion attributes corresponding to the attribute parameters to obtain an emotion analysis result of the target corpus text.
With reference to the first aspect, an embodiment of the present application provides a fourth possible implementation manner of the first aspect, where the step of performing an encoding process on a physical object includes: and carrying out coding processing on 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 application 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 application further provides an emotion attribute determining apparatus, which provides an emotion analysis model and a set of word vectors, each word vector in the set of word vectors being configured with an attribute parameter set, by a server, the apparatus including: the acquisition module is used for acquiring entity objects contained in the target corpus text; the coding module is used for coding the entity object to obtain an entity word vector corresponding to the entity object; the first cluster analysis module is used for carrying out cluster analysis on the entity word vector and a plurality of word vectors in the word vector set to obtain a target word vector set corresponding to the entity word vector; the second cluster analysis module is used for 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; 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; the emotion analysis result is emotion attributes corresponding to attribute parameters contained in the target corpus text.
With reference to the second aspect, an embodiment of the present application provides a first possible implementation manner of the second aspect, where the above-mentioned obtaining module is further configured to: performing entity category recognition on the target corpus text based on a named entity recognition NER technology to obtain an entity object; wherein the entity object comprises at least one of: name of person, product, organization structure, and event name.
In a third aspect, an embodiment of the present application further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the steps of the emotion attribute determination method of the first aspect when executing the computer program.
In a fourth aspect, embodiments of the present application also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the emotion attribute determination method of the first aspect.
The embodiment of the application has the following beneficial effects:
the embodiment of the application provides a method, a device and electronic equipment for determining emotion attributes, which are used for obtaining a target attribute parameter set corresponding to a target corpus text by clustering and mining entity word vectors of entity objects in the target corpus text in a word vector set, 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 application 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 application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and drawings.
In order to make the above objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present application, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of an emotion attribute determination method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a method for determining emotion attributes according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an emotion attribute determination device according to an embodiment of the present application;
fig. 4 is a schematic diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Aiming at the problems that the existing coarse-granularity analysis is directly carried out on the corpus text to cause the non-ideal analysis result and the actual application requirement cannot be met, the embodiment of the application provides the emotion attribute determining method, the emotion attribute determining device and the electronic equipment, so that the problems are alleviated.
For the convenience of understanding the present embodiment, a detailed description of an emotion attribute determination method provided in the embodiment of the present application is first provided below.
Embodiment one:
the embodiment of the application provides an emotion attribute determination method, an execution main body is a server, wherein 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 a method for determining emotion attributes according to an embodiment of the present application, as shown in fig. 1, the method includes the following steps:
step S102, obtaining 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 the user on purchased goods and/or voice information in a user chat dialogue, and the embodiment of the present application does not limit the description of the source of the target corpus text.
Optionally, performing entity category recognition on the target corpus text based on NER (Name Entity Recognition, named body recognition) technology to obtain an entity object; wherein the entity object comprises at least one of: name of person, product, organization structure, and event; the organization structure names include, but are not limited to, enterprise names, event names include, but are not limited to, typhoon events, storm events, and the like. Accordingly, the above-mentioned entity objects may be one or more, may be one category, and may also include a plurality of categories, including, for example, an enterprise name and a product name corresponding to the enterprise name, which is not limited in this embodiment of the present application.
Specifically, a person name, a product name, an organization structure name, an event name, and the like corresponding to the target corpus text can be identified based on a cascades HMM (Cascaded Hidden Markov Model, multi-layer hidden markov model), where a plurality of tasks are determined according to the category of the entity object, the entity object is a person name and the entity object is a product name and the like, in the process of identifying the entity object, each task is layered based on cascades HMM models, each layer of hidden markov model executes one task, and the hidden markov models of each layer are related to 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 the Best results are sent to a high-level model in the word graph for use; (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 the words. Therefore, the customized HMM model can conduct 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 through layered recognition without mutual interference, so that the efficiency of entity object recognition is improved.
Step S104, the entity object is encoded to obtain the entity word vector corresponding to the entity object.
Specifically, the entity object is subjected to coding processing based on a word2vec model trained in advance, and an entity word vector corresponding to the entity object is obtained. The entity object is coded, so that word vector expression can be carried out on the entity object, unique identification can be realized on the entity object, on one hand, an identification mode can be provided for entities subjected to cluster mining on a subsequent large-scale corpus text, the alignment problem of mass vocabularies is solved, meanwhile, good disambiguation treatment is carried out, and confusion of the entity object in the large-scale corpus text is avoided; on the other hand, the method also provides sufficient surrounding sample preparation for clustering the following entity objects in the word vector set, for example, the entity objects which are also lipsticks are relatively close to each other in the entity word vector expression, so that the clustering analysis is facilitated. Besides the word2vec model, other techniques for encoding the entity object may be used, such as a Glove model, which is not limited in this embodiment of the present application.
And S106, performing cluster analysis on the entity word vector and a plurality of word vectors in the word vector set to obtain a target word vector set corresponding to the entity word vector.
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 multiple types of entity objects, so that after the entity word vectors and the plurality of word vectors in the word vector set are subjected to cluster analysis, a target word vector set corresponding to the entity word vectors and including a plurality of target word vectors can be obtained, for example, a lipstick product with an entity object of "Tom Ford" can be obtained by performing cluster analysis in the word vector set, and a target word vector set including target word vectors such as "holland", "charm", "jiao lan" and "dio" can be obtained. Because each target word vector is also configured with an attribute parameter set, the target corpus text can be further refined through the cluster analysis, and the emotion analysis precision is further improved.
It should be noted that, because the word vector set includes a plurality of word vectors, the update of the word vector set can be realized by adding the entity word vector corresponding to the new entity object to the word vector set, and the update operation is simple and convenient, which is convenient for popularization and implementation 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 set of target attribute parameters includes a plurality of target attribute parameters.
Since each target word vector is further configured with an attribute parameter set, wherein the attribute parameter set includes attribute parameters of a plurality of target word vectors, the attribute parameters are also called side parameters and are used for characterizing the characteristics of the entity object; for example, the target word vector "diy" is configured with two attribute parameters, and the target word vector "diy" is configured with a plurality of attribute parameters such as color number, aroma, quality and packaging, at this time, by performing cluster analysis on the attribute parameter set configured by each target word vector in the target word vector set, for example, by performing cluster analysis through the bert+linear Linear model, 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, and because the attribute parameters in the attribute parameter set configured by each target word vector may be the same or may be different, the target attribute parameter set obtained through the cluster analysis includes attribute parameters of all the classified target word vectors, for example, by performing cluster analysis on the attribute parameter sets of the target word vectors such as "holland", "charm", "diy" and "diy, so as described above, the attribute parameters of the target attribute parameter set almost include all the attribute parameters of the lipstick product, and thus the target attribute parameter set necessarily includes all the attribute parameters contained in the target 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; the emotion analysis result is emotion attributes corresponding to attribute parameters contained in the target corpus text.
Specifically, the emotion analysis model is a fine granularity emotion analysis model configured with emotion attributes, and the fine granularity emotion analysis model is a six-dimensional emotion analysis model, wherein the emotion attributes comprise: six basic emotions of like, happy, wounded, fear, surprise and vital energy. It should be noted that, the emotion attributes may be set as emotion other than the six basic emotions according to the actual application scenario, or may be other emotion analysis models, which is not limited in the embodiment of the present application.
Specifically, the target attribute parameter set and the target corpus text are input into a fine granularity emotion analysis model to determine attribute parameters contained in the target corpus text, and the attribute parameters are analyzed to obtain emotion attributes corresponding to each attribute parameter, so that emotion analysis is carried out on each attribute parameter contained in the target corpus text, and compared with the existing method of directly carrying out coarse granularity analysis on the corpus text, the accuracy of emotion analysis on the corpus text is improved. For example, for a target corpus text: although the Tom Ford color is scarlet and dislike, the outer package is exquisite and good, the entity object is Tom Ford, the target attribute parameter set is obtained by carrying out cluster analysis on the attribute parameter sets of target word vectors such as 'holland', 'charm', 'jiaolan' and 'Diao', the target attribute parameter set comprises a plurality of target attributes such as package, color number, genuine products and fragrance, and the target attribute parameter set and target corpus text are input into a fine-granularity emotion analysis model, so that emotion attributes of different attribute parameters such as attribute parameters can be obtained: packaging, emotion attribute: is happy, thereby realizing fine granularity emotion analysis of the target corpus text.
In addition, in the existing method, attribute parameters of a text of a language can be mined by a part of specialized emotion analysis models, such as a Memory Network, a mgan Network and the like, and then the mined attribute parameters are subjected to emotion analysis, but the specialized emotion analysis models require a large amount of priori knowledge of professionals in practical application, so that the application scene of the emotion analysis models is limited, and the fine-grain emotion analysis models only need to determine the attribute parameters contained in the text of the target language according to a target attribute parameter set and the target language text and then analyze the attribute parameters without a large amount of priori knowledge.
According to the emotion attribute determining method provided by the embodiment of the application, 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, and emotion analysis is carried out 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 parameter 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 sorting the attribute parameters based on the weighted values of the emotion attributes corresponding to the attribute parameters to obtain an emotion analysis result of the target corpus text. Specifically, for emotion attributes of a plurality of attribute parameters contained in a target corpus text, sorting is performed through configured weighted values, for example, emotion attributes are happy weighted values of 1, emotion attributes are favorite weighted values of 0.8, emotion attributes are wounded weighted values of-1, emotion attributes are fear weighted values of-2 and the like, so that emotion attributes of attribute parameters of a product are sorted through weighted values, a manufacturer can know which parts of the product are approved and liked by a user in time, and which parts of the product are dissatisfied by the user, and the manufacturer or the merchant can improve or optimize the product. It should be noted that, the weighted values of the emotion attributes may be set according to actual situations, which is not limited by the embodiment of the present application.
For ease of understanding, this is illustrated herein. The word vector set pre-stored in the server comprises word vectors corresponding to a plurality of computers, and each word vector is configured with a set of attribute parameters in terms of computers, such as attribute parameters including a screen, a system, a memory, a hard disk capacity, a CPU (Central Processing Unit, a central processing unit) and the like. As shown in fig. 2, a graphical user interface provided at a server obtains an analysis corpus (i.e., a target corpus text) to be processed: the XX computer is fast in operation just before, and the screen is also running. However, the system is not very useful, many software is not available in the application store, and the touch pad is insensitive and very bad, and is suitable for home use. Firstly, identifying the analysis corpus by a NER technology to obtain an included entity object XX, wherein XX can be an enterprise name or a product name; then, performing entity coding processing on the entity object to obtain an entity word vector corresponding to the entity object, performing cluster analysis on the entity word vector and a plurality of word vectors in a word vector set to obtain a target word vector set corresponding to the entity word vector, performing cluster 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, and inputting the target attribute parameter set and an analysis corpus into a fine-grained emotion analysis model (not shown), wherein the analysis corpus contains attribute parameters (namely side parameters) to perform 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, performing fine-grained emotion analysis to obtain emotion attributes (namely emotion A corresponding to the attribute parameters A (such as a screen), emotion attributes (such as emotion B corresponding to the attribute parameters B (such as a system) and emotion attributes (namely emotion C corresponding to the attribute parameters C (such as peripheral)), and outputting the emotion attributes). The XX computer is fast in operation just before and the screen is also running. However, the system is not very well used, many software is not available in the application store, and the touch panel is insensitive and very not well used, so that the system is suitable for household use: screen-happy (1), system-wounded (-1), peripheral equipment-wounded (-1) to realized the fine granularity emotion analysis of analysis corpus, compared with directly inputting the analysis corpus into emotion analysis model and carrying out coarse granularity analysis, improved the precision of corpus text emotion analysis, promoted emotion analysis's practical value.
Therefore, the emotion attribute determination method provided by the application realizes fine granularity 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, the entity object can be automatically, rapidly and uniquely identified, and the preparation can be made for the clustering analysis of the word vector set and the word vector set;
(2) Based on a cluster analysis technology, 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, so that the attribute parameters of the target corpus text can be automatically mined later; meanwhile, the method is convenient for automatically updating the word vector set based on continuous enrichment of corpus texts;
(3) And carrying out fine granularity analysis on the target corpus text through the fine granularity emotion analysis model, so that the emotion analysis precision is improved.
In summary, the emotion attribute determination method provided by the application can be applied to: (1) In the commodity retail field, the evaluation (namely corpus text) of the user is very important feedback information for retailers and manufacturers, and through carrying out emotion analysis on the evaluation of massive users, the commendability of the user on the products and the bidding products thereof can be quantified, so that the retailers and the manufacturers can know the requirements of the users on the products and the comparison advantages and disadvantages of the users and the bidding products; (2) In the field of social public opinion, the trend of public opinion can be effectively mastered by analyzing criticizing (namely corpus text) of public on social hot events; (3) In the aspect of enterprise public opinion, the emotion analysis can be used for rapidly knowing the evaluation of society to enterprises, so that the enterprises can conveniently perform firm basic work in the aspects of brand management and public image, and the like, and the enterprise has good practical value.
Based on the method embodiment, the embodiment of the application also provides an emotion attribute determining device, which provides an emotion analysis model and a word vector set through a server, wherein each word vector in the word vector set is configured with an attribute parameter set. As shown in fig. 3, the device includes an acquisition module 31, a coding module 32, a first cluster analysis module 33, a second cluster analysis module 34 and an emotion attribute analysis module 35 which are sequentially connected, wherein the functions of each module are as follows:
the obtaining module 31 is configured to obtain an entity object contained in the target corpus text;
the encoding module 32 is configured to encode the entity object to obtain an entity word vector corresponding to the entity object;
the first cluster analysis module 33 is configured to perform cluster analysis on the entity word vector and a plurality of word vectors in the word vector set, so as to obtain a target word vector set corresponding to the entity word vector;
the second cluster analysis module 34 is configured to perform cluster analysis on the attribute parameter set configured by each target word vector in the target word vector set, so as 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 an emotion analysis model, so as to obtain an emotion analysis result of the target corpus text; the emotion analysis result is emotion attributes corresponding to attribute parameters contained in the target corpus text.
According to the emotion attribute determining device provided by the embodiment of the application, 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, and emotion analysis is carried out 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 parameter contained in the target corpus text.
In one possible embodiment, the obtaining module 31 is further configured to: performing entity category recognition on the target corpus text based on a named entity recognition NER technology to obtain an entity object; wherein the entity object comprises at least one of: name of person, product, organization structure, and event name.
In another possible embodiment, the emotion analysis model is a fine granularity emotion analysis model configured with emotion attributes, where the emotion attributes include: the emotion attribute analysis module 35 is also configured to: and inputting the target attribute parameter set and the target corpus text into a fine-granularity 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 sorting the attribute parameters based on the weighted values of the emotion attributes corresponding to the attribute parameters to obtain an emotion analysis result of the target corpus text.
In another possible embodiment, the above-mentioned encoding module 32 is further configured to: and carrying out coding processing on 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 speech information.
The emotion attribute determination device provided by the embodiment of the application 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 application also provides electronic equipment, which comprises a processor and a memory, wherein the memory stores machine executable instructions which can be 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 includes a processor 40 and a memory 41, the memory 41 storing machine executable instructions executable by the processor 40, the processor 40 executing the machine executable instructions to implement the above-described emotion attribute determination method.
Further, the electronic device shown in fig. 4 further comprises a bus 42 and a communication interface 43, and the processor 40, the communication interface 43 and the memory 41 are connected by the bus 42.
The memory 41 may include a high-speed random access memory (RAM, random Access Memory), and may further include a non-volatile memory (non-volatile memory), such as at least one magnetic disk memory. The communication connection between the system network element and the at least one other network element is achieved via at least one communication interface 43 (which may be wired or wireless), which may use the internet, a wide area network, a local network, a metropolitan area network, etc. Bus 42 may be an ISA (Industrial Standard Architecture, industry standard architecture) bus, PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus, or EISA (Enhanced Industry Standard Architecture, extended industry standard architecture) bus, among others. The buses may be classified into address buses, data buses, control buses, and the like. For ease of illustration, only one bi-directional arrow is shown in FIG. 4, but not only one bus or 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 circuitry in hardware or instructions in software in processor 40. The processor 40 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processor, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application 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 application may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as 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 in combination with its hardware performs the steps of the method of the previous embodiment.
The present embodiment also provides a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to implement the above-described emotion attribute determination method.
The emotion attribute determination method, apparatus and computer program product of electronic device provided in the embodiments of the present application include a computer readable storage medium storing program code, where instructions included in the program code may be used to execute the method described in the foregoing method embodiment, and specific implementation may refer to the method embodiment and will not be described herein.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described system and apparatus may refer to corresponding procedures in the foregoing method embodiments, which are not described herein again.
In addition, in the description of embodiments of the present application, unless explicitly stated and limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the above terms in the present application will be understood in specific cases by those of ordinary skill 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 this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In the description of the present application, it should be noted that the directions or positional relationships indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. are based on the directions or positional relationships shown in the drawings, are merely for convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present application. 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 examples are only specific embodiments of the present application, and are not intended to limit the scope of the present application, but it should be understood by those skilled in the art that the present application is not limited thereto, and that the present application is described in detail with reference to the foregoing examples: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method for emotion attribute determination, wherein an emotion analysis model and a set of word vectors each configured with a set of attribute parameters are provided by a server, the method comprising:
performing entity category identification on a target corpus text to obtain entity objects contained in the target corpus text, wherein the entity objects comprise at least one of the following: name of person, product, organization structure, and event;
encoding the entity object to obtain an entity word vector corresponding to the entity object;
performing cluster analysis on the entity word vector and a plurality of word vectors in the word vector set to obtain a target word vector set corresponding to the entity word vector;
performing 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 attribute parameters of all the classified target word vectors;
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 emotion attributes corresponding to attribute parameters contained in the target corpus text.
2. The emotion attribute determination method of claim 1, wherein the step of acquiring the entity object contained in the target corpus text includes:
performing entity category recognition on the target corpus text based on a named entity recognition NER technology to obtain the entity object; wherein the physical object comprises at least one of: name of person, product, organization structure, and event name.
3. The emotion attribute determination method according to claim 1, wherein the emotion analysis model is a fine-grained emotion analysis model configured with emotion attributes, wherein the emotion attributes include: the step of 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 comprises the following steps of:
inputting the target attribute parameter set and the target corpus text into the fine granularity 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.
4. The emotion attribute determination method of claim 3, wherein the emotion attribute is further configured with a weighting value, 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 an emotion analysis result of the target corpus text.
5. The emotion attribute determination method according to claim 1, characterized in that the step of performing encoding processing on the physical object includes:
and carrying out coding processing on the entity object based on a pre-trained word2vec model to obtain an entity word vector corresponding to the entity object.
6. The emotion attribute determination method according to claim 1, wherein the target corpus text is text information and/or speech information.
7. An emotion attribute determination apparatus characterized by providing, by a server, an emotion analysis model and a set of word vectors each of which is configured with an attribute parameter set, the apparatus comprising:
the acquisition module is used for carrying out entity category identification on the target corpus text to acquire entity objects contained in the target corpus text, wherein the entity objects comprise at least one of the following: name of person, product, organization structure, and event;
the encoding module is used for encoding the entity object to obtain an entity word vector corresponding to the entity object;
the first cluster analysis module is used for carrying out cluster analysis on the entity word vector and a plurality of word vectors in the word vector set to obtain a target word vector set corresponding to the entity word vector;
the second cluster analysis module is used for 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 attribute parameters of all the classified target word vectors;
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 emotion attributes corresponding to attribute parameters contained in the target corpus text.
8. The emotion attribute determination device of claim 7, wherein the acquisition module is further configured to:
performing entity category recognition on the target corpus text based on a named entity recognition NER technology to obtain the entity object; wherein the physical object comprises at least one of: name of person, product, organization structure, 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, characterized in that the processor implements the steps of the emotion attribute determination method of any of the preceding claims 1-6 when the computer program is executed by the processor.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps of the emotion attribute determination method of any of the preceding claims 1-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 CN112241453A (en) 2021-01-19
CN112241453B true 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)

Families Citing this family (1)

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

Citations (9)

* 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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200272791A1 (en) * 2019-02-26 2020-08-27 Conversica, Inc. Systems and methods for automated conversations with a transactional assistant

Patent Citations (9)

* 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
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》.2019,439-449. *
一种基于概念逻辑树的异构信息结构化描述模型;刘存涛 等;《通信技术 》;2725-2733 *
基于语义情感分析的网络热点爬虫舆情分析系统;田煜;《软件》;89-93 *

Also Published As

Publication number Publication date
CN112241453A (en) 2021-01-19

Similar Documents

Publication Publication Date Title
CN109800307B (en) Product evaluation analysis method and device, computer equipment and storage medium
CN115204183B (en) Knowledge enhancement-based two-channel emotion analysis method, device and equipment
CN109598586B (en) Recommendation method based on attention model
CN111680165A (en) Information matching method and device, readable storage medium and electronic equipment
CN112699215B (en) Grading prediction method and system based on capsule network and interactive attention mechanism
CN111368051A (en) Dialog generation method and device and computer equipment
KR101656741B1 (en) Method, device, computer program and computer readable recording medium for determining opinion spam based on frame
CN105989066A (en) Information processing method and device
CN110750297B (en) Python code reference information generation method based on program analysis and text analysis
CN112241453B (en) Emotion attribute determining method and device and electronic equipment
CN111291551A (en) Text processing method and device, electronic equipment and computer readable storage medium
JP2006004098A (en) Evaluation information generation apparatus, evaluation information generation method and program
CN113821588A (en) Text processing method and device, electronic equipment and storage medium
CN109241262B (en) Method and device for generating reply sentence based on keyword
CN116680401A (en) Document processing method, document processing device, apparatus and storage medium
CN114297380A (en) Data processing method, device, equipment and storage medium
CN112364666A (en) Text representation method and device and computer equipment
CN113239273A (en) Method, device, equipment and storage medium for generating text
Shaikh et al. Evaluating Significant Features in Context-Aware Multimodal Emotion Recognition with XAI Methods
Nuyts et al. Explicitly Representing Syntax Improves Sentence-to-Layout Prediction of Unexpected Situations
CN112948589B (en) Text classification method, text classification device and computer-readable storage medium
CN109740671B (en) Image identification method and device
CN114580427B (en) Self-media user selection method and related equipment
Soon et al. The impact of African swine fever news sentiment on the Korean meat market
CN112597149B (en) Data table similarity determination 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