WO2021169364A1 - Semantic emotion analysis method and apparatus, device, and storage medium - Google Patents

Semantic emotion analysis method and apparatus, device, and storage medium Download PDF

Info

Publication number
WO2021169364A1
WO2021169364A1 PCT/CN2020/125154 CN2020125154W WO2021169364A1 WO 2021169364 A1 WO2021169364 A1 WO 2021169364A1 CN 2020125154 W CN2020125154 W CN 2020125154W WO 2021169364 A1 WO2021169364 A1 WO 2021169364A1
Authority
WO
WIPO (PCT)
Prior art keywords
sentence
analyzed
word
clause
vector
Prior art date
Application number
PCT/CN2020/125154
Other languages
French (fr)
Chinese (zh)
Inventor
邓悦
郑立颖
徐亮
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021169364A1 publication Critical patent/WO2021169364A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/211Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars
    • 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
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Definitions

  • An input module for inputting the implicit expression corresponding to the sentence to be analyzed and the preset sentence label corresponding to the sentence to be analyzed into the semantic sentiment analysis classifier;
  • This application introduces a self-attention mechanism to quantify the importance of each word in a sentence through the importance measurement value, and then according to the position of the important word, through the RNN improved by the hierarchical traversal of the tree, it can not only obtain The word meaning corresponding to the current word, and according to two parallel running cyclic neural network models, the implicit expression of the sentence to be analyzed based on the current word is obtained, and the semantic dependency of the context is merged to get the meaning of the current word in the entire sentence. As a result, the hidden state of the entire sentence in the final output is integrated with each word in the sentence and its corresponding importance measurement, so that the emotional tendency of the sentence meaning is more obvious, and the sentence expression is more accurate.
  • Fig. 3 is a schematic diagram of convolution calculation using two RNNs according to an embodiment of the present application.
  • RNN F represents the forward-propagating RNN
  • RNN B represents the reverse-propagating RNN
  • f i is the hidden vector expression obtained by the forward-propagating RNN
  • b i is the hidden vector expression obtained by the reverse-propagating RNN
  • f i and b Do the dot product of i to get a word expression v that incorporates context.
  • the left and right child nodes of the child node are respectively regarded as the next-level child nodes, and the recursive loop is performed in the above-mentioned manner until the sentence is segmented and split to the leaf node to stop.
  • the above recursive calculation recursively from the leaf node to the root node corresponding to the first word, and output the vector expression corresponding to the first word as the implicit expression of the hidden state of the entire sentence.
  • the importance metric value corresponding to each word in the sentence to be analyzed is obtained at one time through the calculation method of the importance metric value. Then the first word with the largest importance measure is taken as the parent node of the tree structure, and then the word with the largest importance measure in the two clauses of the sentence to be analyzed is taken as the child node of the parent node, and then continue according to the importance
  • the metric value, the word with the largest importance metric value in the sub-clause corresponding to the clause is used as the next-level child node of the above-mentioned child node until it is split to the leaf node.
  • step S11 of performing word embedding and position coding on the sentence to be analyzed to obtain the vector expression corresponding to each word in the sentence to be analyzed includes:
  • S122 By calling the fourth calculation formula in the self-attention network, respectively calculate the importance metric value corresponding to each word in the sentence to be analyzed.
  • the input module 3 is used to input the implicit expression corresponding to the sentence to be analyzed and the preset sentence label corresponding to the sentence to be analyzed into the semantic sentiment analysis classifier;
  • the importance metric of this application is calculated by introducing a self-attention mechanism, by quantifying the importance of each word in the sentence to be analyzed, and iteratively calculated by two cyclic neural network models running in parallel, so that the final output is
  • the hidden state of the sentence to be analyzed combines the semantics of each word in the sentence to be analyzed and its corresponding importance measure, the semantic dependency of the context, and each word in the sentence and its corresponding importance measure.
  • the emotional tendency of the sentence meaning is more obvious, the sentence expression is more precise, and the expression ability is greatly improved.
  • the above sentence tag distinguishes the positional relationship of each sentence in the text, including but not limited to the first sentence, or the first sentence of the paragraph, and so on.
  • the split unit includes:
  • the third splitting subunit is used to split the sentence to be analyzed into leaf nodes according to the splitting process of the first clause and the second clause to form a tree structure composed of multiple layers of nodes, wherein the Leaf nodes are nodes that have no child nodes.
  • the coding unit is used for word embedding and position coding of the sentence to be analyzed to obtain the vector expression corresponding to each word in the sentence to be analyzed;
  • This application introduces a self-attention mechanism through the vector of word embedding and position encoding, and quantifies the importance of each word in the sentence, so that the hidden state of the final output is integrated with each word in the sentence and its corresponding importance
  • the measurement value greatly improves the expressive ability of the model, so the subsequent sentiment classification results of the candidate's answer will be more accurate.
  • the second obtaining unit includes:
  • devices for analyzing semantic emotions include:
  • the assignment module is used to load the preset classification function to the classifier and initialize the assignment
  • the underlying platform of the blockchain can include processing modules such as user management, basic services, smart contracts, and operation monitoring.
  • the user management module is responsible for the identity information management of all blockchain participants, including the maintenance of public and private key generation (account management), key management, and maintenance of the correspondence between the user’s real identity and the blockchain address (authority management), etc.
  • authorization supervise and audit certain real-identity transactions, and provide risk control rule configuration (risk control audit); basic service modules are deployed on all blockchain node devices to verify the validity of business requests, After completing the consensus on the valid request, it is recorded on the storage.
  • the above-mentioned computer equipment introduces a self-attention mechanism to quantify the importance of each word in the sentence through the importance measurement value, and then according to the position of the important word, through the RNN improved by the hierarchical traversal of the tree, the current The meaning of words in the entire sentence, so that each word in the sentence and its corresponding importance measure are integrated in the hidden state of the entire sentence in the final output.
  • the above-mentioned computer-readable storage medium introduces a self-attention mechanism to quantify the importance of each word in the sentence through the importance measurement value, and then according to the position of the important word, the RNN is improved by the idea of traversing the hierarchy of the tree. , Get the meaning of the current word in the entire sentence, so that each word in the sentence and its corresponding importance measurement value are integrated in the hidden state of the entire sentence in the final output.
  • the above-mentioned processor performs word embedding and position coding on the sentence to be analyzed to obtain the vector expression corresponding to each word in the sentence to be analyzed, including: calculating the specified word by word embedding according to the first calculation formula After the first vector, calculate the second vector corresponding to the position code of the specified word according to the second formula; calculate the vector expression corresponding to the specified word by the third calculation formula according to the first vector and the second vector; According to the calculation process of the vector expression corresponding to the specified word, the vector expression corresponding to each word in the sentence to be analyzed is calculated.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Data Mining & Analysis (AREA)
  • Biomedical Technology (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • Evolutionary Computation (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Biophysics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Machine Translation (AREA)

Abstract

Provided are a semantic emotion analysis method and apparatus, a computer device, and a computer-readable storage medium, relating to the field of intelligent decision making in artificial intelligence. The semantic emotion analysis method comprises: acquiring an importance metric value corresponding to each word in a sentence to be analyzed (S1); according to the importance metric value corresponding to each word in the sentence to be analyzed, obtaining, by means of two recurrent neural network models which run in parallel, an implicit expression corresponding to the sentence to be analyzed (S2); inputting the implicit expression corresponding to the sentence to be analyzed and a sentence label corresponding to the sentence to be analyzed into a semantic sentiment analysis classifier (S3); and receiving an emotion analysis classification result of the semantic emotion analysis classifier for the sentence to be analyzed (S4). A self-attention mechanism is introduced, the importance of each word in a sentence is quantified by means of an importance metric value, and the meaning of the current word in the whole sentence is then acquired according to the position of an important word, so that each word in the sentence and the importance metric value corresponding thereto are fused together in the hidden state of the finally output whole sentence.

Description

分析语义情感的方法、装置、设备及存储介质Method, device, equipment and storage medium for analyzing semantic emotion
本申请要求于2020年09月23日提交中国专利局、申请号为2020110099004,发明名称为“分析语义情感的方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on September 23, 2020, the application number is 2020110099004, and the invention title is "Methods, Apparatus, Equipment, and Storage Media for Analyzing Semantic Emotions", the entire content of which is incorporated by reference Incorporated in this application.
技术领域Technical field
本申请涉及人工智能中的智能决策领域,特别是涉及到分析语义情感的方法、装置、设备及存储介质。This application relates to the field of intelligent decision-making in artificial intelligence, in particular to methods, devices, equipment and storage media for analyzing semantic emotions.
背景技术Background technique
最早期采用的构词模型是词袋模型,词袋模型将句子视为单词的简单集合,通过简单的向量运算将其合并为一句完整的话。随着深度学习的发展,神经网络的应用越来越普及,通过循环神经网络RNN作为一种顺序模型将文本视为单词序列,可以有效地捕捉时序变量间的关系,但发明人意识到顺序模型无法区分句子结构中的语法关系,无法判定句子中每个单词的重要性,不利于理解整句话的重点,故不能识别由于单词或短语的语义角色改变而引起的句子含义的差异,导致无法捕获自然语言中常见单词之间的非线性依赖性,得到语句情感特征。The earliest word-building model adopted is the bag-of-words model. The bag-of-words model treats a sentence as a simple collection of words and combines them into a complete sentence through simple vector operations. With the development of deep learning, the application of neural networks is becoming more and more popular. As a sequential model, the cyclic neural network RNN treats text as a sequence of words, which can effectively capture the relationship between time series variables, but the inventor is aware of the sequential model The grammatical relationship in the sentence structure cannot be distinguished, and the importance of each word in the sentence cannot be determined. It is not conducive to understanding the key points of the entire sentence. Therefore, it cannot recognize the difference in sentence meaning caused by the change of the semantic role of the word or phrase, resulting in failure The non-linear dependence between common words in natural language is captured, and the emotional characteristics of sentences are obtained.
技术问题technical problem
本申请的主要目的为提供分析语义情感的,旨在解决无法捕获自然语言中常见单词之间的非线性依赖性,得到语句情感特征的技术问题。The main purpose of this application is to provide analysis of semantic emotions, aiming to solve the technical problem of not being able to capture the non-linear dependence between common words in natural language and obtaining the emotional features of sentences.
技术解决方案Technical solutions
本申请提出一种分析语义情感的方法,包括:This application proposes a method for analyzing semantic emotions, including:
获取待分析语句中每个单词分别对应的重要性度量值;Obtain the importance metric value corresponding to each word in the sentence to be analyzed;
根据所述待分析语句中每个单词分别对应的重要性度量值,通过两个并行运行的循环神经网络模型,得到所述待分析语句对应的隐式表达式,其中,所述隐式表达式融合了上下文的语义依赖关系;According to the importance metric value corresponding to each word in the sentence to be analyzed, the implicit expression corresponding to the sentence to be analyzed is obtained through two cyclic neural network models running in parallel, wherein the implicit expression Incorporating the semantic dependency of context;
将所述待分析语句对应的隐式表达式以及所述待分析语句对应的预设句子标签,输入语义情感分析分类器;Input the implicit expression corresponding to the sentence to be analyzed and the preset sentence label corresponding to the sentence to be analyzed into the semantic sentiment analysis classifier;
接收所述语义情感分析分类器对所述待分析语句的情感分析分类结果。Receiving the sentiment analysis classification result of the sentence to be analyzed by the semantic sentiment analysis classifier.
本申请还提供了一种分析语义情感的装置,包括:This application also provides a device for analyzing semantic emotions, including:
获取模块,用于获取待分析语句中每个单词分别对应的重要性度量值;The acquiring module is used to acquire the importance metric value corresponding to each word in the sentence to be analyzed;
得到模块,用于根据所述待分析语句中每个单词分别对应的重要性度量值,通过两个并行运行的循环神经网络模型,得到所述待分析语句对应的隐式表达式,其中,所述隐式表达式融合了上下文的语义依赖关系;The obtaining module is used to obtain the implicit expression corresponding to the sentence to be analyzed through two parallel running cyclic neural network models according to the importance metric value corresponding to each word in the sentence to be analyzed. Implicit expressions incorporate the semantic dependency of context;
输入模块,用于将所述待分析语句对应的隐式表达式以及所述待分析语句对应的预设句子标签,输入语义情感分析分类器;An input module for inputting the implicit expression corresponding to the sentence to be analyzed and the preset sentence label corresponding to the sentence to be analyzed into the semantic sentiment analysis classifier;
接收模块,用于接收所述语义情感分析分类器对所述待分析语句的情感分析分类结果。The receiving module is configured to receive the sentiment analysis classification result of the sentence to be analyzed by the semantic sentiment analysis classifier.
本申请还提供了一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现上述方法的步骤。The present application also provides a computer device, including a memory and a processor, the memory stores a computer program, and the processor implements the steps of the foregoing method when the computer program is executed.
本申请还提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述的方法的步骤。The present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned method are realized.
有益效果Beneficial effect
本申请通过引入自注意力机制,将句中每个单词的重要性通过重要性度量值进行量化,然后根据重要单词所处位置,通过由树的层次化遍历思想改进的RNN,使不仅能获取当前单词对应的词义,且可根据两个并行运行的循环神经网络模型,得到待分析语句基于当前单词的隐式表达式,融合了上下文的语义依赖关系,得到当前单词在整个句子中的含义,从而使得最终输出的整个句子的隐藏状态中,融合了句中每个单词及其相应的重要性度量, 使句意的情感倾向更明显,语句表达更精准。This application introduces a self-attention mechanism to quantify the importance of each word in a sentence through the importance measurement value, and then according to the position of the important word, through the RNN improved by the hierarchical traversal of the tree, it can not only obtain The word meaning corresponding to the current word, and according to two parallel running cyclic neural network models, the implicit expression of the sentence to be analyzed based on the current word is obtained, and the semantic dependency of the context is merged to get the meaning of the current word in the entire sentence. As a result, the hidden state of the entire sentence in the final output is integrated with each word in the sentence and its corresponding importance measurement, so that the emotional tendency of the sentence meaning is more obvious, and the sentence expression is more accurate.
附图说明Description of the drawings
图1本申请一实施例的分析语义情感的方法流程示意图;Fig. 1 is a schematic flowchart of a method for analyzing semantic emotions according to an embodiment of the present application;
图2本申请一实施例的使用两个RNN进行卷积计算的示意图;Fig. 2 is a schematic diagram of convolution calculation using two RNNs according to an embodiment of the present application;
图3本申请一实施例的使用两个RNN进行卷积计算的示意图;Fig. 3 is a schematic diagram of convolution calculation using two RNNs according to an embodiment of the present application;
图4本申请一实施例的分析语义情感的系统流程示意图;FIG. 4 is a schematic diagram of a system flow diagram for analyzing semantic emotions according to an embodiment of the present application;
图5本申请一实施例的计算机设备内部结构示意图。Fig. 5 is a schematic diagram of the internal structure of a computer device according to an embodiment of the present application.
本发明最佳的实施方式The best embodiment of the present invention
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions, and advantages of this application clearer and clearer, the following further describes the application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
参照图1,本申请一实施例的分析语义情感的方法,包括:1, a method for analyzing semantic emotions according to an embodiment of the present application includes:
S1:获取待分析语句中每个单词分别对应的重要性度量值;S1: Obtain the importance metric value corresponding to each word in the sentence to be analyzed;
S2:根据所述待分析语句中每个单词分别对应的重要性度量值,通过两个并行运行的循环神经网络模型,得到所述待分析语句对应的隐式表达式,其中,所述隐式表达式融合了上下文的语义依赖关系;S2: According to the importance metric value corresponding to each word in the sentence to be analyzed, the implicit expression corresponding to the sentence to be analyzed is obtained through two parallel running cyclic neural network models, where the implicit The expression incorporates the semantic dependency of the context;
S3:将所述待分析语句对应的隐式表达式以及所述待分析语句对应的预设句子标签,输入语义情感分析分类器;S3: Input the implicit expression corresponding to the sentence to be analyzed and the preset sentence label corresponding to the sentence to be analyzed into the semantic sentiment analysis classifier;
S4:接收语义情感分析分类器对所述待分析语句的情感分析分类结果。S4: Receive the sentiment analysis classification result of the sentence to be analyzed by the semantic sentiment analysis classifier.
本申请的重要性度量值通过引入自注意力机制计算得到,通过将待分析语句中每个单词的重要性进行量化,并通过两个并行运行的循环神经网络模型迭代计算,从而使得最终输出的待分析语句的隐藏状态,融合了待分析语句中每个单词的语义及其相应的重要性度量值,融合了上下文的语义依赖关系,融合了句中每个单词及其相应的重要性度量,使句意的情感倾向更明显,语句表达更精准,大大提升了表达能力。上述句子标签区别各个语句在文中的位置关系,包括但不限于第几句话,或第几段第几句等等。然后通过将表示整个句子隐藏状态的隐式表达式,输入预训练好参量的语义情感分析分类器,进行情感分类分析。情感分类包括积极情感和消极情感。通过对语句的情感分析,提升对说话人的心态了解,达到更精准地识别说话人个性特征的目的。The importance metric of this application is calculated by introducing a self-attention mechanism, by quantifying the importance of each word in the sentence to be analyzed, and iteratively calculated by two cyclic neural network models running in parallel, so that the final output is The hidden state of the sentence to be analyzed combines the semantics of each word in the sentence to be analyzed and its corresponding importance measure, the semantic dependency of the context, and each word in the sentence and its corresponding importance measure. The emotional tendency of the sentence meaning is more obvious, the sentence expression is more precise, and the expression ability is greatly improved. The above sentence tag distinguishes the positional relationship of each sentence in the text, including but not limited to the first sentence, or the first sentence of the paragraph, and so on. Then, by inputting the implicit expression representing the hidden state of the entire sentence into a semantic sentiment analysis classifier with pre-trained parameters, sentiment classification analysis is performed. Emotion classification includes positive emotion and negative emotion. Through the emotional analysis of the sentence, the understanding of the speaker’s mentality is improved, and the purpose of identifying the personality characteristics of the speaker more accurately is achieved.
进一步地,根据所述待分析语句中每个单词分别对应的重要性度量值,通过两个并行运行的循环神经网络模型,得到所述待分析语句对应的隐式表达式的步骤S2,包括:Further, according to the importance metric value corresponding to each word in the sentence to be analyzed, the step S2 of obtaining the implicit expression corresponding to the sentence to be analyzed through two parallel running cyclic neural network models includes:
S21:按照待分析语句中每个单词分别对应的重要性度量值,将所述待分析语句拆分成树状结构,其中,树状结构包括叶子节点、子节点和根节点;S21: Split the sentence to be analyzed into a tree structure according to the importance metric corresponding to each word in the sentence to be analyzed, where the tree structure includes leaf nodes, child nodes, and root nodes;
S22:将第一叶子节点包含的分句,按照所述待分析语句的正向排序输入第一循环神经网络,将第二叶子节点包含的分句,按照所述待分析语句的逆向排序输入第二循环神经网络,其中,所述第一叶子节点和所述第二叶子节点为同属于任意一个指定子节点的一对叶子节点;S22: Input the clauses contained in the first leaf node into the first recurrent neural network according to the forward order of the sentence to be analyzed, and input the clauses contained in the second leaf node into the first recurrent neural network according to the reverse order of the sentence to be analysed. A two-loop neural network, wherein the first leaf node and the second leaf node are a pair of leaf nodes that belong to any designated child node;
S24:将所述第一循环神经网络输出的正向隐藏向量,乘以所述第二循环神经网络输出的逆向隐藏向量,得到所述指定子节点的矢量表达;S24: Multiply the forward hidden vector output by the first recurrent neural network by the reverse hidden vector output by the second recurrent neural network to obtain the vector expression of the designated child node;
S25:根据所述指定子节点的矢量表达,按照所述树状结构,依次递归计算至第一单词对应的根节点的矢量表达,其中,所述第一单词为重要性度量值最大时对应的单词;S25: According to the vector expression of the designated child node, according to the tree structure, sequentially recursively calculate the vector expression to the root node corresponding to the first word, wherein the first word is the corresponding one when the importance metric value is the largest word;
S26:将所述第一单词对应的根节点的矢量表达,作为所述待分析语句的隐式表达式。S26: Use the vector expression of the root node corresponding to the first word as an implicit expression of the sentence to be analyzed.
本申请通过重要性度量值,实现对待分析语句的断句和拆分,将待分析语句拆分成倒立的树状结构。然后通过两个循环神经网络分别从正向和逆向进行卷积运算,然后再将两个循环神经网络的输出结果进行相乘,则得到指定根节点的矢量表达,然后依次根据倒立的树状结构,递归至树状结构的所有子节点和叶子节点均参与运算,直至得到重要性度量 值最大的第一单词的矢量表达,即得到倒立的树状结构的总根节点对应的矢量表达,作为待分析语句的隐式表达式。This application realizes sentence segmentation and splitting of the sentence to be analyzed through the importance measurement value, and splits the sentence to be analyzed into an inverted tree structure. Then through the two recurrent neural networks to perform convolution operations from the forward and reverse directions, and then multiply the output results of the two recurrent neural networks to obtain the vector expression of the specified root node, and then follow the inverted tree structure in turn , All child nodes and leaf nodes recursively to the tree structure participate in the operation until the vector expression of the first word with the largest importance metric value is obtained, that is, the vector expression corresponding to the total root node of the inverted tree structure is obtained as the waiting Analyze the implicit expression of the statement.
倒立的树状结构的根节点也可称为父节点,定义上述父节点为整句话对应的原始向量。父节点往下则是左右两个子节点。设定整句话按照指定单词划分后得到的两个分句,分别看作父节点的左右子树。然后将左右子树视为序列,并使用RNN对该序列进行编码。将左侧子树的子节点与右侧子树的子节点分开,并使用两个RNN进行卷积计算:第一个RNN依据整句话的排序从前向后编码左侧子节点序列,第二个RNN依据整句话的排序从后向前编码右侧子节点序列。每个RNN最后输出的是拆分左右子树的指定单词对应的向量表示,指定单词作为当前子节点,当前子节点的向量表示是由左侧RNN模型的隐藏状态与右侧RNN模型的隐藏状态共同决定。取重要性度量值排名第一的向量v i对应的单词,作为指定单词,对原句[v 1,v 2,...,v n]进行划分,划分后左侧的句子作为根节点的左子树子节点,右侧的句子作为根节点的右子树子节点。因此左子树子节点包括[v 1,v 2,...,v i],右子树子节点包括[v i,v i+1,...,v n],示意图如附图2所示。因此,对于非叶子节点,使用以下公式来重新计算子节点的矢量表达v:即先计算f i=RNN F(v 1,v 2,...,v i);以及b i=RNN B(v i,v i+1,...,v n);然后通过v=f i·b i得到矢量表达v。上述RNN F表示正向传播的RNN,RNN B表示逆向传播的RNN,f i是正向传播的RNN得到的隐藏向量表达,b i是逆向传播的RNN得到的隐藏向量表达,最终将f i和b i进行点乘得到一个融合了上下文的单词表达形式v。再分别将子节点的左右子节点作为下一级子节点,按照上述方式进行递归循环,直至断句和拆分至叶节点处停止。上述递归计算从叶子节点依次递归至第一单词对应的根节点,输出第一单词对应的矢量表达,作为整个语句的隐藏状态的隐式表达式。 The root node of the inverted tree structure can also be called a parent node, and the parent node is defined as the original vector corresponding to the entire sentence. The parent node is down to the left and right child nodes. Set the two clauses obtained by dividing the whole sentence according to the specified words as the left and right subtrees of the parent node. Then regard the left and right subtrees as a sequence, and use RNN to encode the sequence. Separate the child nodes of the left subtree from the child nodes of the right subtree, and use two RNNs for convolution calculation: the first RNN encodes the sequence of left child nodes from front to back according to the order of the entire sentence, and the second Each RNN encodes the sequence of right child nodes from back to front according to the order of the whole sentence. The final output of each RNN is the vector representation corresponding to the specified word of the split left and right subtrees. The specified word is the current child node. The vector representation of the current child node is composed of the hidden state of the RNN model on the left and the hidden state of the RNN model on the right. decided together. Take the word corresponding to the vector v i that ranks first in the importance metric as the designated word, and divide the original sentence [v 1 ,v 2 ,...,v n ], and the sentence on the left after the division is the root node The left subtree child node, the sentence on the right is the right subtree child node of the root node. Thus the left subtree of child nodes comprises a [v 1, v 2, ... , v i], the right subtree of child nodes comprises a [v i, v i + 1 , ..., v n], such as the schematic figures 2 Shown. Thus, for non-leaf nodes, use the following formula to calculate the child node re-expression of the vector v: i.e. first calculate f i = RNN F (v 1 , v 2, ..., v i); and b i = RNN B ( v i ,v i+1 ,...,v n ); then the vector expression v is obtained by v=f i ·b i. The above RNN F represents the forward-propagating RNN, RNN B represents the reverse-propagating RNN, f i is the hidden vector expression obtained by the forward-propagating RNN, and b i is the hidden vector expression obtained by the reverse-propagating RNN, and finally f i and b Do the dot product of i to get a word expression v that incorporates context. Then, the left and right child nodes of the child node are respectively regarded as the next-level child nodes, and the recursive loop is performed in the above-mentioned manner until the sentence is segmented and split to the leaf node to stop. The above recursive calculation recursively from the leaf node to the root node corresponding to the first word, and output the vector expression corresponding to the first word as the implicit expression of the hidden state of the entire sentence.
进一步地,所述按照所述待分析语句中每个单词分别对应的重要性度量值,将所述待分析语句拆分成树状结构的步骤S21,包括:Further, the step S21 of splitting the sentence to be analyzed into a tree structure according to the importance metric value corresponding to each word in the sentence to be analyzed includes:
S211:按照所述待分析语句中每个单词分别对应的重要性度量值,确定所述待分析语句中重要性度量值最大的第一单词;S211: Determine the first word with the largest importance measurement value in the sentence to be analyzed according to the importance measurement value corresponding to each word in the sentence to be analyzed;
S212:以所述第一单词为分界点,将所述待分析语句拆分成第一子句和第二子句,其中,所述第一单词作为所述树状结构的根节点;S212: Using the first word as a dividing point, split the sentence to be analyzed into a first clause and a second clause, wherein the first word is used as the root node of the tree structure;
S213:以所述第一子句中重要性度量值最大的第二单词为分界点,将所述第一子句拆分成第三子句和第四子句,以所述第二子句中重要性度量值最大的第三单词为分界点,将所述第二子句拆分成第五子句和第六子句,其中,所述第二单词和所述第三单词均为所述根节点的子节点;S213: Using the second word with the largest importance measure in the first clause as a demarcation point, split the first clause into a third clause and a fourth clause, and use the second clause The third word with the largest importance measure is the demarcation point. The second clause is split into a fifth clause and a sixth clause, where the second word and the third word are all The child nodes of the root node;
S214:按照第一子句和第二子句的拆分过程,拆分待分析语句至叶子节点,形成多层节点组成的树状结构,其中,叶子节点为不存在子节点的节点。S214: According to the splitting process of the first clause and the second clause, split the sentence to be analyzed into leaf nodes to form a tree structure composed of multiple layers of nodes, where the leaf nodes are nodes without child nodes.
本申请通过重要性度量值的计算方式,一次性得到待分析语句中每个单词分别对应的重要性度量值。然后将重要性度量值最大的第一单词作为树结构的父节点,然后将待分析语句的两个分句中的重要性度量值最大的单词作为父节点的子节点,然后再继续根据重要性度量值,将分句对应的子分句中的重要性度量值最大的单词,作为上述子节点的下一级子节点,直至拆分至叶子节点。In this application, the importance metric value corresponding to each word in the sentence to be analyzed is obtained at one time through the calculation method of the importance metric value. Then the first word with the largest importance measure is taken as the parent node of the tree structure, and then the word with the largest importance measure in the two clauses of the sentence to be analyzed is taken as the child node of the parent node, and then continue according to the importance The metric value, the word with the largest importance metric value in the sub-clause corresponding to the clause is used as the next-level child node of the above-mentioned child node until it is split to the leaf node.
进一步地,获取待分析语句中每个单词分别对应的重要性度量值的步骤S1,包括:Further, the step S1 of obtaining the importance metric value corresponding to each word in the sentence to be analyzed includes:
S11:对待分析语句进行词嵌入以及位置编码,得到所述待分析语句中每个单词分别对应的向量表达;S11: Perform word embedding and position coding on the sentence to be analyzed to obtain the vector expression corresponding to each word in the sentence to be analyzed;
S12:将所述待分析语句中每个单词分别对应的向量表达,按照在所述待分析语句中的排序,依次输入自注意网络中,得到所述待分析语句中每个单词分别对应的重要性度量值。S12: The vector expression corresponding to each word in the sentence to be analyzed is sequentially input into the self-attention network according to the order in the sentence to be analyzed, and the important corresponding to each word in the sentence to be analyzed is obtained. Metric.
本申请通过对词嵌入以及位置编码的向量,引入自注意力机制,将句中每个单词的重要性进行量化,从而使得最终输出的隐藏状态融合了句中每个单词及其相应的重要性度量值,大大提升了模型的表达能力,因此后续对候选人回答的情感分类结果也会更加精准。This application introduces a self-attention mechanism through the vector of word embedding and position encoding, and quantifies the importance of each word in the sentence, so that the hidden state of the final output is integrated with each word in the sentence and its corresponding importance The measurement value greatly improves the expressive ability of the model, so the subsequent sentiment classification results of the candidate's answer will be more accurate.
进一步地,所述对待分析语句进行词嵌入以及位置编码,得到所述待分析语句中每个单词分别对应的向量表达的步骤S11,包括:Further, the step S11 of performing word embedding and position coding on the sentence to be analyzed to obtain the vector expression corresponding to each word in the sentence to be analyzed includes:
S111:根据第一计算公式计算指定单词经词嵌入后的第一向量,根据第二公式计算所述指定单词对应位置编码的第二向量;S111: Calculate the first vector of the specified word after word embedding according to the first calculation formula, and calculate the second vector of the position code corresponding to the specified word according to the second formula;
S112:根据所述第一向量和第二向量,通过第三计算公式计算得到所述指定单词对应的向量表达;S112: According to the first vector and the second vector, a vector expression corresponding to the designated word is calculated by a third calculation formula;
S113:根据所述指定单词对应的向量表达的计算过程,计算所述待分析语句中每个单词分别对应的向量表达。S113: According to the calculation process of the vector expression corresponding to the designated word, calculate the vector expression corresponding to each word in the sentence to be analyzed.
本申请的第一计算公式为:w i=Embedding(x),第二计算公式为:
Figure PCTCN2020125154-appb-000001
第三计算公式为v i=g(W v·(w i·p i)+b v)。举例地,待分析语句为一个包含n个单词的句子,表示为X=[x 1,x 2,...,x n],假设第i个单词的向量记作v i,定义v i是融合了第i个单词的词嵌入的向量,以及位置编码的向量。w i是第i个单词经过词嵌入后的向量表示,词嵌入将语句中的单词进行one hot编码,向量维度可预先设定为512维。p i是第i个单词的位置编码的向量,W是权重矩阵,b是偏置参数,g是激活函数。将向量w i和p i点乘后经过线性变换和非线性激活函数g,并将其还原成512维,得到第i个单词分别对应的向量表达[v 1,v 2,...,v n]。
The first calculation formula of this application is: w i = Embedding(x), and the second calculation formula is:
Figure PCTCN2020125154-appb-000001
The third formula is v i = g (W v · (w i · p i) + b v). For example, the sentence to be analyzed is a sentence containing n words, expressed as X=[x 1 ,x 2 ,...,x n ], assuming that the vector of the i-th word is denoted as v i , and v i is defined as It combines the word embedding vector of the i-th word and the position-encoded vector. W i is the i th word in the word vectors after embedding, said embedding word sentence word for one hot encoding may be set in advance as a vector dimension 512 dimension. p i is the vector of the position code of the i-th word, W is the weight matrix, b is the bias parameter, and g is the activation function. The vectors w i and p i are multiplied by the linear transformation and nonlinear activation function g, and restored to 512 dimensions, and the vector expressions corresponding to the i-th word are obtained [v 1 ,v 2 ,...,v n ].
进一步地,将所述待分析语句中每个单词分别对应的向量表达,按照在所述待分析语句中的排序,依次输入自注意网络中,得到所述待分析语句中每个单词分别对应的重要性度量值的步骤S12,包括:Further, the vector expression corresponding to each word in the sentence to be analyzed is sequentially input into the self-attention network according to the order in the sentence to be analyzed, and the corresponding vector expression of each word in the sentence to be analyzed is obtained. Step S12 of the importance measure includes:
S121:将所述待分析语句中每个单词分别对应的向量表达,按照在所述待分析语句中的排序,依次输入自注意网络中;S121: The vector expression corresponding to each word in the sentence to be analyzed is sequentially input into the self-attention network according to the order in the sentence to be analyzed;
S122:通过调用所述自注意网络中的第四计算公式,分别计算所述待分析语句中每个单词分别对应的重要性度量值。S122: By calling the fourth calculation formula in the self-attention network, respectively calculate the importance metric value corresponding to each word in the sentence to be analyzed.
本申请的第四计算公式如下:soft max(v T*v/d k)*v,计算得到重要性度量向量,作为重要性度量值,使得句子中的每个单词呈现不同的重要性度量,可进行梯度拆分语句。 The fourth calculation formula of this application is as follows: soft max(v T *v/d k )*v, the importance metric vector is calculated as the importance metric, so that each word in the sentence presents a different importance metric, Can carry out gradient split sentence.
进一步地,获取待分析语句中每个单词分别对应的重要性度量值的步骤S1之前,包括:Further, before step S1 of obtaining the importance metric value corresponding to each word in the sentence to be analyzed, the method includes:
S101:将预设分类函数加载至分类器,并初始化赋值;S101: Load the preset classification function to the classifier, and initialize the assignment;
S102:将训练语句的矢量表达和句子标签,输入加载了所述预设分类函数的分类器中进行分类训练;S102: Input the vector expression and sentence label of the training sentence into the classifier loaded with the preset classification function for classification training;
S103:判断损失函数是否收敛,其中,所述损失函数为预测分类结果和真实分类结果的交叉熵;S103: Determine whether the loss function converges, where the loss function is the cross entropy of the predicted classification result and the true classification result;
S104:若是,则判定训练得到了所述语义情感分析分类器。S104: If yes, determine that the semantic sentiment analysis classifier has been obtained through training.
本申请通过将获得的v即可作为整个句子的向量表示,将其连同标签y i一起输入分类器中进行预测,分类器的函数如下:
Figure PCTCN2020125154-appb-000002
其中,W和b都是分类器的参数。先随机初始化赋值后,根据其预测结果
Figure PCTCN2020125154-appb-000003
和真实标签y的交叉熵作为损失函数对分类器的参数W和b进行不断修正。
In this application, the obtained v can be used as the vector representation of the entire sentence, and it is input into the classifier together with the label yi for prediction. The function of the classifier is as follows:
Figure PCTCN2020125154-appb-000002
Among them, W and b are the parameters of the classifier. After initializing the assignment randomly, according to the predicted result
Figure PCTCN2020125154-appb-000003
The cross entropy of the real label y is used as a loss function to continuously modify the parameters W and b of the classifier.
训练完成后,对于新输入的无标记候选人回答文本X`,经过之前的处理和计算后可以得到其隐藏状态v′,利用分类器进行预测如下:
Figure PCTCN2020125154-appb-000004
After the training is completed, for the newly input unlabeled candidate answer text X`, the hidden state v′ can be obtained after the previous processing and calculation, and the prediction using the classifier is as follows:
Figure PCTCN2020125154-appb-000004
本申请分析语义情感的方法的流程示意图,如图3所示。本申请的语义情感分析,可通过说话人的回答迅速说话人的某些性格特征进行判断,并给出必要和合理的追问。通过捕获上下文的表达,提高了对说话人回答的整句话的理解程度,提升了面试官和候选人双方的面试体验。与此同时,硬件的应答速度也得到了提高,所以不仅节省了计算机的存储空间,也提高了软件的运行速度。The schematic flow chart of the method for analyzing semantic emotions of the present application is shown in FIG. 3. The semantic sentiment analysis of this application can quickly judge certain personality characteristics of the speaker based on the speaker's answer, and give necessary and reasonable follow-up questions. By capturing the expression of the context, the understanding of the entire sentence answered by the speaker is improved, and the interview experience for both the interviewer and the candidate is improved. At the same time, the response speed of the hardware has also been improved, so not only the storage space of the computer is saved, but also the running speed of the software is improved.
参照图4,本申请一实施例的分析语义情感的装置,包括:Referring to Fig. 4, an apparatus for analyzing semantic emotions according to an embodiment of the present application includes:
获取模块1,用于获取待分析语句中每个单词分别对应的重要性度量值;The obtaining module 1 is used to obtain the importance metric value corresponding to each word in the sentence to be analyzed;
得到模块2,用于根据所述待分析语句中每个单词分别对应的重要性度量值,通过两个并行运行的循环神经网络模型,得到所述待分析语句对应的隐式表达式,其中,所述隐式表达式融合了上下文的语义依赖关系;The obtaining module 2 is used to obtain the implicit expression corresponding to the sentence to be analyzed through two parallel running cyclic neural network models according to the importance metric value corresponding to each word in the sentence to be analyzed, wherein, The implicit expression integrates the semantic dependency of the context;
输入模块3,用于将所述待分析语句对应的隐式表达式以及所述待分析语句对应的预设句子标签,输入语义情感分析分类器;The input module 3 is used to input the implicit expression corresponding to the sentence to be analyzed and the preset sentence label corresponding to the sentence to be analyzed into the semantic sentiment analysis classifier;
接收模块4,用于接收语义情感分析分类器对所述待分析语句的情感分析分类结果。The receiving module 4 is configured to receive the sentiment analysis classification result of the sentence to be analyzed by the semantic sentiment analysis classifier.
本申请的重要性度量值通过引入自注意力机制计算得到,通过将待分析语句中每个单词的重要性进行量化,并通过两个并行运行的循环神经网络模型迭代计算,从而使得最终输出的待分析语句的隐藏状态,融合了待分析语句中每个单词的语义及其相应的重要性度量值,融合了上下文的语义依赖关系,融合了句中每个单词及其相应的重要性度量,使句意的情感倾向更明显,语句表达更精准,大大提升了表达能力。上述句子标签区别各个语句在文中的位置关系,包括但不限于第几句话,或第几段第几句等等。然后通过将表示整个句子隐藏状态的隐式表达式,输入预训练好参量的语义情感分析分类器,进行情感分类分析。情感分类包括积极情感和消极情感。通过对语句的情感分析,提升对说话人的心态了解,达到更精准地识别说话人个性特征的目的。The importance metric of this application is calculated by introducing a self-attention mechanism, by quantifying the importance of each word in the sentence to be analyzed, and iteratively calculated by two cyclic neural network models running in parallel, so that the final output is The hidden state of the sentence to be analyzed combines the semantics of each word in the sentence to be analyzed and its corresponding importance measure, the semantic dependency of the context, and each word in the sentence and its corresponding importance measure. The emotional tendency of the sentence meaning is more obvious, the sentence expression is more precise, and the expression ability is greatly improved. The above sentence tag distinguishes the positional relationship of each sentence in the text, including but not limited to the first sentence, or the first sentence of the paragraph, and so on. Then, by inputting the implicit expression representing the hidden state of the entire sentence into a semantic sentiment analysis classifier with pre-trained parameters, sentiment classification analysis is performed. Emotion classification includes positive emotion and negative emotion. Through the emotional analysis of the sentence, the understanding of the speaker’s mentality is improved, and the purpose of identifying the personality characteristics of the speaker more accurately is achieved.
进一步地,得到模块2,包括:Further, module 2 is obtained, including:
拆分单元,用于按照所述待分析语句中每个单词分别对应的重要性度量值,将所述待分析语句拆分成树状结构,其中,所述树状结构包括叶子节点、子节点和根节点;The splitting unit is configured to split the sentence to be analyzed into a tree structure according to the importance metric value corresponding to each word in the sentence to be analyzed, wherein the tree structure includes leaf nodes and child nodes And the root node;
输入单元,用于将第一叶子节点包含的分句,按照所述待分析语句的正向排序输入第一循环神经网络,将第二叶子节点包含的分句,按照所述待分析语句的逆向排序输入第二循环神经网络,其中,所述第一叶子节点和所述第二叶子节点为同属于任意一个指定子节点的一对叶子节点;The input unit is used to input the clauses contained in the first leaf node into the first recurrent neural network according to the forward ordering of the sentences to be analyzed, and the clauses contained in the second leaf node according to the reverse of the sentences to be analyzed Sort and input the second recurrent neural network, wherein the first leaf node and the second leaf node are a pair of leaf nodes that belong to any designated child node;
第一得到单元,用于将第一循环神经网络输出的正向隐藏向量,乘以所述第二循环神经网络输出的逆向隐藏向量,得到所述指定子节点的矢量表达;The first obtaining unit is configured to multiply the forward hidden vector output by the first recurrent neural network by the reverse hidden vector output by the second recurrent neural network to obtain the vector expression of the designated child node;
计算单元,用于根据所述指定根节点的矢量表达过程,按照所述树状结构,依次递归计算至第一单词对应的根节点的矢量表达,其中,所述第一单词为重要性度量值最大时对应的单词;The calculation unit is configured to recursively calculate the vector expression to the root node corresponding to the first word according to the vector expression process of the designated root node and according to the tree structure, wherein the first word is the importance metric value The word corresponding to the maximum time;
作为单元,用于将所述第一单词对应的根节点的矢量表达,作为所述待分析语句的隐式表达式。As a unit, it is used to express the vector of the root node corresponding to the first word as an implicit expression of the sentence to be analyzed.
本申请通过重要性度量值,实现对待分析语句的断句和拆分,将待分析语句拆分成倒立的树状结构。然后通过两个循环神经网络分别从正向和逆向进行卷积运算,然后再将两个循环神经网络的输出结果进行相乘,则得到指定根节点的矢量表达,然后依次根据倒立的树状结构,递归至树状结构的所有子节点和叶子节点均参与运算,直至得到重要性度量值最大的第一单词的矢量表达,即得到倒立的树状结构的总根节点对应的矢量表达,作为待分析语句的隐式表达式。This application realizes sentence segmentation and splitting of the sentence to be analyzed through the importance measurement value, and splits the sentence to be analyzed into an inverted tree structure. Then through the two recurrent neural networks to perform convolution operations from the forward and reverse directions, and then multiply the output results of the two recurrent neural networks to obtain the vector expression of the specified root node, and then follow the inverted tree structure in turn , All child nodes and leaf nodes recursively to the tree structure participate in the operation until the vector expression of the first word with the largest importance metric value is obtained, that is, the vector expression corresponding to the total root node of the inverted tree structure is obtained as the waiting Analyze the implicit expression of the statement.
倒立的树状结构的根节点也称为父节点,定义上述父节点为整句话对应的原始向量。父节点往下则是左右两个子节点。设定整句话按照指定单词划分后得到的两个分句,分别看作父节点的左右子树。然后将左右子树视为序列,并使用RNN对该序列进行编码。将左侧子树的子节点与右侧子树的子节点分开,并使用两个RNN进行卷积计算:第一个RNN依据整句话的排序从前向后编码左侧子节点序列,第二个RNN依据整句话的排序从后向前编码右侧子节点序列。每个RNN最后输出的是拆分左右子树的指定单词对应的向量表示,指定单词作为当前子节点,当前子节点的向量表示是由左侧RNN模型的隐藏状态与右侧RNN模型的隐藏状态共同决定。取重要性度量值排名第一的向量v i对应的单词,作为指定单词,对原句[v i,v i+1,...,v n]进行划分,划分后左侧的句子作为根节点的左子树子节点,右侧的句子作为根节点的右子树子节点。因此左子树子节点包括[v 1,v 2,...,v i],右子树子节点包括[v i,v i+1,...,v n],示意图如附图2所示。因此,对于非叶子节点,使用以下公式来重新计算子节点的矢量表达v:即先计算f i=RNN F(v 1,v 2,...,v i);以及b i=RNN B(v i,v i+1,...,v n);然后通过v=f i·b i得到矢量表达v。上述RNN F表示正向传播的RNN,RNN B表示逆向传播的RNN,f i是正向传播的RNN得到的隐藏向量表达,b i是逆向传播的RNN得到的隐藏向量表达,最终将f i和b i进行点乘得到一个融合了上下文的单词表达形式v。再分别将子节点的左右子节点作为下一级子节点,按照上述方式进行递归循环,直至断句和拆分至叶节点处停止。上述递归计算从叶子节点依次递归至第一单词对应的根节点,输出第一单词对应的矢量表达,作为整个语句的隐藏状态的隐式表达式。 The root node of the inverted tree structure is also called the parent node, and the parent node is defined as the original vector corresponding to the entire sentence. The parent node is down to the left and right child nodes. Set the two clauses obtained by dividing the whole sentence according to the specified words as the left and right subtrees of the parent node. Then regard the left and right subtrees as a sequence, and use RNN to encode the sequence. Separate the child nodes of the left subtree from the child nodes of the right subtree, and use two RNNs for convolution calculation: the first RNN encodes the sequence of left child nodes from front to back according to the order of the entire sentence, and the second Each RNN encodes the sequence of right child nodes from back to front according to the order of the whole sentence. The final output of each RNN is the vector representation corresponding to the specified word of the split left and right subtrees. The specified word is the current child node. The vector representation of the current child node is the hidden state of the RNN model on the left and the hidden state of the RNN model on the right. decided together. Take the importance ranking metric vectors v i corresponding to the word, as the designated word of the original sentence [v i, v i + 1 , ..., v n] is divided, the division of the sentence as the root of the left The left subtree child node of the node, and the sentence on the right as the right subtree child node of the root node. Thus the left subtree of child nodes comprises a [v 1, v 2, ... , v i], the right subtree of child nodes comprises a [v i, v i + 1 , ..., v n], such as the schematic figures 2 Shown. Thus, for non-leaf nodes, use the following formula to calculate the child node re-expression of the vector v: i.e. first calculate f i = RNN F (v 1 , v 2, ..., v i); and b i = RNN B ( v i ,v i+1 ,...,v n ); then the vector expression v is obtained by v=f i ·b i. The above-mentioned RNN F represents the forward-propagating RNN, RNN B represents the reverse-propagating RNN, f i is the hidden vector expression obtained by the forward-propagating RNN, and b i is the hidden vector expression obtained by the reverse-propagating RNN, and finally f i and b Do the dot product of i to get a word expression v that incorporates context. Then, the left and right child nodes of the child node are respectively regarded as the next-level child nodes, and the recursive loop is performed in the above-mentioned manner until the sentence is segmented and split to the leaf node to stop. The above recursive calculation recursively from the leaf node to the root node corresponding to the first word, and output the vector expression corresponding to the first word as the implicit expression of the hidden state of the entire sentence.
进一步地,拆分单元,包括:Further, the split unit includes:
确定子单元,用于按照所述待分析语句中每个单词分别对应的重要性度量值,确定所述待分析语句中重要性度量值最大的第一单词;The determining subunit is used to determine the first word with the largest importance measurement value in the sentence to be analyzed according to the importance measurement value corresponding to each word in the sentence to be analyzed;
第一拆分子单元,用于以所述第一单词为分界点,将所述待分析语句拆分成第一子句和第二子句,其中,所述第一单词作为所述树状结构的根节点;The first splitting subunit is used to split the sentence to be analyzed into a first clause and a second clause using the first word as a dividing point, wherein the first word serves as the tree structure The root node;
第二拆分子单元,用于以所述第一子句中重要性度量值最大的第二单词为分界点,将所述第一子句拆分成第三子句和第四子句,以所述第二子句中重要性度量值最大的第三单词为分界点,将所述第二子句拆分成第五子句和第六子句,其中,所述第二单词和所述第三单词均为所述根节点的子节点;The second splitting subunit is used for splitting the first clause into a third clause and a fourth clause using the second word with the largest importance measure in the first clause as a demarcation point. The third word with the largest importance measure in the second clause is the demarcation point, and the second clause is split into a fifth clause and a sixth clause, wherein the second word and the The third word is a child node of the root node;
第三拆分子单元,用于按照所述第一子句和第二子句的拆分过程,拆分所述待分析语句至叶子节点,形成多层节点组成的树状结构,其中,所述叶子节点为不存在子节点的节点。The third splitting subunit is used to split the sentence to be analyzed into leaf nodes according to the splitting process of the first clause and the second clause to form a tree structure composed of multiple layers of nodes, wherein the Leaf nodes are nodes that have no child nodes.
本申请通过重要性度量值的计算方式,一次性得到待分析语句中每个单词分别对应的重要性度量值。然后将重要性度量值最大的第一单词作为树结构的父节点,然后将待分析语句的两个分句中的重要性度量值最大的单词作为父节点的子节点,然后再继续根据重要性度量值,将分句对应的子分句中的重要性度量值最大的单词,作为上述子节点的下一级子节点,直至拆分至叶子节点。In this application, the importance metric value corresponding to each word in the sentence to be analyzed is obtained at one time through the calculation method of the importance metric value. Then the first word with the largest importance measure is taken as the parent node of the tree structure, and then the word with the largest importance measure in the two clauses of the sentence to be analyzed is taken as the child node of the parent node, and then continue according to the importance The metric value, the word with the largest importance metric value in the sub-clause corresponding to the clause is used as the next-level child node of the above-mentioned child node until it is split to the leaf node.
进一步地,获取模块1,包括:Further, obtaining module 1 includes:
编码单元,用于对待分析语句进行词嵌入以及位置编码,得到所述待分析语句中每个单词分别对应的向量表达;The coding unit is used for word embedding and position coding of the sentence to be analyzed to obtain the vector expression corresponding to each word in the sentence to be analyzed;
第二得到单元,用于将所述待分析语句中每个单词分别对应的向量表达,按照在所述待分析语句中的排序,依次输入自注意网络中,得到所述待分析语句中每个单词分别对应的重要性度量值。The second obtaining unit is used to express the vector corresponding to each word in the sentence to be analyzed, according to the order in the sentence to be analyzed, and sequentially input into the self-attention network to obtain each of the sentences to be analyzed. The importance metric value corresponding to each word.
本申请通过对词嵌入以及位置编码的向量,引入自注意力机制,将句中每个单词的重要性进行量化,从而使得最终输出的隐藏状态融合了句中每个单词及其相应的重要性度量值,大大提升了模型的表达能力,因此后续对候选人回答的情感分类结果也会更加精准。This application introduces a self-attention mechanism through the vector of word embedding and position encoding, and quantifies the importance of each word in the sentence, so that the hidden state of the final output is integrated with each word in the sentence and its corresponding importance The measurement value greatly improves the expressive ability of the model, so the subsequent sentiment classification results of the candidate's answer will be more accurate.
进一步地,编码单元,包括:Further, the coding unit includes:
第一计算子单元,用于根据第一计算公式计算指定单词经词嵌入后的第一向量,根据第二公式计算所述指定单词对应位置编码的第二向量;The first calculation subunit is configured to calculate a first vector of a specified word after word embedding according to a first calculation formula, and calculate a second vector of a position code corresponding to the specified word according to a second formula;
第二计算子单元,用于根据所述第一向量和第二向量,通过第三计算公式计算得到所述指定单词对应的向量表达;The second calculation subunit is configured to calculate the vector expression corresponding to the designated word through a third calculation formula according to the first vector and the second vector;
第三计算子单元,用于根据所述指定单词对应的向量表达的计算过程,计算所述待分析语句中每个单词分别对应的向量表达。The third calculation subunit is used to calculate the vector expression corresponding to each word in the sentence to be analyzed according to the calculation process of the vector expression corresponding to the designated word.
本申请的第一计算公式为:w i=Embedding(x),第二计算公式为:
Figure PCTCN2020125154-appb-000005
第三计算公式为v i=g(W v·(w i·p i)+b v)。举例地,待分析语句为一个包含n个单词的句子,表示为X=[x 1,x 2,...,x n],假设第i个单词的向量记作v i,定义v i是融合了第i个单词的词嵌入的向量,以及位置编码的向量。w i是第i个单词经过词嵌入后的向量表示,词嵌入将语句中的单词进行one hot编码,向量维度可预先设定为512维。p i是第i个单词的位置编码的向量,W是权重矩阵,b是偏置参数,g是激活函数。将向量w i和p i点乘后经过线性变换和非线性激活函数g,并将其还原成512维,得到第i个单词分别对应的向量表达[v i,v i+1,...,v n]。
The first calculation formula of this application is: w i = Embedding(x), and the second calculation formula is:
Figure PCTCN2020125154-appb-000005
The third formula is v i = g (W v · (w i · p i) + b v). For example, the sentence to be analyzed is a sentence containing n words, expressed as X=[x 1 ,x 2 ,...,x n ], assuming that the vector of the i-th word is denoted as v i , and v i is defined as It combines the word embedding vector of the i-th word and the position-encoded vector. W i is the i th word in the word vectors after embedding, said embedding word sentence word for one hot encoding may be set in advance as a vector dimension 512 dimension. p i is the vector of the position code of the i-th word, W is the weight matrix, b is the bias parameter, and g is the activation function. Multiply the vectors w i and p i through linear transformation and nonlinear activation function g, and restore them to 512 dimensions to obtain the vector expressions corresponding to the i-th word [v i ,v i+1 ,... ,v n ].
进一步地,第二得到单元,包括:Further, the second obtaining unit includes:
输入子单元,用于将所述待分析语句中每个单词分别对应的向量表达,按照在所述待分析语句中的排序,依次输入自注意网络中;The input subunit is used to express the vector corresponding to each word in the sentence to be analyzed, and sequentially input into the self-attention network according to the order in the sentence to be analyzed;
第四计算子单元,用于通过调用所述自注意网络中的第四计算公式,分别计算所述待分析语句中每个单词分别对应的重要性度量值。The fourth calculation subunit is configured to calculate the importance metric value corresponding to each word in the sentence to be analyzed by calling the fourth calculation formula in the self-attention network.
本申请的第四计算公式如下:soft max(v T*v/d k)*v,计算得到重要性度量值向量,作为重要性度量值,使得句子中的每个单词呈现不同的重要性度量,可进行梯度拆分语句。 The fourth calculation formula of this application is as follows: soft max(v T *v/d k )*v, the importance metric value vector is calculated as the importance metric value, so that each word in the sentence presents a different importance metric , You can perform gradient split sentences.
进一步地,分析语义情感的装置,包括:Further, devices for analyzing semantic emotions include:
赋值模块,用于将预设分类函数加载至分类器,并初始化赋值;The assignment module is used to load the preset classification function to the classifier and initialize the assignment;
训练模块,用于将训练语句的矢量表达和句子标签,输入加载了所述预设分类函数的分类器中进行分类训练;The training module is used to input the vector expression and sentence label of the training sentence into the classifier loaded with the preset classification function for classification training;
判断模块,用于判断损失函数是否收敛,其中,所述损失函数为预测分类结果和真实分类结果的交叉熵;A judging module for judging whether the loss function has converged, where the loss function is the cross entropy of the predicted classification result and the true classification result;
判定模块,用于若收敛,则判定训练得到了所述语义情感分析分类器。The judging module is used for judging that the semantic sentiment analysis classifier is obtained by training if it converges.
本申请通过将获得的v即可作为整个句子的向量表示,将其连同标签y i一起输入分类器中进行预测,分类器的函数如下:
Figure PCTCN2020125154-appb-000006
其中,W和b都是分类器的参数。先随机初始化赋值后,根据其预测结果
Figure PCTCN2020125154-appb-000007
和真实标签y的交叉熵作为损失函数对分类器的参数W和b进行不断修正。
In this application, the obtained v can be used as the vector representation of the entire sentence, and it is input into the classifier together with the label yi for prediction. The function of the classifier is as follows:
Figure PCTCN2020125154-appb-000006
Among them, W and b are the parameters of the classifier. After initializing the assignment randomly, according to the predicted result
Figure PCTCN2020125154-appb-000007
The cross entropy of the real label y is used as a loss function to continuously modify the parameters W and b of the classifier.
训练完成后,对于新输入的无标记候选人回答文本X`,经过之前的处理和计算后可以得到其隐藏状态v′,利用分类器进行预测如下:
Figure PCTCN2020125154-appb-000008
After the training is completed, for the newly input unlabeled candidate answer text X`, the hidden state v′ can be obtained after the previous processing and calculation, and the prediction using the classifier is as follows:
Figure PCTCN2020125154-appb-000008
本申请分析语义情感的方法的流程示意图,如图3所示。本申请的语义情感分析,可通过说话人的回答迅速说话人的某些性格特征进行判断,并给出必要和合理的追问。通过捕获上下文的表达,提高了对说话人回答的整句话的理解程度,提升了面试官和候选人双方的面试体验。与此同时,硬件的应答速度也得到了提高,所以不仅节省了计算机的存储空间,也提高了软件的运行速度。The schematic flow chart of the method for analyzing semantic emotions of the present application is shown in FIG. 3. The semantic sentiment analysis of this application can quickly judge certain personality characteristics of the speaker based on the speaker's answer, and give necessary and reasonable follow-up questions. By capturing the expression of the context, the understanding of the entire sentence answered by the speaker is improved, and the interview experience for both the interviewer and the candidate is improved. At the same time, the response speed of the hardware has also been improved, so not only the storage space of the computer is saved, but also the running speed of the software is improved.
本申请的分析语义情感的数据存储于区块链中,基于区块链的优势,实现数据存储和分享。区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层。The data for analyzing semantic emotions of this application is stored in the blockchain, and based on the advantages of the blockchain, data storage and sharing are realized. Blockchain is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. Blockchain, essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information for verification. The validity of the information (anti-counterfeiting) and the generation of the next block. The blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
区块链底层平台可以包括用户管理、基础服务、智能合约以及运营监控等处理模块。其中,用户管理模块负责所有区块链参与者的身份信息管理,包括维护公私钥生成(账户管理)、密钥管理以及用户真实身份和区块链地址对应关系维护(权限管理)等,并且在授权的情况下,监管和审计某些真实身份的交易情况,提供风险控制的规则配置(风控审计);基础服务模块部署在所有区块链节点设备上,用来验证业务请求的有效性,并对有效请求完成共识后记录到存储上,对于一个新的业务请求,基础服务先对接口适配解析和鉴权处理(接口适配),然后通过共识算法将业务信息加密(共识管理),在加密之后完整一致的传输至共享账本上(网络通信),并进行记录存储;智能合约模块负责合约的注册发行以及合约触发和合约执行,开发人员可以通过某种编程语言定义合约逻辑,发布到区块链上(合约注册),根据合约条款的逻辑,调用密钥或者其它的事件触发执行,完成合约逻辑,同时还提供对合约升级注销的功能;运营监控模块主要负责产品发布过程中的部署、配置的修改、合约设置、云适配以及产品运行中的实时状态的可视化输出,例如:告警、监控网络情况、监控节点设备健康状态等。The underlying platform of the blockchain can include processing modules such as user management, basic services, smart contracts, and operation monitoring. Among them, the user management module is responsible for the identity information management of all blockchain participants, including the maintenance of public and private key generation (account management), key management, and maintenance of the correspondence between the user’s real identity and the blockchain address (authority management), etc. In the case of authorization, supervise and audit certain real-identity transactions, and provide risk control rule configuration (risk control audit); basic service modules are deployed on all blockchain node devices to verify the validity of business requests, After completing the consensus on the valid request, it is recorded on the storage. For a new business request, the basic service first performs interface adaptation analysis and authentication processing (interface adaptation), and then encrypts the business information through the consensus algorithm (consensus management), After encryption, it is completely and consistently transmitted to the shared ledger (network communication), and recorded and stored; the smart contract module is responsible for contract registration and issuance, contract triggering and contract execution. Developers can define the contract logic through a certain programming language and publish it to On the blockchain (contract registration), according to the logic of the contract terms, call keys or other events to trigger execution, complete the contract logic, and also provide the function of contract upgrade and cancellation; the operation monitoring module is mainly responsible for the deployment of the product release process , Configuration modification, contract settings, cloud adaptation, and visual output of real-time status during product operation, such as: alarms, monitoring network conditions, monitoring node equipment health status, etc.
参照图5,本申请实施例中还提供一种计算机设备,该计算机设备可以是服务器,其内部结构可以如图5所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设计的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储分析语义情感的过程需要的所有数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现分析语义情感的方法。Referring to FIG. 5, an embodiment of the present application also provides a computer device. The computer device may be a server, and its internal structure may be as shown in FIG. 5. The computer equipment includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor designed by the computer is used to provide calculation and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer equipment is used to store all the data needed for the process of analyzing semantic emotions. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer program is executed by the processor to realize the method of analyzing semantic emotion.
上述处理器执行上述分析语义情感的方法,包括:获取待分析语句中每个单词分别对 应的重要性度量值;根据所述待分析语句中每个单词分别对应的重要性度量值,通过两个并行运行的循环神经网络模型,得到所述待分析语句对应的隐式表达式,其中,所述隐式表达式融合了上下文的语义依赖关系;将所述待分析语句对应的隐式表达式以及所述待分析语句对应的预设句子标签,输入语义情感分析分类器;接收所述语义情感分析分类器对所述待分析语句的情感分析分类结果。The processor executes the above method for analyzing semantic emotions, including: obtaining the importance metric value corresponding to each word in the sentence to be analyzed; according to the importance metric value corresponding to each word in the sentence to be analyzed, passing two The cyclic neural network model runs in parallel to obtain the implicit expression corresponding to the sentence to be analyzed, wherein the implicit expression incorporates the semantic dependency of the context; the implicit expression corresponding to the sentence to be analyzed is combined with The preset sentence label corresponding to the sentence to be analyzed is input into the semantic sentiment analysis classifier; and the result of sentiment analysis of the sentence to be analyzed by the semantic sentiment analysis classifier is received.
上述计算机设备,通过引入自注意力机制,将句中每个单词的重要性通过重要性度量值进行量化,然后根据重要单词所处位置,通过由树的层次化遍历思想改进的RNN,获取当前单词在整个句子中的含义,从而使得最终输出的整个句子的隐藏状态中,融合了句中每个单词及其相应的重要性度量值。The above-mentioned computer equipment introduces a self-attention mechanism to quantify the importance of each word in the sentence through the importance measurement value, and then according to the position of the important word, through the RNN improved by the hierarchical traversal of the tree, the current The meaning of words in the entire sentence, so that each word in the sentence and its corresponding importance measure are integrated in the hidden state of the entire sentence in the final output.
在一个实施例中,上述处理器根据所述待分析语句中每个单词分别对应的重要性度量值,通过两个并行运行的循环神经网络模型,得到所述待分析语句对应的隐式表达式的步骤,包括:按照所述待分析语句中每个单词分别对应的重要性度量值,将所述待分析语句拆分成树状结构,其中,所述树状结构包括叶子节点、子节点和根节点;将第一叶子节点包含的分句,按照所述待分析语句的正向排序输入第一循环神经网络,将第二叶子节点包含的分句,按照所述待分析语句的逆向排序输入第二循环神经网络,其中,所述第一叶子节点和所述第二叶子节点为同属于任意一个指定子节点的一对叶子节点;将所述第一循环神经网络输出的正向隐藏向量,乘以所述第二循环神经网络输出的逆向隐藏向量,得到所述指定子节点的矢量表达;根据所述指定子节点的矢量表达,按照所述树状结构,依次递归计算至第一单词对应的根节点的矢量表达,其中,所述第一单词为重要性度量值最大时对应的单词;将所述第一单词对应的根节点的矢量表达,作为待分析语句的隐式表达式。In one embodiment, the above-mentioned processor obtains the implicit expression corresponding to the sentence to be analyzed through two parallel running cyclic neural network models according to the importance metric value corresponding to each word in the sentence to be analyzed. The step includes: splitting the sentence to be analyzed into a tree structure according to the importance metric value corresponding to each word in the sentence to be analyzed, wherein the tree structure includes leaf nodes, child nodes, and Root node; the clauses contained in the first leaf node are input into the first recurrent neural network according to the forward order of the sentence to be analyzed, and the clauses contained in the second leaf node are input according to the reverse order of the sentence to be analyzed The second recurrent neural network, wherein the first leaf node and the second leaf node are a pair of leaf nodes that belong to any designated child node; the forward hidden vector output by the first recurrent neural network, Multiply the inverse hidden vector output by the second recurrent neural network to obtain the vector expression of the designated child node; according to the vector expression of the designated child node, according to the tree structure, sequentially recursively calculate to the first word corresponding The vector expression of the root node of the first word is the word corresponding to the maximum importance metric value; the vector expression of the root node corresponding to the first word is used as the implicit expression of the sentence to be analyzed.
在一个实施例中,上述处理器按照所述待分析语句中每个单词分别对应的重要性度量值,将所述待分析语句拆分成树状结构的步骤,包括:按照所述待分析语句中每个单词分别对应的重要性度量值,确定所述待分析语句中重要性度量值最大的第一单词;以所述第一单词为分界点,将所述待分析语句拆分成第一子句和第二子句,其中,所述第一单词作为所述树状结构的根节点;以所述第一子句中重要性度量值最大的第二单词为分界点,将所述第一子句拆分成第三子句和第四子句,以所述第二子句中重要性度量值最大的第三单词为分界点,将所述第二子句拆分成第五子句和第六子句,其中,所述第二单词和所述第三单词均为所述根节点的子节点;按照所述第一子句和第二子句的拆分过程,拆分所述待分析语句至叶子节点,形成多层节点组成的树状结构,其中,所述叶子节点为不存在子节点的节点。In one embodiment, the above-mentioned processor splits the sentence to be analyzed into a tree structure according to the importance metric value corresponding to each word in the sentence to be analyzed, including: according to the sentence to be analyzed The importance metric value corresponding to each word in each word in the sentence to be analyzed is determined, and the first word with the largest importance metric value in the sentence to be analyzed is determined; the first word is used as the demarcation point, and the sentence to be analyzed is split into the first sentence Clause and the second clause, wherein the first word is the root node of the tree structure; the second word with the largest importance metric in the first clause is used as the demarcation point, and the first word One clause is split into a third clause and a fourth clause, and the second clause is split into a fifth clause with the third word with the largest importance measure in the second clause as the demarcation point. Sentence and the sixth clause, wherein the second word and the third word are both child nodes of the root node; according to the splitting process of the first clause and the second clause, all From the sentence to be analyzed to the leaf node, a tree structure composed of multiple layers of nodes is formed, wherein the leaf node is a node without child nodes.
在一个实施例中,上述处理器获取待分析语句中每个单词分别对应的重要性度量值的步骤,包括:对待分析语句进行词嵌入以及位置编码,得到所述待分析语句中每个单词分别对应的向量表达;将所述待分析语句中每个单词分别对应的向量表达,按照在所述待分析语句中的排序,依次输入自注意网络中,得到所述待分析语句中每个单词分别对应的重要性度量值。In one embodiment, the step of obtaining the importance metric value corresponding to each word in the sentence to be analyzed by the above-mentioned processor includes: performing word embedding and position coding on the sentence to be analyzed to obtain each word in the sentence to be analyzed. Corresponding vector expression; the vector expression corresponding to each word in the sentence to be analyzed is sequentially input into the self-attention network according to the order in the sentence to be analyzed, and each word in the sentence to be analyzed is obtained. The corresponding importance measure.
在一个实施例中,上述处理器对待分析语句进行词嵌入以及位置编码,得到所述待分析语句中每个单词分别对应的向量表达的步骤,包括:根据第一计算公式计算指定单词经词嵌入后的第一向量,根据第二公式计算所述指定单词对应位置编码的第二向量;根据所述第一向量和第二向量,通过第三计算公式计算得到所述指定单词对应的向量表达;根据所述指定单词对应的向量表达的计算过程,计算所述待分析语句中每个单词分别对应的向量表达。In one embodiment, the above-mentioned processor performs word embedding and position encoding on the sentence to be analyzed to obtain the vector expression corresponding to each word in the sentence to be analyzed, including: calculating the specified word by word embedding according to the first calculation formula After the first vector, calculate the second vector corresponding to the position code of the specified word according to the second formula; calculate the vector expression corresponding to the specified word by the third calculation formula according to the first vector and the second vector; According to the calculation process of the vector expression corresponding to the specified word, the vector expression corresponding to each word in the sentence to be analyzed is calculated.
在一个实施例中,上述处理器将所述待分析语句中每个单词分别对应的向量表达,按照在所述待分析语句中的排序,依次输入自注意网络中,得到所述待分析语句中每个单词分别对应的重要性度量值的步骤,包括:将所述待分析语句中每个单词分别对应的向量表达,按照在所述待分析语句中的排序,依次输入自注意网络中;通过调用所述自注意网络 中的第四计算公式,分别计算所述待分析语句中每个单词分别对应的重要性度量值。In one embodiment, the above-mentioned processor expresses the vector corresponding to each word in the sentence to be analyzed, and sequentially inputs the vector expression in the sentence to be analyzed into the self-attention network to obtain the sentence to be analyzed. The step of the importance metric value corresponding to each word includes: expressing the vector corresponding to each word in the sentence to be analyzed, and sequentially inputting it into the self-attention network according to the order in the sentence to be analyzed; The fourth calculation formula in the self-attention network is called to respectively calculate the importance metric value corresponding to each word in the sentence to be analyzed.
在一个实施例中,上述处理器获取待分析语句中每个单词分别对应的重要性度量值的步骤之前,包括:将预设分类函数加载至分类器,并初始化赋值;将训练语句的矢量表达和句子标签,输入加载了预设分类函数的分类器中进行分类训练;判断损失函数是否收敛,其中,损失函数为预测分类结果和真实分类结果的交叉熵;若是,则判定训练得到了语义情感分析分类器。In one embodiment, before the step of obtaining the importance metric value corresponding to each word in the sentence to be analyzed by the above-mentioned processor, it includes: loading a preset classification function into the classifier, and initializing the assignment; expressing the vector of the training sentence And sentence labels, input into the classifier loaded with the preset classification function for classification training; determine whether the loss function is convergent, where the loss function is the cross entropy of the predicted classification result and the real classification result; if it is, it is determined that the training has obtained the semantic emotion Analyze the classifier.
本领域技术人员可以理解,图5中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定。Those skilled in the art can understand that the structure shown in FIG. 5 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
本申请一实施例还提供一种计算机可读存储介质,所述计算机可读存储介质可以是非易失性,也可以是易失性,其上存储有计算机程序,计算机程序被处理器执行时实现分析语义情感的方法,包括:获取待分析语句中每个单词分别对应的重要性度量值;根据所述待分析语句中每个单词分别对应的重要性度量值,通过两个并行运行的循环神经网络模型,得到所述待分析语句对应的隐式表达式,其中,所述隐式表达式融合了上下文的语义依赖关系;将所述待分析语句对应的隐式表达式以及所述待分析语句对应的句子标签,输入语义情感分析分类器;接收所述语义情感分析分类器对所述待分析语句的情感分析分类结果。An embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium may be non-volatile or volatile, and has a computer program stored thereon, which is realized when the computer program is executed by a processor. The method for analyzing semantic sentiment includes: obtaining the importance metric value corresponding to each word in the sentence to be analyzed; according to the importance metric value corresponding to each word in the sentence to be analyzed, through two parallel running loops The network model obtains the implicit expression corresponding to the sentence to be analyzed, where the implicit expression incorporates the semantic dependency of the context; and the implicit expression corresponding to the sentence to be analyzed and the sentence to be analyzed The corresponding sentence label is input to the semantic sentiment analysis classifier; the sentiment analysis classification result of the sentence to be analyzed by the semantic sentiment analysis classifier is received.
上述计算机可读存储介质,通过引入自注意力机制,将句中每个单词的重要性通过重要性度量值进行量化,然后根据重要单词所处位置,通过由树的层次化遍历思想改进的RNN,获取当前单词在整个句子中的含义,从而使得最终输出的整个句子的隐藏状态中,融合了句中每个单词及其相应的重要性度量值。The above-mentioned computer-readable storage medium introduces a self-attention mechanism to quantify the importance of each word in the sentence through the importance measurement value, and then according to the position of the important word, the RNN is improved by the idea of traversing the hierarchy of the tree. , Get the meaning of the current word in the entire sentence, so that each word in the sentence and its corresponding importance measurement value are integrated in the hidden state of the entire sentence in the final output.
在一个实施例中,上述处理器根据所述待分析语句中每个单词分别对应的重要性度量值,通过两个并行运行的循环神经网络模型,得到所述待分析语句对应的隐式表达式的步骤,包括:按照所述待分析语句中每个单词分别对应的重要性度量值,将所述待分析语句拆分成树状结构,其中,所述树状结构包括叶子节点、子节点和根节点;将第一叶子节点包含的分句,按照所述待分析语句的正向排序输入第一循环神经网络,将第二叶子节点包含的分句,按照所述待分析语句的逆向排序输入第二循环神经网络,其中,所述第一叶子节点和所述第二叶子节点为同属于任意一个指定子节点的一对叶子节点;将所述第一循环神经网络输出的正向隐藏向量,乘以所述第二循环神经网络输出的逆向隐藏向量,得到所述指定子节点的矢量表达;根据所述指定子节点的矢量表达,按照所述树状结构,依次递归计算至第一单词对应的根节点的矢量表达,其中,所述第一单词为重要性度量值最大时对应的单词;将所述第一单词对应的根节点的矢量表达,作为待分析语句的隐式表达式。In one embodiment, the above-mentioned processor obtains the implicit expression corresponding to the sentence to be analyzed through two parallel running cyclic neural network models according to the importance metric value corresponding to each word in the sentence to be analyzed. The step includes: splitting the sentence to be analyzed into a tree structure according to the importance metric value corresponding to each word in the sentence to be analyzed, wherein the tree structure includes leaf nodes, child nodes, and Root node; the clauses contained in the first leaf node are input into the first recurrent neural network according to the forward order of the sentence to be analyzed, and the clauses contained in the second leaf node are input according to the reverse order of the sentence to be analyzed The second recurrent neural network, wherein the first leaf node and the second leaf node are a pair of leaf nodes that belong to any designated child node; the forward hidden vector output by the first recurrent neural network, Multiply the inverse hidden vector output by the second recurrent neural network to obtain the vector expression of the designated child node; according to the vector expression of the designated child node, according to the tree structure, sequentially recursively calculate to the first word corresponding The vector expression of the root node of the first word is the word corresponding to the maximum importance metric value; the vector expression of the root node corresponding to the first word is used as the implicit expression of the sentence to be analyzed.
在一个实施例中,上述处理器按照所述待分析语句中每个单词分别对应的重要性度量值,将所述待分析语句拆分成树状结构的步骤,包括:按照所述待分析语句中每个单词分别对应的重要性度量值,确定所述待分析语句中重要性度量值最大的第一单词;以所述第一单词为分界点,将所述待分析语句拆分成第一子句和第二子句,其中,所述第一单词作为所述树状结构的根节点;以所述第一子句中重要性度量值最大的第二单词为分界点,将所述第一子句拆分成第三子句和第四子句,以所述第二子句中重要性度量值最大的第三单词为分界点,将所述第二子句拆分成第五子句和第六子句,其中,所述第二单词和所述第三单词均为所述根节点的子节点;按照所述第一子句和第二子句的拆分过程,拆分所述待分析语句至叶子节点,形成多层节点组成的树状结构,其中,所述叶子节点为不存在子节点的节点。In one embodiment, the above-mentioned processor splits the sentence to be analyzed into a tree structure according to the importance metric value corresponding to each word in the sentence to be analyzed, including: according to the sentence to be analyzed The importance metric value corresponding to each word in each word in the sentence to be analyzed is determined, and the first word with the largest importance metric value in the sentence to be analyzed is determined; the first word is used as the demarcation point, and the sentence to be analyzed is split into the first sentence Clause and the second clause, wherein the first word is the root node of the tree structure; the second word with the largest importance metric in the first clause is used as the demarcation point, and the first word One clause is split into a third clause and a fourth clause, and the second clause is split into a fifth clause with the third word with the largest importance measure in the second clause as the demarcation point. Sentence and the sixth clause, wherein the second word and the third word are both child nodes of the root node; according to the splitting process of the first clause and the second clause, all From the sentence to be analyzed to the leaf node, a tree structure composed of multiple layers of nodes is formed, wherein the leaf node is a node without child nodes.
在一个实施例中,上述处理器获取待分析语句中每个单词分别对应的重要性度量值的步骤,包括:对待分析语句进行词嵌入以及位置编码,得到所述待分析语句中每个单词分别对应的向量表达;将所述待分析语句中每个单词分别对应的向量表达,按照在所述待分析语句中的排序,依次输入自注意网络中,得到所述待分析语句中每个单词分别对应的重要性度量值。In one embodiment, the step of obtaining the importance metric value corresponding to each word in the sentence to be analyzed by the above-mentioned processor includes: performing word embedding and position coding on the sentence to be analyzed to obtain each word in the sentence to be analyzed. Corresponding vector expression; the vector expression corresponding to each word in the sentence to be analyzed is sequentially input into the self-attention network according to the order in the sentence to be analyzed, and each word in the sentence to be analyzed is obtained. The corresponding importance measure.
在一个实施例中,上述处理器对待分析语句进行词嵌入以及位置编码,得到所述待分析语句中每个单词分别对应的向量表达的步骤,包括:根据第一计算公式计算指定单词经词嵌入后的第一向量,根据第二公式计算所述指定单词对应位置编码的第二向量;根据所述第一向量和第二向量,通过第三计算公式计算得到所述指定单词对应的向量表达;根据所述指定单词对应的向量表达的计算过程,计算所述待分析语句中每个单词分别对应的向量表达。In one embodiment, the above-mentioned processor performs word embedding and position coding on the sentence to be analyzed to obtain the vector expression corresponding to each word in the sentence to be analyzed, including: calculating the specified word by word embedding according to the first calculation formula After the first vector, calculate the second vector corresponding to the position code of the specified word according to the second formula; calculate the vector expression corresponding to the specified word by the third calculation formula according to the first vector and the second vector; According to the calculation process of the vector expression corresponding to the specified word, the vector expression corresponding to each word in the sentence to be analyzed is calculated.
在一个实施例中,上述处理器将所述待分析语句中每个单词分别对应的向量表达,按照在所述待分析语句中的排序,依次输入自注意网络中,得到所述待分析语句中每个单词分别对应的重要性度量值的步骤,包括:将所述待分析语句中每个单词分别对应的向量表达,按照在所述待分析语句中的排序,依次输入自注意网络中;通过调用所述自注意网络中的第四计算公式,分别计算所述待分析语句中每个单词分别对应的重要性度量值。In one embodiment, the above-mentioned processor expresses the vector corresponding to each word in the sentence to be analyzed, and sequentially inputs the vector expression in the sentence to be analyzed into the self-attention network to obtain the sentence to be analyzed. The step of the importance metric value corresponding to each word includes: expressing the vector corresponding to each word in the sentence to be analyzed, and sequentially inputting it into the self-attention network according to the order in the sentence to be analyzed; The fourth calculation formula in the self-attention network is called to respectively calculate the importance metric value corresponding to each word in the sentence to be analyzed.
在一个实施例中,上述处理器获取待分析语句中每个单词分别对应的重要性度量值的步骤之前,包括:将预设分类函数加载至分类器,并初始化赋值;将训练语句的矢量表达和句子标签,输入加载了预设分类函数的分类器中进行分类训练;判断损失函数是否收敛,其中,损失函数为预测分类结果和真实分类结果的交叉熵;若是,则判定训练得到了语义情感分析分类器。In one embodiment, before the step of obtaining the importance metric value corresponding to each word in the sentence to be analyzed by the above-mentioned processor, it includes: loading a preset classification function into the classifier, and initializing the assignment; expressing the vector of the training sentence And sentence labels, input into the classifier loaded with the preset classification function for classification training; determine whether the loss function is convergent, where the loss function is the cross entropy of the predicted classification result and the real classification result; if it is, it is determined that the training has obtained the semantic emotion Analyze the classifier.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,上述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的和实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可以包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双速据率SDRAM(SSRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by computer programs instructing relevant hardware. The above-mentioned computer programs can be stored in a non-volatile computer readable storage medium. Here, when the computer program is executed, it may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and/or volatile memory. Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not a limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Claims (20)

  1. 一种分析语义情感的方法,其中,包括:A method of analyzing semantic sentiment, including:
    获取待分析语句中每个单词分别对应的重要性度量值;Obtain the importance metric value corresponding to each word in the sentence to be analyzed;
    根据所述待分析语句中每个单词分别对应的重要性度量值,通过两个并行运行的循环神经网络模型,得到所述待分析语句对应的隐式表达式,其中,所述隐式表达式融合了上下文的语义依赖关系;According to the importance metric value corresponding to each word in the sentence to be analyzed, the implicit expression corresponding to the sentence to be analyzed is obtained through two cyclic neural network models running in parallel, wherein the implicit expression Incorporating the semantic dependency of context;
    将所述待分析语句对应的隐式表达式以及所述待分析语句对应的预设句子标签,输入语义情感分析分类器;Input the implicit expression corresponding to the sentence to be analyzed and the preset sentence label corresponding to the sentence to be analyzed into the semantic sentiment analysis classifier;
    接收所述语义情感分析分类器对所述待分析语句的情感分析分类结果。Receiving the sentiment analysis classification result of the sentence to be analyzed by the semantic sentiment analysis classifier.
  2. 根据权利要求1所述的分析语义情感的方法,其中,所述根据所述待分析语句中每个单词分别对应的重要性度量值,通过两个并行运行的循环神经网络模型,得到所述待分析语句对应的隐式表达式的步骤,包括:The method for analyzing semantic sentiment according to claim 1, wherein, according to the importance metric value corresponding to each word in the sentence to be analyzed, through two parallel running cyclic neural network models, the to-be-analyzed sentence is obtained. The steps to analyze the implicit expression corresponding to the sentence include:
    按照所述待分析语句中每个单词分别对应的重要性度量值,将所述待分析语句拆分成树状结构,其中,所述树状结构包括叶子节点、子节点和根节点;Splitting the sentence to be analyzed into a tree structure according to the importance metric value corresponding to each word in the sentence to be analyzed, wherein the tree structure includes a leaf node, a child node, and a root node;
    将第一叶子节点包含的分句,按照所述待分析语句的正向排序输入第一循环神经网络,将第二叶子节点包含的分句,按照所述待分析语句的逆向排序输入第二循环神经网络,其中,所述第一叶子节点和所述第二叶子节点为同属于任意一个指定子节点的一对叶子节点;The clauses contained in the first leaf node are input into the first loop neural network according to the forward order of the sentence to be analyzed, and the clauses contained in the second leaf node are input into the second loop according to the reverse order of the sentence to be analyzed A neural network, wherein the first leaf node and the second leaf node are a pair of leaf nodes that belong to any designated child node;
    将所述第一循环神经网络输出的正向隐藏向量,乘以所述第二循环神经网络输出的逆向隐藏向量,得到所述指定子节点的矢量表达;Multiply the forward hidden vector output by the first recurrent neural network by the reverse hidden vector output by the second recurrent neural network to obtain the vector expression of the designated child node;
    根据所述指定子节点的矢量表达,按照所述树状结构,依次递归计算至第一单词对应的根节点的矢量表达,其中,所述第一单词为重要性度量值最大时对应的单词;According to the vector expression of the designated child node, according to the tree structure, sequentially recursively calculate the vector expression to the root node corresponding to the first word, where the first word is the word corresponding to the maximum importance metric;
    将所述第一单词对应的根节点的矢量表达,作为所述待分析语句的隐式表达式。The vector expression of the root node corresponding to the first word is used as the implicit expression of the sentence to be analyzed.
  3. 根据权利要求2所述的分析语义情感的方法,其中,所述按照所述待分析语句中每个单词分别对应的重要性度量值,将所述待分析语句拆分成树状结构的步骤,包括:The method for analyzing semantic emotion according to claim 2, wherein the step of splitting the sentence to be analyzed into a tree structure according to the importance metric value corresponding to each word in the sentence to be analyzed, include:
    按照所述待分析语句中每个单词分别对应的重要性度量值,确定所述待分析语句中重要性度量值最大的第一单词;Determine the first word with the largest importance metric in the sentence to be analyzed according to the importance metric value corresponding to each word in the sentence to be analyzed;
    以所述第一单词为分界点,将所述待分析语句拆分成第一子句和第二子句,其中,所述第一单词作为所述树状结构的根节点;Using the first word as a dividing point, split the sentence to be analyzed into a first clause and a second clause, wherein the first word is used as the root node of the tree structure;
    以所述第一子句中重要性度量值最大的第二单词为分界点,将所述第一子句拆分成第三子句和第四子句,以所述第二子句中重要性度量值最大的第三单词为分界点,将所述第二子句拆分成第五子句和第六子句,其中,所述第二单词和所述第三单词均为所述根节点的子节点;Taking the second word with the largest importance measure in the first clause as the demarcation point, the first clause is divided into a third clause and a fourth clause, and the second clause is important in the second clause. The third word with the largest sexual metric is the demarcation point. The second clause is split into a fifth clause and a sixth clause, where the second word and the third word are both the root Child nodes of the node;
    按照所述第一子句和第二子句的拆分过程,拆分所述待分析语句至叶子节点,形成多层节点组成的树状结构,其中,所述叶子节点为不存在子节点的节点。According to the splitting process of the first clause and the second clause, the sentence to be analyzed is split into leaf nodes to form a tree structure composed of multi-layer nodes, wherein the leaf nodes are those without child nodes node.
  4. 根据权利要求1所述的分析语义情感的方法,其中,获取待分析语句中每个单词分别对应的重要性度量值的步骤,包括:The method for analyzing semantic sentiment according to claim 1, wherein the step of obtaining the importance metric value corresponding to each word in the sentence to be analyzed comprises:
    对待分析语句进行词嵌入以及位置编码,得到所述待分析语句中每个单词分别对应的向量表达;Performing word embedding and position coding on the sentence to be analyzed to obtain a vector expression corresponding to each word in the sentence to be analyzed;
    将所述待分析语句中每个单词分别对应的向量表达,按照在所述待分析语句中的排序,依次输入自注意网络中,得到所述待分析语句中每个单词分别对应的重要性度量值。The vector expression corresponding to each word in the sentence to be analyzed is sequentially input into the self-attention network according to the order in the sentence to be analyzed, and the importance metric corresponding to each word in the sentence to be analyzed is obtained. value.
  5. 根据权利要求4所述的分析语义情感的方法,其中,所述对待分析语句进行词嵌入以及位置编码,得到所述待分析语句中每个单词分别对应的向量表达的步骤,包括:The method for analyzing semantic emotions according to claim 4, wherein the step of performing word embedding and position coding on the sentence to be analyzed to obtain the vector expression corresponding to each word in the sentence to be analyzed comprises:
    根据第一计算公式计算指定单词经词嵌入后的第一向量,根据第二公式计算所述指定单词对应位置编码的第二向量;Calculate the first vector of the specified word after the word is embedded according to the first calculation formula, and calculate the second vector of the position code corresponding to the specified word according to the second formula;
    根据所述第一向量和第二向量,通过第三计算公式计算得到所述指定单词对应的向量表达;According to the first vector and the second vector, the vector expression corresponding to the designated word is calculated by a third calculation formula;
    根据所述指定单词对应的向量表达的计算过程,计算所述待分析语句中每个单词分别对应的向量表达。According to the calculation process of the vector expression corresponding to the specified word, the vector expression corresponding to each word in the sentence to be analyzed is calculated.
  6. 根据权利要求4所述的分析语义情感的方法,其中,所述将所述待分析语句中每个单词分别对应的向量表达,按照在所述待分析语句中的排序,依次输入自注意网络中,得到所述待分析语句中每个单词分别对应的重要性度量值的步骤,包括:The method for analyzing semantic emotions according to claim 4, wherein the vector expression corresponding to each word in the sentence to be analyzed is sequentially input into the self-attention network according to the order in the sentence to be analyzed , The step of obtaining the importance metric value corresponding to each word in the sentence to be analyzed includes:
    将所述待分析语句中每个单词分别对应的向量表达,按照在所述待分析语句中的排序,依次输入自注意网络中;The vector expression corresponding to each word in the sentence to be analyzed is sequentially input into the self-attention network according to the order in the sentence to be analyzed;
    通过调用所述自注意网络中的第四计算公式,分别计算所述待分析语句中每个单词分别对应的重要性度量值。By calling the fourth calculation formula in the self-attention network, the importance metric value corresponding to each word in the sentence to be analyzed is calculated respectively.
  7. 根据权利要求1所述的分析语义情感的方法,其中,所述获取待分析语句中每个单词分别对应的重要性度量值的步骤之前,包括:The method for analyzing semantic sentiment according to claim 1, wherein before the step of obtaining the importance metric value corresponding to each word in the sentence to be analyzed, the method comprises:
    将预设分类函数加载至分类器,并初始化赋值;Load the preset classification function to the classifier and initialize the assignment;
    将训练语句的矢量表达和句子标签,输入加载了所述预设分类函数的分类器中进行分类训练;Input the vector expression and sentence label of the training sentence into the classifier loaded with the preset classification function for classification training;
    判断损失函数是否收敛,其中,所述损失函数为预测分类结果和真实分类结果的交叉熵;Judging whether the loss function converges, where the loss function is the cross entropy of the predicted classification result and the true classification result;
    若是,则判定训练得到了所述语义情感分析分类器。If it is, it is determined that the semantic sentiment analysis classifier is obtained by training.
  8. 一种分析语义情感的装置,其中,包括:A device for analyzing semantic emotions, which includes:
    获取模块,用于获取待分析语句中每个单词分别对应的重要性度量值;The acquiring module is used to acquire the importance metric value corresponding to each word in the sentence to be analyzed;
    得到模块,用于根据所述待分析语句中每个单词分别对应的重要性度量值,通过两个并行运行的循环神经网络模型,得到所述待分析语句对应的隐式表达式,其中,所述隐式表达式融合了上下文的语义依赖关系;The obtaining module is used to obtain the implicit expression corresponding to the sentence to be analyzed through two parallel running cyclic neural network models according to the importance metric value corresponding to each word in the sentence to be analyzed. Implicit expressions incorporate the semantic dependency of context;
    输入模块,用于将所述待分析语句对应的隐式表达式以及所述待分析语句对应的预设句子标签,输入语义情感分析分类器;An input module for inputting the implicit expression corresponding to the sentence to be analyzed and the preset sentence label corresponding to the sentence to be analyzed into the semantic sentiment analysis classifier;
    接收模块,用于接收所述语义情感分析分类器对所述待分析语句的情感分析分类结果。The receiving module is configured to receive the sentiment analysis classification result of the sentence to be analyzed by the semantic sentiment analysis classifier.
  9. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现分析语义情感的方法,其中,包括:A computer device includes a memory and a processor, the memory stores a computer program, and a method for analyzing semantic emotions when the processor executes the computer program, which includes:
    获取待分析语句中每个单词分别对应的重要性度量值;Obtain the importance metric value corresponding to each word in the sentence to be analyzed;
    根据所述待分析语句中每个单词分别对应的重要性度量值,通过两个并行运行的循环神经网络模型,得到所述待分析语句对应的隐式表达式,其中,所述隐式表达式融合了上下文的语义依赖关系;According to the importance metric value corresponding to each word in the sentence to be analyzed, the implicit expression corresponding to the sentence to be analyzed is obtained through two cyclic neural network models running in parallel, wherein the implicit expression Incorporating the semantic dependency of context;
    将所述待分析语句对应的隐式表达式以及所述待分析语句对应的预设句子标签,输入语义情感分析分类器;Input the implicit expression corresponding to the sentence to be analyzed and the preset sentence label corresponding to the sentence to be analyzed into the semantic sentiment analysis classifier;
    接收所述语义情感分析分类器对所述待分析语句的情感分析分类结果。Receiving the sentiment analysis classification result of the sentence to be analyzed by the semantic sentiment analysis classifier.
  10. 根据权利要求9所述的计算机设备,其中,所述根据所述待分析语句中每个单词分别对应的重要性度量值,通过两个并行运行的循环神经网络模型,得到所述待分析语句对应的隐式表达式的步骤,包括:8. The computer device according to claim 9, wherein the corresponding importance metric value of each word in the sentence to be analyzed is obtained through two cyclic neural network models running in parallel to obtain the sentence corresponding to the sentence to be analyzed. The steps of the implicit expression include:
    按照所述待分析语句中每个单词分别对应的重要性度量值,将所述待分析语句拆分成树状结构,其中,所述树状结构包括叶子节点、子节点和根节点;Splitting the sentence to be analyzed into a tree structure according to the importance metric value corresponding to each word in the sentence to be analyzed, wherein the tree structure includes a leaf node, a child node, and a root node;
    将第一叶子节点包含的分句,按照所述待分析语句的正向排序输入第一循环神经网络,将第二叶子节点包含的分句,按照所述待分析语句的逆向排序输入第二循环神经网络,其中,所述第一叶子节点和所述第二叶子节点为同属于任意一个指定子节点的一对叶子节点;The clauses contained in the first leaf node are input into the first loop neural network according to the forward order of the sentence to be analyzed, and the clauses contained in the second leaf node are input into the second loop according to the reverse order of the sentence to be analyzed A neural network, wherein the first leaf node and the second leaf node are a pair of leaf nodes that belong to any designated child node;
    将所述第一循环神经网络输出的正向隐藏向量,乘以所述第二循环神经网络输出的逆 向隐藏向量,得到所述指定子节点的矢量表达;Multiply the forward hidden vector output by the first recurrent neural network by the reverse hidden vector output by the second recurrent neural network to obtain the vector expression of the designated child node;
    根据所述指定子节点的矢量表达,按照所述树状结构,依次递归计算至第一单词对应的根节点的矢量表达,其中,所述第一单词为重要性度量值最大时对应的单词;According to the vector expression of the designated child node, according to the tree structure, sequentially recursively calculate the vector expression to the root node corresponding to the first word, where the first word is the word corresponding to the maximum importance metric;
    将所述第一单词对应的根节点的矢量表达,作为所述待分析语句的隐式表达式。The vector expression of the root node corresponding to the first word is used as the implicit expression of the sentence to be analyzed.
  11. 根据权利要求10所述的计算机设备,其中,所述按照所述待分析语句中每个单词分别对应的重要性度量值,将所述待分析语句拆分成树状结构的步骤,包括:10. The computer device according to claim 10, wherein the step of splitting the sentence to be analyzed into a tree structure according to the importance metric value corresponding to each word in the sentence to be analyzed comprises:
    按照所述待分析语句中每个单词分别对应的重要性度量值,确定所述待分析语句中重要性度量值最大的第一单词;Determine the first word with the largest importance metric in the sentence to be analyzed according to the importance metric value corresponding to each word in the sentence to be analyzed;
    以所述第一单词为分界点,将所述待分析语句拆分成第一子句和第二子句,其中,所述第一单词作为所述树状结构的根节点;Using the first word as a dividing point, split the sentence to be analyzed into a first clause and a second clause, wherein the first word is used as the root node of the tree structure;
    以所述第一子句中重要性度量值最大的第二单词为分界点,将所述第一子句拆分成第三子句和第四子句,以所述第二子句中重要性度量值最大的第三单词为分界点,将所述第二子句拆分成第五子句和第六子句,其中,所述第二单词和所述第三单词均为所述根节点的子节点;Taking the second word with the largest importance measure in the first clause as the demarcation point, the first clause is divided into a third clause and a fourth clause, and the second clause is important in the second clause. The third word with the largest sexual metric is the demarcation point. The second clause is split into a fifth clause and a sixth clause, where the second word and the third word are both the root Child nodes of the node;
    按照所述第一子句和第二子句的拆分过程,拆分所述待分析语句至叶子节点,形成多层节点组成的树状结构,其中,所述叶子节点为不存在子节点的节点。According to the splitting process of the first clause and the second clause, the sentence to be analyzed is split into leaf nodes to form a tree structure composed of multi-layer nodes, wherein the leaf nodes are those without child nodes node.
  12. 根据权利要求9所述的计算机设备,其中,获取待分析语句中每个单词分别对应的重要性度量值的步骤,包括:The computer device according to claim 9, wherein the step of obtaining the importance metric value corresponding to each word in the sentence to be analyzed comprises:
    对待分析语句进行词嵌入以及位置编码,得到所述待分析语句中每个单词分别对应的向量表达;Performing word embedding and position coding on the sentence to be analyzed to obtain a vector expression corresponding to each word in the sentence to be analyzed;
    将所述待分析语句中每个单词分别对应的向量表达,按照在所述待分析语句中的排序,依次输入自注意网络中,得到所述待分析语句中每个单词分别对应的重要性度量值。The vector expression corresponding to each word in the sentence to be analyzed is sequentially input into the self-attention network according to the order in the sentence to be analyzed, and the importance metric corresponding to each word in the sentence to be analyzed is obtained. value.
  13. 根据权利要求12所述的计算机设备,其中,所述对待分析语句进行词嵌入以及位置编码,得到所述待分析语句中每个单词分别对应的向量表达的步骤,包括:The computer device according to claim 12, wherein the step of performing word embedding and position coding on the sentence to be analyzed to obtain the vector expression corresponding to each word in the sentence to be analyzed comprises:
    根据第一计算公式计算指定单词经词嵌入后的第一向量,根据第二公式计算所述指定单词对应位置编码的第二向量;Calculate the first vector of the specified word after the word is embedded according to the first calculation formula, and calculate the second vector of the position code corresponding to the specified word according to the second formula;
    根据所述第一向量和第二向量,通过第三计算公式计算得到所述指定单词对应的向量表达;According to the first vector and the second vector, the vector expression corresponding to the designated word is calculated by a third calculation formula;
    根据所述指定单词对应的向量表达的计算过程,计算所述待分析语句中每个单词分别对应的向量表达。According to the calculation process of the vector expression corresponding to the specified word, the vector expression corresponding to each word in the sentence to be analyzed is calculated.
  14. 根据权利要求13所述的计算机设备,其中,所述将所述待分析语句中每个单词分别对应的向量表达,按照在所述待分析语句中的排序,依次输入自注意网络中,得到所述待分析语句中每个单词分别对应的重要性度量值的步骤,包括:The computer device according to claim 13, wherein the vector expression corresponding to each word in the sentence to be analyzed is sequentially input into the self-attention network according to the order in the sentence to be analyzed to obtain the The steps to describe the importance metric value corresponding to each word in the sentence to be analyzed include:
    将所述待分析语句中每个单词分别对应的向量表达,按照在所述待分析语句中的排序,依次输入自注意网络中;The vector expression corresponding to each word in the sentence to be analyzed is sequentially input into the self-attention network according to the order in the sentence to be analyzed;
    通过调用所述自注意网络中的第四计算公式,分别计算所述待分析语句中每个单词分别对应的重要性度量值。By calling the fourth calculation formula in the self-attention network, the importance metric value corresponding to each word in the sentence to be analyzed is calculated respectively.
  15. 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现分析语义情感的方法,其中,包括:A computer-readable storage medium has a computer program stored thereon, and when the computer program is executed by a processor, a method for analyzing semantic emotions is realized, which includes:
    获取待分析语句中每个单词分别对应的重要性度量值;Obtain the importance metric value corresponding to each word in the sentence to be analyzed;
    根据所述待分析语句中每个单词分别对应的重要性度量值,通过两个并行运行的循环神经网络模型,得到所述待分析语句对应的隐式表达式,其中,所述隐式表达式融合了上下文的语义依赖关系;According to the importance metric value corresponding to each word in the sentence to be analyzed, the implicit expression corresponding to the sentence to be analyzed is obtained through two cyclic neural network models running in parallel, wherein the implicit expression Incorporating the semantic dependency of context;
    将所述待分析语句对应的隐式表达式以及所述待分析语句对应的预设句子标签,输入语义情感分析分类器;Input the implicit expression corresponding to the sentence to be analyzed and the preset sentence label corresponding to the sentence to be analyzed into the semantic sentiment analysis classifier;
    接收所述语义情感分析分类器对所述待分析语句的情感分析分类结果。Receiving the sentiment analysis classification result of the sentence to be analyzed by the semantic sentiment analysis classifier.
  16. 根据权利要求15所述的计算机可读存储介质,其中,所述根据所述待分析语句中每个单词分别对应的重要性度量值,通过两个并行运行的循环神经网络模型,得到所述待分析语句对应的隐式表达式的步骤,包括:The computer-readable storage medium according to claim 15, wherein said to-be-analyzed sentence obtains said to-be-analyzed cyclic neural network model through two parallel running recurrent neural network models according to the importance metric value corresponding to each word in said sentence to be analyzed. The steps to analyze the implicit expression corresponding to the sentence include:
    按照所述待分析语句中每个单词分别对应的重要性度量值,将所述待分析语句拆分成树状结构,其中,所述树状结构包括叶子节点、子节点和根节点;Splitting the sentence to be analyzed into a tree structure according to the importance metric value corresponding to each word in the sentence to be analyzed, wherein the tree structure includes a leaf node, a child node, and a root node;
    将第一叶子节点包含的分句,按照所述待分析语句的正向排序输入第一循环神经网络,将第二叶子节点包含的分句,按照所述待分析语句的逆向排序输入第二循环神经网络,其中,所述第一叶子节点和所述第二叶子节点为同属于任意一个指定子节点的一对叶子节点;The clauses contained in the first leaf node are input into the first loop neural network according to the forward order of the sentence to be analyzed, and the clauses contained in the second leaf node are input into the second loop according to the reverse order of the sentence to be analyzed A neural network, wherein the first leaf node and the second leaf node are a pair of leaf nodes that belong to any designated child node;
    将所述第一循环神经网络输出的正向隐藏向量,乘以所述第二循环神经网络输出的逆向隐藏向量,得到所述指定子节点的矢量表达;Multiply the forward hidden vector output by the first recurrent neural network by the reverse hidden vector output by the second recurrent neural network to obtain the vector expression of the designated child node;
    根据所述指定子节点的矢量表达,按照所述树状结构,依次递归计算至第一单词对应的根节点的矢量表达,其中,所述第一单词为重要性度量值最大时对应的单词;According to the vector expression of the designated child node, according to the tree structure, sequentially recursively calculate the vector expression to the root node corresponding to the first word, where the first word is the word corresponding to the maximum importance metric;
    将所述第一单词对应的根节点的矢量表达,作为所述待分析语句的隐式表达式。The vector expression of the root node corresponding to the first word is used as the implicit expression of the sentence to be analyzed.
  17. 根据权利要求16所述的计算机可读存储介质,其中,所述按照所述待分析语句中每个单词分别对应的重要性度量值,将所述待分析语句拆分成树状结构的步骤,包括:16. The computer-readable storage medium according to claim 16, wherein the step of splitting the sentence to be analyzed into a tree structure according to the importance metric value corresponding to each word in the sentence to be analyzed, include:
    按照所述待分析语句中每个单词分别对应的重要性度量值,确定所述待分析语句中重要性度量值最大的第一单词;Determine the first word with the largest importance metric in the sentence to be analyzed according to the importance metric value corresponding to each word in the sentence to be analyzed;
    以所述第一单词为分界点,将所述待分析语句拆分成第一子句和第二子句,其中,所述第一单词作为所述树状结构的根节点;Using the first word as a dividing point, split the sentence to be analyzed into a first clause and a second clause, wherein the first word is used as the root node of the tree structure;
    以所述第一子句中重要性度量值最大的第二单词为分界点,将所述第一子句拆分成第三子句和第四子句,以所述第二子句中重要性度量值最大的第三单词为分界点,将所述第二子句拆分成第五子句和第六子句,其中,所述第二单词和所述第三单词均为所述根节点的子节点;Taking the second word with the largest importance measure in the first clause as the demarcation point, the first clause is divided into a third clause and a fourth clause, and the second clause is important in the second clause. The third word with the largest sexual metric is the demarcation point. The second clause is split into a fifth clause and a sixth clause, where the second word and the third word are both the root Child nodes of the node;
    按照所述第一子句和第二子句的拆分过程,拆分所述待分析语句至叶子节点,形成多层节点组成的树状结构,其中,所述叶子节点为不存在子节点的节点。According to the splitting process of the first clause and the second clause, the sentence to be analyzed is split into leaf nodes to form a tree structure composed of multiple layers of nodes, wherein the leaf nodes are those without child nodes node.
  18. 根据权利要求15所述的计算机可读存储介质,其中,获取待分析语句中每个单词分别对应的重要性度量值的步骤,包括:15. The computer-readable storage medium according to claim 15, wherein the step of obtaining the importance metric value corresponding to each word in the sentence to be analyzed comprises:
    对待分析语句进行词嵌入以及位置编码,得到所述待分析语句中每个单词分别对应的向量表达;Performing word embedding and position coding on the sentence to be analyzed to obtain a vector expression corresponding to each word in the sentence to be analyzed;
    将所述待分析语句中每个单词分别对应的向量表达,按照在所述待分析语句中的排序,依次输入自注意网络中,得到所述待分析语句中每个单词分别对应的重要性度量值。The vector expression corresponding to each word in the sentence to be analyzed is sequentially input into the self-attention network according to the order in the sentence to be analyzed, and the importance metric corresponding to each word in the sentence to be analyzed is obtained. value.
  19. 根据权利要求18所述的计算机可读存储介质,其中,所述对待分析语句进行词嵌入以及位置编码,得到所述待分析语句中每个单词分别对应的向量表达的步骤,包括:18. The computer-readable storage medium according to claim 18, wherein the step of performing word embedding and position coding on the sentence to be analyzed to obtain the vector expression corresponding to each word in the sentence to be analyzed comprises:
    根据第一计算公式计算指定单词经词嵌入后的第一向量,根据第二公式计算所述指定单词对应位置编码的第二向量;Calculate the first vector of the specified word after the word is embedded according to the first calculation formula, and calculate the second vector of the position code corresponding to the specified word according to the second formula;
    根据所述第一向量和第二向量,通过第三计算公式计算得到所述指定单词对应的向量表达;According to the first vector and the second vector, the vector expression corresponding to the designated word is calculated by a third calculation formula;
    根据所述指定单词对应的向量表达的计算过程,计算所述待分析语句中每个单词分别对应的向量表达。According to the calculation process of the vector expression corresponding to the specified word, the vector expression corresponding to each word in the sentence to be analyzed is calculated.
  20. 根据权利要求19所述的计算机可读存储介质,其中,所述将所述待分析语句中每个单词分别对应的向量表达,按照在所述待分析语句中的排序,依次输入自注意网络中,得到所述待分析语句中每个单词分别对应的重要性度量值的步骤,包括:The computer-readable storage medium according to claim 19, wherein the vector expression corresponding to each word in the sentence to be analyzed is sequentially input into the self-attention network according to the order in the sentence to be analyzed , The step of obtaining the importance metric value corresponding to each word in the sentence to be analyzed includes:
    将所述待分析语句中每个单词分别对应的向量表达,按照在所述待分析语句中的排序,依次输入自注意网络中;The vector expression corresponding to each word in the sentence to be analyzed is sequentially input into the self-attention network according to the order in the sentence to be analyzed;
    通过调用所述自注意网络中的第四计算公式,分别计算所述待分析语句中每个单词分别对应的重要性度量值。By calling the fourth calculation formula in the self-attention network, the importance metric value corresponding to each word in the sentence to be analyzed is calculated respectively.
PCT/CN2020/125154 2020-09-23 2020-10-30 Semantic emotion analysis method and apparatus, device, and storage medium WO2021169364A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011009900.4A CN112131888B (en) 2020-09-23 2020-09-23 Method, device, equipment and storage medium for analyzing semantic emotion
CN202011009900.4 2020-09-23

Publications (1)

Publication Number Publication Date
WO2021169364A1 true WO2021169364A1 (en) 2021-09-02

Family

ID=73841195

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/125154 WO2021169364A1 (en) 2020-09-23 2020-10-30 Semantic emotion analysis method and apparatus, device, and storage medium

Country Status (2)

Country Link
CN (1) CN112131888B (en)
WO (1) WO2021169364A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113468334A (en) * 2021-09-06 2021-10-01 平安科技(深圳)有限公司 Ciphertext emotion classification method, device, equipment and storage medium
CN113919361A (en) * 2021-09-13 2022-01-11 聚好看科技股份有限公司 Text classification method and device
CN115204183A (en) * 2022-09-19 2022-10-18 华南师范大学 Knowledge enhancement based dual-channel emotion analysis method, device and equipment
CN115659951A (en) * 2022-12-26 2023-01-31 华南师范大学 Statement emotion analysis method, device and equipment based on label embedding
CN116843345A (en) * 2023-08-30 2023-10-03 深圳市艾德网络科技发展有限公司 Intelligent wind control system and method for trading clients based on artificial intelligence technology

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109446331A (en) * 2018-12-07 2019-03-08 华中科技大学 A kind of text mood disaggregated model method for building up and text mood classification method
CN109472031A (en) * 2018-11-09 2019-03-15 电子科技大学 A kind of aspect rank sentiment classification model and method based on double memory attentions
CN109740167A (en) * 2019-02-01 2019-05-10 北京字节跳动网络技术有限公司 Method and apparatus for generating information
CN109740148A (en) * 2018-12-16 2019-05-10 北京工业大学 A kind of text emotion analysis method of BiLSTM combination Attention mechanism
CN109902175A (en) * 2019-02-20 2019-06-18 上海方立数码科技有限公司 A kind of file classification method and categorizing system based on neural network structure model
CN111144130A (en) * 2019-12-26 2020-05-12 辽宁工程技术大学 Context-aware-based fine-grained emotion classification method for hybrid neural network

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180107940A1 (en) * 2010-04-27 2018-04-19 Jeremy Lieberman Artificial intelligence method and apparatus
US9026425B2 (en) * 2012-08-28 2015-05-05 Xerox Corporation Lexical and phrasal feature domain adaptation in statistical machine translation
CN108399158B (en) * 2018-02-05 2021-05-14 华南理工大学 Attribute emotion classification method based on dependency tree and attention mechanism
CN108628829B (en) * 2018-04-23 2022-03-15 苏州大学 Automatic tree bank transformation method and system based on tree-shaped cyclic neural network
CN108717406B (en) * 2018-05-10 2021-08-24 平安科技(深圳)有限公司 Text emotion analysis method and device and storage medium
CN109214003B (en) * 2018-08-29 2019-08-09 陕西师范大学 The method that Recognition with Recurrent Neural Network based on multilayer attention mechanism generates title
CN110347831A (en) * 2019-06-28 2019-10-18 西安理工大学 Based on the sensibility classification method from attention mechanism

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109472031A (en) * 2018-11-09 2019-03-15 电子科技大学 A kind of aspect rank sentiment classification model and method based on double memory attentions
CN109446331A (en) * 2018-12-07 2019-03-08 华中科技大学 A kind of text mood disaggregated model method for building up and text mood classification method
CN109740148A (en) * 2018-12-16 2019-05-10 北京工业大学 A kind of text emotion analysis method of BiLSTM combination Attention mechanism
CN109740167A (en) * 2019-02-01 2019-05-10 北京字节跳动网络技术有限公司 Method and apparatus for generating information
CN109902175A (en) * 2019-02-20 2019-06-18 上海方立数码科技有限公司 A kind of file classification method and categorizing system based on neural network structure model
CN111144130A (en) * 2019-12-26 2020-05-12 辽宁工程技术大学 Context-aware-based fine-grained emotion classification method for hybrid neural network

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
HUANG QIJING, FU WEI: "Emotion classification model based on Attention-BiLSTM", ELECTRONIC TECHNOLOGY & SOFTWARE ENGINEERING, CHINA ELECTRONIC SOCIETY, CN, no. 3, 1 February 2020 (2020-02-01), CN, pages 14 - 15, XP055841169, ISSN: 2095-5650 *
LIU SIQIN, FENG XURUIRUI: "Text Sentiment Analysis Based on BERT", JOURNAL OF INFORMATION SECURITY RESEARCH, vol. 6, no. 3, 1 March 2020 (2020-03-01), pages 220 - 227, XP055841151, ISSN: 2096-1057 *
SHEPING ZHAI, YANG YUANYUAN;QIU CHENG;LI JING;WU ZHIYUN: "BILINGUAL TEXT SENTIMENT ANALYSIS BASED ON ATTENTION MECHANISM BI-LSTM", COMPUTER APPLICATIONS AND SOFTWARE, vol. 36, no. 12, 1 December 2019 (2019-12-01), pages 251 - 255, XP055841161, ISSN: 1000-386X *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113468334A (en) * 2021-09-06 2021-10-01 平安科技(深圳)有限公司 Ciphertext emotion classification method, device, equipment and storage medium
CN113468334B (en) * 2021-09-06 2021-11-23 平安科技(深圳)有限公司 Ciphertext emotion classification method, device, equipment and storage medium
CN113919361A (en) * 2021-09-13 2022-01-11 聚好看科技股份有限公司 Text classification method and device
CN115204183A (en) * 2022-09-19 2022-10-18 华南师范大学 Knowledge enhancement based dual-channel emotion analysis method, device and equipment
CN115659951A (en) * 2022-12-26 2023-01-31 华南师范大学 Statement emotion analysis method, device and equipment based on label embedding
CN115659951B (en) * 2022-12-26 2023-03-21 华南师范大学 Statement emotion analysis method, device and equipment based on label embedding
CN116843345A (en) * 2023-08-30 2023-10-03 深圳市艾德网络科技发展有限公司 Intelligent wind control system and method for trading clients based on artificial intelligence technology

Also Published As

Publication number Publication date
CN112131888A (en) 2020-12-25
CN112131888B (en) 2023-11-14

Similar Documents

Publication Publication Date Title
WO2021169364A1 (en) Semantic emotion analysis method and apparatus, device, and storage medium
US10664381B2 (en) Method and system for synthetic generation of time series data
US11816439B2 (en) Multi-turn dialogue response generation with template generation
US10971141B2 (en) Session information processing method and device and storage medium
US11468239B2 (en) Joint intent and entity recognition using transformer models
CN111061847A (en) Dialogue generation and corpus expansion method and device, computer equipment and storage medium
US11694478B2 (en) Sentiment analysis of content using expression recognition
Feng et al. Joint extraction of entities and relations using reinforcement learning and deep learning
US11663406B2 (en) Methods and systems for automated detection of personal information using neural networks
US20190228297A1 (en) Artificial Intelligence Modelling Engine
CN113822315A (en) Attribute graph processing method and device, electronic equipment and readable storage medium
CN111191439A (en) Natural sentence generation method and device, computer equipment and storage medium
US20210142233A1 (en) Systems and methods for process mining using unsupervised learning
CN113821587A (en) Text relevance determination method, model training method, device and storage medium
CN111079175B (en) Data processing method, data processing device, computer readable storage medium and computer equipment
WO2023137918A1 (en) Text data analysis method and apparatus, model training method, and computer device
Mills et al. Faster Federated Learning With Decaying Number of Local SGD Steps
US20220180057A1 (en) Method and apparatus for decentralized supervised learning in nlp applications
CN112948582B (en) Data processing method, device, equipment and readable medium
WO2021115269A1 (en) User cluster prediction method, apparatus, computer device, and storage medium
CN112364136B (en) Keyword generation method, device, equipment and storage medium
Li et al. ELSTM: An improved long short‐term memory network language model for sequence learning
US20240177243A1 (en) Intelligent platform for audit response using a metaverse-driven approach for regulator reporting requirements
Jose et al. Application of artificial intelligence in secure decentralized computation enabled by TOTEM
Watson The need for explainable processes and algorithms

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20922128

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20922128

Country of ref document: EP

Kind code of ref document: A1