Target user implicit relation classification method based on multi-semantic factor and feature aggregation

文档序号:1963781 发布日期:2021-12-14 浏览:23次 中文

阅读说明:本技术 基于多语义因素与特征聚合的目标用户隐性关系分类方法 (Target user implicit relation classification method based on multi-semantic factor and feature aggregation ) 是由 饶子昀 曹万华 刘俊涛 张毅 黄志刚 王元斌 周莹 王振杰 于 2021-09-07 设计创作,主要内容包括:本发明公开了一种基于多语义因素与特征聚合的目标用户隐性关系分类方法,包括以下步骤:(1)对已知目标用户事件文本进行三类局部语义特征提取;(2)对已知目标用户事件文本进行全局语义特征提取;(3)将事件文本的三类局部语义特征池化处理并加权融合后输入自注意力网络得到文本的多语义因素聚合特征向量;(4)将多语义因素聚合特征和全局语义特征输入训练好的分类器,对输出特征softmax后得到目标用户之间的关系类别。本发明提出了基于多语义因素与特征聚合的目标用户隐性关系分类方法,可以有效地挖掘电子商务活动涉及的用户之间的隐性关系,提高推荐系统对目标用户关系的认知和分析效率。(The invention discloses a target user implicit relation classification method based on multi-semantic factor and feature aggregation, which comprises the following steps of: (1) extracting three types of local semantic features of the known target user event text; (2) carrying out global semantic feature extraction on the known target user event text; (3) pooling three types of local semantic features of the event text, weighting and fusing the three types of local semantic features, and inputting the three types of local semantic features into an attention network to obtain a multi-semantic-factor aggregation feature vector of the text; (4) and inputting the multi-semantic-factor aggregation characteristics and the global semantic characteristics into a trained classifier, and obtaining the relation category between the target users after outputting the characteristic softmax. The invention provides a target user implicit relation classification method based on multi-semantic factor and feature aggregation, which can effectively mine implicit relations among users involved in electronic commerce activities and improve the cognition and analysis efficiency of a recommendation system on the target user relation.)

1. A target user implicit relation classification method based on multi-semantic factor and feature aggregation is characterized by comprising the following steps:

step S1: extracting three types of local semantic features including situation semantic features, behavior semantic features and emotion semantic features from an event text of a known target user;

step S2: performing weighted fusion on the three types of local semantic features, and introducing a self-attention mechanism to obtain a multi-semantic-factor aggregation feature of the event text;

step S3: extracting global semantic features of event text information of a target user through a bidirectional long-short term memory network;

step S4: and inputting the multi-semantic-factor aggregation characteristics and the global semantic characteristics into a trained classifier, and obtaining the relation category between the target users after outputting the characteristic softmax.

2. The method for classifying a target user implicit relationship based on multi-semantic-factor and feature aggregation according to claim 1, wherein the step S1 includes:

acquiring text data containing target user related events, segmenting the acquired event texts, and extracting situation words, behavior words and emotion words of the events from the segmented texts;

the local semantic embedding of each type of word is learned using a convolution kernel.

3. The method for classifying the implicit relationship between target users based on multi-semantic-factor and feature aggregation as claimed in claim 2, wherein extracting the "contextual word", "behavioral word" and "emotional word" of the event from the segmented text comprises:

the 'behavior words' of each event text are obtained by extracting verbs in the event text through a part-of-speech classifier, the 'emotion words' are obtained by positioning positive emotion words and negative emotion words in the event text through a Hownet emotion dictionary, and the 'context words' are obtained through a pre-trained Latent Dirichlet Allocation (LDA) model.

4. The method for classifying the implicit relationship of the target user based on the multi-semantic-factor and feature aggregation as claimed in claim 3, wherein the learning of the local semantic embedding of each word type is performed by using a convolution kernel, and specifically comprises:

obtaining all situation words, behavior words and emotion words in an event text through a part of speech classifier, dictionary positioning and an LDA model, and marking the situation words, the behavior words and the emotion words as a situation word set { BG }, a behavior word set { AC } and an emotion word set { EM }; learning local semantic embedding for each class of words using a convolution kernel:

where r represents the nonlinear activation function ReLU, W [ t; t + k]A word vector sequence representing the t to t + k words in each of { BG }, { AC }, and { EM }, n representing the number of words in each of { BG }, { AC }, and { EM }, HkExpressing a convolution kernel with the scale of k, respectively extracting the characteristics of three types of vocabulary sets of each event text by the above formula to obtain semantic embedding w1 of the ith word of the situation word set { BG } in each event text dataiSemantic embedding of the ith word of the behavior word set { AC } w2iSemantic embedding of the ith word in the set of emotional words { EM } w3iSemantic embedding of all words in the three-class word set respectively forms a context semantic feature vector of the event textBehavioral semantic feature vector And emotional semantic feature vectors(Vector)The lengths l, m, n are determined by the window size of the convolution kernel and the number of words of each type in an event text.

5. The method for classifying target users' implicit relations based on multi-semantic-factor and feature aggregation according to claim 1 or 2, wherein in the step S2, the weighted fusion of the three types of local semantic features includes:

background semantic features on event textBehavioral semantic featuresEmotional semantic featuresCalculating the weights of three local semantic vectors of each event text:

for the weight of three vectors of each event text, S1、S2、S3Normalization is carried out to obtain three weights k1、k2、k3Obtaining a weighted three-dimensional vector through the pooling layer as a semantic feature vector of an event textWhere p () is a pooling function used to reduce the vector to one dimension.

6. The method for classifying target users' implicit relations based on multi-semantic-factor and feature aggregation according to claim 1 or 2, wherein the step S2 of introducing a self-attention mechanism to obtain the multi-semantic-factor aggregated features of the event text comprises:

adding a self-attention mechanism toObtaining the multi-semantic-factor aggregation characteristic of each event text through the attention network as the embedded input of each event text

7. The method for classifying a target user' S implicit relationship based on multi-semantic-factor and feature aggregation according to claim 1 or 2, wherein the step S3 includes:

for collected event text data containing target users, after each event text is subjected to dictionary analysis to obtain pre-training dictionary index vectors of vocabularies, the vectors are input into a bidirectional long-time and short-time memory network (Bi-LSTM) to respectively obtain global semantic feature vectors of each event text data

8. The method for classifying a target user' S implicit relationship based on multi-semantic-factor and feature aggregation according to claim 1 or 2, wherein the step S4 includes:

training relation classifier, inputting training data including event text related to target user and all known user relation categories, aggregating feature vectors by fusing multiple semantic factors corresponding to two target user corresponding eventsAnd global feature vectorTraining to obtain the optimal classification parameters;

aggregating the feature vectors according to the multi-semantic factor corresponding to the corresponding event of the target userAnd global feature vectorAnd obtaining the relation classification between the two target users to obtain the relation classification.

9. The method of claim 8, wherein the objective function of the trained relationship classifier is as follows:

wherein, R is a distance measurement function, S and Y are relation measurement functions, theta and gamma are classifier parameters required to be obtained by training, the relation representation between two users is obtained by adding S and Y, specific relation classification is output after softmax, and L is the existing relation classification between the two users.

Technical Field

The invention belongs to the technical field of data mining, and particularly relates to a target user implicit relation classification method based on multi-semantic factor and feature aggregation.

Background

The electronic commerce platform has a great number of users, the users have diversified attribute characteristics and behavior activities, various contacts which cannot be directly obtained through explicit information exist among the users, and mining implicit relations among the users using the electronic commerce platform gradually becomes an important requirement in the field of personalized recommendation. With the increasing and complex electronic commerce activities, various researches on the analysis of target users involved in electronic commerce are also more and more extensive for the purposes of analyzing user communities, optimizing recommendations and the like, wherein one of the mainstream methods is to classify the target user relationships.

The target inter-user relationship extraction research comprises a pattern matching based method and a machine learning based method. The traditional pattern matching method has the problems that the relation between target users extracted by the traditional pattern matching method depends on formulated rules and initial seeds, data sparsity and the like exist, the machine learning method depends on manual marking of the size and quality of a target user background knowledge data set and the reasonability of manual feature design, and the effect is poor.

Disclosure of Invention

Aiming at the defects or the improvement requirements of the prior art, the invention provides a target user implicit relation classification method based on multi-semantic factor and feature aggregation, which can better capture the overall features of the original description text, classify the target user relation by fusing the local semantic features and the global semantic features of the target user and provide support for discovery of communities and mining of the community relation.

In order to achieve the above object, according to an aspect of the present invention, there is provided a method for classifying a target user implicit relationship based on multi-semantic factor and feature aggregation, including:

step S1: extracting three types of local semantic features including situation semantic features, behavior semantic features and emotion semantic features from an event text of a known target user;

step S2: performing weighted fusion on the three types of local semantic features, and introducing a self-attention mechanism to obtain a multi-semantic-factor aggregation feature of the event text;

step S3: extracting global semantic features of event text information of a target user through a bidirectional long-short term memory network;

step S4: and inputting the multi-semantic-factor aggregation characteristics and the global semantic characteristics into a trained classifier, and obtaining the relation category between the target users after outputting the characteristic softmax.

In an embodiment of the present invention, the step S1 includes:

acquiring text data containing target user related events, segmenting the acquired event texts, and extracting situation words, behavior words and emotion words of the events from the segmented texts;

the local semantic embedding of each type of word is learned using a convolution kernel.

In one embodiment of the present invention, extracting "context words", "behavior words" and "emotion words" of an event from the segmented text includes:

the 'behavior words' of each event text are obtained by extracting verbs in the event text through a part-of-speech classifier, the 'emotion words' are obtained by positioning positive emotion words and negative emotion words in the event text through a Hownet emotion dictionary, and the 'context words' are obtained through a pre-trained Latent Dirichlet Allocation (LDA) model.

In one embodiment of the present invention, the local semantic embedding of each type of word is learned by using a convolution kernel, which specifically includes:

obtaining all situation words, behavior words and emotion words in an event text through a part of speech classifier, dictionary positioning and an LDA model, and marking the situation words, the behavior words and the emotion words as a situation word set { BG }, a behavior word set { AC } and an emotion word set { EM }; learning local semantic embedding for each class of words using a convolution kernel:

where r represents the nonlinear activation function ReLU, W [ t; t + k]A word vector sequence representing the t to t + k words in each of { BG }, { AC }, and { EM }, n representing the number of words in each of { BG }, { AC }, and { EM }, HkExpressing a convolution kernel with the scale of k, respectively extracting the characteristics of three types of vocabulary sets of each event text by the above formula to obtain semantic embedding w1 of the ith word of the situation word set { BG } in each event text dataiSemantic embedding of the ith word of the behavior word set { AC } w2iSemantic embedding of the ith word in the set of emotional words { EM } w3iSemantic embedding of all words in the three-class word set respectively forms a context semantic feature vector of the event textBehavioral semantic feature vector And emotional semantic feature vectorsThe vector lengths l, m, n are determined by the window size of the convolution kernel and the number of words of each type in an event text.

In an embodiment of the present invention, in step S2, the performing weighted fusion on the three types of local semantic features includes:

background semantic features on event textBehavioral semantic featuresEmotional semantic featuresCalculating the weights of three local semantic vectors of each event text:

for the weight of three vectors of each event text, S1、S2、S3Normalization is carried out to obtain three weights k1、k2、k3Obtaining a weighted three-dimensional vector through the pooling layer as a semantic feature vector of an event textWhere p () is a pooling function used to reduce the vector to one dimension.

In an embodiment of the present invention, in the step S2, a self-attention mechanism is introduced to obtain a multi-semantic-factor aggregation feature of the event text, including:

adding a self-attention mechanism toObtaining the multi-semantic-factor aggregation characteristic of each event text through the attention network as the embedded input of each event text

7. The method for classifying a target user' S implicit relationship based on multi-semantic-factor and feature aggregation according to claim 1 or 2, wherein the step S3 includes:

for collected event text data containing target users, after each event text is subjected to dictionary analysis to obtain pre-training dictionary index vectors of vocabularies, the vectors are input into a bidirectional long-time and short-time memory network (Bi-LSTM) to respectively obtain global semantic feature vectors of each event text data

In an embodiment of the present invention, the step S4 includes:

training relation classifier, inputting training data including event text related to target user and all known user relation categories, aggregating feature vectors by fusing multiple semantic factors corresponding to two target user corresponding eventsAnd global feature vectorTraining to obtain the optimal classification parameters;

aggregating the feature vectors according to the multi-semantic factor corresponding to the corresponding event of the target userAnd global feature vectorObtaining the relation classification between two target usersTo a relationship category.

In one embodiment of the invention, the objective function of the training relationship classifier is as follows:

wherein, R is a distance measurement function, S and Y are relation measurement functions, theta and gamma are classifier parameters required to be obtained by training, the relation representation between two users is obtained by adding S and Y, specific relation classification is output after softmax, and L is the existing relation classification between the two users.

Generally, compared with the prior art, the technical scheme of the invention has the following beneficial effects:

(1) text features are directly extracted based on the user event text, so that information of the user event text can be fully reserved, and semantic information can be more accurately and flexibly mined;

(2) the semantic feature model of the user event text is comprehensively constructed by combining local and overall text features, known information is expanded and mined, and the problem of data sparsity can be relieved;

(3) the user relationship is deduced through the user related event text, the limitation that the relationship is obtained through the user personal information in the traditional method and the user personal real information is difficult to obtain in reality is broken through, and meanwhile, the increasingly strict network security requirements are met by only utilizing the public event text to carry out relationship analysis.

Drawings

FIG. 1 is a classification method of target user implicit relationship based on multi-semantic factor and feature aggregation proposed by the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. In addition, the technical features involved in the embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.

As shown in FIG. 1, the present invention provides a classification method of implicit relationship of target users based on multi-semantic factor and feature aggregation, which comprises the following steps:

step S1: extracting three types of local semantic features including situation semantic features, behavior semantic features and emotion semantic features from an event text of a known target user; step S1 includes:

firstly, collecting text data containing relevant events of a target user, segmenting collected event texts, and extracting situation words, behavior words and emotion words of the events from the segmented texts by different methods. The 'behavior words' of each event text are obtained by extracting verbs in the event texts through a part-of-speech classifier, the 'emotion words' are obtained by positioning positive emotion words and negative emotion words in the event texts through a Hownet emotion dictionary, and the 'context words' are obtained through a pre-trained Latent Dirichlet Allocation (LDA) model.

And (3) for an event text containing a target user, respectively obtaining all situation words, behavior words and emotion words in the event text through the part of speech classifier, dictionary positioning and LDA model, and marking as a situation word set { BG }, a behavior word set { AC } and an emotion word set { EM }. The local semantic embedding of each type of word is learned using a convolution kernel. Specifically, the following formula:

where r represents the nonlinear activation function ReLU, W [ t; t + k]A word vector sequence representing the t to t + k words in each of { BG }, { AC }, and { EM }, n representing the number of words in each of { BG }, { AC }, and { EM }, HkRepresenting a convolution kernel of scale k, bias is the bias term of the activation function. The above formula respectively extracts the characteristics of the three vocabulary sets of each event text to obtain the semantic embedding w1 of the ith word of the situation word set { BG } in each event text dataiSet of action words { ACEmbedding the semantics of the ith word w2iSemantic embedding of the ith word in the set of emotional words { EM } w3i. Semantic embedding of all words in the three-class word set respectively forms a context semantic feature vector of the event textBehavioral semantic feature vectorAnd emotional semantic feature vectors The vector lengths l, m and n are determined by the window size of a convolution kernel and the number of words of each class in an event text;

step S2: performing weighted fusion on the three types of local semantic features, and introducing a self-attention mechanism to obtain a multi-semantic-factor aggregation feature of the event text; step S2 includes:

background semantic features for event text obtained in claim 2Behavioral semantic featuresEmotional semantic featuresCalculating the weights of three local semantic vectors of each event text:

for the weight of three vectors of each event text, S1、S2、S3Normalization is carried out to obtain three weights k1、k2、k3. Obtaining a weighted three-dimensional vector through a pooling layer as a semantic feature vector of an event text:

where p () is a pooling function used to reduce the vector to one dimension.

Adding a self-attention mechanism toObtaining the multi-semantic-factor aggregation characteristic of each event text through the attention network as the embedded input of each event text

Step S3: carrying out global semantic feature extraction on the event text information of a target user through a bidirectional Long Short-Term Memory network (Bi-LSTM, Bi-directional Long Short-Term Memory); step S3 includes:

for collected event text data containing target users, after each event text is subjected to dictionary analysis to obtain pre-training dictionary index vectors of vocabularies, the vectors are input into a bidirectional long-time and short-time memory network (Bi-LSTM) to respectively obtain global semantic feature vectors of each event text data

Step S4: inputting the multi-semantic-factor aggregation characteristics and the global semantic characteristics into a trained classifier, and obtaining the relation category between target users after outputting the characteristic softmax; step S4 includes:

a relationship classifier is first trained. Inputting training data including event text related to target users and all known user relationship categories, and aggregating feature vectors by fusing multi-semantic factors corresponding to events corresponding to two target usersAnd global feature vectorTraining to obtain the optimal classification parameters, wherein the training objective function is as follows:

wherein, R is a distance measurement function, S and Y are relation measurement functions, theta and gamma are classifier parameters required to be obtained by training, the relation representation between two users is obtained by adding S and Y, specific relation classification is output after softmax, and L is the existing relation classification between the two users.

After the relation classifier is obtained, the feature vectors can be aggregated according to the multi-semantic factor corresponding to the corresponding event of the target userAnd global feature vectorAnd obtaining the relation classification between the two target users, wherein the obtained relation classification belongs to one of the existing relations.

The technical solution of the present invention is illustrated by a specific example below:

(1) acquiring text data of related events containing target users, and extracting background semantic features, behavior semantic features and emotion semantic features of event texts through a convolution kernel:

firstly, collecting text data containing relevant events of a target user, segmenting collected event texts, and extracting situation words, behavior words and emotion words of the events from the segmented texts by different methods. The 'behavior word' of each event text is obtained by extracting a verb in the event text through a part-of-speech classifier, the 'emotion word' is obtained by positioning a positive emotion word and a negative emotion word in the event text through a Hownet emotion dictionary, the 'situation word' is obtained through a pre-trained LDA model, the topic type of the LDA model is set to be 20, the number of words of each class of topics is set to be 3, and when the 'situation word' is selected, the corresponding word of the first 5 classes of topics with the highest distribution probability in a topic result output by the event text is selected as the 'situation word' of the event text.

And for an event text containing a target user, obtaining all situation words, behavior words and emotion words in the event text through a part of speech classifier, and marking as a situation word set { BG }, a behavior word set { AC } and an emotion word set { EM }. For example, the input text "… … a and b meet … …" often at X, and is divided into "a/and/b/often/in/X place/meet" by using a word segmentation method, so as to obtain the context words "X place", "meeting", the behavior word "meeting" and the emotion word "often".

The local semantic features of each type of word are extracted using a convolution kernel. Specifically, the following formula:

where r represents the nonlinear activation function ReLU, W [ t; t + k]Word vector sequence, H, representing the t to t + k words in each of { BG }, { AC }, and { EM }kRepresenting a convolution kernel of scale k. The above formula respectively extracts the features of the three vocabulary sets of each event text to obtain the semantic features w1 of the ith word of the situation word set { BG } in each event text dataiSemantic features w2 of the ith word of the behavior word set { AC }iSemantic features w3 of the ith word of the emotion word set { EM }i. The semantic features of all the words in the three-class word set respectively form a background semantic feature vector of the event text Behavioral semantic feature vectorAnd emotional semantic feature vectorsThe vector lengths l, m, n are determined by the window size of the convolution kernel and the number of words of each type in an event text.

In "… … a and b frequent meeting at X … …", three types of local semantic features of the sentence are extracted separately by convolution kernels. The background semantic features comprise vocabulary embedding of 'X place' and 'meeting', the behavior semantic features comprise vocabulary embedding of 'meeting', and the emotion semantic features comprise vocabulary embedding of 'frequent'.

(2) Carrying out global semantic feature extraction on the original text;

background semantic features for event text obtained in claim 2Behavioral semantic featuresEmotional semantic featuresThe weights of three local semantic vectors for each word are calculated:

for the weight of three vectors of each event text, S1、S2、S3Normalization is carried out to obtain three weights k1、k2、k3. Obtaining a weighted three-dimensional vector through the pooling layer as a semantic feature vector of an event text

Where p () is a pooling function, the vector can be reduced to one dimension. Adding a self-attention mechanism toAs the embedded input of each event text, obtaining the multi-semantic-factor aggregation feature vector of each event text through the attention network

(3) Introducing a self-attention mechanism, and performing weighted summation to obtain the polymerization characteristics of the multiple semantic factors;

for collected event text data containing target users, after dictionary index vectors are obtained from each event text through dictionary, the vectors are input into a bidirectional long-short term memory network (Bi-LSTM), and global semantic feature vectors of each event text data are respectively obtained

For example, for events "a and b meet at X" and "b and c offer at Y", the two events are obtained separately

(4) Inputting a classifier to obtain the relation category between target users;

a relationship classifier is first trained. Inputting training data including event text related to target users and all known user relationship categories, and aggregating feature vectors by fusing multi-semantic factors corresponding to events corresponding to two target usersAnd global feature vectorTraining to obtain the optimal classification parameters, wherein the objective function is as follows:

wherein, R is a distance measurement function, S and Y are relation measurement functions, theta and gamma are classifier parameters required to be obtained by training, the relation representation between two users is obtained by adding S and Y, specific relation classification is output after softmax, and L is the existing relation classification between the two users.

After the relation classifier is obtained, the feature vectors can be aggregated according to the multi-semantic factor corresponding to the corresponding event of the target userAnd global feature vectorAnd obtaining the relation classification between the two target users, wherein the obtained relation classification belongs to one of the existing relations.

It will be understood by those skilled in the art that the foregoing is only a preferred embodiment of the present invention, and is not intended to limit the invention, and that any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the scope of the present invention.

11页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于胶囊网络的多语言情感分类方法、装置、设备及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!