CN114357307A - News recommendation method based on multi-dimensional features - Google Patents

News recommendation method based on multi-dimensional features Download PDF

Info

Publication number
CN114357307A
CN114357307A CN202210025279.3A CN202210025279A CN114357307A CN 114357307 A CN114357307 A CN 114357307A CN 202210025279 A CN202210025279 A CN 202210025279A CN 114357307 A CN114357307 A CN 114357307A
Authority
CN
China
Prior art keywords
news
entity
vector
features
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210025279.3A
Other languages
Chinese (zh)
Inventor
郭楠
李金辉
高燊
高天寒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Northeastern University China
Original Assignee
Northeastern University China
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 Northeastern University China filed Critical Northeastern University China
Priority to CN202210025279.3A priority Critical patent/CN114357307A/en
Publication of CN114357307A publication Critical patent/CN114357307A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a news recommendation method based on multi-dimensional featuresaThe method comprises the steps of obtaining a news category ID characteristic, a news headline text clustering category characteristic, a news headline characteristic and an image characteristic; then constructing a user characteristic processor, multiplying the attention weight obtained by each news through an attention network by the respective news characteristic to obtain a user characteristic u, and multiplying the user characteristic u and the news characteristic raMultiplying to obtain the click probability score of each news
Figure DDA0003464211150000011
Then, a training set is constructed to define pointsA hit rate loss function is obtained, and interaction records of a plurality of users are input into a batch of deep learning to train a deep learning model; and finally, adopting a trained deep learning model to carry out home page recommendation or personalized recommendation. The invention uses various features to improve the accuracy and diversity of news recommendation.

Description

News recommendation method based on multi-dimensional features
Technical Field
The invention relates to the technical field of news recommendation, in particular to a news recommendation method based on multi-dimensional features.
Background
With the development of internet technology and the improvement of life needs of people, the number of users reading news is increasing all the time, and people have higher and higher requirements on the recommendation effect of news apps.
Patent CN102929928A proposes to use the title and the text content to obtain the topic feature vector, then construct a news model and a user model according to the topic feature vector and the user behavior data of the news, and then perform personalized recommendation according to the time feature. Although various features such as title, text and time features are considered to a certain extent, only the title and the text are really used for feature extraction in the model, the multi-dimensional features are not really embodied, the proposed time features are only used for strategy screening during recommendation, and a user generally sees the title first and then sees the text when clicking news, and the reading habit of people is not met.
Patent CN111061856A proposes that an entity is identified from a news text, the entity is matched with an entity in a knowledge map, a knowledge representation learning model is used to obtain vector representation of the entity and the relationship, a convolutional neural network is used to fuse word vectors and entity vectors of news, characteristics of news are learned from the vector representation, user characteristics are obtained by an attention mechanism, then candidate news characteristics, user characteristics and path characteristics are used as input, a multi-layer perceptron is used to calculate the click probability of candidate news, and finally personalized recommendation is achieved. Although the entity and the relation in the knowledge graph are well improved in AUC and F1, in actual engineering, not all news apps can build the knowledge graph in advance, and if the knowledge graph is not built or is too sparse, the recommendation effect is reduced.
Because the technical scheme can not meet the requirement of people on news reading recommendation, a new recommendation method is necessary.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a news recommending method based on multi-dimensional features.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows: a news recommendation method based on multi-dimensional features comprises the following specific processes:
step 1: constructing a news feature extractor to extract the news feature raThe process is as follows:
step 1.1: acquiring news, extracting entity information and relationship information from a text of a news title, and constructing a knowledge map; and learning entity vectors and relationship vectors from the constructed knowledge graph spectrum, and calculating the average value of the context vector of each entity, wherein the specific process is as follows:
step 1.1.1: performing entity extraction on news titles based on a named entity identification technology, and combining extracted entities into a news entity set;
step 1.1.2: inputting news titles and corresponding entities into the PCNN for relationship extraction to form triples (h, r, t); h is a head entity, t is a tail entity, h and t are from a news entity set, r is a relation, and the relation is obtained after extraction by PCNN;
step 1.1.3: constructing a knowledge graph on the basis of the triples (h, r, t);
step 1.1.4: learning entity vectors and relationship vectors from the constructed knowledge graph by using a knowledge graph feature learning method;
step 1.1.5: extracting the context information of each entity, namely acquiring the neighborhood of each entity in the graph, and calculating the average value of the context vector of each entity.
The specific calculation formula is as follows:
Figure BDA0003464211130000021
context(e)={ei|(e,r,ei)∈G or(ei∈G)}
wherein context (e) is a context set of entity e, eiIs the ith entity vector representation of context (e), r is the relationship between entities, G is the knowledge-graph,
Figure BDA0003464211130000022
is the average of the context vector for entity e.
Further, in order to prevent the number of edges in the knowledge-graph from being small and lacking in diversity, the knowledge-graph is expanded, and entities and related edges which are within a threshold distance from the entities in the knowledge-graph are introduced to increase the number of edges.
Step 1.2: the method comprises the following steps of obtaining a word vector of each word in a news title, mapping the word vector and an average value of an entity vector and an entity context vector into a vector space with the same dimensionality, inputting the word vector and the entity vector into a dynamic multi-convolution kernel (CNN) for feature extraction, and obtaining corresponding word features, entity features and entity context features, wherein the specific process is as follows:
step 1.2.1: news title [ w ]1,w2,...,wn]Each word w iniAnd its word vector
Figure BDA0003464211130000023
Entity vector eiEntity context vector mean
Figure BDA0003464211130000024
One-to-one correspondence, if the entity vector and the context vector are not matched, replacing the entity vector and the context vector by a zero vector;
step 1.2.2: mapping the word vector, the entity vector and the context vector into a d-dimensional vector space by using a mapping function, unifying the dimensions of the three vectors and obtaining a word vector sequence
Figure BDA0003464211130000025
Entity vector sequence [ e ]1,e2,...en]Sequence of entity context vectors
Figure BDA0003464211130000026
The specific mapping function is as follows:
g(e)=tanh(Me+b)
wherein M is equal to Rd×kA transformation matrix is obtained, k is the dimension before transformation, and d is the dimension after transformation; b is a bias constant and e is an entity vector.
Step 1.2.3: respectively inputting the word vector sequence, the entity vector sequence and the entity context vector sequence into a dynamic multi-convolution kernel (CNN), and respectively using the characteristics obtained by a ReLU activation function
Figure BDA0003464211130000031
Figure BDA0003464211130000032
Represents;
step 1.2.4: attention weights are used on the features obtained in step 2.3 respectively,
obtaining:
Figure BDA0003464211130000033
Figure BDA0003464211130000034
wherein,
Figure BDA0003464211130000035
weight value, V, representing the ith word vectorwAnd vwIs the projection parameter at which the vector weight is calculated, qwIs the attention query vector when calculating the vector weights,
Figure BDA0003464211130000036
the word features obtained through the ReLU activation function; obtaining the weight value corresponding to the ith entity vector by the same method
Figure BDA0003464211130000037
Weight values corresponding to the ith entity context vector
Figure BDA0003464211130000038
Step 1.2.5: respectively multiplying the word vector, the entity vector and the entity context vector by the respective corresponding weight values, and performing summation calculation to respectively obtain word characteristics rwEntity characteristic reAnd entity context characteristics
Figure BDA0003464211130000039
The specific calculation formula is as follows:
Figure BDA00034642111300000310
Figure BDA00034642111300000311
Figure BDA00034642111300000312
step 1.3: respectively calculating the corresponding weight values of the word characteristics, the entity characteristics and the entity context characteristics obtained in the step 2, respectively multiplying the corresponding weight values by the corresponding word characteristics, the corresponding entity characteristics and the corresponding entity context characteristics, and then adding the word characteristics, the corresponding entity characteristics and the corresponding entity context characteristics to obtain the final title characteristics rtThe process is as follows:
step 1.3.1: the weight α w on the word feature is calculated as follows:
Figure BDA00034642111300000313
Figure BDA00034642111300000314
wherein, Uw、uwTo calculate projection parameters for feature weights, qwIs to calculate the feature weightAttention query vector of time; the weight alpha corresponding to the entity characteristics is calculated and obtained by the same methodeWeights corresponding to entity context characteristics
Figure BDA0003464211130000041
Step 1.3.2: the final title feature is calculated as follows:
Figure BDA0003464211130000042
wherein r istIs the final title feature.
Step 1.4: clustering analysis is carried out on the texts of the news headlines by using a k-means mean clustering algorithm, the centroids after clustering are obtained, and the k centroids correspond to k categories to obtain category characteristic representation r of the news headline text clusteringcq
Further, the category characteristic representation r of the news headline text clustercqThe specific method comprises the following steps:
corresponding the k centroids to k categories, numbering by 0,1,. k respectively, and initializing k category characteristics;
summing news title features, performing Euclidean distance calculation with each centroid vector, and calculating the class feature C corresponding to the closest centroidqInputting the data into a deep learning Dense neural network to obtain the category characteristic representation r of news headline text clusteringcq
Step 1.5: acquiring a matching image from news, converting the image to obtain an RGB image, converting the RGB image color space to an HSV color space, and calculating hue H, saturation S and brightness V in the HSV color space to obtain the color characteristics of the image;
the specific calculation method is as follows:
step 1.5.1: the hue H is RGB converted and calculated as follows:
Figure BDA0003464211130000043
step 1.5.2: the saturation S is RGB converted and calculated as follows:
Figure BDA0003464211130000044
step 1.5.3: the luminance V is RGB-converted and calculated as follows:
Figure BDA0003464211130000045
step 1.6: calculating the geometric invariant moment of each image f (x, y), and describing the shape characteristics of the image by using the geometric invariant moment; the specific algorithm is as follows:
step 1.6.1: the origin moment of order p + q and the central moment of order p + q for a discrete digital image f (x, y) are calculated as follows:
Figure BDA0003464211130000046
Figure BDA0003464211130000051
wherein p, q is 0,1, 2 …, mpqIs the origin moment of order p + q, mupqIs the central moment of order p + q,
Figure BDA0003464211130000052
representing the image center coordinates;
step 1.6.2: image center coordinates
Figure BDA0003464211130000053
The calculation is as follows:
Figure BDA0003464211130000054
Figure BDA0003464211130000055
step 1.6.3: the central moments, which represent the distribution of pixels of different gray levels within the image with respect to the center of gravity, are normalized to obtain properties that are independent of the image, and are calculated as follows:
Figure BDA0003464211130000056
wherein r is (p + q +2)/2, p + q is 2, 3, 4, …, ηpqIs the distance between the centers of the two plates,
Figure BDA0003464211130000057
is a zero order center distance;
step 1.6.4: based on the normalized second and third central moments, 7 moment sets can be derived, calculated as follows:
M1=η2002
M2=(η2002)2+4η11
M3=(η30-3η12)2+(3η2103)2
M4=(η3012)2+(η2103)2
M5=(η03-3η12)(η3012)[(η30+3η12)2-3(η2103)2]+
(3η2103)(η2103)[3(η3012)2-(η2103)2]
M6=(η2002)[(η3012)2-(η2103)2]+4η113012)(η2103)
M7=(3η2103)(η3012)[(η3012)2-3(η2103)2]+
(3η2103)(η2103)[3(η3012)2-(η2103)2]
wherein, the 7 invariant moment groups M1、M2、M3、M4、M5、M6And M7Referred to as geometric invariant moment, is used to characterize the shape.
Step 1.7: calculating a gray level co-occurrence matrix of each image f (x, y), and describing the texture characteristics of the images by using the gray level co-occurrence matrix;
the gray level co-occurrence matrix is obtained by counting that pixel points which keep a certain distance on an image respectively have certain gray level conditions, and the specific calculation method is as follows:
step 1.7.1: for each gray image f (x, y), defining S as a set of pixel pairs having a specific spatial relationship in any region R, the gray co-occurrence matrix is calculated as follows:
m(d,θ)(i,j)=card{[(x1,y1),(x2,y2)]∈S|f(x1,y1)=i&f(x2,y2)=j}
wherein x is2=x1+dcosθ,y2=y1+ dsin θ, card(s) denotes set, m(d,θ)(i, j) represents the number of contributing elements, d is the step distance, and theta is the direction;
step 1.7.2: the gray level co-occurrence matrix is normalized as follows:
Figure BDA0003464211130000061
further, the gray level co-occurrence matrix is used for describing the texture features of the image, and can be replaced by constructing feature vectors by using entropy, contrast and inverse variance to describe the texture features of the image.
Step 1.8: respectively calculating the feature similarity of the color, shape and texture features of each news image, dynamically adjusting a threshold value according to the feature similarity calculation result, establishing a knowledge graph subgraph of the features of each news image, and linking all the knowledge graph subgraphs together to obtain a knowledge graph of the features of the news images;
step 1.9: representing the color, shape and texture features of the image as a head entity vector and a tail entity vector in a knowledge graph, representing the similarity between the features as a relation vector, and filtering the head entity vector, the tail entity vector and the relation vector by using a TransE0 model;
further, the similarity calculation method between the features is as follows:
A. calculating the similarity of the color features of the images by adopting Euclidean distance;
B. calculating the similarity of the shape characteristics of the images by adopting a correlation coefficient method;
C. and calculating the similarity of the texture features of the images by adopting cosine similarity.
Step 1.10: carrying out linear fusion on the color, shape and texture characteristics of the image to obtain a characteristic vector D of the image;
step 1.11: obtaining news category ID, obtaining initial characteristics corresponding to the category ID, inputting the initial characteristics into the Dense to obtain characteristic representation r of the news category IDca
Step 1.12: features r of news category IDcaCategory characteristics r of news headline text clusteringcqNews headline characteristic rtAnd fusing the image characteristics D together by using an attention mechanism to obtain final news characteristics ra
The specific calculation formula is as follows:
ra=αca*rcacq*rcqD*D+αt*rt
step 2: constructing a user feature processor, and multiplying the attention weight obtained by each news through an attention network by the news features extracted by the news feature extractor in the step 1 to obtain user features u;
the specific calculation formula is as follows:
Figure BDA0003464211130000071
wherein,
Figure BDA0003464211130000072
as the ith news feature
Figure BDA0003464211130000073
The attention weight obtained via the attention network, m being the news volume.
And step 3: user characteristic u and news characteristic raMultiplying to obtain the click probability score of each news
Figure BDA0003464211130000074
The specific calculation formula is as follows:
Figure BDA0003464211130000075
and 4, step 4: randomly extracting K pieces of news which are not clicked by users from interaction records of multiple users as negative samples, extracting one piece of news which is clicked by one user as positive samples, combining all user data to form a training set, and calculating the click probability score p of the positive samples of the training setiAnd defining a click rate loss function L, wherein the specific process is as follows:
step 4.1: randomly extracting K pieces of news which are not clicked by the users from the interaction records of the users to serve as negative samples, and meanwhile calculating the click probability score of each piece of negative sample news according to the method in the step 3 to obtain the negative sample setClick probability score, denoted as
Figure BDA0003464211130000076
Step 4.2: extracting news clicked by a user as a positive sample, calculating the click probability score of the positive sample news according to the method in the step 3, and recording the score as the click probability score
Figure BDA0003464211130000077
Step 4.3: calculating click probability score p of training set positive sampleiThe formula is as follows:
Figure BDA0003464211130000078
wherein,
Figure BDA0003464211130000079
is the click probability score for the ith positive sample,
Figure BDA00034642111300000710
is the click probability score of the jth negative sample in the same candidate news sequence as the ith positive sample,
Figure BDA00034642111300000711
scoring the click probability of the positive sample;
step 4.4: defining a click-through rate loss function L, the formula is as follows:
Figure BDA0003464211130000081
where S is the set of forward training samples.
And 5: inputting the interaction records of a plurality of users into a batch of deep learning, and repeatedly executing the steps 1 to 4 to train a deep learning model;
step 6: inputting the historical browsing news and the candidate news of the user into the deep learning model trained in the step 5, and recommending the home page or recommending the candidate news individually.
Adopt the produced beneficial effect of above-mentioned technical scheme to lie in:
1. the method provided by the invention uses the category after the text clustering, can avoid the deviation caused by the category after manual editing to a certain extent, and can also obtain the implicit category representation of the text.
2. The method provided by the invention uses entity information in the knowledge map, the entity belongs to a mode of knowledge presentation, and news can be connected through the entity, so that the entity characteristics and the entity context characteristics are blended into the title characteristics, and more information can be represented.
3. The method provided by the invention combines the news image data, takes the color, shape and texture characteristics of news into consideration, establishes the knowledge map, and filters through the TransE model to obtain the characteristics of the fused news image, thereby further expanding the data characteristic dimension.
4. The method provided by the invention integrates various characteristics with an attention mechanism, and the information of the category, the news category, the entity and the title after the text clustering is easy to obtain in the actual engineering.
Drawings
FIG. 1 is a flowchart of a news recommendation method based on multidimensional features according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a knowledge-graph structure of news image features in an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a deep learning model combining a news feature extractor and a user feature processor in an embodiment of the present invention;
FIG. 4 is a flowchart of step 6 in an embodiment of the present invention.
Detailed Description
The following detailed description of embodiments of the present invention is provided in connection with the accompanying drawings and examples. The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
As shown in fig. 1, the news recommendation method based on the multidimensional feature in the present embodiment is as follows.
Step 1: constructing a news feature extractor to extract the news feature raThe process is as follows:
step 1.1: acquiring news, extracting entity information and relationship information from a text of a news title, and constructing a knowledge map; and learning entity vectors and relationship vectors from the constructed knowledge graph spectrum, and calculating the average value of the context vector of each entity, wherein the specific process is as follows:
step 1.1.1: performing entity extraction on news titles based on a named entity identification technology, and combining extracted entities into a news entity set;
in this embodiment, a named entity recognition technology based on perceptron sequence labeling, a Bi-LSTM + CRF technology, and the like are used to extract entities from news headlines.
Step 1.1.2: inputting news titles and corresponding entities into the PCNN for relationship extraction to form triples (h, r, t); h is a head entity, t is a tail entity, h and t are from a news entity set, r is a relation, and the relation is obtained after extraction by PCNN;
step 1.1.3: constructing a knowledge graph on the basis of the triples (h, r, t);
in this embodiment, a knowledge graph is constructed based on the Neo4j database, data can be accessed, an algorithm for graph operation can be written on the database, the graph can be saved, and the algorithm can be written on the database for operation.
Step 1.1.4: learning entity vectors and relationship vectors from the constructed knowledge graph by using a knowledge graph feature learning method;
in this embodiment, knowledge graph feature learning methods such as transE and TransR are used to learn the entity vector and the relationship vector.
Step 1.1.5: extracting the context information of each entity, namely acquiring the neighborhood of each entity in the graph, and calculating the average value of the context vector of each entity.
The specific calculation formula is as follows:
Figure BDA0003464211130000091
context(e)={ei|(e,r,ei)∈G or(ei∈G)}
wherein context (e) is a context set of entity e, eiIs the ith entity vector representation of context (e), r is the relationship between entities, G is the knowledge-graph,
Figure BDA0003464211130000092
is the average of the context vector of entity e.
Further, in order to prevent the number of edges in the knowledge-graph from being small and lacking in diversity, the knowledge-graph is expanded, and entities and related edges which are within a threshold distance from the entities in the knowledge-graph are introduced to increase the number of edges.
In this embodiment, the distance between the entities is calculated by using an equidistance calculation method of the euclidean distance and the cosine distance.
Step 1.2: the method comprises the following steps of obtaining a word vector of each word in a news title, mapping the word vector and an average value of an entity vector and an entity context vector into a vector space with the same dimensionality, inputting the word vector and the entity vector into a dynamic multi-convolution kernel (CNN) for feature extraction, and obtaining corresponding word features, entity features and entity context features, wherein the specific process is as follows:
step 1.2.1: news title [ w ]1,w2,...,wn]Each word w iniAnd its word vector
Figure BDA0003464211130000093
Entity vector eiEntity context vector mean
Figure BDA0003464211130000101
One-to-one correspondence, if the entity vector and the context vector are not matched, replacing the entity vector and the context vector by a zero vector;
step 1.2.2: vector words using a mapping functionMapping the entity vector and the context vector to a d-dimensional vector space to unify the dimensions of the three vectors to obtain a word vector sequence
Figure BDA0003464211130000102
Entity vector sequence [ e ]1,e2,...en]Sequence of entity context vectors
Figure BDA0003464211130000103
The specific mapping function is as follows:
g(e)=tanh(Me+b)
wherein M is equal to Rd×kA transformation matrix is obtained, k is the dimension before transformation, and d is the dimension after transformation; b is a bias constant and e is an entity vector.
Step 1.2.3: respectively inputting the word vector sequence, the entity vector sequence and the entity context vector sequence into a dynamic multi-convolution kernel (CNN), and respectively using the characteristics obtained by a ReLU activation function
Figure BDA0003464211130000104
Figure BDA0003464211130000105
Represents;
step 1.2.4: attention weights are used on the features obtained in step 2.3 respectively,
obtaining:
Figure BDA0003464211130000106
Figure BDA0003464211130000107
wherein,
Figure BDA0003464211130000108
weight value, v, representing the ith word vectorwAnd vwIs to calculate a vectorProjection parameters at weight, qwIs the attention query vector when calculating the vector weights,
Figure BDA0003464211130000109
the word features obtained through the ReLU activation function; obtaining the weight value corresponding to the ith entity vector by the same method
Figure BDA00034642111300001010
Weight values corresponding to the ith entity context vector
Figure BDA00034642111300001011
Step 1.2.5: respectively multiplying the word vector, the entity vector and the entity context vector by the respective corresponding weight values, and performing summation calculation to respectively obtain word characteristics rwEntity characteristic reAnd entity context characteristics
Figure BDA00034642111300001012
The specific calculation formula is as follows:
Figure BDA00034642111300001013
Figure BDA00034642111300001014
Figure BDA00034642111300001015
step 1.3: respectively calculating the corresponding weight values of the word characteristics, the entity characteristics and the entity context characteristics obtained in the step 2, respectively multiplying the corresponding weight values by the corresponding word characteristics, the corresponding entity characteristics and the corresponding entity context characteristics, and then adding the word characteristics, the corresponding entity characteristics and the corresponding entity context characteristics to obtain the final title characteristics rtThe process is as follows:
step 1.3.1: computing a weight alpha on a word featurewDisclosure of the inventionThe formula is as follows:
Figure BDA0003464211130000111
Figure BDA0003464211130000112
wherein, Uw、uwTo calculate projection parameters for feature weights, qwIs the attention query vector when calculating the feature weights; the weight alpha corresponding to the entity characteristics is calculated and obtained by the same methodeWeights corresponding to entity context characteristics
Figure BDA0003464211130000113
Step 1.3.2: the final title feature is calculated as follows:
Figure BDA0003464211130000114
wherein r istIs the final title feature.
Step 1.4: clustering analysis is carried out on the texts of the news headlines by using a k-means mean clustering algorithm, the centroids after clustering are obtained, and the k centroids correspond to k categories to obtain category characteristic representation r of the news headline text clusteringcq
Further, the category characteristic representation r of the news headline text clustercqThe specific method comprises the following steps:
corresponding the k centroids to k categories, numbering by 0,1,. k respectively, and initializing k category characteristics;
summing news title features, performing Euclidean distance calculation with each centroid vector, and comparing the initial class feature C corresponding to the closest centroidqInputting the data into a deep learning Dense neural network to obtain the category characteristic representation r of news headline text clusteringcq
In this embodiment, the specific process of clustering and analyzing the text of the news headline by the k-means mean clustering algorithm is as follows:
step 1.4.1: news title [ w ]1,w2,...,wn]The word vectors corresponding to each word in the text are summed to form a text feature vector diThe calculation formula is as follows:
Figure BDA0003464211130000115
wherein,
Figure BDA0003464211130000116
word vectors corresponding to words in news headlines.
Step 1.4.2: defining the number of centroids as k, randomly selecting a data point as the centroid coUse of 1-di*coCalculating the distance between the centroid and the data point, wherein di*co=||di||·||c0||cos(di,co);
Step 1.4.3: calculating the sum of the distances from the points in each cluster to the centroid of the cluster, taking the sum as a new criterion function value, and maintaining the distance from each point to the nearest centroid;
step 1.4.4: to select the remaining centroids, the method will proceed by calculating the initial first centroid coA portion of the resulting criteria function value is located as Δ;
step 1.4.5: traversing all the rest data points, and if the distance from the point to the nearest centroid is less than delta, adding the point to a centroid list;
step 1.4.6: traversing all data points, and distributing the data points to the nearest centroid to form a new cluster;
step 1.4.7: recalculating the centroid of each cluster until the centroid does not change, forming k centroids, i.e. [ c ]0,c1…ck]。
Step 1.5: acquiring a matching image from news, converting the image to obtain an RGB image, converting the RGB image color space to an HSV color space, and calculating hue H, saturation S and brightness V in the HSV color space to obtain the color characteristics of the image;
the specific calculation method is as follows:
step 1.5.1: the hue H is RGB converted and calculated as follows:
Figure BDA0003464211130000121
step 1.5.2: the saturation S is RGB converted and calculated as follows:
Figure BDA0003464211130000122
step 1.5.3: the luminance V is RGB-converted and calculated as follows:
Figure BDA0003464211130000123
step 1.6: calculating the geometric invariant moment of each image f (x, y), and describing the shape characteristics of the image by using the geometric invariant moment; the geometric invariant moment is a statistical characteristic of the image, has translation, rotation and scale invariance, and is used for describing the distribution characteristics of the image.
The specific algorithm is as follows:
step 1.6.1: the origin moment of order p + q and the central moment of order p + q for a discrete digital image f (x, y) are calculated as follows:
Figure BDA0003464211130000124
Figure BDA0003464211130000125
wherein p, q is 0,1, 2 …, mpqIs the origin moment of order p + q,μpqis the central moment of order p + q,
Figure BDA0003464211130000126
representing the image center coordinates;
step 1.6.2: image center coordinates
Figure BDA0003464211130000131
The calculation is as follows:
Figure BDA0003464211130000132
Figure BDA0003464211130000133
step 1.6.3: the central moments, which represent the distribution of pixels of different gray levels within the image with respect to the center of gravity, are normalized to obtain properties that are independent of the image, and are calculated as follows:
Figure BDA0003464211130000134
wherein r is (p + q +2)/2, p + q is 2, 3, 4, …, ηpqIs the distance between the centers of the two plates,
Figure BDA0003464211130000135
is a zero order center distance;
step 1.6.4: based on the normalized second and third central moments, 7 moment sets can be derived, calculated as follows:
Figure BDA0003464211130000136
wherein, the 7 invariant moment groups M1、M2、M3、M4、M5、M6And M7Called geometric invariant moment, usingTo describe the shape characteristics.
Step 1.7: calculating a gray level co-occurrence matrix of each image f (x, y), and describing the texture characteristics of the images by using the gray level co-occurrence matrix;
the gray level co-occurrence matrix is obtained by counting that pixel points which keep a certain distance on an image respectively have certain gray level conditions, and the specific calculation method is as follows:
step 1.7.1: for each gray image f (x, y), defining S as a set of pixel pairs having a specific spatial relationship in any region R, the gray co-occurrence matrix is calculated as follows:
m(d,θ)(i,j)=card{[(x1,y1),(x2,y2)]∈S|f(x1,y1)=i&f(x2,y2)=j}
wherein x is2=x1+dcosθ,y2=y1+ dsin θ, card (S) denotes set, m(d,θ)(i, j) represents the number of contributing elements, d is the step distance, and theta is the direction;
step 1.7.2: the gray level co-occurrence matrix is normalized as follows:
Figure BDA0003464211130000141
furthermore, the gray level co-occurrence matrix is used for describing the texture features of the image, and can be replaced by constructing feature vectors by using entropy, contrast and inverse variance to describe the texture features of the image, so that the calculation amount is reduced. The gray level transformation can be performed on the image, and then the entropy, the contrast and the inverse variance are extracted.
Wherein, the entropy: the amount of information an image has is measured. The texture in the image is more, and the corresponding entropy value is larger; the more sparse the texture is, the smaller the entropy value is, and the entropy value calculation mode is as follows:
Ent=-∑ijP(i,j)logP(i,j)
where P (i, j) represents the number of occurrences of two pixels with gray scales i and j, respectively.
Contrast ratio: reflecting the definition of the image texture features. I-j represents the difference between the gray values, the more the pixel pairs with large gray value difference are, the larger the contrast is, the contrast represents the thickness of the texture features, and the calculation mode of the contrast is as follows:
Con=∑ij(i-j)2P(i,j)
inverse variance: reflecting the uniformity of the textural features, (i-j)2The smaller the image uniformity characteristic is, the larger the image uniformity characteristic is, and conversely, the smaller the image uniformity characteristic is, the measure of the smoothness of the image is reflected, and the inverse variance calculation is as follows:
Figure BDA0003464211130000142
step 1.8: respectively calculating the feature similarity of the color, shape and texture features of each news image, dynamically adjusting a threshold according to the feature similarity calculation result, establishing a knowledge graph subgraph of the features of each news image, and linking all the knowledge graph subgraphs together to obtain a knowledge graph of the features of the news images, wherein the structure of the knowledge graph is shown in FIG. 2;
step 1.9: representing the color, shape and texture features of the image as a head entity vector and a tail entity vector in a knowledge graph, representing the similarity between the features as a relation vector, and filtering the head entity vector, the tail entity vector and the relation vector by using a TransE0 model; the distance between the entities is measured by L2 norm, and the smaller the distance is, the stronger the relationship is, the calculation mode is as follows:
Figure BDA0003464211130000151
wherein, X1Is an entity, X2Is another entity, X1iBeing vectors in entities, X2iIs a vector in another entity.
Further, the similarity calculation method between the features is as follows:
A. calculating the similarity of the color features of the images by adopting Euclidean distance;
the specific process is as follows: h, S, V three components are combined into a one-dimensional characteristic vector, the vector is normalized, and the similarity is calculated by adopting the Euclidean distance, and the calculation is as follows:
Figure BDA0003464211130000152
wherein P is a feature vector, Q is another feature vector,
Figure BDA0003464211130000153
in the form of a vector of values,
Figure BDA0003464211130000154
is another vector value.
B. Calculating the similarity of the shape characteristics of the images by adopting a correlation coefficient method;
the specific calculation formula is as follows:
Figure BDA0003464211130000155
wherein r (X, Y) is a correlation coefficient, X is a feature vector, and Y is another feature vector.
C. And calculating the similarity of the texture features of the images by adopting cosine similarity.
The specific calculation formula is as follows:
Figure BDA0003464211130000156
wherein A is a feature vector and B is another feature vector.
Step 1.10: carrying out linear fusion on the color, shape and texture features of the image to obtain a feature vector D of the image, wherein a calculation formula is as follows:
Figure BDA0003464211130000157
wherein, wiAs a feature weight, DiIs a feature vector.
Step 1.11: obtaining news category ID, obtaining initial characteristics corresponding to the category ID, inputting the initial characteristics into the Dense to obtain characteristic representation r of the news category IDca
Step 1.12: features r of news category IDcaCategory characteristics r of news headline text clusteringcqNews headline characteristic rtAnd fusing the image characteristics D together by using an attention mechanism to obtain final news characteristics ra
The specific calculation formula is as follows:
ra=αca*rcacq*rcqD*D+αt*rt
step 2: constructing a user feature processor, and multiplying the attention weight obtained by each news through an attention network by the news features extracted by the news feature extractor in the step 1 to obtain user features u;
the specific calculation formula is as follows:
Figure BDA0003464211130000161
wherein,
Figure BDA0003464211130000162
as the ith news feature
Figure BDA0003464211130000163
The attention weight obtained via the attention network, m being the news volume.
And step 3: user characteristic u and news characteristic raMultiplying to obtain the click probability score of each news
Figure BDA0003464211130000164
The specific calculation formula is as follows:
Figure BDA0003464211130000165
and 4, step 4: randomly extracting K pieces of news which are not clicked by users from interaction records of multiple users as negative samples, extracting one piece of news which is clicked by one user as positive samples, combining all user data to form a training set, and calculating the click probability score p of the positive samples of the training setiAnd defining a click rate loss function L, wherein the specific process is as follows:
step 4.1: randomly extracting K pieces of news which are not clicked by the users from the interaction records of the users to serve as negative samples, meanwhile, calculating the click probability score of each piece of negative sample news according to the method in the step 3 to obtain the click probability score of the negative sample set, and recording the click probability score as the click probability score of the negative sample set
Figure BDA0003464211130000166
Step 4.2: extracting news clicked by a user as a positive sample, calculating the click probability score of the positive sample news according to the method in the step 3, and recording the score as the click probability score
Figure BDA0003464211130000167
Step 4.3: calculating click probability score p of training set positive sampleiThe formula is as follows:
Figure BDA0003464211130000168
wherein,
Figure BDA0003464211130000169
is the click probability score for the ith positive sample,
Figure BDA00034642111300001610
is the click probability of the jth negative sample in the same candidate news sequence as the ith positive sampleThe method comprises the following steps of dividing,
Figure BDA00034642111300001611
scoring the click probability of the positive sample;
step 4.4: defining a click-through rate loss function L, the formula is as follows:
Figure BDA00034642111300001612
where S is the set of forward training samples.
And 5: inputting the interaction records of a plurality of users into a batch of deep learning, and repeatedly executing the steps 1 to 4 to train a deep learning model as shown in fig. 3;
step 6: inputting the historical browsing news and the candidate news of the user into the deep learning model trained in the step 5, and performing home page recommendation or personalized recommendation, wherein the flow is shown in fig. 4.

Claims (10)

1. A news recommendation method based on multi-dimensional features is characterized by comprising the following steps:
step 1: constructing a news feature extractor to extract the news feature ra
Step 2: constructing a user feature processor, and multiplying the attention weight obtained by each news through an attention network by the news features extracted by the news feature extractor in the step 1 to obtain user features u;
and step 3: user characteristic u and news characteristic raMultiplying to obtain the click probability score of each news
Figure FDA0003464211120000011
And 4, step 4: randomly extracting K pieces of news which are not clicked by users from interaction records of multiple users as negative samples, extracting one piece of news which is clicked by one user as positive samples, combining all user data to form a training set, and calculating the click probability score p of the positive samples of the training setiAnd define pointsHit rate loss function L;
and 5: inputting the interaction records of a plurality of users into a batch of deep learning, and repeatedly executing the steps 1 to 4 to train a deep learning model;
step 6: inputting the historical browsing news and the candidate news of the user into the deep learning model trained in the step 5, and recommending the home page or recommending the candidate news individually.
2. The news recommendation method based on multi-dimensional features as claimed in claim 1, wherein the process of step 1 is as follows:
step 1.1: acquiring news, extracting entity information and relationship information from a text of a news title, and constructing a knowledge map; learning entity vectors and relationship vectors from the constructed knowledge graph spectrum, and calculating the average value of the context vector of each entity;
step 1.2: obtaining a word vector of each word in a news title, mapping the word vector and an average value of an entity vector and an entity context vector into a vector space with the same dimensionality, and inputting the word vector and the entity vector into a dynamic multi-convolution kernel (CNN) for feature extraction to obtain corresponding word features, entity features and entity context features;
step 1.3: respectively calculating the corresponding weight values of the word characteristics, the entity characteristics and the entity context characteristics obtained in the step 2, respectively multiplying the corresponding weight values by the corresponding word characteristics, the corresponding entity characteristics and the corresponding entity context characteristics, and then adding the word characteristics, the corresponding entity characteristics and the corresponding entity context characteristics to obtain the final title characteristics rt
Step 1.4: clustering analysis is carried out on the texts of the news headlines by using a k-means mean clustering algorithm, the centroids after clustering are obtained, and the k centroids correspond to k categories to obtain category characteristic representation r of the news headline text clusteringcq
Step 1.5: acquiring a matching image from news, converting the image to obtain an RGB image, converting the RGB image color space to an HSV color space, and calculating hue H, saturation S and brightness V in the HSV color space to obtain the color characteristics of the image;
step 1.6: calculating the geometric invariant moment of each image f (x, y), and describing the shape characteristics of the image by using the geometric invariant moment;
step 1.7: calculating a gray level co-occurrence matrix of each image f (x, y), and describing the texture characteristics of the images by using the gray level co-occurrence matrix;
step 1.8: respectively calculating the feature similarity of the color, shape and texture features of each news image, dynamically adjusting a threshold value according to the feature similarity calculation result, establishing a knowledge graph subgraph of the features of each news image, and linking all the knowledge graph subgraphs together to obtain a knowledge graph of the features of the news images;
step 1.9: representing the color, shape and texture features of the image as a head entity vector and a tail entity vector in a knowledge graph, representing the similarity between the features as a relation vector, and filtering the head entity vector, the tail entity vector and the relation vector by using a TransE0 model;
step 1.10: carrying out linear fusion on the color, shape and texture characteristics of the image to obtain a characteristic vector D of the image;
step 1.11: obtaining news category ID, obtaining initial characteristics corresponding to the category ID, inputting the initial characteristics into the Dense to obtain characteristic representation r of the news category IDca
Step 1.12: features r of news category IDcaCategory characteristics r of news headline text clusteringcqNews headline characteristic rtAnd fusing the image characteristics D together by using an attention mechanism to obtain final news characteristics ra
3. A news recommendation method based on multi-dimensional features according to claim 2, characterized in that the procedure of step 1.1 is as follows:
step 1.1.1: performing entity extraction on news titles based on a named entity identification technology, and combining extracted entities into a news entity set;
step 1.1.2: inputting news titles and corresponding entities into the PCNN for relationship extraction to form triples (h, r, t); h is a head entity, t is a tail entity, h and t are from a news entity set, r is a relation, and the relation is obtained after extraction by PCNN;
step 1.1.3: constructing a knowledge graph on the basis of the triples (h, r, t);
step 1.1.4: learning entity vectors and relationship vectors from the constructed knowledge graph by using a knowledge graph feature learning method;
step 1.1.5: extracting the context information of each entity, namely acquiring the neighborhood of each entity in the graph, and calculating the average value of the context vector of each entity.
4. A news recommendation method based on multi-dimensional features according to claim 2 or 3, characterized in that, in order to prevent the number of edges in the knowledge-graph from being small and lacking in diversity, the knowledge-graph is expanded, and entities and related edges within a threshold distance from the entities in the knowledge-graph are introduced to increase the number of edges.
5. A news recommendation method based on multi-dimensional features according to claim 2, characterized in that the procedure of step 1.2 is as follows:
step 1.2.1: news title [ w ]1,w2,…,wn]Each word w iniAnd its word vector
Figure FDA0003464211120000021
Entity vector eiEntity context vector mean
Figure FDA0003464211120000022
One-to-one correspondence, if the entity vector and the context vector are not matched, replacing the entity vector and the context vector by a zero vector;
step 1.2.2: mapping the word vector, the entity vector and the context vector into a d-dimensional vector space by using a mapping function, unifying the dimensions of the three vectors and obtaining a word vector sequence
Figure FDA0003464211120000023
Entity vector sequence [ e ]1,e2,…en]Sequence of entity context vectors
Figure FDA0003464211120000031
Step 1.2.3: respectively inputting the word vector sequence, the entity vector sequence and the entity context vector sequence into a dynamic multi-convolution kernel (CNN), and respectively using the characteristics obtained by a ReLU activation function
Figure FDA0003464211120000032
Figure FDA0003464211120000033
Represents;
step 1.2.4: attention weights are used on the features obtained in step 2.3 respectively,
obtaining:
Figure FDA0003464211120000034
Figure FDA0003464211120000035
wherein,
Figure FDA0003464211120000036
weight value, V, representing the ith word vectorwAnd vwIs the projection parameter at which the vector weight is calculated, qwIs the attention query vector when calculating the vector weights,
Figure FDA0003464211120000037
the word features obtained through the ReLU activation function; obtaining the weight value corresponding to the ith entity vector by the same method
Figure FDA0003464211120000038
Corresponding to the ith entity context vectorWeight value of
Figure FDA0003464211120000039
Step 1.2.5: respectively multiplying the word vector, the entity vector and the entity context vector by the respective corresponding weight values, and performing summation calculation to respectively obtain word characteristics rwEntity characteristic reAnd entity context characteristics
Figure FDA00034642111200000310
6. A news recommendation method based on multi-dimensional features according to claim 5, characterized in that the procedure of step 1.3 is as follows:
step 1.3.1: computing a weight alpha on a word featurewThe formula is as follows:
Figure FDA00034642111200000311
Figure FDA00034642111200000312
wherein, Uw、uwTo calculate projection parameters for feature weights, qwIs the attention query vector when calculating the feature weights; the weight alpha corresponding to the entity characteristics is calculated and obtained by the same methodeWeights corresponding to entity context characteristics
Figure FDA00034642111200000314
Step 1.3.2: the final title feature is calculated as follows:
Figure FDA00034642111200000313
wherein r istIs the final title feature.
7. The news recommendation method based on multi-dimensional features of claim 2, wherein the category feature representation r of the news headline text clustercqThe specific method comprises the following steps:
corresponding the k centroids to k categories, numbering by 0,1 and … k respectively, and initializing k category characteristics;
summing news title features, performing Euclidean distance calculation with each centroid vector, and comparing the initial class feature C corresponding to the closest centroidqInputting the data into a deep learning Dense neural network to obtain the category characteristic representation r of news headline text clusteringcq
8. A news recommendation method based on multi-dimensional features according to claim 2, characterized in that the gray level co-occurrence matrix in step 1.7 describes the texture features of the image, and is replaced by constructing feature vectors by using entropy, contrast and inverse variance to describe the texture features of the image.
9. A news recommendation method based on multi-dimensional features according to claim 2, characterized in that the similarity calculation method between features in step 1.9 is as follows:
A. calculating the similarity of the color features of the images by adopting Euclidean distance;
B. calculating the similarity of the shape characteristics of the images by adopting a correlation coefficient method;
C. and calculating the similarity of the texture features of the images by adopting cosine similarity.
10. The news recommendation method based on multi-dimensional features of claim 1, wherein the process of step 4 is as follows:
step 4.1: randomly extracting K pieces of news which are not clicked by the users from the interaction records of the users to serve as negative samples, and simultaneously calculating the news of each negative sample according to the method in the step 3The click probability score is obtained, and the click probability score of the negative sample set is recorded as
Figure FDA0003464211120000041
Step 4.2: extracting news clicked by a user as a positive sample, calculating the click probability score of the positive sample news according to the method in the step 3, and recording the score as the click probability score
Figure FDA0003464211120000042
Step 4.3: calculating click probability score p of training set positive sampleiThe formula is as follows:
Figure FDA0003464211120000043
wherein,
Figure FDA0003464211120000044
is the click probability score for the ith positive sample,
Figure FDA0003464211120000045
is the click probability score of the jth negative sample in the same candidate news sequence as the ith positive sample,
Figure FDA0003464211120000046
scoring the click probability of the positive sample;
step 4.4: defining a click-through rate loss function L, the formula is as follows:
Figure FDA0003464211120000047
where S is the set of forward training samples.
CN202210025279.3A 2022-01-11 2022-01-11 News recommendation method based on multi-dimensional features Pending CN114357307A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210025279.3A CN114357307A (en) 2022-01-11 2022-01-11 News recommendation method based on multi-dimensional features

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210025279.3A CN114357307A (en) 2022-01-11 2022-01-11 News recommendation method based on multi-dimensional features

Publications (1)

Publication Number Publication Date
CN114357307A true CN114357307A (en) 2022-04-15

Family

ID=81110181

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210025279.3A Pending CN114357307A (en) 2022-01-11 2022-01-11 News recommendation method based on multi-dimensional features

Country Status (1)

Country Link
CN (1) CN114357307A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116911958A (en) * 2023-09-12 2023-10-20 深圳须弥云图空间科技有限公司 Recommendation system model training method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116911958A (en) * 2023-09-12 2023-10-20 深圳须弥云图空间科技有限公司 Recommendation system model training method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
Yu et al. Spatial pyramid-enhanced NetVLAD with weighted triplet loss for place recognition
CN111177446B (en) Method for searching footprint image
CN108038122B (en) Trademark image retrieval method
Unnikrishnan et al. Toward objective evaluation of image segmentation algorithms
CN107092918B (en) Image retrieval method based on semantic features and supervised hashing
CN108665323B (en) Integration method for financial product recommendation system
CN106845358B (en) Method and system for recognizing image features of handwritten characters
CN109213853B (en) CCA algorithm-based Chinese community question-answer cross-modal retrieval method
CN111062277B (en) Sign language-lip language conversion method based on monocular vision
CN108388639B (en) Cross-media retrieval method based on subspace learning and semi-supervised regularization
CN109635140B (en) Image retrieval method based on deep learning and density peak clustering
CN111125540A (en) Recommendation method integrating knowledge graph representation learning and bias matrix decomposition
CN111538846A (en) Third-party library recommendation method based on mixed collaborative filtering
CN114461839A (en) Multi-mode pre-training-based similar picture retrieval method and device and electronic equipment
CN114299362A (en) Small sample image classification method based on k-means clustering
CN107527058B (en) Image retrieval method based on weighted local feature aggregation descriptor
CN110442736B (en) Semantic enhancer spatial cross-media retrieval method based on secondary discriminant analysis
CN115577080A (en) Question reply matching method, system, server and storage medium
CN110188864B (en) Small sample learning method based on distribution representation and distribution measurement
CN114357307A (en) News recommendation method based on multi-dimensional features
CN113553326A (en) Spreadsheet data processing method, device, computer equipment and storage medium
CN114140657A (en) Image retrieval method based on multi-feature fusion
Nanda et al. A person re-identification framework by inlier-set group modeling for video surveillance
CN117435982A (en) Method for rapidly identifying network water army through multiple dimensions
CN116935057A (en) Target evaluation method, electronic device, and computer-readable storage medium

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