CN110083676B - Short text-based field dynamic tracking method - Google Patents
Short text-based field dynamic tracking method Download PDFInfo
- Publication number
- CN110083676B CN110083676B CN201910322267.5A CN201910322267A CN110083676B CN 110083676 B CN110083676 B CN 110083676B CN 201910322267 A CN201910322267 A CN 201910322267A CN 110083676 B CN110083676 B CN 110083676B
- Authority
- CN
- China
- Prior art keywords
- word
- neural network
- network model
- short text
- layer
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/31—Indexing; Data structures therefor; Storage structures
- G06F16/313—Selection or weighting of terms for indexing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/3331—Query processing
- G06F16/3332—Query translation
- G06F16/3335—Syntactic pre-processing, e.g. stopword elimination, stemming
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/335—Filtering based on additional data, e.g. user or group profiles
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Software Systems (AREA)
- Databases & Information Systems (AREA)
- Life Sciences & Earth Sciences (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Machine Translation (AREA)
Abstract
The invention provides a field dynamic tracking method based on short texts, which belongs to the fields of recommendation systems and natural language processing and comprises the following steps: 1.1) data acquisition; 1.2) preprocessing data; 1.3) establishing a word embedding neural network model; 1.4) establishing a convolutional neural network model; 2.1) recommending short texts; 2.2) saving user feedback. The method can fully and accurately mine the domain theme characteristics of the short text, and improves the accuracy of the dynamic tracking of the domain; the current excellent text recommendation scheme is extended, the latest short text is scored, and the latest short text is dynamically presented to a user as a field; the data can be acquired from static web pages, and short texts can be acquired from dynamic data streams to make data storage for text recommendation.
Description
Technical Field
The invention belongs to the field of recommendation systems and natural language processing, and particularly relates to a field dynamic tracking method based on short texts.
Background
The dynamic tracking method is from two existing technologies of text recommendation and crawler and is improved.
The traditional text recommendation technology is a content recommendation method, and text recommendation is performed according to the similarity with a text file to be recommended by analyzing the implicit theme feature vector of a text. In the prior art, a Web text personalized recommendation method is provided, which recommends a text with influence on a user higher than a threshold value; and a Sina microblog event recommendation method is also provided, wherein the similarity between the user model and the event vector is calculated through an improved cosine similarity (cosine similarity) algorithm. However, these prior arts cannot perform relevance (relevance) scoring in a certain field, and lack a certain universality.
The crawler (crawler) technology is used for collecting short text information, extracting texts or other related information in the short text information, and storing the texts or other related information in a database. It is an infrastructure in information retrieval applications and an important means for data acquisition. In the prior art, there is a web crawler method for extracting data from a web page, which extracts short text information by parsing a Document Object Model (DOM) in a HyperText Markup Language (HTML); and a crawler technology for automatically acquiring a large amount of microblog information by using various crawling methods. However, these prior art technologies cannot achieve the functions of acquiring data from static web pages, and acquiring short texts from dynamic data streams to make data storage for text recommendations.
Disclosure of Invention
Aiming at the technical problems, the invention provides a field dynamic tracking method based on short texts, which comprises the following steps:
step 1.1, data acquisition:
continuously and directionally acquiring short texts on internet media according to keywords in a specific field specified by a user, and storing the short texts in a local database;
the short text comprises words, publication time and a subject label;
step 1.2, preprocessing data;
removing noise content in the short text; the noise content comprises stop words, symbolic expressions and webpage links;
intercepting the content of a fixed digit length for the short text after the noise content is removed; if the short text length is less than the digit length, "< PAD >" is filled in to fill up the short text;
assigning a unique integer to each appearing word in the short text as an identifier to distinguish each word;
converting the document into a sequence of integers using the identifiers as a vector representation of the document;
step 1.3, establishing a word embedding neural network model;
respectively taking words appearing in the short text and context information thereof as input and output to train a word embedded neural network model, wherein the output result of the network intermediate layer is taken as word vector representation of a target word, and the method specifically comprises the following steps:
establishing a word embedding neural network model for embedding the information of the context words of the target words into the vector representation of the target words and combining the mathematical meaning of the embedded vector with the language meaning of the target words;
the one-hot vector of the target word is used as the input of the word embedding neural network model;
a one-hot vector of a context word of the target word is used as an output of the word embedding neural network model;
the projection word of the target word is used as an output result of the projection layer of the word embedding neural network model, namely the target word contains a word vector of context information and represents the meaning of the target word in the context;
the words are embedded into neural network weights between the input layer and the projection layer of the neural network model using a V N matrix W ═ Wi,jIs (1. ltoreq. j.ltoreq.V, 1. ltoreq. i.ltoreq.N);
carrying out random initialization on W to obtain a calculation result h of a projection layertIs a 1 XN-dimensional vector, i.e.
Wherein V represents the total number of words in the lexicon, N is a hyper-parameter representing the number of neurons in the projection layer, and wtThe target word is selected;
is the target word wtInputting a neural network model, namely a one-hot vector of the target word; in thatOne and only oneEqual to 1, the remainder being 0;
the word is embedded in a neural network weight between a projection layer and an output layer of the neural network model, using an N × V matrix W ═ W'i,jIs (1. ltoreq. i.ltoreq.N, 1. ltoreq. j.ltoreq.V);
carrying out random initialization on W' to obtain a calculation result o of an output layertIs a vector of dimension 1 x V, i.e.
The target word wtContext word wI∈{wt-2,wt-1,wt+1,wt+2};wIUnique heat vector x ofI∈{xwt-2,xwt-1,xwt+1,xwt+2};
Calculation result o at output layert=[o1,o2,...,oV]Adding softmax7 classifier to realize the relation with the target word wtContext word wIUnique heat vector x ofITo obtain wtOutput on the neural network modelNamely:
step 1.4, establishing a convolutional neural network model;
in the convolutional neural network model, firstly, words in a short text are converted into word vectors as local features, and meanwhile, keywords appointed by a user are converted into the word vectors as global features; and the two groups of characteristics respectively pass through a convolution layer and a pooling layer of the convolution neural network model, and finally calculate the score corresponding to each short text through a multilayer perceptron and a softmax activation function, specifically:
for words and phrasesLength of composition LwAny word w in the short textkThe output of the projection layer of the word-embedded neural network model obtained by step 1.3, the word-embedding map S of its N-dimensional vectorkThe result is that
Sk=word2vec(wk)
wherein N is the number of neurons in a projection layer of the word embedding neural network model and is also the dimension of a word vector output by the projection layer;
in a similar manner, the subject label characteristic H is obtained as
Wherein L isHThe number of the subject labels contained in the short text;
for the matrix S, the convolutional layer filter is definedIs composed ofWherein, the matrix isIs hyper-parametric and performs random initializationMelting; s calculation result C of convolution layerSIs composed of
To CSMaximum pooling (max pooling) is performed per row to obtain a matrix PS:
Similarly, for matrix H, the convolutional layer filter is definedIs composed ofWherein, the matrix isIf the parameter is a hyper-parameter, carrying out random initialization; h calculation result C of convolution layerHIs composed of
To CHMaking maximum pooling of each row to obtain a matrix PH:
And according to PfAnd between logistic regression layer neural networksThe dimension weight matrix M calculates an output o ' ═ of (o ') of the logistic regression layer '1,o′2):
Calculating the output value of the softmax activating function:
step 2.1, short text recommendation is carried out according to the scores obtained in the step 1.4, and a plurality of pieces of short text information with the highest scores are taken as dynamic progress of the field and recommended to a user;
different from step 1.4Step 2.1 is only for data which does not participate in training and is in the last week, and does not carry out back propagation error correction; at run-time, step 2.1 pairs the number N specified according to the usertopScreening out N with highest scoretopBars are dynamic for the domain;
step 2.2, the user feeds back the recommended short text according to the correlation degree, and records the recommended short text in a local database to correct the accuracy of the model and improve the performance of the model;
the training method of the word embedding neural network model in the step 1.3 comprises the following steps:
the training goal of the word embedding neural network model is to reduceAnd wIUnique heat vector x ofI=(xI,1,xI,2,...,xI,V) Difference therebetween
Wherein wI∈{wt-2,wt-1,wt+1,wt+2And is provided with
For a weight matrix W ' of dimension N × V from projection layer to output layer, the gradient δ W ' of j (1 ≦ i ≦ N,1 ≦ j ≦ V) for any i, j according to the chain rule 'i,jIs equal to
Wherein
Therefore, it is not only easy to use
And according to gradient delta W'i,jWhile using the first moment calculated in the last execution of the training processAnd second momentOr first momentAnd second momentIs calculated as the set of weights W'i,jFirst moment estimation ofAnd second moment estimation
Wherein beta is1And beta2The super-parameter is used for controlling the change of the first moment estimation value and the second moment estimation value;
wherein step is the number of times of the step completed, and W 'is updated'i,jIs composed of
Where α is a hyper-parameter, called learning rate (learning rate), and is controlled by'i,jThe update ratio of (2); e is defined as a decimal fraction greater than and approaching 0, e.g. 10-8For preventing division by zero in the score;
for a V x N dimensional weight matrix W from the input layer to the projection layer, according to the chain rule,for any j, i (1 ≦ j ≦ V,1 ≦ i ≦ N), its gradient δ Wj,iIs equal to
and update the weight Wj,i:
Each time the step is finished, the word embedding neural network model is trained once, so that the weight is updated;
the training method of the convolutional neural network model in step 1.4 specifically comprises the following steps:
the training target of the convolutional neural network model is reduced u '═ u'1,u′2) And actual degree of correlation a '═ a'1,a′2) The difference between them; wherein a'1Is [0,1 ]]Is LwDegree of correlation with domain to which keyword belongs, u'1The greater the correlation, the stronger the correlation, a'2=1-a′1;
Is provided with
E′=E′1+E′2
And is provided with
E′j=-(a′jlogu′j+(1-a′j)(1-logu′j))
Wherein j is more than or equal to 1 and less than or equal to 2; for PfTo o' sDimension weight matrix M, according to the chain rule, for any i, j (M:)J is more than or equal to 1 and less than or equal to 2) and the gradient delta M thereofi,jIs composed of
Wherein
Therefore, it is not only easy to use
and update the weight Mi,j:
Wherein
Therefore, it is not only easy to use
Correction to approximate unbiased estimation:
Wherein
Therefore, it is not only easy to use
Correction to approximate unbiased estimation:
And training the convolutional neural network model once every time the step is completed, so as to update the weight.
The invention has the beneficial effects that:
compared with the conventional text recommendation method, the method can fully and accurately mine the domain theme characteristics of the short text, and improves the accuracy of domain dynamic tracking; the current excellent text recommendation scheme is extended, the latest short text is scored, and the latest short text is dynamically presented to a user as a field; the data can be acquired from static web pages, and short texts can be acquired from dynamic data streams to make data storage for text recommendation.
The invention has reasonable design, easy realization and good practical value.
Drawings
Fig. 1 is a schematic diagram of a process for removing noise content in a short text according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a word-embedded neural network model according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a training method of the convolutional neural network model and a short text recommendation method in the embodiment of 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.
The invention provides a field dynamic tracking method based on a short text, which mainly adopts a recommendation technology based on a convolutional neural network and a short text-oriented crawler technology, and comprises the following steps: a model training part and a text recommendation part.
The model training part comprises the following steps:
step 1.1, data acquisition;
continuously and directionally acquiring short texts on internet media according to keywords in a specific field specified by a user, and storing the short texts in a local database;
the short text comprises words, publication times and topic labels (hashtag/category);
the short texts are from tweets, microblogs, paper abstracts and user postings of Twitter, arXiv and Reddit network platforms;
the subject label is specified by a user;
step 1.2, preprocessing data;
removing noise content in the short text, wherein the process is shown in FIG. 1; the noise content comprises stop words, symbolic expressions and webpage links, and the underlined content in the graph is the stop words;
intercepting the content of a fixed digit length for the short text after the noise content is removed; if the short text length is less than the digit length, "< PAD >" is filled in to fill up the short text;
assigning a unique integer to each appearing word in the short text as an identifier to distinguish each word;
converting the document into a sequence of integers using the identifiers as a vector representation of the document;
step 1.3, establishing a word embedding neural network model;
respectively taking words appearing in a short text and context information thereof as input and output to train a word embedding (word embedding) neural network model, wherein an output result of the network intermediate layer is taken as a word vector representation of a target word, as shown in fig. 2, specifically:
in order to embed the information of the context words of the target words into the vector representation of the target words, the mathematical meaning of the embedded vector is combined with the language meaning of the target words to establish a word embedding neural network model;
the one-hot vector of the target word is used as the input of the word embedding neural network model;
a one-hot vector of a context word of the target word is used as an output of the word embedding neural network model;
the projection word of the target word is used as an output result of the projection layer of the word embedding neural network model, namely the target word contains a word vector of context information and represents the meaning of the target word in the context;
the words are embedded into neural network weights between the input layer and the projection layer of the neural network model using a V N matrix W ═ Wi,jIs (1. ltoreq. j.ltoreq.V, 1. ltoreq. i.ltoreq.N);
carrying out random initialization on W to obtain a calculation result h of a projection layertIs a 1 XN-dimensional vector, i.e.
Wherein V represents the total number of words in the lexicon, N is a hyper-parameter representing the number of neurons in the projection layer, and wtThe target word is selected;
is the target word wtInputting a neural network model, namely a one-hot vector of the target word; in thatOne and only oneEqual to 1, the remainder being 0;
the word is embedded in a neural network weight between a projection layer and an output layer of the neural network model, using an N × V matrix W ═ W'i,jIs (1. ltoreq. i.ltoreq.N, 1. ltoreq. j.ltoreq.V);
randomly initializing W' to obtainCalculation result o to output layertIs a vector of dimension 1 x V, i.e.
The target word wtContext word wI∈{wt-2,wt-1,wt+1,wt+2};wIUnique heat vector x ofI∈{xwt-2,xwt-1,xwt+1,xwt+2};
Calculation result o at output layert=[o1,o2,...,oV]Adding softmax7 classifier to realize the relation with the target word wtContext word wIUnique heat vector x ofITo obtain wtOutput on the neural network modelNamely:
the training method of the word embedding neural network model in the step 1.3 comprises the following steps:
the training goal of the word embedding neural network model is to reduceAnd wIUnique heat vector x ofI=(xI,1,xI,2,...,xI,V) Difference therebetween
Wherein wI∈{wt-2,wt-1,wt+1,wt+2And is provided with
For a weight matrix W ' of dimension N × V from projection layer to output layer, the gradient δ W ' of j (1 ≦ i ≦ N,1 ≦ j ≦ V) for any i, j according to the chain rule 'i,jIs equal to
Wherein
Therefore, it is not only easy to use
And according to gradient delta W'i,jWhile using the first moment calculated in the last execution of the training processAnd second momentOr first momentAnd second momentIs calculated for the group ofWeight W'i,jFirst moment estimation ofAnd second moment estimation
Wherein beta is1And beta2The super-parameter is used for controlling the change of the first moment estimation value and the second moment estimation value;
wherein step is the number of times of the step completed, and W 'is updated'i,jIs composed of
Where α is a hyper-parameter, called learning rate (learning rate), and is controlled by'i,jThe update ratio of (2); e is defined as a decimal fraction greater than and approaching 0, e.g. 10-8For preventing division by zero in the score;
for the V multiplied by N dimensional weight matrix W from the input layer to the projection layer, i (j is more than or equal to 1 and less than or equal to V, i is more than or equal to 1 and less than or equal to N) is arbitrarily set, and the gradient delta W is set according to the chain rulej,iIs equal to
and update the weight Wj,i:
Each time the step is finished, the word embedding neural network model is trained once, so that the weight is updated;
step 1.4, establishing a convolutional neural network model;
in the Convolutional Neural Network (Convolutional Neural Network) model, firstly, words in a short text are converted into word vectors as local features, and meanwhile, keywords specified by a user are converted into word vectors as global features; and the two groups of characteristics respectively pass through a convolution layer (convolution layer) and a pooling layer (max-pooling layer) of the convolution neural network model, and finally calculate the score corresponding to each short text through a multilayer perceptron (multi layer perceptron) and a softmax activation function, specifically:
for theBy words and phrasesLength of composition LwAny word w in the short textkThe output of the projection layer of the word-embedded neural network model obtained by step 1.3, the word-embedding map S of its N-dimensional vectorkThe result is that
Sk=word2vec(wk)
wherein N is the number of neurons in a projection layer of the word embedding neural network model and is also the dimension of a word vector output by the projection layer;
in a similar manner, the subject label characteristic H is obtained as
Wherein L isHThe number of the subject labels contained in the short text;
for the matrix S, the convolutional layer filter is definedIs composed ofWherein, the matrix isIf the parameter is a hyper-parameter, carrying out random initialization; s calculation result C of convolution layerSIs composed of
To CSMaximum pooling (max pooling) is performed per row to obtain a matrix PS:
Similarly, for matrix H, the convolutional layer filter is definedIs composed ofWherein, the matrix isIf the parameter is a hyper-parameter, carrying out random initialization; h calculation result C of convolution layerHIs composed of
To CHMaking maximum pooling of each row to obtain a matrix PH:
And according to PfAnd between logistic regression layersThe dimension weight matrix M calculates an output o ' ═ of (o ') of the logistic regression layer '1,o′2):
Calculating the output value of the softmax activating function:
The training method of the convolutional neural network model in step 1.4 is shown in fig. 3, and specifically includes:
the training target of the convolutional neural network model is reduced u '═ u'1,u′2) And actual degree of correlation a '═ a'1,a′2) The difference between them; wherein a'1Is [0,1 ]]Is LwDegree of correlation with domain to which keyword belongs, u'1The greater the correlation, the stronger the correlation, a'2=1-a′1;
Is provided with
E′=E′1+E′2
And is provided with
E′j=-(a′jlogu′j+(1-a′j)(1-logu′j))
Wherein j is more than or equal to 1 and less than or equal to 2; for PfTo o' sDimension weight matrix M, according to the chain rule, for any i, j (M:)J is more than or equal to 1 and less than or equal to 2) and the gradient delta M thereofi,jIs composed of
Wherein
Therefore, it is not only easy to use
and update the weight Mi,j:
Wherein
Therefore, it is not only easy to use
Correction to approximate unbiased estimation:
Wherein
Therefore, it is not only easy to use
Correction to approximate unbiased estimation:
Each time the step is finished, training the convolutional neural network model once so as to update the weight;
the text recommendation part comprises the following steps:
step 2.1, as shown in fig. 3, short text recommendation is performed according to the scores obtained in step 1.4, and a plurality of pieces of short text information with the highest scores are taken as dynamic progress of the field and recommended to the user;
unlike step 1.4, step 2.1 only targets data in the last week that did not participate in training, and does not perform back propagation error correction; at run-time, step 2.1 pairs the number N specified according to the usertopScreening out N with highest scoretopBars are dynamic for the domain;
step 2.2, the user feeds back the recommended short text according to the correlation degree, and records the recommended short text in a local database to correct the accuracy of the model and improve the performance of the model;
in this embodiment, the feedback is N recommended by the usertopThe short text bars are scored between 1 and 5.
According to the application of the method in practice, the scheme of the invention greatly improves the method for tracking the dynamic state of a specific field in mass information, and the method can be applied to any field only by changing different field keywords.
Claims (3)
1. A field dynamic tracking method based on short texts is characterized by comprising the following steps:
step 1, performing model training, specifically:
step 1.1, data acquisition:
continuously and directionally acquiring short texts on internet media according to keywords in a specific field specified by a user, and storing the short texts in a local database;
the short text comprises words, publication time and a subject label;
step 1.2, preprocessing data;
removing noise content in the short text; the noise content comprises stop words, symbolic expressions and webpage links;
intercepting the content of a fixed digit length for the short text after the noise content is removed; if the short text length is less than the digit length, "< PAD >" is filled in to fill up the short text;
assigning a unique integer to each appearing word in the short text as an identifier to distinguish each word;
converting the document into a sequence of integers using the identifiers as a vector representation of the document;
step 1.3, establishing a word embedding neural network model;
respectively taking words appearing in the short text and context information thereof as input and output to train a word embedded neural network model, wherein the output result of the network intermediate layer is taken as word vector representation of a target word, and the method specifically comprises the following steps:
establishing a word embedding neural network model for embedding the information of the context words of the target words into the vector representation of the target words and combining the mathematical meaning of the embedded vector with the language meaning of the target words;
the one-hot vector of the target word is used as the input of the word embedding neural network model;
a one-hot vector of a context word of the target word is used as an output of the word embedding neural network model;
the projection word of the target word is used as an output result of the projection layer of the word embedding neural network model, namely the target word contains a word vector of context information and represents the meaning of the target word in the context;
the words are embedded into neural network weights between the input layer and the projection layer of the neural network model using a V N matrix W ═ Wi,jIs (1. ltoreq. i.ltoreq.V, 1. ltoreq. j.ltoreq.N);
carrying out random initialization on W to obtain a calculation result h of a projection layertIs a 1 XN-dimensional vector, i.e.
Wherein V represents the total number of words in the lexicon, N is a hyper-parameter representing the number of neurons in the projection layer, and wtThe target word is selected;
is the target word wtInputting a neural network model, namely a one-hot vector of the target word; in thatOne and only oneEqual to 1, the remainder being 0;
the word is embedded in a neural network weight between a projection layer and an output layer of the neural network model, using an N × V matrix W ═ W'i,jIs (1. ltoreq. i.ltoreq.N, 1. ltoreq. j.ltoreq.V);
carrying out random initialization on W' to obtain a calculation result o of an output layertIs a vector of dimension 1 x V, i.e.
Calculation result o at output layert=[o1,o2,...,oV]Adding softmax7 classifier to realize the relation with the target word wtContext word wIUnique heat vector x ofITo obtain wtOutput on the neural network modelNamely:
step 1.4, establishing a convolutional neural network model;
in the convolutional neural network model, firstly, words in a short text are converted into word vectors as local features, and meanwhile, keywords appointed by a user are converted into the word vectors as global features; and the two groups of characteristics respectively pass through a convolution layer and a pooling layer of the convolution neural network model, and finally calculate the score corresponding to each short text through a multilayer perceptron and a softmax activation function, specifically:
for the word w1,w2,...,Length of composition LwAny word w in the short textkThe output of the projection layer of the word-embedded neural network model obtained by step 1.3, the word-embedding map S of its N-dimensional vectorkThe result is that
Sk=word2vec(wk)
wherein N is the number of neurons in a projection layer of the word embedding neural network model and is also the dimension of a word vector output by the projection layer;
in a similar manner, the subject label characteristic H is obtained as
Wherein L isHThe number of the subject labels contained in the short text;
for the matrix S, the convolutional layer filter is definedIs composed ofOf (2) matrixWhereinIf the parameter is a hyper-parameter, carrying out random initialization; s calculation result C of convolution layerSIs composed of
To CSMaximum pooling (max pooling) is performed per row to obtain a matrix PS:
Similarly, for matrix H, the convolutional layer filter is definedIs composed ofWherein, the matrix isIf the parameter is a hyper-parameter, carrying out random initialization; h calculation result C of convolution layerHIs composed of
To CHMaking maximum pooling of each row to obtain a matrix PH:
And according to PfAnd between logistic regression layer neural networksThe dimension weight matrix M calculates an output o ' ═ of (o ') of the logistic regression layer '1,o′2):
Calculating the output value of the softmax activating function:
Step 2, text recommendation is carried out, specifically:
step 2.1, short text recommendation is carried out according to the scores obtained in the step 1.4, and a plurality of pieces of short text information with the highest scores are taken as dynamic progress of the field and recommended to a user;
unlike step 1.4, step 2.1 only targets data in the last week that did not participate in training, and does not perform back propagation error correction; at run-time, step 2.1 pairs the number N specified according to the usertopScreening out N with highest scoretopBars are dynamic for the domain;
and 2.2, the user feeds back the recommended short text according to the correlation degree and records the recommended short text in a local database.
2. The short text-based field dynamic tracking method according to claim 1, wherein the training method of the word embedding neural network model in step 1.3 is:
the training goal of the word embedding neural network model is to reduceAnd wIUnique heat vector x ofI=(xI,1,xI,2,...,xI,V) Difference therebetween
Wherein wI∈{wt-2,wt-1,wt+1,wt+2And is provided with
NxV-dimensional weight moment for projection layer to output layerMatrix W ', according to the chain rule, for any i, j (1 ≦ i ≦ N,1 ≦ j ≦ V), the gradient delta W'i,jIs equal to
Wherein
Therefore, it is not only easy to use
And according to gradient delta W'i,jWhile using the first moment calculated in the last execution of the training processAnd second momentOr first momentAnd second momentIs calculated as the set of weights W'i,jFirst moment estimation ofAnd second moment estimation
Wherein beta is1And beta2The super-parameter is used for controlling the change of the first moment estimation value and the second moment estimation value;
wherein step is the number of times of the step completed, and W 'is updated'i,jIs composed of
Where α is a hyper-parameter, called learning rate (learning rate), and is controlled by'i,jThe update ratio of (2); e is defined as a fraction greater than and approaching 0 to prevent division by zero in the fraction;
for the V multiplied by N dimensional weight matrix W from the input layer to the projection layer, i (j is more than or equal to 1 and less than or equal to V, i is more than or equal to 1 and less than or equal to N) is arbitrarily set, and the gradient delta W is set according to the chain rulej,iIs equal to
and update the weight Wj,i:
And training the word embedding neural network model once every time the step is completed, so as to update the weight.
3. The short text-based field dynamic tracking method according to claim 1, wherein the training method of the convolutional neural network model in step 1.4 specifically comprises:
the training target of the convolutional neural network model is reduced u '═ u'1,u′2) And actual degree of correlation a '═ a'1,a′2) The difference between them; wherein a'1Is [0,1 ]]Is LwDegree of correlation with domain to which keyword belongs, u'1The greater the correlation, the stronger the correlation, a'2=1-a′1;
Is provided with
E′=E′1+E′2
And is provided with
E′j=-(a′jlogu′j+(1-a′j)(1-logu′j))
Wherein j is more than or equal to 1 and less than or equal to 2; for PfTo o' sDimension weight matrix M, according to the chain rule, for arbitraryGradient δ M thereofi,jIs composed of
Wherein
Therefore, it is not only easy to use
and update the weight Mi,j:
Wherein
Therefore, it is not only easy to use
Correction to approximate unbiased estimation:
Wherein
Therefore, it is not only easy to use
Correction to approximate unbiased estimation:
And training the convolutional neural network model once every time the step is completed, so as to update the weight.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910322267.5A CN110083676B (en) | 2019-04-22 | 2019-04-22 | Short text-based field dynamic tracking method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910322267.5A CN110083676B (en) | 2019-04-22 | 2019-04-22 | Short text-based field dynamic tracking method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110083676A CN110083676A (en) | 2019-08-02 |
CN110083676B true CN110083676B (en) | 2021-12-03 |
Family
ID=67415993
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910322267.5A Active CN110083676B (en) | 2019-04-22 | 2019-04-22 | Short text-based field dynamic tracking method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110083676B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110795937A (en) * | 2019-09-25 | 2020-02-14 | 卓尔智联(武汉)研究院有限公司 | Information processing method, device and storage medium |
CN111460105B (en) * | 2020-04-02 | 2023-08-29 | 清华大学 | Topic mining method, system, equipment and storage medium based on short text |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104834747A (en) * | 2015-05-25 | 2015-08-12 | 中国科学院自动化研究所 | Short text classification method based on convolution neutral network |
CN107562729A (en) * | 2017-09-14 | 2018-01-09 | 云南大学 | The Party building document representation method strengthened based on neutral net and theme |
CN107656990A (en) * | 2017-09-14 | 2018-02-02 | 中山大学 | A kind of file classification method based on two aspect characteristic informations of word and word |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170308790A1 (en) * | 2016-04-21 | 2017-10-26 | International Business Machines Corporation | Text classification by ranking with convolutional neural networks |
-
2019
- 2019-04-22 CN CN201910322267.5A patent/CN110083676B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104834747A (en) * | 2015-05-25 | 2015-08-12 | 中国科学院自动化研究所 | Short text classification method based on convolution neutral network |
CN107562729A (en) * | 2017-09-14 | 2018-01-09 | 云南大学 | The Party building document representation method strengthened based on neutral net and theme |
CN107656990A (en) * | 2017-09-14 | 2018-02-02 | 中山大学 | A kind of file classification method based on two aspect characteristic informations of word and word |
Non-Patent Citations (3)
Title |
---|
Supervised Deep Polylingual Topic Modeling for Scholarly Information Recommendations;Daniel Ramage等;《ICPRAM 2018 - 7th International Conference on Pattern Recognition Applications and Methods》;20181231;全文 * |
一种基于深度学习与Labeled_LDA的文本分类方法;庞宇明;《中国优秀硕士学位论文全文数据库信息科技辑》;20180315;全文 * |
基于主题增强卷积神经网络的用户兴趣识别;杜雨萌等;《计算机研究与发展》;20180131;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN110083676A (en) | 2019-08-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109992648B (en) | Deep text matching method and device based on word migration learning | |
CN107330049B (en) | News popularity estimation method and system | |
CN110019685B (en) | Deep text matching method and device based on sequencing learning | |
CN114565104A (en) | Language model pre-training method, result recommendation method and related device | |
CN110516245A (en) | Fine granularity sentiment analysis method, apparatus, computer equipment and storage medium | |
CN111881334A (en) | Keyword-to-enterprise retrieval method based on semi-supervised learning | |
CN107688870B (en) | Text stream input-based hierarchical factor visualization analysis method and device for deep neural network | |
WO2021139415A1 (en) | Data processing method and apparatus, computer readable storage medium, and electronic device | |
US20220318317A1 (en) | Method for disambiguating between authors with same name on basis of network representation and semantic representation | |
WO2023272748A1 (en) | Academic accurate recommendation-oriented heterogeneous scientific research information integration method and system | |
CN110046223B (en) | Film evaluation emotion analysis method based on improved convolutional neural network model | |
CN113822776B (en) | Course recommendation method, device, equipment and storage medium | |
CN110083676B (en) | Short text-based field dynamic tracking method | |
CN110889282A (en) | Text emotion analysis method based on deep learning | |
CN114328834A (en) | Model distillation method and system and text retrieval method | |
CN110019653A (en) | A kind of the social content characterizing method and system of fusing text and label network | |
CN109086463A (en) | A kind of Ask-Answer Community label recommendation method based on region convolutional neural networks | |
CN113934835B (en) | Retrieval type reply dialogue method and system combining keywords and semantic understanding representation | |
CN110874392B (en) | Text network information fusion embedding method based on depth bidirectional attention mechanism | |
CN110569355B (en) | Viewpoint target extraction and target emotion classification combined method and system based on word blocks | |
CN111914553A (en) | Financial information negative subject judgment method based on machine learning | |
CN114492451A (en) | Text matching method and device, electronic equipment and computer readable storage medium | |
CN113722439A (en) | Cross-domain emotion classification method and system based on antagonism type alignment network | |
CN114282528A (en) | Keyword extraction method, device, equipment and storage medium | |
CN112966096A (en) | Cloud service discovery method based on multi-task learning |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |