CN117851688A - Personalized recommendation method based on deep learning and user comment content - Google Patents
Personalized recommendation method based on deep learning and user comment content Download PDFInfo
- Publication number
- CN117851688A CN117851688A CN202410253430.8A CN202410253430A CN117851688A CN 117851688 A CN117851688 A CN 117851688A CN 202410253430 A CN202410253430 A CN 202410253430A CN 117851688 A CN117851688 A CN 117851688A
- Authority
- CN
- China
- Prior art keywords
- emotion
- comment
- sequence
- words
- sentence
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 51
- 238000013135 deep learning Methods 0.000 title claims abstract description 21
- 230000008451 emotion Effects 0.000 claims abstract description 300
- 238000013145 classification model Methods 0.000 claims description 22
- 230000008569 process Effects 0.000 claims description 10
- 230000011218 segmentation Effects 0.000 claims description 9
- 238000012549 training Methods 0.000 claims description 9
- 230000006870 function Effects 0.000 claims description 7
- 238000013527 convolutional neural network Methods 0.000 claims description 6
- 238000004364 calculation method Methods 0.000 claims description 2
- 238000012937 correction Methods 0.000 claims description 2
- 238000013528 artificial neural network Methods 0.000 abstract description 2
- 230000008859 change Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000001914 filtration Methods 0.000 description 2
- ORILYTVJVMAKLC-UHFFFAOYSA-N Adamantane Natural products C1C(C2)CC3CC1CC2C3 ORILYTVJVMAKLC-UHFFFAOYSA-N 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 230000002996 emotional effect Effects 0.000 description 1
- 239000002360 explosive Substances 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9535—Search customisation based on user profiles and personalisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9536—Search customisation based on social or collaborative filtering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/01—Social networking
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Business, Economics & Management (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Human Resources & Organizations (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Computation (AREA)
- Health & Medical Sciences (AREA)
- Economics (AREA)
- Medical Informatics (AREA)
- Mathematical Physics (AREA)
- Marketing (AREA)
- Primary Health Care (AREA)
- Strategic Management (AREA)
- Tourism & Hospitality (AREA)
- General Business, Economics & Management (AREA)
- Artificial Intelligence (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention relates to the technical field of content recommendation, in particular to a personalized recommendation method based on deep learning and user comment content, which comprises the following steps: acquiring commodity comment data of a user, acquiring emotion attribute sequences of each sentence sequence, correcting the emotion attribute sequences to acquire complete emotion attribute sequences, acquiring comment basic emotion scores of each sentence according to the complete emotion attribute sequences, acquiring first-order condition difference sequences of the complete emotion attribute sequences, acquiring emotion analysis difficulty indexes of each sentence according to the first-order condition difference sequences, acquiring comment comprehensive emotion scores of each sentence by combining the comment basic emotion scores and the emotion analysis difficulty indexes, and completing comment content recommendation of the user by combining a neural network. The invention aims to improve the accuracy of user comment content recommendation and realize the accurate recommendation of the user comment content.
Description
Technical Field
The invention relates to the technical field of content recommendation, in particular to a personalized recommendation method based on deep learning and user comment content.
Background
With the development of the internet, data grows in an explosive manner, and users have the characteristics of information overload and ambiguous requirements while accessing information. To cope with this situation, the prior art generally adopts collaborative filtering-based and content-based recommendation algorithms to make personalized recommendations for users, and accesses content-related recommendations according to user history.
In the information historically accessed by the user, not all browsed content is content liked by the user, and the user comments often comprise a plurality of user preferences and comment information for browsing the content. Therefore, a recommendation method based on emotion analysis is generally performed according to user comment information. However, there are often uncertain factors in the user comments that affect the accuracy of emotion analysis, for example, comment text often adopts metaphor convoying techniques, that is, comments contain deeper meanings, and the meaning is opposite to what is expressed literally, so that the complexity of sentence emotion is increased, and emotion tendencies when users comment are difficult to distinguish.
Disclosure of Invention
In order to solve the technical problems, the invention provides a personalized recommendation method based on deep learning and user comment content so as to solve the existing problems.
The personalized recommendation method based on deep learning and user comment content adopts the following technical scheme:
the embodiment of the invention provides a personalized recommendation method based on deep learning and user comment content, which comprises the following steps:
acquiring a user comment content disclosure data set;
word segmentation is carried out on the comment content of the user to obtain each sentence sequence; obtaining emotion attribute sequences of each sentence sequence according to the positive emotion words and the negative emotion words in the emotion dictionary; correcting the emotion attribute sequence according to the distribution of the polar emotion words and the negative emotion words in the data set to obtain a complete emotion attribute sequence; combining the complete emotion attribute sequence and the number of negative words in the sentence sequence to obtain comment basic emotion scores of the sentence sequences; acquiring a first-order conditional differential sequence of a complete emotion attribute sequence; obtaining emotion analysis difficulty indexes of each sentence sequence according to the first-order conditional differential sequence; combining the comment basic emotion scores and the emotion analysis difficulty indexes to obtain comment comprehensive emotion scores of each sentence sequence; training a commodity comment emotion classification model by combining the comment comprehensive emotion scores; and the commodity comment emotion classification model is utilized to finish the recommendation of the user comment content.
Preferably, the word segmentation of the comment content of the user to obtain each sentence sequence includes:
and dividing the comment content of each sentence user into each word by using a word segmentation tool, wherein the sentence sequence is the combination of all the words.
Preferably, the obtaining the emotion attribute sequence of each sentence sequence according to the positive emotion words and the negative emotion words in the emotion dictionary includes:
for each sentence sequence, marking the emotion attribute of which the words are positive emotion words in the emotion dictionary as 1, marking the emotion attribute of which the words are negative emotion words in the emotion dictionary as-1, marking the emotion attributes of all the words of other types in the emotion dictionary as 0, and taking all the marked emotion attributes as emotion attribute sequences.
Preferably, the obtaining the complete emotion attribute sequence according to the distribution correction emotion attribute sequence of the polar emotion words and the passive emotion words in the data set includes:
for each sentence sequence, if the words are in the emotion dictionary, the emotion attributes corresponding to the words are complete emotion attributes, otherwise, the times that positive emotion words in the words and the emotion dictionary appear in one sentence simultaneously in the data set are counted and recorded as first times, the times that negative emotion words in the words and the emotion dictionary appear in one sentence simultaneously in the data set are counted and recorded as second times, the difference value between the first times and the second times is calculated, the ratio of the difference value to the total times of the words appearing in the data set is used as the complete emotion attributes of the words, and the complete emotion attributes of all the words are used as complete emotion attribute sequences.
Preferably, the obtaining the comment basic emotion score of each sentence sequence by combining the complete emotion attribute sequence and the number of negative words in the sentence sequence includes:
counting the times of occurrence of negative words in the sentence sequence, taking the times as an index of an exponential function taking-1 as a base, calculating the product of the calculation result of the exponential function and the complete emotion attribute of each word in the sentence sequence, and taking the sum of the products of all the words in the sentence sequence as the comment base emotion score of the sentence sequence.
Preferably, the obtaining the first-order conditional differential sequence of the complete emotion attribute sequence includes:
the expression of the element values in the first-order conditional differential sequence is:
in the method, in the process of the invention,representing the value of the ith element in the first order conditional differential sequence,/and (ii)>Representing the complete emotion attributes of the i-th word in the sentence sequence,/>complete emotion attributes representing the i-1 st word in a sentence sequence,/for example>Representing natural constants.
Preferably, the obtaining the emotion analysis difficulty index of each sentence sequence according to the first-order conditional differential sequence includes:
and taking the average value of all elements of the first-order conditional differential sequence as the emotion analysis difficulty index of each sentence sequence aiming at the first-order conditional differential sequence of each sentence sequence.
Preferably, the method for obtaining the comment comprehensive emotion score of each sentence sequence by combining the comment basic emotion score and the emotion analysis difficulty index includes:
and aiming at each sentence sequence, calculating the ratio of the comment basic emotion score to the emotion analysis difficulty index, and taking the normalized value of the ratio as the comment comprehensive emotion score of each sentence sequence.
Preferably, the training of the commodity comment emotion classification model by combining the comment comprehensive emotion score comprises the following steps:
and aiming at each comment in the data set, if the comment comprehensive emotion score of the corresponding sentence sequence is greater than 0, marking the label of the comment as like, otherwise, marking the label as dislike, marking the commodity comment emotion classification model as a convolutional neural network, and training all comments marked by the commodity comment emotion classification model.
Preferably, the method for completing user comment content recommendation by using the commodity comment emotion classification model includes:
and taking multiple comments of a single user aiming at the single commodity as input of a trained commodity comment emotion classification model, outputting labels of all comments, taking the average value of the corresponding scores of all labels as the preference of the current user on the commodity, acquiring other users with the same preference as the current user on the commodity, and taking the commodity with the highest preference among all commodities liked by the other users as the recommended content of the current user.
The invention has at least the following beneficial effects:
according to the method, personalized commodity recommendation is realized for the user according to feedback of the user by analyzing commodity comment data of the user; acquiring emotion attributes of each word in the sentence sequence through the emotion dictionary, calculating a complete emotion attribute sequence of the sentence sequence, acquiring comment basic emotion scores and emotion analysis difficulty indexes of the sentence sequence, acquiring comment comprehensive emotion scores of the sentence sequences, training commodity comment emotion classification models according to the comment comprehensive emotion scores of the sentence sequences, and performing personalized recommendation for users according to classification results. The method and the system solve the problem of low commodity recommendation accuracy of the user due to complex and changeable comment content expression modes and difficult semantic understanding, and effectively reduce the wrong classification condition of the commodity comment emotion classification model on complex sentences by analyzing emotion analysis difficulty indexes of sentence sequences, so that personalized recommendation is realized for the user more accurately.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart illustrating steps of a personalized recommendation method based on deep learning and user comment content according to an embodiment of the present invention;
FIG. 2 is a flowchart for obtaining user content recommendation index.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following detailed description is given below with reference to the accompanying drawings and the preferred embodiments, wherein the specific implementation, structure, characteristics and effects of the personalized recommendation method based on deep learning and user comment content according to the invention are as follows. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The specific scheme of the personalized recommendation method based on deep learning and user comment content provided by the invention is specifically described below with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of a method for personalized recommendation based on deep learning and user comment content according to an embodiment of the invention is shown, and the method includes the following steps:
and S001, obtaining user comment content data and preprocessing.
The embodiment adopts the commodity comment public data set for analysis, wherein a large number of commodity comments from an online shopping platform are included, and the commodity comments comprise commodity information, comment texts, commenter IDs, comment time and the like.
The comment text in the commodity comment public data set is segmented, the word segmentation tool adopted in the embodiment is an NLTK tool kit, an implementer can select other word segmentation tools according to actual conditions, and the embodiment does not limit the word segmentation tools.
Step S002, obtaining complete emotion attribute sequences of each sentence sequence according to the emotion dictionary, obtaining comment basic emotion scores according to the complete emotion attribute sequences, and further obtaining emotion analysis difficulty indexes to obtain comment comprehensive emotion scores.
Specifically, in this embodiment, commodity comment data of a user is obtained, an emotion attribute sequence of each sentence sequence is obtained, the emotion attribute sequence is corrected to obtain a complete emotion attribute sequence, comment basic emotion scores of each sentence are obtained according to the complete emotion attribute sequence, a first-order conditional differential sequence of the complete emotion attribute sequence is obtained, emotion analysis difficulty indexes of each sentence are obtained according to the first-order conditional differential sequence, comment comprehensive emotion scores of each sentence are obtained by combining the comment basic emotion scores and the emotion analysis difficulty indexes, user comment content recommendation is completed by combining a neural network, and a user content recommendation index obtaining flow chart is shown in fig. 2. The construction process of the comment comprehensive emotion scores of each sentence sequence specifically comprises the following steps:
in general, when a personalized recommendation service is performed for a user, it is necessary to browse content analysis features according to the history of the user and then recommend related commodities to the user according to the features. But there is a phenomenon that the user does not feel the sense of the front after browsing a certain item, i.e., not all the browsed contents are the contents that the user likes. Therefore, the real feeling and comments of the user on the commodity are required to be obtained by analyzing the comment content of the user. So that the recommendation system can better conduct personalized recommendation service for the user. Since the comment text is not a normal text, it is possible that the sentence component of the user comment is incomplete or that the meaning expressed by the user is opposite to the literal meaning, which would seriously affect the understanding of the user comment content.
In order to obtain a commodity comment emotion classification model with more robustness, the embodiment is provided. And further feature extraction of the comment information of the user is completed, and emotion resolution capability of comment content is improved.
When the user has poor feeling on the commodity, the user can express in a metaphor mode, and the metaphor can express emotion and attitude of the user more implicitly, especially when the user is not full of the commodity. However, from a text emotion analysis perspective, metaphors increase the complexity of the analysis, often requiring an understanding in combination with the context and cultural background. Therefore, special attention needs to be paid to the use of metaphors in performing emotion analysis to ensure that the emotion tendencies of the user can be accurately captured.
Firstly, the emotion score of each word in a sentence is obtained through an emotion dictionary. The present embodiment uses a net emotion dictionary that includes positive emotion words such as "happy", and the like, and negative emotion words such as "painful", "anger", and the like. The practitioner can select other emotion dictionaries according to the actual situation, and the embodiment is not limited to this.
First, each sentence in the commodity comment public data set is madeFor a sentence sequence, for the sentence sequenceWherein each element represents a word, and the emotion attribute of each word in the sentence is determined according to the emotion dictionary to obtain an emotion attribute sequence +.>Emotion attribute sequence->Each element in the sentence sequence represents the emotion attribute of each word corresponding to the sentence sequence, the emotion attribute of the positive emotion word is marked as '1', the emotion attribute of the negative emotion word is marked as '1', and the emotion attributes of all words of other types in the emotion dictionary are marked as '0'. However, some words in some sentences in a specific scene, although not belonging to an emotion dictionary, express a certain emotion, for example: "this computer is not only inexpensive but also waterproof", where "inexpensive" and "waterproof" are positive words in this particular scenario of the computer, but it does not belong to affective words. Therefore, the present embodiment needs to score emotion for words not in the emotion dictionary, so as to obtain the complete emotion attribute sequence +.>Wherein->The expression is:
in the method, in the process of the invention,complete emotion attribute representing the i-th word in sentence sequence,/->Representing the emotion attribute of the i-th word in the sentence sequence; />Representing the number of times that the ith word and the positive emotion word in the sentence sequence are simultaneously present in one sentence sequence in the commodity comment public data set,/for the number of times>Representing the number of times that the ith word and the negative emotion word in the sentence sequence are simultaneously present in one sentence sequence in the commodity comment public data set; />Representing the total number of times that the ith word in the sentence sequence appears in the commodity comment public data set; />Representing an ith word in the sentence sequence; />Representing emotion dictionary->Representing belongings of->The representation does not belong. Will->Record as first time, < >>Recorded as the second number.
When the words in the sentence sequence do not belong to the emotion dictionary, the emotion attribute of each word needs to be calculated. When the number of times that a word in a sentence sequence appears with a positive emotion word is greater and the number of times that the word appears with a negative emotion word is smaller, then the word is more likely to express a positive emotion, andabove->The more the positive emotion is, the higher the negative emotion is, otherwise, the more likely the word expresses negative emotion, and +.>Above->The more, the higher the negative emotion. Thus, the complete emotion attribute of each word in the sentence sequence can be obtained.
When considering the emotion score of a sentence sequence, the original emotion direction of the sentence sequence is changed when there are negative words in the sentence sequence, and the original emotion direction is canceled when there are a plurality of negative words, i.e. "double negative representation affirmative", for example, in the case where two negative words are contained in the sentence sequence, such as "i have to dislike him". The original emotional direction is negative because of the negative word "offensive". However, since the negation word "no" occurs twice, the change in emotion direction of the sentence sequence is counteracted without change and still interpreted as negative. Therefore, the comment basic emotion score of each sentence sequence is constructed, and the expression is as follows:
in the method, in the process of the invention,comment base emotion score representing sentence sequence, +.>The number of words contained in the sentence sequence is represented,representing the number of negative words in the sentence sequence; />Representing the complete emotion attributes of the i-th word in the sentence sequence.
When the sum of the complete emotion attributes of the words in the sentence sequence is greater than 0, the basic emotion attribute of the sentence sequence is more biased to positive emotion, otherwise, the basic emotion attribute of the sentence sequence is more biased to negative attribute; meanwhile, when the number of the negative words is odd, the basic emotion attribute direction of the sentence sequence is indicated to be changed, otherwise, the basic emotion attribute of the sentence sequence is indicated to be unchanged.
When the emotion tendencies of the comment content of the user are analyzed, the simpler the sentence sequence expression is, the easier the comment basic emotion score of the sentence sequence is calculated by analyzing the complete emotion attributes of each word in the sentence sequence. The simpler the sentence sequence expression, the less likely the hidden meaning exists, the more the sentence sequence tends to literally express the meaning, and the complete emotion attribute sequence based on the sentence sequenceFirst-order conditional differential sequence of complete emotion attribute sequence is calculated>Wherein->The expression is:
in the method, in the process of the invention,representing the value of the ith element in the first order conditional differential sequence,/and (ii)>Complete emotion attribute representing the i-th word in sentence sequence,/->Complete emotion attributes representing the i-1 st word in a sentence sequence,/for example>Representing natural constants.
Then according to the first order conditional differential sequenceConstructing emotion analysis difficulty indexes of sentence sequences, wherein the expression is as follows:
in the method, in the process of the invention,emotion analysis difficulty index representing sentence sequence, +.>Representing the number of words contained in a sentence sequence, +.>Representing the value of the i-th element in the first order conditional differential sequence.
When the product of the complete emotion attributes of the i-th word and the previous word in the sentence sequence is larger than 0, the meaning of the emotion words of the two words belonging to the same emotion direction is that the emotion attributes of the two words both represent positive emotion or both represent negative emotion,the larger the emotion expression vocabulary of the sentence sequence is, the more the emotion analysis difficulty index is, otherwise, the smaller the emotion expression vocabulary of the sentence sequence is, and the emotion analysis difficulty index is also smaller; when the product of the complete emotion attribute of the i-th word and the previous word in the sentence sequence is less than or equal to 0, the meaning that the two words belong to emotion words with opposite emotion directions is that one emotion attribute of the two words is negative emotion and the other emotion attribute of the two words is positive emotion, because the emotion directions of the two words are converted, meaning that the sentence sequence possibly has the method of punctuation such as metaphor, the emotion complexity of the sentence sequence is increased, and the larger the difference of the complete emotion attributes of the two words is, the larger the emotion complexity of the sentence sequence is, the larger the emotion analysis difficulty index of the sentence sequence is, otherwise, the sentence sequence isThe smaller the emotion complexity, the smaller the emotion analysis difficulty index of the sentence sequence.
The comment base emotion score of the sentence sequence mainly analyzes and expresses emotion tendencies of the whole sentence from the complete emotion attribute aspect of each word. However, if the emotion expression of the sentence sequence is more complex, the higher the emotion analysis difficulty is, the lower the confidence of the comment basic emotion score calculated based on the steps is, and the comment comprehensive emotion score of the sentence sequence is constructed, wherein the expression is as follows:
in the method, in the process of the invention,comment complex emotion score representing sentence sequence, +.>Representing normalization function to make data value in (-1, 1) interval +.>Comment base emotion score representing sentence sequence, +.>And representing the emotion analysis difficulty index of the sentence sequence.
When the comment base emotion score of the sentence sequence is greater than "0", it is indicated that positive emotion of the sentence sequence is expressed from the complete emotion attribute analysis of the word,the larger the positive emotion is, the stronger; when the basic emotion score of the sentence sequence is less than or equal to 0, the method indicates that the negative emotion of the sentence sequence is expressed from the complete emotion attribute analysis of the word, and the word is in the form of ++>The smaller the negative emotion is, the stronger; when the emotion analysis difficulty index of the sentence sequence is large, the sentence sequence is indicated to be expressedThe more complex the method is, the smaller the confidence of the comment basic emotion score of the sentence sequence is, the smaller the comment comprehensive emotion score of the final sentence sequence is, otherwise, the larger the confidence of the comment basic emotion score of the sentence sequence is, and the larger the comment comprehensive emotion score of the final sentence sequence is.
And step S003, training a commodity comment emotion classification model according to the comment comprehensive emotion score of each sentence sequence, and performing personalized recommendation for the user.
According to the embodiment, the comment comprehensive emotion score of each sentence sequence in the commodity comment public data set is obtained, wherein the value range of the comment comprehensive emotion score is in a (-1, 1) interval, the label of the sentence sequence with the comment comprehensive emotion score being more than 0 is marked as like, and the label of the sentence sequence with the comment comprehensive emotion score being less than or equal to 0 is marked as dislike, so that the commodity comment emotion classification model is trained.
In this embodiment, the commodity comment emotion classification model adopts a convolutional neural network model, and an implementer can select other models according to actual conditions, which is not limited in this embodiment, and the convolutional neural network model and the training process of the convolutional neural network model are both existing known techniques, which are not described in detail herein. The optimizer of the convolutional neural network model adopts Adam, and the loss function adopts cross entropy loss function.
And providing personalized recommendation for the user by adopting a collaborative filtering recommendation method based on the user, taking a plurality of comments of a single user on a single commodity as input of a trained commodity comment emotion classification model, outputting a label of each comment, taking the average value of the corresponding scores of all labels as the preference of the current user on the commodity, acquiring other users with the same preference as the current user on the commodity, and taking the commodity with the highest preference among all commodities liked by the other users as the recommended content of the current user.
In conclusion, the embodiment of the invention solves the problem of low commodity recommendation accuracy of users due to complex and changeable comment content expression modes and difficult semantic understanding, effectively reduces the wrong classification condition of a commodity comment emotion classification model on complex sentences by analyzing emotion analysis difficulty indexes of sentence sequences, and improves the accuracy of the user recommendation content.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. And the foregoing description has been directed to specific embodiments of this specification. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.
The foregoing description of the preferred embodiments of the present invention is not intended to be limiting, but rather, any modifications, equivalents, improvements, etc. that fall within the principles of the present invention are intended to be included within the scope of the present invention.
Claims (10)
1. The personalized recommendation method based on deep learning and user comment content is characterized by comprising the following steps of:
acquiring a user comment content disclosure data set;
word segmentation is carried out on the comment content of the user to obtain each sentence sequence; obtaining emotion attribute sequences of each sentence sequence according to the positive emotion words and the negative emotion words in the emotion dictionary; correcting the emotion attribute sequence according to the distribution of the polar emotion words and the negative emotion words in the data set to obtain a complete emotion attribute sequence; combining the complete emotion attribute sequence and the number of negative words in the sentence sequence to obtain comment basic emotion scores of the sentence sequences; acquiring a first-order conditional differential sequence of a complete emotion attribute sequence; obtaining emotion analysis difficulty indexes of each sentence sequence according to the first-order conditional differential sequence; combining the comment basic emotion scores and the emotion analysis difficulty indexes to obtain comment comprehensive emotion scores of each sentence sequence; training a commodity comment emotion classification model by combining the comment comprehensive emotion scores; and the commodity comment emotion classification model is utilized to finish the recommendation of the user comment content.
2. The personalized recommendation method based on deep learning and user comment content according to claim 1, wherein the word segmentation of the user comment content to obtain each sentence sequence includes:
and dividing the comment content of each sentence user into each word by using a word segmentation tool, wherein the sentence sequence is the combination of all the words.
3. The personalized recommendation method based on deep learning and user comment content according to claim 1, wherein the obtaining the emotion attribute sequence of each sentence sequence according to the positive emotion words and the negative emotion words in the emotion dictionary comprises:
for each sentence sequence, marking the emotion attribute of which the words are positive emotion words in the emotion dictionary as 1, marking the emotion attribute of which the words are negative emotion words in the emotion dictionary as-1, marking the emotion attributes of all the words of other types in the emotion dictionary as 0, and taking all the marked emotion attributes as emotion attribute sequences.
4. The personalized recommendation method based on deep learning and user comment content according to claim 3, wherein the obtaining the complete emotion attribute sequence according to the distribution correction emotion attribute sequence of the extreme emotion words and the negative emotion words in the dataset comprises:
for each sentence sequence, if the words are in the emotion dictionary, the emotion attributes corresponding to the words are complete emotion attributes, otherwise, the times that positive emotion words in the words and the emotion dictionary appear in one sentence simultaneously in the data set are counted and recorded as first times, the times that negative emotion words in the words and the emotion dictionary appear in one sentence simultaneously in the data set are counted and recorded as second times, the difference value between the first times and the second times is calculated, the ratio of the difference value to the total times of the words appearing in the data set is used as the complete emotion attributes of the words, and the complete emotion attributes of all the words are used as complete emotion attribute sequences.
5. The personalized recommendation method based on deep learning and user comment content according to claim 4, wherein the obtaining comment base emotion scores of each sentence sequence by combining the complete emotion attribute sequence and the number of negative words in the sentence sequence includes:
counting the times of occurrence of negative words in the sentence sequence, taking the times as an index of an exponential function taking-1 as a base, calculating the product of the calculation result of the exponential function and the complete emotion attribute of each word in the sentence sequence, and taking the sum of the products of all the words in the sentence sequence as the comment base emotion score of the sentence sequence.
6. The personalized recommendation method based on deep learning and user comment content according to claim 1, wherein the obtaining a first-order conditional differential sequence of a complete emotion attribute sequence comprises:
the expression of the element values in the first-order conditional differential sequence is:
in the method, in the process of the invention,representing the value of the ith element in the first order conditional differential sequence,/and (ii)>Complete emotion attribute representing the i-th word in sentence sequence,/->Complete emotion attributes representing the i-1 st word in a sentence sequence,/for example>Self-expressionBut constant.
7. The personalized recommendation method based on deep learning and user comment content according to claim 1, wherein the obtaining the emotion analysis difficulty index of each sentence sequence according to the first-order conditional difference sequence comprises:
and taking the average value of all elements of the first-order conditional differential sequence as the emotion analysis difficulty index of each sentence sequence aiming at the first-order conditional differential sequence of each sentence sequence.
8. The personalized recommendation method based on deep learning and user comment content according to claim 1, wherein the comment comprehensive emotion score of each sentence sequence is obtained by combining comment basic emotion scores and emotion analysis difficulty indexes, and the method comprises the following steps:
and aiming at each sentence sequence, calculating the ratio of the comment basic emotion score to the emotion analysis difficulty index, and taking the normalized value of the ratio as the comment comprehensive emotion score of each sentence sequence.
9. The personalized recommendation method based on deep learning and user comment content according to claim 1, wherein training the commodity comment emotion classification model in combination with comment integrated emotion scores comprises:
and aiming at each comment in the data set, if the comment comprehensive emotion score of the corresponding sentence sequence is greater than 0, marking the label of the comment as like, otherwise, marking the label as dislike, marking the commodity comment emotion classification model as a convolutional neural network, and training all comments marked by the commodity comment emotion classification model.
10. The personalized recommendation method based on deep learning and user comment content according to claim 9, wherein the using commodity comment emotion classification model to complete user comment content recommendation comprises:
and taking multiple comments of a single user aiming at the single commodity as input of a trained commodity comment emotion classification model, outputting labels of all comments, taking the average value of the corresponding scores of all labels as the preference of the current user on the commodity, acquiring other users with the same preference as the current user on the commodity, and taking the commodity with the highest preference among all commodities liked by the other users as the recommended content of the current user.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410253430.8A CN117851688B (en) | 2024-03-06 | 2024-03-06 | Personalized recommendation method based on deep learning and user comment content |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410253430.8A CN117851688B (en) | 2024-03-06 | 2024-03-06 | Personalized recommendation method based on deep learning and user comment content |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117851688A true CN117851688A (en) | 2024-04-09 |
CN117851688B CN117851688B (en) | 2024-05-03 |
Family
ID=90532748
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410253430.8A Active CN117851688B (en) | 2024-03-06 | 2024-03-06 | Personalized recommendation method based on deep learning and user comment content |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117851688B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108710680A (en) * | 2018-05-18 | 2018-10-26 | 哈尔滨理工大学 | It is a kind of to carry out the recommendation method of the film based on sentiment analysis using deep learning |
CN110517121A (en) * | 2019-09-23 | 2019-11-29 | 重庆邮电大学 | Method of Commodity Recommendation and the device for recommending the commodity based on comment text sentiment analysis |
CN111401936A (en) * | 2020-02-26 | 2020-07-10 | 中国人民解放军战略支援部队信息工程大学 | Recommendation method based on comment space and user preference |
CN112364646A (en) * | 2020-11-18 | 2021-02-12 | 安徽财经大学 | Sentence comment emotion polarity analysis method considering modifiers |
CN114926239A (en) * | 2022-05-16 | 2022-08-19 | 重庆大学 | Commodity recommendation method, system and equipment based on comment information and scoring matrix |
US20230281678A1 (en) * | 2019-12-23 | 2023-09-07 | Reputation.Com, Inc. | Impact-based strength and weakness determination |
CN116757794A (en) * | 2023-08-17 | 2023-09-15 | 酒仙网络科技股份有限公司 | Big data-based product recommendation method in wine selling applet |
US20230401274A1 (en) * | 2020-03-04 | 2023-12-14 | Karl Louis Denninghoff | Relative fuzziness for fast reduction of false positives and false negatives in computational text searches |
-
2024
- 2024-03-06 CN CN202410253430.8A patent/CN117851688B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108710680A (en) * | 2018-05-18 | 2018-10-26 | 哈尔滨理工大学 | It is a kind of to carry out the recommendation method of the film based on sentiment analysis using deep learning |
CN110517121A (en) * | 2019-09-23 | 2019-11-29 | 重庆邮电大学 | Method of Commodity Recommendation and the device for recommending the commodity based on comment text sentiment analysis |
US20230281678A1 (en) * | 2019-12-23 | 2023-09-07 | Reputation.Com, Inc. | Impact-based strength and weakness determination |
CN111401936A (en) * | 2020-02-26 | 2020-07-10 | 中国人民解放军战略支援部队信息工程大学 | Recommendation method based on comment space and user preference |
US20230401274A1 (en) * | 2020-03-04 | 2023-12-14 | Karl Louis Denninghoff | Relative fuzziness for fast reduction of false positives and false negatives in computational text searches |
CN112364646A (en) * | 2020-11-18 | 2021-02-12 | 安徽财经大学 | Sentence comment emotion polarity analysis method considering modifiers |
CN114926239A (en) * | 2022-05-16 | 2022-08-19 | 重庆大学 | Commodity recommendation method, system and equipment based on comment information and scoring matrix |
CN116757794A (en) * | 2023-08-17 | 2023-09-15 | 酒仙网络科技股份有限公司 | Big data-based product recommendation method in wine selling applet |
Non-Patent Citations (5)
Title |
---|
EWIN TANG: "A quantum-inspired classical algorithm for recommendation systems", 《STOC 2019: PROCEEDINGS OF THE 51ST ANNUAL ACM SIGACT SYMPOSIUM ON THEORY OF COMPUTING》, 23 June 2019 (2019-06-23), pages 217 - 228, XP058437065, DOI: 10.1145/3313276.3316310 * |
ZHIWEI GUO 等: "Deep Learning-Embedded Social Internet of Things for Ambiguity-Aware Social Recommendations", 《IEEE TRANSACTIONS ON NETWORK SCIENCE AND ENGINEERING》, vol. 9, no. 3, 30 June 2022 (2022-06-30), pages 1067 - 1081, XP011909147, DOI: 10.1109/TNSE.2021.3049262 * |
李海枫 等: "基于深度学习的机载LiDAR点云滤波方法", 《成都理工大学学报(自然科学版)》, vol. 50, no. 03, 17 March 2023 (2023-03-17), pages 376 - 384 * |
李铁: "面向大规模电商评论的情感分析与兴趣挖掘研究", 《中国博士学位论文全文数据库 经济与管理科学辑》, no. 09, 15 September 2018 (2018-09-15), pages 157 - 2 * |
赵佳艳: "面向个性化推荐的在线评论细粒度情感分析研究及应用", 《中国优秀硕士学位论文全文数据库 信息科技辑》, no. 06, 15 June 2022 (2022-06-15), pages 138 - 640 * |
Also Published As
Publication number | Publication date |
---|---|
CN117851688B (en) | 2024-05-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107133213B (en) | Method and system for automatically extracting text abstract based on algorithm | |
US11379668B2 (en) | Topic models with sentiment priors based on distributed representations | |
CN105183833B (en) | Microblog text recommendation method and device based on user model | |
CN104008091B (en) | A kind of network text sentiment analysis method based on emotion value | |
CN110765260A (en) | Information recommendation method based on convolutional neural network and joint attention mechanism | |
CN107992531A (en) | News personalization intelligent recommendation method and system based on deep learning | |
CN112966091B (en) | Knowledge map recommendation system fusing entity information and heat | |
CN107357793A (en) | Information recommendation method and device | |
CN110502626A (en) | A kind of aspect grade sentiment analysis method based on convolutional neural networks | |
CN111506831A (en) | Collaborative filtering recommendation module and method, electronic device and storage medium | |
CN110750648A (en) | Text emotion classification method based on deep learning and feature fusion | |
CN113204624B (en) | Multi-feature fusion text emotion analysis model and device | |
CN111126067B (en) | Entity relationship extraction method and device | |
CN110990670B (en) | Growth incentive book recommendation method and recommendation system | |
CN117474703B (en) | Topic intelligent recommendation method based on social network | |
Lin et al. | A simple but effective method for Indonesian automatic text summarisation | |
CN111259156A (en) | Hot spot clustering method facing time sequence | |
CN116595975A (en) | Aspect-level emotion analysis method for word information enhancement based on sentence information | |
CN113934835B (en) | Retrieval type reply dialogue method and system combining keywords and semantic understanding representation | |
CN112214661A (en) | Emotional unstable user detection method for conventional video comments | |
CN116680363A (en) | Emotion analysis method based on multi-mode comment data | |
CN115878752A (en) | Text emotion analysis method, device, equipment, medium and program product | |
CN113688633A (en) | Outline determination method and device | |
CN113449200B (en) | Article recommendation method and device and computer storage medium | |
CN110334204B (en) | Exercise similarity calculation recommendation method based on user records |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |