CN112036980A - Article recommendation method and device, electronic equipment and storage medium - Google Patents

Article recommendation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112036980A
CN112036980A CN202010899901.4A CN202010899901A CN112036980A CN 112036980 A CN112036980 A CN 112036980A CN 202010899901 A CN202010899901 A CN 202010899901A CN 112036980 A CN112036980 A CN 112036980A
Authority
CN
China
Prior art keywords
attribute
emotion
words
user
articles
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
CN202010899901.4A
Other languages
Chinese (zh)
Inventor
陈倩倩
景艳山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Minglue Zhaohui Technology Co Ltd
Original Assignee
Beijing Minglue Zhaohui Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Minglue Zhaohui Technology Co Ltd filed Critical Beijing Minglue Zhaohui Technology Co Ltd
Priority to CN202010899901.4A priority Critical patent/CN112036980A/en
Publication of CN112036980A publication Critical patent/CN112036980A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0631Item recommendations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates

Abstract

The application provides an article recommendation method, an article recommendation device, an electronic device and a storage medium, wherein the article recommendation method comprises the following steps: acquiring target feedback texts of a user on a plurality of articles; the target feedback text comprises attribute words corresponding to each article and emotion words corresponding to the attribute words; determining the emotion score of a user under each article for the attribute words corresponding to the emotion words according to each emotion word corresponding to each article; selecting a candidate article corresponding to a target user from a plurality of articles according to the attribute words corresponding to each article and the emotion scores of the users under the articles aiming at the attribute words; the users comprise target users and other users; and sorting the candidate articles based on the attribute words corresponding to each candidate article and the emotion scores of the users under the candidate articles aiming at the attribute words, selecting the articles to be recommended from the candidate articles based on the sorting result, and recommending the articles to be recommended to the target users. The application improves the conversion rate of the articles.

Description

Article recommendation method and device, electronic equipment and storage medium
Technical Field
The application relates to the technical field of computer information, in particular to an article recommendation method and device, an electronic device and a storage medium.
Background
At present, big data technology has been involved in aspects of people's life, such as recommending articles that users may like according to their historical purchase records.
The item recommendation method is generally based on items purchased by a user, and items on sale matched with the types of the items purchased by the user are recommended to the user.
However, by adopting the recommendation method, the recommended on-sale articles are single and cannot be accurately matched with the purchase demand of the user, so that the article conversion rate is low.
Disclosure of Invention
In view of this, an object of the embodiments of the present application is to provide an article recommendation method, an apparatus, an electronic device, and a storage medium, which are capable of recommending an article with each attribute matched with a corresponding emotion score to a user by determining the emotion score of the user for each attribute of the article, so as to improve the pertinence of article recommendation and further improve the conversion rate of the article.
In a first aspect, an embodiment of the present application provides an item recommendation method, where the item recommendation method includes:
acquiring target feedback texts of a user on a plurality of articles; the target feedback text comprises attribute words corresponding to each article and emotion words corresponding to the attribute words;
determining the emotion score of the user for the attribute words corresponding to the emotion words under each article according to each emotion word corresponding to each article;
selecting candidate articles corresponding to target users from the articles according to the attribute words corresponding to the articles and the emotion scores of the users aiming at the attribute words under the articles; the users comprise target users and other users;
and sorting the candidate articles based on the attribute words corresponding to each candidate article and the emotion scores of the users aiming at the attribute words under the candidate articles, selecting the articles to be recommended from the candidate articles based on the sorting result, and recommending the articles to be recommended to the target user.
In one possible implementation manner, the attribute words included in the target feedback text are obtained by:
selecting candidate participles from a plurality of participles included in the target feedback text according to the frequency of each participle in the target feedback text appearing in the target feedback text and the frequency of each participle in the target feedback text appearing in the target feedback text except the target feedback text;
and if the candidate participles included in the target feedback text are preset standard attribute words, determining the candidate participles as the attribute words of the target feedback text.
In one possible implementation, the target feedback text is obtained by:
inputting a plurality of word segments included in a candidate feedback text into a pre-trained classification model, and acquiring a classification result of the candidate feedback text output by the classification model;
and if the classification result of the candidate feedback text is a preset target result, determining the candidate feedback text as the target feedback text.
In a possible implementation manner, the determining, according to each emotion word corresponding to each item, an emotion score of the user for an attribute word corresponding to the emotion word under the item includes:
determining the emotion type of the attribute word under each article and the grade of the emotion type of the user aiming at the article according to the emotion word corresponding to each attribute word under each article;
and determining the emotion score of the user for each attribute word according to the emotion type of each attribute word and the grade of the emotion type.
In one possible embodiment, the item recommendation method further includes:
and aiming at each target feedback text, if the emotion scores corresponding to the two attribute words connected by the associated word in the target feedback text respectively do not meet the score rule corresponding to the associated word, adjusting the emotion score corresponding to the next attribute word so that the emotion scores corresponding to the two attribute words respectively meet the score rule.
In a possible implementation manner, the attribute words included in the target feedback text are used as first attribute words, and the basic attribute words except the first attribute words in the preset basic attribute words are used as second attribute words; selecting a candidate item corresponding to a target user from the plurality of items according to the attribute word corresponding to each item and the emotion score of the user for the attribute word under the item, including:
and according to the plurality of basic attribute words corresponding to the articles, selecting candidate articles corresponding to the target user from the plurality of articles by the user according to the emotion score of each first attribute word and the default score corresponding to the second attribute word.
In a possible implementation manner, the attribute words included in the target feedback text are used as first attribute words, and the basic attribute words except the first attribute words in the preset basic attribute words are used as second attribute words; the selecting a candidate item corresponding to a target user from the plurality of items according to the attribute word corresponding to each item and the emotion score of the user for the attribute word under the item, further comprising:
determining the emotion score of each user for the second attribute word according to the emotion score of each user for the first attribute word and the emotion score of an associated user associated with the user for the second attribute word;
and selecting a candidate item corresponding to a target user from the plurality of items according to the plurality of basic attribute words corresponding to each item, the emotion scores of the users under the item for the first attribute words and the emotion scores of the users under the item for the second attribute words.
In a second aspect, an embodiment of the present application provides an item recommendation device, including:
the first acquisition module is used for acquiring target feedback texts of a user on a plurality of articles; the target feedback text comprises attribute words corresponding to each article and emotion words corresponding to the attribute words;
the first determining module is used for determining the emotion score of the user for the attribute words corresponding to the emotion words under each article according to the emotion words corresponding to the articles;
the first selection module is used for selecting candidate articles corresponding to target users from the articles according to attribute words corresponding to the articles and emotion scores of the users aiming at the attribute words under the articles; the users comprise target users and other users;
the sorting module is used for sorting the candidate items based on the attribute words corresponding to each candidate item and the emotion scores of the candidate items for the attribute words of the user;
and the second selection module is used for selecting an article to be recommended from the candidate articles based on the sorting result and recommending the article to be recommended to the target user.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, the processor and the memory communicate with each other through the bus when the electronic device runs, and the processor executes the machine-readable instructions to execute the steps of the item recommendation method according to any one of the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the item recommendation method according to any one of the first aspect.
The method, the device, the electronic equipment and the storage medium for recommending the articles, provided by the embodiment of the application, are used for acquiring target feedback texts of a user on a plurality of articles; the target feedback text comprises attribute words corresponding to each article and emotion words corresponding to the attribute words; determining the emotion score of the user for the attribute words corresponding to the emotion words under each article according to each emotion word corresponding to each article; selecting candidate articles corresponding to target users from the articles according to the attribute words corresponding to the articles and the emotion scores of the users aiming at the attribute words under the articles; the users comprise target users and other users; and sorting the candidate articles based on the attribute words corresponding to each candidate article and the emotion scores of the users aiming at the attribute words under the candidate articles, selecting the articles to be recommended from the candidate articles based on the sorting result, and recommending the articles to be recommended to the target user. The method and the device can recommend the articles with the attributes matched with the corresponding emotion scores to the user by determining the emotion scores of the user for each attribute of the articles, so that the pertinence of article recommendation is improved, and further the conversion rate of the articles is improved.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a flowchart illustrating an item recommendation method according to an embodiment of the present application;
FIG. 2 is a flow chart illustrating another method for recommending items according to an embodiment of the present application;
FIG. 3 is a flow chart illustrating another method for recommending items according to an embodiment of the present application;
FIG. 4 is a flow chart illustrating another method for recommending items according to an embodiment of the present application;
FIG. 5 is a flow chart illustrating another method for recommending items according to an embodiment of the present application;
FIG. 6 is a schematic structural diagram illustrating an article recommendation device according to an embodiment of the present application;
fig. 7 shows a schematic diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
At present, big data technology has been involved in aspects of people's life, such as recommending articles that users may like according to their historical purchase records. The item recommendation method is generally based on items purchased by a user, and items on sale matched with the types of the items purchased by the user are recommended to the user. However, by adopting the recommendation method, the recommended on-sale articles are single and cannot be accurately matched with the purchase demand of the user, so that the article conversion rate is low.
Based on the above problems, embodiments of the present application provide an article recommendation method, an apparatus, an electronic device, and a storage medium, to obtain target feedback texts of a user on a plurality of articles; the target feedback text comprises attribute words corresponding to each article and emotion words corresponding to the attribute words; determining the emotion score of the user for the attribute words corresponding to the emotion words under each article according to each emotion word corresponding to each article; selecting candidate articles corresponding to target users from the articles according to the attribute words corresponding to the articles and the emotion scores of the users aiming at the attribute words under the articles; the users comprise target users and other users; and sorting the candidate articles based on the attribute words corresponding to each candidate article and the emotion scores of the users aiming at the attribute words under the candidate articles, selecting the articles to be recommended from the candidate articles based on the sorting result, and recommending the articles to be recommended to the target user. The method and the device can recommend the articles with the attributes matched with the corresponding emotion scores to the user by determining the emotion scores of the user for each attribute of the articles, so that the pertinence of article recommendation is improved, and further the conversion rate of the articles is improved.
The above-mentioned drawbacks are the results of the inventor after practical and careful study, and therefore, the discovery process of the above-mentioned problems and the solution proposed by the present application to the above-mentioned problems in the following should be the contribution of the inventor to the present application in the process of the present application.
The technical solutions in the present application will be described clearly and completely with reference to the drawings in the present application, and it should be understood that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the present application, as generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
For the convenience of understanding the present embodiment, a detailed description will be given to an article recommendation method disclosed in the embodiments of the present application.
Referring to fig. 1, fig. 1 is a flowchart of an item recommendation method provided in an embodiment of the present application, where the item recommendation method includes the following steps:
s101, acquiring target feedback texts of a user on a plurality of articles; the target feedback text comprises attribute words corresponding to each article and emotion words corresponding to the attribute words.
In the embodiment of the application, the target feedback text is a comment text of a user on an article, for example, the target feedback text 1 of the user 1 on the article 1 is "very good for hardware of the article 1, but not good for a screen", and target feedback texts of a plurality of users on a plurality of different articles are obtained, wherein each target feedback text includes an attribute word corresponding to the article and an emotion word associated with each attribute word, where the attribute word is a participle in the target feedback text representing different attributes of the article, and the emotion word is a participle in the target feedback text representing an emotional tendency of the user on each attribute word of the article, for example, the attribute word of the article 1 in the target feedback text 1 includes "hardware" and "screen", and accordingly, "very" and "good" are emotion words corresponding to "hardware", and "not" and "good" are emotion words corresponding to "screen", the emotion word corresponding to each attribute word may be one word segmentation or a plurality of word segmentations.
S102, according to each emotion word corresponding to each article, determining the emotion score of the user for the attribute word corresponding to the emotion word under the article.
In the embodiment of the application, the corresponding relation between each emotion word and the emotion score is prestored, and after the emotion word given by the user to each attribute word of the article is determined, the emotion score corresponding to each emotion word is determined based on the corresponding relation, namely the emotion score given by the user for each attribute word of the article.
For example, the emotion words corresponding to the attribute word "hardware" in the target feedback text 1 include "very" and "good", where the emotion score corresponding to the emotion word "very" is "0.9", the emotion score corresponding to the emotion word "good" is "+ 1", and the emotion score corresponding to the attribute word "hardware" is 0.9 × (+1) ═ 0.9, respectively.
S103, selecting candidate articles corresponding to target users from the articles according to the attribute words corresponding to the articles and the emotion scores of the users aiming at the attribute words under the articles; the users comprise target users and other users.
In this embodiment of the application, the multiple users include a target user and other users, the target user is a user of an item to be recommended, the other users are users other than the target user among the multiple users, and specifically, according to an attribute word corresponding to each item, an emotion score given by the target user to each attribute word of each item, and an emotion score given by the other users to each attribute word of each item, candidate items that may be interested by the target user are recalled from the multiple items.
S104, sorting the candidate articles based on the attribute words corresponding to each candidate article and the emotion scores of the users aiming at the attribute words under the candidate articles, selecting articles to be recommended from the candidate articles based on a sorting result, and recommending the articles to be recommended to the target users.
In the embodiment of the application, if the emotion score of the attribute word of the candidate item by the user is 0, the emotion score of the attribute word is filled by using an objective function, the emotion score of the attribute word is 0, which indicates that the user does not feedback the emotion tendency of the attribute word, but does not represent that the user does not have the emotion tendency of the attribute word, the emotion score of the attribute word by the user is mined by using the objective function, after updating the emotion score, a plurality of candidate items are ranked according to the updated emotion score of each attribute word of the candidate item by the user based on a Bayesian Personalized Ranking (BPR) algorithm, and the candidate item of which the Ranking result meets the preset condition is determined as the item to be recommended according to the Ranking result corresponding to each candidate item, and the item to be recommended is recommended to the corresponding target user, for example, the candidate item ranked in the top three places is recommended to the target user, the BPR algorithm considers the substitution relation between the articles, combines the substitution constraint and the personalized constraint, and determines the articles to be recommended.
According to the article recommendation method provided by the embodiment of the application, the article with each attribute matched with the corresponding emotion score can be recommended to the user by determining the emotion score of the user for each attribute of the article, the article recommendation pertinence is improved, and the article conversion rate is further improved.
Further, referring to fig. 2, in the embodiment of the present application, the attribute words included in the target feedback text are obtained as follows:
s201, aiming at each target feedback text, selecting candidate participles from a plurality of participles included in the target feedback text according to the frequency of each participle in the target feedback text appearing in the target feedback text and the frequency of each participle in the target feedback text appearing in the target feedback texts except the target feedback text.
In the embodiment of the present application, a plurality of target feedback texts correspond to each target, the plurality of target feedback texts are used as a text base, for each participle in each target feedback text, a feature value corresponding to the participle is calculated according to the number of times that the participle appears in the target feedback text and the number of times that the participle appears in the text base, if the calculated feature value is greater than a first preset threshold, the participle is determined as a candidate participle, and in practice, a TF-IDF (Term Frequency-Inverse Document Frequency) method is usually used to determine the feature value corresponding to each participle, where TF-IDF is a commonly used weighting technique for information retrieval and data mining, TF is a Term Frequency (Term Frequency), and IDF is an Inverse text Frequency index (Inverse text Frequency), and specifically, the feature value corresponding to each participle is calculated by the following formula:
TF-IDF=TF×IDF=(a/N1)×log[N2/(N3+0.1)]。
wherein, a is the frequency of the word segmentation in the target feedback text, N1Feeding back the total number of times of the text for the target where the word is located, N2Feeding back the total number of texts for the target in the text library, N3And determining the participles with TF-IDF larger than a first preset threshold value as candidate participles for the number of the target feedback texts containing the participles in the text base except the target feedback text where the participles are located.
S202, if the candidate participles included in the target feedback text are preset standard attribute words, determining the candidate participles as the attribute words of the target feedback text.
In the embodiment of the application, a plurality of standard attribute words are preset, and if a candidate participle in a target feedback text is any one of the preset standard attribute words, the candidate participle is determined as an attribute word of the target feedback text, and each target feedback text may include a plurality of attribute words.
Further, referring to fig. 3, the target feedback text is obtained as follows:
s301, inputting a plurality of word segments included in the candidate feedback text into a pre-trained classification model, and obtaining a classification result of the candidate feedback text output by the classification model.
In the embodiment of the application, the candidate feedback text is any text generated by a user when the user discusses an article, and the candidate feedback text comprises a chatting text and a comment text. Performing word segmentation on candidate feedback texts to obtain a plurality of segmented words included in each candidate feedback text, presetting a plurality of stop words and sensitive words, screening the plurality of segmented words included in each candidate feedback text, removing the stop words and the sensitive words to obtain a plurality of target segmented words included in each candidate feedback text, obtaining a word vector corresponding to each target segmented word based on a relevant dictionary in the natural language processing field, inputting the word vectors of the plurality of target segmented words included in each candidate feedback text into a pre-trained classification model, and obtaining a classification result of the candidate feedback text output by the classification model, wherein the classification result comprises a chatty text and a comment text.
As an optional implementation manner, the classification model is a BERT model, binary classification processing is performed on the candidate feedback text by using the BERT model, and a classification result output by the BERT model includes "0" and "1", where if the classification result of the candidate feedback text is "0", the candidate feedback text is a text irrelevant to the article, that is, a chatting text; if the classification result of the candidate feedback text is "1", the candidate feedback text is a text related to the article, that is, a comment text. Specifically, according to word vectors of a plurality of target word segments included in the candidate feedback text, a text matrix corresponding to the candidate feedback text is generated, an article matrix is preset, the similarity between the text matrix corresponding to the input candidate feedback text and the article matrix is calculated, if the similarity is greater than a second preset threshold, the BERT model outputs a classification result "1", and if the similarity is less than or equal to the second preset threshold, the BERT model outputs a classification result "0".
S302, if the classification result of the candidate feedback texts is a preset target result, determining the candidate feedback texts as the target feedback texts.
In the embodiment of the application, the target feedback texts are comment texts of a user on a certain article, namely the target results are comment texts, and if the classification result of the candidate feedback texts is the comment texts, the candidate feedback texts are determined as the target feedback texts.
As an alternative implementation, the word vectors of the target word segmentations included in the candidate feedback text are input into the pre-trained BERT model, and if the output of the BERT model is classified as "1", the candidate feedback text is determined as the target feedback text.
Further, referring to fig. 4, determining, according to each emotion word corresponding to each article, an emotion score of the user for the attribute word corresponding to the emotion word under the article includes:
s401, determining the emotion type of the attribute word under each article and the grade of the emotion type of the user according to the emotion word corresponding to each attribute word under each article.
In the embodiment of the application, the emotion words comprise emotion words, negative words and degree words, the emotion type of the attribute word under each article of a user is determined according to the emotion words and the negative words corresponding to each attribute word of each article, the emotion type of the attribute word under each article of the user is further determined according to the degree words corresponding to each attribute word of each article, the emotion types comprise positive types and negative types, and the emotion type grades can be set according to the actual requirements of the user, for example, the emotion types correspond to three grades, namely high, medium and low.
In practice, based on the emotion dictionary open source in the natural language processing field, the emotion type corresponding to the emotion word and the level of the emotion type, such as a hownet dictionary, are determined. Determining the emotion type of each emotion word in the target feedback text according to the corresponding relation between the emotion words and the emotion types, determining the level of the emotion type of each degree word in the target feedback text according to the corresponding relation between the degree words and the levels of the emotion types, and if the attribute words in the target feedback text correspond to the negative words and the emotion words at the same time, negating the emotion types of the emotion words, such as the emotion type of "like" being "positive type", the emotion type of "not" and the emotion type of "like" being "negative type".
For example, the target feedback text 1 is "hardware of the article 1 does very well but screen is not good," wherein the target feedback text 1 includes two attribute words "hardware" and "screen," emotional words corresponding to the hardware "include" very "and" good, "good" is an emotional word, the emotion type of "good" is "positive class," the emotion type of "very" is a degree word based on the emotional dictionary, "very" is "high" level, "emotional words corresponding to the screen" include "not" and "good," good "is an emotional word," not "is a negative word, and the emotion type corresponding to both" not "and" good "is" negative class "based on the emotional dictionary.
S402, determining the emotion score of the user for each attribute word according to the emotion type of each attribute word and the grade of the emotion type.
In the embodiment of the application, different emotion types correspond to different first scores, different emotion type grades correspond to different second scores, and the product of the first score and the second score corresponding to each attribute word is determined as the emotion score of the user for the attribute word.
As an optional implementation manner, the first score corresponding to the "positive class" in the emotion types is "+ 1", the first score corresponding to the "negative class" is "-1", the second score corresponding to the "high" level of the emotion types is "+ 0.9", the second score corresponding to the "middle" level of the emotion types is "+ 0.5", the second score corresponding to the "low" level of the emotion types is "+ 0.2", the emotion word corresponding to the attribute word "hardware" includes the degree word "extraordinary" and the emotion word "excellent", the emotion type of the "excellent" is the "positive class" and the "extraordinary" is the "high" level based on the emotion dictionary, and the emotion score of the user for the attribute word "hardware" is 0.9.
Furthermore, the target feedback text generally uses associated words to connect a plurality of attribute words, and in order to ensure the consistency of the overall expression emotion of the target feedback text, the emotion scores corresponding to the attribute words can be adjusted, wherein the adjustment mode of the emotion scores comprises:
and aiming at each target feedback text, if the emotion scores corresponding to the two attribute words connected by the associated word in the target feedback text respectively do not meet the score rule corresponding to the associated word, adjusting the emotion score corresponding to the next attribute word so that the emotion scores corresponding to the two attribute words respectively meet the score rule.
In the embodiment of the application, different associated words correspond to different score rules, the associated words include parallel associated words and turning associated words, and the score rules corresponding to the parallel associated words are as follows: the emotion scores corresponding to the two attribute words connected with the parallel associated words are the same in positive and negative; the score rule corresponding to the turning relevant words is as follows: the emotion scores corresponding to the two attribute words connected by the turning associated word are opposite in positive and negative. Specifically, for each target feedback text, if the target feedback text comprises parallel associated words and emotion scores corresponding to two attribute words connected by the parallel associated words are opposite in positive and negative, the positive and negative of the emotion score corresponding to the attribute word behind the parallel associated word are changed; and if the target feedback text comprises the turning relevant words and the emotion scores corresponding to the two attribute words connected by the turning relevant words are the same in positive and negative, changing the positive and negative of the emotion scores corresponding to the attribute words behind the turning relevant words.
In practice, sentiment score corresponding to each attribute word in the target feedback text is determined by using a sentiment word segmentation tool Sentires in the natural language processing field, the Sentires tool considers the influence of the associated word on the sentiment score, and for each target feedback text, the corresponding output mode is (u, v, a, s), wherein u is a user corresponding to each target feedback text, v is an article related to each target feedback text, a is the attribute word included in each target feedback text, and s is the sentiment score corresponding to the attribute word included in each target feedback text.
Further, if the user feeds back the information of the article through the target feedback text, all attribute words of the article are not involved, or the emotional tendency of all attribute words is not fed back, at this time, the attribute words not involved need to be supplemented, and the emotional scores of the attribute words not involved need to be supplemented, and the embodiment of the present application provides two supplementary ways:
firstly, taking the attribute words included in the target feedback text as first attribute words, and taking basic attribute words except the first attribute words in preset basic attribute words as second attribute words; selecting a candidate item corresponding to a target user from the plurality of items according to the attribute word corresponding to each item and the emotion score of the user for the attribute word under the item, including: and according to the plurality of basic attribute words corresponding to the articles, selecting candidate articles corresponding to the target user from the plurality of articles by the user according to the emotion score of each first attribute word and the default score corresponding to the second attribute word.
In the embodiment of the application, a plurality of basic attribute words are preset, the plurality of basic attribute words are all attribute words of an article, a first attribute word, possibly all basic attribute words or part of basic attribute words, of the article extracted from a target feedback text, and when the first attribute word of the article extracted from the target feedback text is part of the basic attribute words, the basic attribute words except the first attribute word in the plurality of basic attribute words are used as second attribute words, so that the second attribute words of the article and emotion scores of users aiming at the second attribute words are supplemented, and each article is enabled to have all basic attribute words and an emotion score corresponding to each basic attribute word.
Determining the emotion score of the user for the second attribute word of the article as a default score, for example, defaulting the emotion score of the user for the second attribute word of the article to 0, and then using an A2CF model to cooperatively filter the article based on the attribute of the article, specifically, constructing a first matrix according to the emotion score of each user for the first attribute word and the default score corresponding to the second attribute word, wherein each column of elements in the first matrix is the emotion score of each basic attribute word for different users, and each row of elements is the emotion score corresponding to the same user for different basic attribute words; and constructing a second matrix according to the attribute words extracted from the target feedback text, wherein elements in each column in the second matrix are numerical values obtained after each basic attribute word is coded, and elements in each row are numerical values obtained after different basic attribute words corresponding to the same article are coded.
For example, the basic attribute words include basic attribute word 1, basic attribute word 2, basic attribute word 3, and basic attribute word 4, the users include user 1, user 2, and user 3, the emotion scores of user 1, user 2, and user 3 for the above four basic attribute words are (+0.9, -0.5, 0), (+0.2, +0.5, 0, -0.2), (0, -0.9, -0.5, +0.5), (+0.5, +0, -0.9), respectively, then the first row element of the first matrix is +0.9, -0.5, 0, the second row element is +0.2, +0.5, 0, -0.2, the third row element is 0, -0.9, -0.5, +0.5, the fourth row element is +0.5, 0, -0.9, and the four row elements of the basic attribute words are encoded after basic attribute word 1, basic attribute word 2, basic attribute word 3, basic attribute word 4, the resulting digitized representation is 1, 2, 3, 4, the first row elements of the second matrix are 1, 2, 3, 0, the second row elements are 1, 2, 0, 4, the third row elements are 0, 2, 3, 4, and the fourth row elements are 1, 2, 0, 4.
Inputting the constructed first matrix and the second matrix into an A2CF model, obtaining a plurality of candidate items output by the A2CF model, specifically, determining a first loss value corresponding to the first matrix and a second loss value corresponding to the second matrix according to a loss function corresponding to the A2CF model, optimizing the first loss value and the second loss value, screening out corresponding candidate items from the plurality of items by the A2CF model, and outputting the screened candidate items.
The collaborative filtering method based on matrix decomposition is invisible and unexplainable, and in the application, an A2CF model is used for conducting collaborative filtering on the articles based on the attributes of the articles, extracting the attributes of the articles and conducting emotion analysis on the emotion tendency of each attribute of the articles of a user, so that the explicable article recommendation is achieved.
Secondly, referring to fig. 5, the attribute words included in the target feedback text are used as first attribute words, and the basic attribute words except the first attribute words in the preset basic attribute words are used as second attribute words; the selecting a candidate item corresponding to a target user from the plurality of items according to the attribute word corresponding to each item and the emotion score of the user for the attribute word under the item, further comprising:
s501, according to the emotion score of each user for the first attribute word and the emotion score of the associated user associated with the user for the second attribute word, the emotion score of the user for the second attribute word is determined.
In the embodiment of the application, an emotion score corresponding to a second attribute word is determined by using a slope one algorithm, a plurality of users are used as a user set, and for each user, the emotion score of the user for each second attribute word is determined according to the emotion score of the user for a first attribute word of an article, namely the emotion score of the user for the fed-back attribute word, and the emotion scores of other users (namely associated users of the user) except the user in the user set for the second attribute word, namely the emotion scores of the other users for the attribute words which are not fed back by the user.
S502, selecting candidate items corresponding to target users from the plurality of items according to the plurality of basic attribute words corresponding to each item, the emotion scores of the users aiming at the first attribute words under the item and the emotion scores of the users aiming at the second attribute words under the item.
In the embodiment of the application, a first matrix is constructed according to the emotion scores of each user for a first attribute word and a second attribute word, wherein each row of elements in the first matrix is the emotion score of each basic attribute word for different users, and each row of elements is the emotion score corresponding to the same user for different basic attribute words; and constructing a second matrix according to the plurality of corresponding basic attribute words in the target feedback text, wherein the elements in each column in the second matrix are the numerical values of each basic attribute word after being coded, and the elements in each row are the numerical values of different basic attribute words corresponding to the same article after being coded. And inputting the constructed first matrix and the second matrix into the A2CF model, and obtaining a plurality of candidate items output by the A2CF model.
Based on the same inventive concept, an article recommendation device corresponding to the article recommendation method is further provided in the embodiments of the present application, and as the principle of solving the problem of the device in the embodiments of the present application is similar to that of the article recommendation method in the embodiments of the present application, the implementation of the device may refer to the implementation of the method, and repeated details are not repeated.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an article recommendation device according to an embodiment of the present application, where the article recommendation device includes:
a first obtaining module 601, configured to obtain target feedback texts of a user on a plurality of articles; the target feedback text comprises attribute words corresponding to each article and emotion words corresponding to the attribute words;
a first determining module 602, configured to determine, according to each emotion word corresponding to each article, an emotion score of the user for an attribute word corresponding to the emotion word under the article;
a first selecting module 603, configured to select, according to an attribute word corresponding to each article and an emotion score of the user for the attribute word under the article, a candidate article corresponding to a target user from the multiple articles; the users comprise target users and other users;
a sorting module 604, configured to sort the candidate items based on the attribute words corresponding to each candidate item and the emotion scores of the candidate items for the attribute words of the user;
a second selecting module 605, configured to select an item to be recommended from the candidate items based on the sorting result, and recommend the item to be recommended to the target user.
In a possible embodiment, the item recommendation device further includes:
a third selecting module, configured to select, for each target feedback text, a candidate participle from multiple participles included in the target feedback text according to the number of times that each participle in the target feedback text appears in the target feedback text and the number of times that each participle in the target feedback text appears in target feedback texts other than the target feedback text;
and the second determining module is used for determining the candidate participle as the attribute word of the target feedback text if the candidate participle included in the target feedback text is a preset standard attribute word.
In a possible embodiment, the item recommendation device further includes:
the second obtaining module is used for inputting a plurality of word segments included in the candidate feedback text into a classification model trained in advance, and obtaining a classification result of the candidate feedback text output by the classification model;
and the third determining module is used for determining the candidate feedback text as the target feedback text if the classification result of the candidate feedback text is a preset target result.
In a possible implementation manner, the first determining module 602, when determining, according to each emotion word corresponding to each item, an emotion score of the user for an attribute word corresponding to the emotion word under the item, includes:
determining the emotion type of the attribute word under each article and the grade of the emotion type of the user aiming at the article according to the emotion word corresponding to each attribute word under each article;
and determining the emotion score of the user for each attribute word according to the emotion type of each attribute word and the grade of the emotion type.
In a possible embodiment, the item recommendation device further includes:
and the adjusting module is used for adjusting the emotion score corresponding to the next attribute word so that the emotion scores corresponding to the two attribute words respectively meet the score rule if the emotion scores corresponding to the two attribute words connected by the associated word in the target feedback text respectively do not meet the score rule corresponding to the associated word.
In a possible implementation manner, the attribute words included in the target feedback text are used as first attribute words, and the basic attribute words except the first attribute words in the preset basic attribute words are used as second attribute words; the first selecting module 603, when selecting a candidate item corresponding to a target user from the plurality of items according to the attribute word corresponding to each item and the emotion score of the user for the attribute word under the item, includes:
and according to the plurality of basic attribute words corresponding to the articles, selecting candidate articles corresponding to the target user from the plurality of articles by the user according to the emotion score of each first attribute word and the default score corresponding to the second attribute word.
In a possible implementation manner, the attribute words included in the target feedback text are used as first attribute words, and the basic attribute words except the first attribute words in the preset basic attribute words are used as second attribute words; the first selecting module 603, when selecting a candidate item corresponding to a target user from the multiple items according to the attribute word corresponding to each item and the emotion score of the user for the attribute word under the item, further includes:
determining the emotion score of each user for the second attribute word according to the emotion score of each user for the first attribute word and the emotion score of an associated user associated with the user for the second attribute word;
and selecting a candidate item corresponding to a target user from the plurality of items according to the plurality of basic attribute words corresponding to each item, the emotion scores of the users under the item for the first attribute words and the emotion scores of the users under the item for the second attribute words.
The article recommending device provided by the embodiment of the application can recommend the articles with the attributes matched with the corresponding emotion scores to the user by determining the emotion scores of the user for each attribute of the articles, so that the pertinence of article recommendation is improved, and further the conversion rate of the articles is improved.
Referring to fig. 7, fig. 7 is an electronic device 700 provided in an embodiment of the present application, where the electronic device 700 includes: a processor 701, a memory 702 and a bus, wherein the memory 702 stores machine-readable instructions executable by the processor 701, when the electronic device runs, the processor 701 communicates with the memory 702 through the bus, and the processor 701 executes the machine-readable instructions to execute the steps of the item recommendation method.
Specifically, the memory 702 and the processor 701 can be general-purpose memory and processor, which are not limited in particular, and the processor 701 can execute the item recommendation method when executing the computer program stored in the memory 702.
Corresponding to the item recommendation method, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and the computer program is executed by a processor to perform the steps of the item recommendation method.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and there may be other divisions in actual implementation, and for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or modules through some communication interfaces, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the exemplary embodiments of the present application, and are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. An item recommendation method, characterized in that the item recommendation method comprises:
acquiring target feedback texts of a user on a plurality of articles; the target feedback text comprises attribute words corresponding to each article and emotion words corresponding to the attribute words;
determining the emotion score of the user for the attribute words corresponding to the emotion words under each article according to each emotion word corresponding to each article;
selecting candidate articles corresponding to target users from the articles according to the attribute words corresponding to the articles and the emotion scores of the users aiming at the attribute words under the articles; the users comprise target users and other users;
and sorting the candidate articles based on the attribute words corresponding to each candidate article and the emotion scores of the users aiming at the attribute words under the candidate articles, selecting the articles to be recommended from the candidate articles based on the sorting result, and recommending the articles to be recommended to the target user.
2. The item recommendation method according to claim 1, wherein the attribute words included in the target feedback text are obtained by:
selecting candidate participles from a plurality of participles included in the target feedback text according to the frequency of each participle in the target feedback text appearing in the target feedback text and the frequency of each participle in the target feedback text appearing in the target feedback text except the target feedback text;
and if the candidate participles included in the target feedback text are preset standard attribute words, determining the candidate participles as the attribute words of the target feedback text.
3. The item recommendation method according to claim 1, wherein the target feedback text is obtained by:
inputting a plurality of word segments included in a candidate feedback text into a pre-trained classification model, and acquiring a classification result of the candidate feedback text output by the classification model;
and if the classification result of the candidate feedback text is a preset target result, determining the candidate feedback text as the target feedback text.
4. The item recommendation method according to claim 1, wherein determining, according to each emotion word corresponding to each item, an emotion score of the user for an attribute word corresponding to the emotion word under the item comprises:
determining the emotion type of the attribute word under each article and the grade of the emotion type of the user aiming at the article according to the emotion word corresponding to each attribute word under each article;
and determining the emotion score of the user for each attribute word according to the emotion type of each attribute word and the grade of the emotion type.
5. The item recommendation method according to claim 4, further comprising:
and aiming at each target feedback text, if the emotion scores corresponding to the two attribute words connected by the associated word in the target feedback text respectively do not meet the score rule corresponding to the associated word, adjusting the emotion score corresponding to the next attribute word so that the emotion scores corresponding to the two attribute words respectively meet the score rule.
6. The item recommendation method according to claim 1, wherein the attribute words included in the target feedback text are used as first attribute words, and the basic attribute words except the first attribute words in the preset basic attribute words are used as second attribute words; selecting a candidate item corresponding to a target user from the plurality of items according to the attribute word corresponding to each item and the emotion score of the user for the attribute word under the item, including:
and according to the plurality of basic attribute words corresponding to the articles, selecting candidate articles corresponding to the target user from the plurality of articles by the user according to the emotion score of each first attribute word and the default score corresponding to the second attribute word.
7. The item recommendation method according to claim 1, wherein the attribute words included in the target feedback text are used as first attribute words, and the basic attribute words except the first attribute words in the preset basic attribute words are used as second attribute words; the selecting a candidate item corresponding to a target user from the plurality of items according to the attribute word corresponding to each item and the emotion score of the user for the attribute word under the item, further comprising:
determining the emotion score of each user for the second attribute word according to the emotion score of each user for the first attribute word and the emotion score of an associated user associated with the user for the second attribute word;
and selecting a candidate item corresponding to a target user from the plurality of items according to the plurality of basic attribute words corresponding to each item, the emotion scores of the users under the item for the first attribute words and the emotion scores of the users under the item for the second attribute words.
8. An item recommendation device, characterized in that the item recommendation device comprises:
the first acquisition module is used for acquiring target feedback texts of a user on a plurality of articles; the target feedback text comprises attribute words corresponding to each article and emotion words corresponding to the attribute words;
the first determining module is used for determining the emotion score of the user for the attribute words corresponding to the emotion words under each article according to the emotion words corresponding to the articles;
the first selection module is used for selecting candidate articles corresponding to target users from the articles according to attribute words corresponding to the articles and emotion scores of the users aiming at the attribute words under the articles; the users comprise target users and other users;
the sorting module is used for sorting the candidate items based on the attribute words corresponding to each candidate item and the emotion scores of the candidate items for the attribute words of the user;
and the second selection module is used for selecting an article to be recommended from the candidate articles based on the sorting result and recommending the article to be recommended to the target user.
9. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the electronic device is operating, the processor executing the machine-readable instructions to perform the steps of the item recommendation method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, performs the steps of the item recommendation method according to any one of claims 1 to 7.
CN202010899901.4A 2020-08-31 2020-08-31 Article recommendation method and device, electronic equipment and storage medium Pending CN112036980A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010899901.4A CN112036980A (en) 2020-08-31 2020-08-31 Article recommendation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010899901.4A CN112036980A (en) 2020-08-31 2020-08-31 Article recommendation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112036980A true CN112036980A (en) 2020-12-04

Family

ID=73586635

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010899901.4A Pending CN112036980A (en) 2020-08-31 2020-08-31 Article recommendation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112036980A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102663046A (en) * 2012-03-29 2012-09-12 中国科学院自动化研究所 Sentiment analysis method oriented to micro-blog short text
CN108595533A (en) * 2018-04-02 2018-09-28 深圳大学 A kind of item recommendation method, storage medium and server based on collaborative filtering

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102663046A (en) * 2012-03-29 2012-09-12 中国科学院自动化研究所 Sentiment analysis method oriented to micro-blog short text
CN108595533A (en) * 2018-04-02 2018-09-28 深圳大学 A kind of item recommendation method, storage medium and server based on collaborative filtering

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
彭敏;席俊杰;代心媛;何炎祥;: "基于情感分析和LDA主题模型的协同过滤推荐算法", 中文信息学报, vol. 31, no. 02, pages 194 - 203 *
李国振: "基于协同过滤的个性化推荐系统算法研究", 中国硕士学位论文全文数据库信息科技辑, vol. 1, no. 06, pages 22 - 103 *

Similar Documents

Publication Publication Date Title
CN108491377B (en) E-commerce product comprehensive scoring method based on multi-dimensional information fusion
Rai Identifying key product attributes and their importance levels from online customer reviews
Rahardja et al. Opinion mining on e-commerce data using sentiment analysis and k-medoid clustering
CN102567475B (en) User interface for interactive query reformulation
Teso et al. Application of text mining techniques to the analysis of discourse in eWOM communications from a gender perspective
WO2017013667A1 (en) Method for product search using the user-weighted, attribute-based, sort-ordering and system thereof
CN108388660B (en) Improved E-commerce product pain point analysis method
Wang et al. Collaborative filtering with aspect-based opinion mining: A tensor factorization approach
CN111061957A (en) Article similarity recommendation method and device
JP4538760B2 (en) Information processing apparatus and method, program, and recording medium
CN111242679A (en) Sales forecasting method based on product review viewpoint mining
CN111339439A (en) Collaborative filtering recommendation method and device fusing comment text and time sequence effect
CN108763961B (en) Big data based privacy data grading method and device
CN111353044A (en) Comment-based emotion analysis method and system
Anam Sentiment Analysis of Online Lectures using K-Nearest Neighbors based on Feature Selection
JP5048852B2 (en) Search device, search method, search program, and computer-readable recording medium storing the program
CN103294741A (en) Similar document retrieval auxiliary device and similar document retrieval auxiliary method
Kurniawan et al. Exploring Sentimen Analysis Using Machine Learning: A Case Study on Partai Demokrasi Indonesia Perjuangan (PDIP) in the 2024 General Election
Shikalgar et al. JIBCA: Jaccard index based clustering algorithm for mining online review
Abdi et al. Using an auxiliary dataset to improve emotion estimation in users’ opinions
CN117593089A (en) Credit card recommendation method, apparatus, device, storage medium and program product
Younis et al. Applying machine learning techniques for performing comparative opinion mining
CN111859932A (en) Text abstract generation method and device, electronic equipment and storage medium
Taqiuddin et al. Opinion spam classification on steam review using support vector machine with lexicon-based features
Maulana et al. Sentiment analysis of public towards infrastructure development in Indonesia on Twitter media using boosting support vector machine method

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