CN110674301A - Emotional tendency prediction method, device and system and storage medium - Google Patents

Emotional tendency prediction method, device and system and storage medium Download PDF

Info

Publication number
CN110674301A
CN110674301A CN201910941635.4A CN201910941635A CN110674301A CN 110674301 A CN110674301 A CN 110674301A CN 201910941635 A CN201910941635 A CN 201910941635A CN 110674301 A CN110674301 A CN 110674301A
Authority
CN
China
Prior art keywords
words
similarity
structure data
word
emotional tendency
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.)
Pending
Application number
CN201910941635.4A
Other languages
Chinese (zh)
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.)
Chumen Wenwen Information Technology Co Ltd
Original Assignee
Chumen Wenwen Information Technology 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 Chumen Wenwen Information Technology Co Ltd filed Critical Chumen Wenwen Information Technology Co Ltd
Priority to CN201910941635.4A priority Critical patent/CN110674301A/en
Publication of CN110674301A publication Critical patent/CN110674301A/en
Pending legal-status Critical Current

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Biomedical Technology (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Databases & Information Systems (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an emotional tendency prediction method, device and system based on a Graph Neural Network (GNN) and a computer storage medium. The emotional tendency prediction method based on the graph neural network comprises the following steps: firstly, acquiring a section of text information; then, converting the text information into graph structure data which takes the words as nodes and takes the similarity between the words as edges; next, converting the graph structure data into an adjacency matrix formed by similarity among words; and then performing emotional tendency prediction on the adjacency matrix through an emotional classification model. When the emotional tendency prediction method is used for processing a long text, text information is converted into graphic structure data through word-to-word similarity, and on one hand, the advantage of a graph neural network can be utilized to contain semantics as much as possible; on the other hand, by gathering similar words, the emotional tendency characteristics with the most representative meaning are easier to extract, so that the prediction result is more accurate.

Description

Emotional tendency prediction method, device and system and storage medium
Technical Field
The invention relates to the technical field of Artificial Intelligence (AI), in particular to an emotional tendency prediction method, device and system based on a graph neural network GNN and a computer storage medium.
Background
Emotion classification is a common task in natural language processing. Specifically, a piece of text information is given, and the emotion tendency of the text information is predicted by using an emotion classification model.
At present, emotional tendency prediction methods are mostly realized based on word vector sequences and convolutional neural networks. When sentences in text information are converted in the previous period, the emotion tendency prediction method mainly uses the following method: firstly, segmenting a sentence, and converting an extracted word into a word vector; then, the word vectors are arranged according to the position sequence of the words in the sentence to form a sentence matrix. And similarly, arranging the sentence matrix according to the position sequence of the sentences in the text to form a text matrix. It follows that this process is similar to the process of encoding and does not have much refinement or refinement. Furthermore, in the text matrix thus obtained, the arrangement order and combination of words are only related to the word order and not to the semantics.
It becomes difficult to process long text information using such an emotional tendency prediction method. Because when the text information is long, the text matrix based on the word vector sequence is a very large matrix, and words related to emotional tendencies are scattered in various positions of the text matrix. This causes the following problems: 1) when the size of the sentence matrix exceeds the size of the matrix which can be processed by the neural network, only part of word vectors can be abandoned, and part of the matrix is intercepted for processing. This is equivalent to that, when emotion tendency prediction is performed, only the front section, the interruption or the rear section of a sentence is used, and the probability of semantic deletion is very high at this time; 2) even if the size of the sentence matrix does not exceed the size of the matrix which can be processed by the neural network, the range covered by the size of a single convolution window can limit the accuracy of the extraction of the emotional tendency characteristics because the words related to the emotional tendency can be scattered at various positions of the matrix.
Disclosure of Invention
As is known, a basic idea of the graph neural network GNN is to perform vector transformation (embedding) on nodes based on local neighbor node information of the nodes, that is, to aggregate information of each node and its surrounding nodes through the neural network. Therefore, the graph neural network has the following characteristics: 1) the nodes have vector transformation at each layer; 2) the model can reach any depth; 3) the vector transformation of the level zero node is its own input feature vector.
Therefore, the inventor creatively thinks whether the long text can be converted into a graph structure with words as nodes and the similarity between the words as edges by utilizing the advantages of the graph neural network, and utilizes the graph neural network model to predict the emotional tendency, so that not only can repeated words be removed, a text matrix is simplified and contains more different words, but also the words can be aggregated according to the semantics, and the related emotional tendency characteristics can be more easily and accurately extracted.
Based on the above inventive concept, embodiments of the present invention provide a method, an apparatus, a system, and a computer storage medium for emotion tendency prediction based on a graph neural network.
According to a first aspect of the embodiments of the present invention, there is provided an emotional tendency prediction method based on a graph neural network, the method including: acquiring text information; converting the text information into graph structure data which takes the words as nodes and takes the similarity between the words as edges; converting the graph structure data into an adjacency matrix formed by similarity among the words; and performing emotional tendency prediction on the adjacency matrix through an emotional classification model.
According to an embodiment of the present invention, converting text information into graph structure data using words as nodes and similarity between words as edges includes: extracting words in the text information; acquiring similarity between the extracted words; and constructing graph structure data by taking the extracted words as nodes and taking the similarity between the words as edges.
According to an embodiment of the present invention, obtaining the similarity between the extracted words includes: and acquiring the similarity between the extracted words through a word vector conversion tool.
According to an embodiment of the present invention, obtaining the similarity between the extracted words includes: the similarity between the extracted words is obtained by modeling using a word similarity calculation method.
According to one embodiment of the invention, the emotion tendency prediction of the adjacency matrix through the emotion classification model comprises the following steps: extracting the characteristics of the adjacent matrix through a convolutional neural network model CNN to obtain a corresponding compressed expression vector; and (4) the compressed expression vector passes through a full connection layer and a classification model to obtain an emotional tendency prediction result.
According to a second aspect of the embodiments of the present invention, an emotional tendency prediction device based on a graph neural network comprises: the information acquisition module is used for acquiring text information; the graph structure data conversion module is used for converting the text information into graph structure data which takes the words as nodes and takes the similarity between the words as edges; the adjacency matrix conversion module is used for converting the graph structure data into an adjacency matrix formed by the similarity between the words; and the emotional tendency prediction module is used for predicting the emotional tendency of the adjacency matrix through the emotional classification model.
According to an embodiment of the present invention, a graph structure data conversion module includes: the word extraction unit is used for extracting words in the text information; a similarity obtaining unit for obtaining a similarity between the extracted words; and the graph structure data construction unit is used for constructing the graph structure data by taking the extracted words as nodes and taking the similarity between the words as edges.
According to an embodiment of the present invention, the similarity obtaining unit is specifically configured to obtain the similarity between the extracted words through a word vector conversion tool.
According to an embodiment of the present invention, the similarity obtaining unit is specifically configured to obtain the similarity between the extracted words by modeling using a word similarity calculation method.
According to an embodiment of the present invention, the emotional tendency prediction module 304 comprises: the characteristic extraction unit is used for extracting the characteristics of the adjacent matrix through a convolutional neural network model CNN to obtain a corresponding compressed expression vector; a prediction result obtaining unit for obtaining the emotional tendency prediction result by passing the compressed expression vector through the full connection layer and the classification model
According to the third aspect of the embodiments of the present invention, there is also provided an emotional tendency prediction system based on a graph neural network, including a processor and a memory, where the memory stores computer program instructions, and the computer program instructions are executed by the processor to perform any one of the above emotional tendency prediction methods.
According to a fourth aspect of embodiments of the present invention, there is provided a computer storage medium comprising a set of computer executable instructions which, when executed, perform any of the above methods of emotional tendency prediction.
The embodiment of the invention discloses an emotional tendency prediction method, device and system based on a graph neural network and a computer storage medium. Firstly, acquiring a section of text information; then, converting the text information into graph structure data which takes the words as nodes and takes the similarity between the words as edges; next, converting the graph structure data into an adjacency matrix formed by similarity among words; and then performing emotional tendency prediction on the adjacency matrix through an emotional classification model. When the emotional tendency prediction method is used for processing a long text, text information is converted into graphic structure data through word-to-word similarity, and on one hand, the advantage of a graph neural network can be utilized to contain semantics as much as possible; on the other hand, by gathering similar words, the emotional tendency characteristics with the most representative meaning are easier to extract, so that the prediction result is more accurate.
Drawings
The above and other objects, features and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description read in conjunction with the accompanying drawings. Several embodiments of the invention are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which:
in the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
FIG. 1 is a schematic diagram illustrating an implementation flow of an emotional tendency prediction method based on a graph neural network according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating data of a graph structure in an emotional tendency prediction method based on a graph neural network according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of the composition structure of an emotional tendency prediction apparatus based on a graph neural network according to an embodiment of the present invention.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. 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.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
FIG. 1 shows an implementation flow of an emotional tendency prediction method based on a graph neural network according to an embodiment of the present invention. Referring to fig. 1, the method includes: operation 110, acquiring text information; operation 120, converting the text information into graph structure data with words as nodes and similarity between words as edges; operation 130, converting the graph structure data into an adjacency matrix formed by similarities between words; in operation 140, emotion tendency prediction is performed on the adjacency matrix through the emotion classification model.
In operation 110, the textual information primarily refers to a sentence, a paragraph, or an article in plain text format. The source of the text information is not limited, and the text information may be text information crawled from a website, text information converted by voice conversation, text information read from a file or a database, and the like.
In operation 120, the graph structure data may be constructed in any suitable form, such as an array (array), a list (list), a set (set), or a structure (structure), among others. Compared with the word sequence in the prior art, the words in the graph structure data are obtained after repeated words are removed, and more words can be included under the condition that input limiting conditions are the same. In addition, the edges in the graph structure represent word-to-word similarities, which are also deficient data in the existing scheme, and the similarities can gather words with similar word senses, and the emotional tendency characteristics with the most representative meanings can be kept as much as possible when the subsequent neural network operation is carried out. Therefore, the graph structure data obtained by the method provides more sufficient and efficient prediction basis for final emotional tendency prediction, particularly for emotional tendency prediction of long text information.
At operation 130, the adjacency relationship between the nodes represented by the adjacency matrix herein is the similarity between the words. This step is primarily responsible for converting the graph structure data in operation 120 into a value type that the computer can recognize and receive during the machine learning process. Here, the matrix needs to be constructed as a matrix of a specific format that can meet the input requirements of the emotion classification model. This format is determined by the emotion classification model.
At operation 140, the emotion classification model herein is a prediction model that can predict the type of emotional tendency. The model here may be any suitable emotion classification model that can receive as input the adjacency matrix formed by the similarity between words as described above and predict emotional tendencies from the adjacency matrix. For example, the model may be an emotional tendency prediction model trained using experimental data similar to the adjacency matrix as input using some machine learning method. Among them, a machine learning method which is commonly used is a deep learning method represented by a neural network model.
According to an embodiment of the present invention, converting text information into graph structure data using words as nodes and similarity between words as edges includes: extracting words in the text information; acquiring similarity between the extracted words; and constructing graph structure data by taking the extracted words as nodes and taking the similarity between the words as edges.
The extraction of words in the text information means that words are obtained by segmenting the text by a word segmentation method and then removing repeated words. The word segmentation method herein may be any suitable word segmentation method. Of course, the more mature and accurate the word segmentation method used herein, the better the accuracy and effect of the emotional tendency prediction. Similarity between words is primarily a measure of how close two words are semantically. In general, similarity is generally defined as a real number between 0 and 1. In particular, when two words are identical, their similarity is 1; when two words are completely different concepts, their similarity is close to 0. The graph structure data here is a collection of nodes and edges. The nodes are words included in the text information, and the edges are similarities between the words. Words, typically word vectors, are converted from word vectors. The word vector can be obtained by adding emotional factors on the basis of the word vector which is obtained by learning from the corpus and contains semantic information, and the word vector which simultaneously considers the semantics and the emotional tendency is obtained. The similarity between words, such as similarity, is calculated according to the word vector representing the word. For example, the closeness of the word vectors can be obtained by calculating the cosine distance of two word vectors.
According to an embodiment of the present invention, obtaining the similarity between the extracted words includes: and acquiring the similarity between the extracted words through a word vector conversion tool.
Here, the word vector conversion tool may be any suitable word vector conversion tool, such as word2vector, tfidf, bert, fasttext, and the like. These tools also typically provide methods or functions for calculating word vector similarity.
According to an embodiment of the present invention, obtaining the similarity between the extracted words includes: the similarity between the extracted words is obtained by modeling using a word similarity calculation method. The word similarity calculation method herein may be any suitable method, such as word similarity calculation based on a semantic dictionary, such as "web of knowledge" (HowNet), "synonym forest", and the like; or the solution can be carried out by applying a statistical method through the information of the word context.
According to one embodiment of the invention, the graphical structure data is converted into a adjacency matrix composed of similarities between words. The adjacency matrix here is a numerical matrix consisting of words and similarities between words, e.g. a matrix
Figure BDA0002223070200000071
Wherein the element a in the matrixijThe value of (d) is the similarity of the ith word vector and the jth word vector. If the number of words extracted from the text is n, this adjacency matrix is a matrix of dimensions n × n.
According to one embodiment of the invention, the emotion tendency prediction of the adjacency matrix through the emotion classification model comprises the following steps: extracting the characteristics of the adjacent matrix through a convolutional neural network model CNN to obtain a corresponding compressed expression vector; and (4) the compressed expression vector passes through a full connection layer and a classification model to obtain an emotional tendency prediction result.
The extraction and compression of the adjacent matrix through the convolutional neural network model are to refine the characteristics of the matrix, and usually include convolutional layer and pooling layer operations. The compressed expression vector obtained after convolution and pooling is the most prominent feature extracted from the adjacency matrix, and is also the data most relevant to the tendency prediction. The compressed representation vector is propagated through one or more full connection layers, and finally a classification result is obtained through a classification model. The fully-connected layer can integrate local information with category distinctiveness in the convolutional layer or the pooling layer, and the output value of the last fully-connected layer is transmitted to a classification model, such as a softmax classification model, so that the induction is completed and the emotional tendency prediction result is obtained.
How to convert the acquired text information into the graph structure data and then convert the graph structure data into the adjacency matrix formed by the similarity between words is described in detail below with reference to fig. 2.
As shown in fig. 2, it is assumed that the obtained text information is subjected to word segmentation processing to obtain a word 201, a word 202, a word 203, and a word 204. These words can be used as nodes of the graph structure data. The graph structure data G ═ V, E is constructed, where V is a set of nodes and E is a set of edges. The words are subjected to word vector conversion by using a word vector conversion tool: the word 201 is converted into a word vector to obtain v1(ii) a The word 202 is converted into a word vector to obtain v2(ii) a The word 203 is converted into a word vector to obtain v3(ii) a The word 204 is converted into a word vector to obtain v4. V is to be1、v2、v3And v4Put into the node set V. Assume that word 201 is related to word 202, with a degree of similarity a120.7, an edge e is formed at the node connecting the word 201 and the word 20212(ii) a Word 201 is related to word 203 with similarity a130.6, an edge e is formed at the node connecting the word 201 and the word 20313(ii) a Word 201 is related to word 204, with similarity a140.5, an edge e is formed at the node connecting the word 201 and the word 20414(ii) a Word 202 is related to word 203 with similarity a230.3, an edge e is formed at the node connecting the word 202 and the word 20323(ii) a Word 202 is related to word 204 with similarity a240.1, an edge e is formed at the node connecting the word 202 and the word 20424(ii) a Word 203 is related to word 204 with similarity a340.8, an edge e is formed at the node connecting the word 203 and the word 20434And so on. All edges eijAnd corresponding similarity aijPut into the set of edges E. At this time, the graph structure data G is constructed.
Next, the graph structure data shown in fig. 2 is converted into a node and an adjacency matrix a between nodes using a mapping method as shown in table 1.
Degree of similarity Word 201 Word 202 Word 203 Word 204
Word 201 a11 a12 a13 a14
Word 202 a21 a22 a23 a21
Word 203 a31 a32 a33 a34
Word 204 a41 a42 a43 a44
TABLE 1
Wherein, aijIs the similarity from word node i to word node j.
At this time, the graph structure data G as above is converted into an adjacency matrix:
Figure BDA0002223070200000091
here, assuming that the similarity of the same words is 1, the similarity between words is symmetrical, i.e., aijAnd ajiAre equal in value. However, in practical application scenarios, the similarity of the same word may be a decimal number infinitely close to 1, and the similarity between words may also be asymmetric, i.e. aijAnd ajiAre not equal in value.
Further, based on the emotional tendency prediction method based on the graph neural network as described above, the embodiment of the invention also provides an emotional tendency prediction device based on the graph neural network. As shown in fig. 3, the apparatus 30 includes: an information obtaining module 301, configured to obtain text information; a graph structure data conversion module 302, configured to convert the text information into graph structure data with words as nodes and similarities between the words as edges; an adjacency matrix conversion module 303, configured to convert the graph structure data into an adjacency matrix formed by similarity between words; and an emotional tendency prediction module 304, which predicts the emotional tendency of the adjacency matrix through the emotional classification model.
According to an embodiment of the present invention, the graph structure data conversion module 302 includes: the word extraction unit is used for extracting words in the text information; a similarity obtaining unit for obtaining a similarity between the extracted words; and the graph structure data construction unit is used for constructing the graph structure data by taking the extracted words as nodes and taking the similarity between the words as edges.
According to an embodiment of the present invention, the similarity obtaining unit is specifically configured to obtain the similarity between the extracted words through a word vector conversion tool.
According to an embodiment of the present invention, the similarity obtaining unit is specifically configured to obtain the similarity between the extracted words by modeling using a word similarity calculation method.
According to an embodiment of the present invention, the emotional tendency prediction module 304 comprises: the characteristic extraction unit is used for extracting the characteristics of the adjacent matrix through a convolutional neural network model CNN to obtain a corresponding compressed expression vector; and the prediction result obtaining unit is used for obtaining the emotional tendency prediction result by the compressed expression vector through the full connection layer and the classification model.
Also, based on the emotional tendency prediction method, the embodiment of the invention also provides an emotional tendency prediction system based on a graph neural network, which comprises a processor and a memory, wherein the memory stores computer program instructions, and the computer program instructions are used for executing any one of the emotional tendency prediction methods when the processor runs.
Furthermore, based on the emotional tendency prediction method as described above, an embodiment of the present invention further provides a computer storage medium storing a program that, when executed by a processor, causes the processor to perform at least the following operation steps: operation 110, acquiring text information; operation 120, converting the text information into graph structure data with words as nodes and similarity between words as edges; operation 130, converting the graph structure data into an adjacency matrix formed by similarities between words; in operation 140, emotion tendency prediction is performed on the adjacency matrix through the emotion classification model.
Here, it should be noted that: the above descriptions for the embodiment of the emotional tendency prediction apparatus based on the graph neural network, the embodiment of the emotional tendency prediction system, and the above descriptions for the embodiment of the computer storage medium are similar to the descriptions for the embodiment of the method shown in fig. 1, and have similar beneficial effects to the embodiment of the method shown in fig. 1, and therefore, the descriptions are omitted. For the descriptions of the embodiments of the emotional tendency prediction apparatus, the embodiments of the emotional tendency prediction system, and the technical details that are not disclosed in the above descriptions of the embodiments of the computer storage medium, please refer to the foregoing description of the embodiment of the method shown in fig. 1 of the present invention for understanding, and therefore, for brevity, will not be described again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of a unit is only one logical function division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another device, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units; can be located in one place or distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media capable of storing program codes, such as a removable storage medium, a Read Only Memory (ROM), a magnetic disk, and an optical disk.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods of the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a magnetic or optical disk, or other various media that can store program code.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method for predicting emotional tendency based on a Graph Neural Network (GNN), the method comprising:
acquiring text information;
converting the text information into graph structure data which takes words as nodes and takes the similarity between the words as edges;
converting the graph structure data into an adjacency matrix formed by similarity among words;
and performing emotional tendency prediction on the adjacency matrix through an emotional classification model.
2. The method according to claim 1, wherein the converting the text information into graph structure data with words as nodes and similarity between words as edges comprises:
extracting words in the text information;
acquiring similarity between the extracted words;
and constructing graph structure data by taking the extracted words as nodes and taking the similarity between the words as edges.
3. The method of claim 2, wherein the obtaining the similarity between the extracted words comprises:
and acquiring the similarity between the extracted words through a word vector conversion tool.
4. The method of claim 2, wherein the obtaining the similarity between the extracted words comprises:
the similarity between the extracted words is obtained by modeling using a word similarity calculation method.
5. The method of claim 1, wherein the emotion tendency prediction for the adjacency matrix through an emotion classification model comprises:
extracting the characteristics of the adjacency matrix through a convolutional neural network model CNN to obtain a corresponding compressed expression vector;
and the compressed expression vector is subjected to a full connection layer and a classification model to obtain an emotional tendency prediction result.
6. An emotional tendency prediction device based on a graph neural network, characterized in that the device comprises:
the information acquisition module is used for acquiring text information;
the graph structure data conversion module is used for converting the text information into graph structure data which takes the words as nodes and takes the similarity between the words as edges;
the adjacency matrix conversion module is used for converting the graph structure data into an adjacency matrix formed by the similarity between words;
and the emotional tendency prediction module is used for predicting the emotional tendency of the adjacency matrix through an emotional classification model.
7. The apparatus of claim 6, wherein the graph structure data transformation module comprises:
the word extraction unit is used for extracting words in the text information;
a similarity obtaining unit for obtaining a similarity between the extracted words;
and the graph structure data construction unit is used for constructing the graph structure data by taking the extracted words as nodes and taking the similarity between the words as edges.
8. The apparatus according to claim 7, characterized in that the similarity obtaining unit is specifically configured to,
and acquiring the similarity between the extracted words through a word vector conversion tool.
9. An emotional tendency prediction system based on a graph neural network, comprising a processor and a memory, wherein the memory stores computer program instructions, and the computer program instructions are used for executing the emotional tendency prediction method according to any one of claims 1 to 5 when the processor runs.
10. A computer storage medium comprising a set of computer executable instructions for performing the method of any one of claims 1 to 5 when executed.
CN201910941635.4A 2019-09-30 2019-09-30 Emotional tendency prediction method, device and system and storage medium Pending CN110674301A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910941635.4A CN110674301A (en) 2019-09-30 2019-09-30 Emotional tendency prediction method, device and system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910941635.4A CN110674301A (en) 2019-09-30 2019-09-30 Emotional tendency prediction method, device and system and storage medium

Publications (1)

Publication Number Publication Date
CN110674301A true CN110674301A (en) 2020-01-10

Family

ID=69078806

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910941635.4A Pending CN110674301A (en) 2019-09-30 2019-09-30 Emotional tendency prediction method, device and system and storage medium

Country Status (1)

Country Link
CN (1) CN110674301A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111461301A (en) * 2020-03-30 2020-07-28 北京沃东天骏信息技术有限公司 Serialized data processing method and device, and text processing method and device
CN112016438A (en) * 2020-08-26 2020-12-01 北京嘀嘀无限科技发展有限公司 Method and system for identifying certificate based on graph neural network
CN112883741A (en) * 2021-04-29 2021-06-01 华南师范大学 Specific target emotion classification method based on dual-channel graph neural network
CN113535904A (en) * 2021-07-23 2021-10-22 重庆邮电大学 Aspect level emotion analysis method based on graph neural network

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107463658A (en) * 2017-07-31 2017-12-12 广州市香港科大霍英东研究院 File classification method and device
CN109858520A (en) * 2018-12-27 2019-06-07 陕西师范大学 A kind of multilayer semisupervised classification method
CN110277165A (en) * 2019-06-27 2019-09-24 清华大学 Aided diagnosis method, device, equipment and storage medium based on figure neural network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107463658A (en) * 2017-07-31 2017-12-12 广州市香港科大霍英东研究院 File classification method and device
CN109858520A (en) * 2018-12-27 2019-06-07 陕西师范大学 A kind of multilayer semisupervised classification method
CN110277165A (en) * 2019-06-27 2019-09-24 清华大学 Aided diagnosis method, device, equipment and storage medium based on figure neural network

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111461301A (en) * 2020-03-30 2020-07-28 北京沃东天骏信息技术有限公司 Serialized data processing method and device, and text processing method and device
WO2021196954A1 (en) * 2020-03-30 2021-10-07 北京沃东天骏信息技术有限公司 Serialized data processing method and device, and text processing method and device
CN112016438A (en) * 2020-08-26 2020-12-01 北京嘀嘀无限科技发展有限公司 Method and system for identifying certificate based on graph neural network
CN112883741A (en) * 2021-04-29 2021-06-01 华南师范大学 Specific target emotion classification method based on dual-channel graph neural network
CN112883741B (en) * 2021-04-29 2021-07-27 华南师范大学 Specific target emotion classification method based on dual-channel graph neural network
CN113535904A (en) * 2021-07-23 2021-10-22 重庆邮电大学 Aspect level emotion analysis method based on graph neural network
CN113535904B (en) * 2021-07-23 2022-08-09 重庆邮电大学 Aspect level emotion analysis method based on graph neural network

Similar Documents

Publication Publication Date Title
CN111104794B (en) Text similarity matching method based on subject term
CN107122413B (en) Keyword extraction method and device based on graph model
CN109190117B (en) Short text semantic similarity calculation method based on word vector
KR101999152B1 (en) English text formatting method based on convolution network
CN110929038B (en) Knowledge graph-based entity linking method, device, equipment and storage medium
CN106970910B (en) Keyword extraction method and device based on graph model
CN110674301A (en) Emotional tendency prediction method, device and system and storage medium
CN110427623A (en) Semi-structured document Knowledge Extraction Method, device, electronic equipment and storage medium
CN104199972A (en) Named entity relation extraction and construction method based on deep learning
CN113392209B (en) Text clustering method based on artificial intelligence, related equipment and storage medium
CN109086265B (en) Semantic training method and multi-semantic word disambiguation method in short text
CN111985228B (en) Text keyword extraction method, text keyword extraction device, computer equipment and storage medium
CN108647322B (en) Method for identifying similarity of mass Web text information based on word network
CN111143547B (en) Big data display method based on knowledge graph
CN110990532A (en) Method and device for processing text
CN112559684A (en) Keyword extraction and information retrieval method
CN108268439B (en) Text emotion processing method and device
CN103646112A (en) Dependency parsing field self-adaption method based on web search
CN111767725A (en) Data processing method and device based on emotion polarity analysis model
CN110222192A (en) Corpus method for building up and device
CN113158687B (en) Semantic disambiguation method and device, storage medium and electronic device
CN111753082A (en) Text classification method and device based on comment data, equipment and medium
CN112860896A (en) Corpus generalization method and man-machine conversation emotion analysis method for industrial field
CN112836029A (en) Graph-based document retrieval method, system and related components thereof
CN111695358A (en) Method and device for generating word vector, computer storage medium and electronic equipment

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200110

RJ01 Rejection of invention patent application after publication