Scoring prediction model training method, content recommendation method and system

By constructing portrait models of users and learning objects, and using word embedding layers and attention mechanisms to match and process emotions and feature content, the problem of difficulty in correlating learning object features and emotions in deep learning methods is solved, and recommendation performance is improved.

CN118568333APending Publication Date: 2024-08-30ORIENTAL CABLE NETWORK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311871619.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-29
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

It is difficult for existing deep learning methods to directly correlate learning object features and emotions, resulting in reduced recommendation performance.

Method used

By building a portrait model of users and learning objects, using the word embedding layer, phrase extraction layer, phrase association layer and pooling layer, combined with the attention mechanism, we match and process the emotions and characteristic content of users and learning objects, and build a rating prediction model.

Benefits of technology

Fine-grained portraits of students and learning objects are constructed under the deep learning framework, which improves recommendation performance and solves the problem of insufficient emotional correlation capabilities in traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568333A
    Figure CN118568333A
Patent Text Reader

Abstract

The invention provides a training method of a score prediction model, and a content recommendation method and system. The training method comprises the following steps: acquiring a plurality of sample comment texts of different interested objects commented by a user; based on each sample comment text, obtaining corresponding sample emotion content and sample interested object feature content; constructing a user portrait model based on the plurality of sample emotion contents; constructing an interested object portrait model based on the feature contents of the plurality of sample interested objects; and performing matching processing on the user portrait model and the interested object portrait model to construct a score prediction model. According to the method, the user portrait model constructed based on the emotion content and the interested object portrait model constructed based on the sample interested object feature content are matched to obtain the score prediction model, so that the emotion polarity of students on learning object features is considered; student portraits and learning object portraits are constructed in a fine-grained manner, and recommendation performance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of content recommendation, and in particular to a training method for a rating prediction model, a content recommendation method, system, device and medium. Background Art

[0002] In the recommendation system of adaptive learning in the field of education, the traditional collaborative filtering method infers the behavior patterns of students and learning objects from the rating data, and it is still a competitive technology. However, when encountering data sparsity and cold start problems, the performance of the collaborative filtering method drops significantly. Therefore, many researchers try to introduce comment text as a supplement and mine various elements in the comments to model the student-learning object portrait. The seven common elements in comments are "high-frequency words", "comment topics", "sentiment about learning object characteristics", "contextual sentiment", "contrasting sentiment" and "emotion", which have been deeply studied in the traditional machine learning era.

[0003] However, existing deep learning methods only use learning object features to represent student interests, ignoring the emotions (the third comment element) corresponding to learning object features. This is because the fixed-size convolution window of CNN (convolutional neural network) lacks the ability to model context expansion within the range of variable word lengths, making it difficult to directly associate "learning object features" with "emotions", which reduces recommendation performance. Summary of the invention

[0004] The technical problem to be solved by the present disclosure is to overcome the defects that the deep learning methods in the prior art find it difficult to directly associate "learning object features" with "emotions", resulting in reduced recommendation performance, and to provide a training method for a rating prediction model, a content recommendation method, system, device and medium.

[0005] The present invention solves the above technical problems through the following technical solutions:

[0006] The present disclosure provides a training method for a score prediction model, the training method comprising:

[0007] Obtain several sample review texts of users' reviews on different objects of interest;

[0008] Based on each of the sample comment texts, obtaining corresponding sample emotional content representing the user's emotional state towards each object of interest, and sample object of interest feature content representing the attributes of the object of interest;

[0009] Based on the emotional contents of the samples, a user portrait model is constructed;

[0010] Based on the characteristic contents of the objects of interest in the samples, a portrait model of the objects of interest is constructed;

[0011] The user portrait model and the object of interest portrait model have the same model structure;

[0012] Matching the user portrait model and the object of interest portrait model to construct the rating prediction model;

[0013] The rating prediction model is used to output a predicted rating of the user's actual emotional state for each target object of interest based on the target review text of the user's comments on different target objects of interest.

[0014] Preferably, the users include students, and the objects of interest include learning objects.

[0015] Preferably, the model structure corresponding to the user portrait model and the object of interest portrait model includes a word embedding layer, a phrase extraction layer, a phrase association layer, a pooling layer and a comment layer connected in sequence.

[0016] Preferably, the step of constructing a user portrait model based on the emotion contents of the samples includes:

[0017] Converting the sample sentiment content into a corresponding first word vector sequence at the word embedding layer;

[0018] Wherein, each of the sample emotional contents includes a number of words;

[0019] At the phrase extraction layer, a first phrase vector of each word is obtained based on the first self-attention network and the first word vector sequence, and a first emotion vector and a first object of interest feature vector are determined based on the first phrase vector;

[0020] At the phrase association layer, based on a second self-attention network, the first emotion vector and the first object of interest feature vector are associated to obtain a first phrase content;

[0021] In the pooling layer, an attention mechanism is used to assign a first weight to each first phrase content, and a first comment content is determined based on the first phrase content and the first weight;

[0022] At the comment layer, the attention mechanism is used to aggregate a number of the first comment contents to construct the user portrait model;

[0023] and / or,

[0024] The step of constructing a portrait model of the object of interest based on the characteristic contents of the object of interest of the samples comprises:

[0025] Converting the feature content of the sample object of interest into a corresponding second word vector sequence at the word embedding layer;

[0026] Wherein, each of the sample object of interest feature content includes a number of words;

[0027] At the phrase extraction layer, a second phrase vector of each of the words is obtained based on the first self-attention network and the second word vector sequence, and a second sentiment vector and a second object of interest feature vector are determined based on the second phrase vector;

[0028] At the phrase association layer, based on a second self-attention network, the second sentiment vector and the second object of interest feature vector are associated to obtain a second phrase content;

[0029] In the pooling layer, an attention mechanism is used to assign a second weight to each second phrase content, and a second comment content is determined based on the second phrase content and the second weight;

[0030] At the comment layer, the attention mechanism is used to aggregate a number of the second comment contents to construct a portrait model of the object of interest.

[0031] Preferably, the step of matching the user portrait model and the object of interest portrait model to construct the rating prediction model includes:

[0032] Using a decomposition machine to match the user portrait model and the object of interest portrait model to construct the rating prediction model;

[0033] and / or,

[0034] The training method further comprises:

[0035] In each iteration of training the rating prediction model, a loss function is constructed according to the predicted rating corresponding to the input sample comment text by the current rating prediction model and the actual rating corresponding to the sample comment text;

[0036] When the loss function meets a preset condition, it is determined to stop training to obtain the rating prediction model.

[0037] The present disclosure also provides a content recommendation method, the content recommendation method comprising:

[0038] Get the actual comment text of the user on the target object of interest;

[0039] Inputting the actual review text into a rating prediction model to obtain a target predicted rating;

[0040] The rating prediction model is obtained based on the training method of the rating prediction model described above, and the target prediction score is used to characterize the actual emotional state of the user towards the target object of interest;

[0041] The corresponding target content is recommended to the user based on the target prediction score.

[0042] The present disclosure also provides a training system for a rating prediction model, the training system comprising:

[0043] A sample comment acquisition module is used to acquire a number of sample comment texts of users' comments on different objects of interest;

[0044] A content acquisition module, for acquiring, based on each of the sample comment texts, corresponding sample emotional content representing the user's emotional state towards each object of interest, and sample object of interest feature content representing the attributes of the object of interest;

[0045] A user portrait construction module, used to construct a user portrait model based on the sample emotional content;

[0046] An object portrait construction module is used to construct an object portrait model of interest based on the characteristic contents of the sample objects of interest;

[0047] The user portrait model and the object of interest portrait model have the same model structure;

[0048] A model building module, used for matching the user portrait model with the interested object portrait model to construct the rating prediction model;

[0049] The rating prediction model is used to output a predicted rating of the user's actual emotional state for each target object of interest based on the target review text of the user's comments on different target objects of interest.

[0050] Preferably, the users include students, and the objects of interest include learning objects.

[0051] Preferably, the model structure corresponding to the user portrait model and the object of interest portrait model includes a word embedding layer, a phrase extraction layer, a phrase association layer, a pooling layer and a comment layer connected in sequence.

[0052] Preferably, the user portrait building module includes:

[0053] A first word embedding layer unit, configured to convert the sample sentiment content into a corresponding first word vector sequence at the word embedding layer;

[0054] Wherein, each of the sample emotional contents includes a number of words;

[0055] A first phrase extraction layer unit is used to obtain a first phrase vector for each of the words at the phrase extraction layer based on a first self-attention network and the first word vector sequence, and determine a first sentiment vector and a first object of interest feature vector based on the first phrase vector;

[0056] A first phrase association layer unit is used to associate the first emotion vector with the first object of interest feature vector at the phrase association layer based on a second self-attention network to obtain a first phrase content;

[0057] A first pooling layer unit is used to assign a first weight to each first phrase content by using an attention mechanism in the pooling layer, and determine a first comment content based on the first phrase content and the first weight;

[0058] A first comment layer unit, configured to aggregate a plurality of the first comment contents at the comment layer using the attention mechanism to construct the user portrait model;

[0059] and / or,

[0060] The object portrait construction module includes:

[0061] A second phrase extraction layer unit, configured to convert the feature content of the sample object of interest into a corresponding second word vector sequence at the word embedding layer;

[0062] Wherein, each of the sample object of interest feature content includes a number of words;

[0063] A second phrase extraction layer unit is used to obtain a second phrase vector for each of the words at the phrase extraction layer based on the first self-attention network and the second word vector sequence, and determine a second sentiment vector and a second object of interest feature vector based on the second phrase vector;

[0064] A second phrase association layer unit, configured to associate the second sentiment vector with the second object of interest feature vector at the phrase association layer based on a second self-attention network to obtain a second phrase content;

[0065] A second pooling layer unit is used to assign a second weight to each second phrase content by using an attention mechanism in the pooling layer, and determine a second comment content based on the second phrase content and the second weight;

[0066] The second comment layer unit is used to aggregate the plurality of second comment contents at the comment layer using the attention mechanism to construct a portrait model of the object of interest.

[0067] Preferably, the model building module is further used to use a decomposition machine to match the user portrait model and the interested object portrait model to construct the rating prediction model;

[0068] and / or,

[0069] The training system also includes:

[0070] A loss function construction module, used to construct a loss function according to the predicted score corresponding to the input sample comment text and the actual score corresponding to the sample comment text by the current score prediction model during each iteration of training the score prediction model;

[0071] The training stop determination module is used to determine to stop training to obtain the rating prediction model when the loss function meets a preset condition.

[0072] The present disclosure also provides a content recommendation system, the content recommendation system comprising:

[0073] The actual comment acquisition module is used to obtain the actual comment text of the user on the target object of interest;

[0074] A target score acquisition module is used to input the actual review text into the score prediction model to obtain a target prediction score;

[0075] The rating prediction model is obtained based on the training system of the rating prediction model described above, and the target prediction score is used to characterize the actual emotional state of the user towards the target object of interest;

[0076] A content recommendation module is used to recommend corresponding target content to the user based on the target prediction score.

[0077] The present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and used to run on the processor, wherein when the processor executes the computer program, it implements the training method of the rating prediction model as described above, or implements the content recommendation method as described above.

[0078] The present disclosure also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program implements the training method of the rating prediction model as described above, or implements the content recommendation method as described above.

[0079] On the basis of being in accordance with the common sense in the art, the above-mentioned preferred conditions can be arbitrarily combined to obtain the preferred embodiments of the present disclosure.

[0080] The positive and progressive effects of this disclosure are:

[0081] The present invention obtains a rating prediction model by matching a user portrait model constructed based on emotional content with an object of interest portrait model constructed based on the feature content of a sample object of interest. It considers students' emotional polarity towards learning object features under a deep learning framework, constructs student portraits and learning object portraits in a fine-grained manner, and improves recommendation performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] Figure 1 The present invention is a flowchart of the training method of the score prediction model of the first embodiment of the present invention.

[0083] Figure 2 This is a flowchart of step S103 in the training method of the rating prediction model of embodiment 2 of the present disclosure.

[0084] Figure 3 This is a flowchart of step S104 in the training method of the rating prediction model of embodiment 2 of the present disclosure.

[0085] Figure 4 This is a flowchart of the training method of the score prediction model of Example 2 of the present disclosure.

[0086] Figure 5 This is a flowchart of the content recommendation method of embodiment 3 of the present disclosure.

[0087] Figure 6 This is a module diagram of a training system for a rating prediction model according to Embodiment 4 of the present disclosure.

[0088] Figure 7 The figure is an overall architecture diagram of the training system of the rating prediction model of Example 4 of the present disclosure.

[0089] Figure 8 This is a module diagram of the training system of the rating prediction model of Example 5 of the present disclosure.

[0090] Fig. 9 This is a hierarchical structure diagram of the training system of the score prediction model of Example 5 of the present disclosure.

[0091] Fig.10 This is a module diagram of the content recommendation system of Example 6 of the present disclosure.

[0092] Fig.11 This is a schematic diagram of the structure of an electronic device according to Embodiment 7 of the present disclosure. DETAILED DESCRIPTION

[0093] The present disclosure is further described below by way of examples, but the present disclosure is not limited to the scope of the examples.

[0094] Example 1

[0095] This embodiment provides a training method for a rating prediction model. Figure 1 As shown, the training method includes:

[0096] S101, obtaining a number of sample comment texts of users commenting on different objects of interest;

[0097] S102, based on each sample comment text, obtaining corresponding sample emotional content representing the user's emotional state towards each object of interest, and sample object of interest feature content representing the attributes of the object of interest;

[0098] Specifically, several sample comment texts constitute a sample comment set. Based on the sample comment set, a user comment set can be obtained with users as the main body, that is, sample emotional content. Based on the sample comment set, a collection of interesting object comments can be obtained with objects of interest as the main body, that is, sample interesting object feature content. Taking students' comments on different learning objects as an example, the sample comment set of students on 2,000 learning objects is taken as the student comment set, and the sample comment set of 50 students on one learning object is taken as the learning object comment set. The number here is just an example and can be adjusted according to actual needs.

[0099] S103, constructing a user portrait model based on the emotional contents of several samples;

[0100] S104, constructing a portrait model of the object of interest based on the characteristic contents of the object of interest of the samples;

[0101] Among them, the model structure corresponding to the user portrait model and the object of interest portrait model is the same;

[0102] S105, matching the user portrait model and the interested object portrait model to construct a rating prediction model;

[0103] Among them, the rating prediction model is used to output the predicted rating of the user's actual emotional state for each target object of interest based on the target review text of the user's comments on different target objects of interest.

[0104] In this embodiment, the user portrait model constructed based on emotional content and the object of interest portrait model constructed based on the feature content of the sample object of interest are matched to obtain a rating prediction model. The students' emotional polarity towards "learning object features" is taken into account under the deep learning framework, and the student portraits and learning object portraits are constructed in a fine-grained manner, thereby improving the recommendation performance.

[0105] Example 2

[0106] This embodiment provides a training method for a rating prediction model, which is a further improvement on Embodiment 1.

[0107] In one implementable solution, the users include students, and the objects of interest include learning objects.

[0108] In this scheme, by obtaining sample comment texts of students' comments on different learning objects, we construct corresponding student portrait models and learning object portrait models, and then construct a corresponding rating prediction model. This rating prediction model can output the predicted rating of the students' actual emotional state towards the learning objects, so as to facilitate the recommendation of corresponding learning content to students.

[0109] In one feasible solution, the model structure corresponding to the user portrait model and the object of interest portrait model includes a word embedding layer, a phrase extraction layer, a phrase association layer, a pooling layer and a comment layer connected in sequence.

[0110] like Figure 2 As shown, step S103 includes:

[0111] S1031, converting the sample sentiment content into a corresponding first word vector sequence at the word embedding layer;

[0112] Among them, each sample emotional content includes several words;

[0113] Specifically, the word embedding layer maps each sample comment text in the user comment set into a word vector sequence The word embedding layer accepts a user review set, which contains multiple sample review texts {r1, r2…, r L}, where L represents the maximum number of user review sets. Each sample review text ri is a word sequence of length l, where each word is a vector represented by a one-hot encoding. Each word is embedded in the word embedding matrix W d ×|V| maps the one-hot encoding to a d-dimensional dense vector, where V is the size of the vocabulary, Represents a collection of user comments.

[0114] S1032. At the phrase extraction layer, obtain a first phrase vector for each word based on the first self-attention network and the first word vector sequence, and determine a first sentiment vector and a first object of interest feature vector based on the first phrase vector;

[0115] Specifically, the phrase extraction layer uses the first self-attention network to encode the context of each word in the sample comment text to form a phrase representation. On the one hand, semantically related words are encoded into a phrase; on the other hand, distant words are associated. The input of the first self-attention network is a word vector sequence of length l Linearly project X into three different semantic spaces to form three sequences Input Q, K, V into the attention function to calculate the context representation H of each word. The formula for linear projection is as follows:

[0116] Q=XW Q

[0117] K=XW K

[0118] V=XW V

[0119] The formula for calculating the context representation of each word is as follows:

[0120] H=attention(Q,K,V)=softmax(QK T )V

[0121] Among them, W Q , W K , As parameters, H encodes the context words for each word in the review.

[0122] Add the word itself V and the context representation H, and transform the semantic space through a fully connected layer to finally get the phrase representation X phrase-1 , that is, the first phrase vector:

[0123] X phrase-1 =tanh((H+V)W p +b p )

[0124] in, X phrase-1 The semantics of each word in is no longer a single word, but a phrase centered on the word; W p As parameters, For bias.

[0125] A classification method can be used to obtain emotional phrases and learning object feature phrases from the phrase representation. The emotional phrase is the first emotional vector, and the learning object feature phrase is the first object of interest feature vector.

[0126] S1033. At the phrase association layer, based on the second self-attention network, the first sentiment vector and the first object of interest feature vector are associated to obtain a first phrase content;

[0127] Specifically, the phrase association layer uses the second self-attention network to associate the emotional phrases with the learning object feature phrases to obtain the students’ emotional polarity towards specific aspects of the learning object, i.e., the first phrase content, expressed as Each learning object feature phrase encodes the associated sentiment polarity. The structure of the second self-attention network is the same as that of the first self-attention network.

[0128] S1034, at the pooling layer, using an attention mechanism to assign a first weight to each first phrase content, and determining the first comment content based on the first phrase content and the first weight;

[0129] Specifically, the pooling layer uses the attention mechanism to transform the phrase sequence of the user comment set into The phrases in are aggregated into a representation of a single sample comment text, namely the first comment content. The attention mechanism assigns a first weight to each phrase in the sequence, and then weights all phrases according to the size of the first weight. The weight of each phrase in the comment is calculated, and the attention weight distribution is obtained after normalization by the softmax (normalized exponential function) function. The final representation of the sample review text is obtained by weighted summing of all phrases. The corresponding calculation formula is as follows:

[0130] e=v T tanh(W u X phrase-2 )

[0131] α=softmax(e)

[0132]

[0133] in, and as a parameter.

[0134] S1035. At the comment layer, an attention mechanism is used to aggregate the contents of several first comments to construct a user portrait model.

[0135] Specifically, the comment layer uses the attention mechanism to represent the L sample comment texts in the user comment set as U = {u1,u2,…u L} is aggregated into a d-dimensional vector p as a user portrait model. The corresponding calculation formula is as follows:

[0136] β=softmax(v T tanh(W u U))

[0137]

[0138] Among them, β i represents {u1,u2,…u L The weight corresponding to each comment in}, as a parameter.

[0139] In this scheme, by adopting word embedding layer, phrase extraction layer, phrase association layer, pooling layer and comment layer, combined with attention network and attention mechanism, a user portrait model is constructed based on the user comment set, which solves the problem of extracting variable-length phrases in the user comment set, alleviates the problem of fixed convolution window of traditional convolutional neural network that is too large to introduce noise and too small to cause context loss, and ensures the accuracy and reliability of the user portrait model.

[0140] In one feasible solution, Figure 3 As shown, step S104 includes:

[0141] S1041, converting the feature content of the sample object of interest into a corresponding second word vector sequence at the word embedding layer;

[0142] Among them, the feature content of each sample object of interest includes several words;

[0143] S1042. At the phrase extraction layer, obtain a second phrase vector for each word based on the first self-attention network and the second word vector sequence, and determine a second sentiment vector and a second object of interest feature vector based on the second phrase vector;

[0144] S1043. At the phrase association layer, based on the second self-attention network, the second sentiment vector and the second object of interest feature vector are associated to obtain a second phrase content;

[0145] S1044, at the pooling layer, using an attention mechanism to assign a second weight to each second phrase content, and determining the second comment content based on the second phrase content and the second weight;

[0146] S1045. At the comment layer, an attention mechanism is used to aggregate the contents of several second comments to construct a portrait model of the object of interest.

[0147] In this solution, the construction principle of the object of interest portrait model is similar to that of the user portrait model, which will not be repeated here. By adopting the word embedding layer, phrase extraction layer, phrase association layer, pooling layer and comment layer, combined with the attention network and attention mechanism, the object of interest portrait model is constructed based on the object of interest comment set, which solves the problem of extracting variable-length phrases in the object of interest comment set, alleviates the problem of the traditional convolutional neural network's fixed convolution window introducing noise when it is too large and causing context loss when it is too small, and ensures the accuracy and reliability of the object of interest portrait model.

[0148] In one feasible solution, Figure 4 As shown, step S105 includes:

[0149] S1051. Use a decomposition machine to match the user portrait model and the object of interest portrait model to construct a rating prediction model.

[0150] Specifically, the extracted user portrait model and the object of interest portrait model Input into the factorization machine (FM) to match the two and calculate the predicted score The factorization machine accepts a feature vector And model the first-order and second-order relationships between users and objects of interest. The corresponding formulas are as follows:

[0151]

[0152] Among them, w0 is the global bias, It is used to capture the first-order interaction strength between the user and the object of interest, w i Used to capture the second-order interaction strength between users and objects of interest.

[0153] In this solution, the user portrait model and the object of interest portrait model are matched by using a decomposition machine, thereby ensuring the accuracy and reliability of the constructed rating prediction model.

[0154] In one feasible solution, Figure 4 As shown, the training method also includes:

[0155] S106, when training the rating prediction model in each iteration, constructing a loss function according to the predicted rating corresponding to the input sample comment text and the actual rating corresponding to the sample comment text by the current rating prediction model;

[0156] Specifically, the mean square error between the predicted score and the actual score is used as the loss function, and the corresponding formula is as follows:

[0157]

[0158] in, and r ui They represent the predicted score and true score of user u on the object of interest i, respectively, and D is the training set.

[0159] During the model training process, Adan can be used for optimization, and the initial learning rate can be set to 0.002. The rating prediction model is trained until the performance of the validation set does not improve for 5 consecutive rounds, and early stopping is used to select the model parameters with the best performance on the validation set. The value of the initial learning rate and the number of training rounds can be set and adjusted according to actual needs. This is just an example.

[0160] The datasets for experimental verification can be public datasets from different fields, and the rating prediction model can be evaluated based on these datasets. The dataset examples are as follows: Digital Music, Toys and Games, Cell Phones and Accessories, Office Products, Clothing Shoes and Jewelry, Musical Instruments from Amazon 5-core.

[0161] S107. When the loss function meets a preset condition, it is determined to stop training to obtain a rating prediction model.

[0162] In this scheme, a loss function is constructed based on the predicted score and the actual score. When the loss function meets the preset conditions, the training is stopped to obtain the score prediction model, which ensures the accuracy and reliability of the score prediction model.

[0163] The working principle of the training method of the rating prediction model of this embodiment is explained below with reference to specific examples:

[0164] First, the sample comment text is preprocessed. The preprocessing process specifically includes: converting all words in the sample comment text to lowercase, removing all punctuation marks, retaining only words that appear more than 5 times in the vocabulary, and replacing unregistered words with "[UNK]". The maximum length of a single sample comment text is set to 30 words, and the sample comment set contains at most 20 sample comment texts. The sample comment set with less than 20 sample comment texts is completed with comment texts with the content "[PAD]". For the data set, the data set is randomly divided into training set, test set, and validation set. The test set and validation set are constructed using the "leave one out" method, that is, to ensure that each student in the sample comment set has one and only one sample. In order to avoid data leakage, the comment text that appears in the test set and validation set is deleted from the training set. At the same time, when calculating the predicted score of user u for the object of interest i When reviewing the real review text written by the user ui Dynamically delete comments from the user review set and the object of interest review set to prevent the rating prediction model from degenerating into a noisy sentiment classification model.

[0165] After preprocessing, sample comment texts are obtained; based on the sample comment texts, corresponding sample emotional content representing the user's emotional state towards each object of interest, and sample object of interest feature content representing the attributes of the object of interest are obtained; a five-layer model structure including a word embedding layer, a phrase extraction layer, a phrase association layer, a pooling layer and a comment layer is used to construct a user portrait model based on the sample emotional content, and to construct an object of interest portrait model based on the sample object of interest feature content; a decomposition machine is used to match the user portrait model and the object of interest portrait model to construct a rating prediction model; in each iterative training of the rating prediction model, a loss function is constructed based on the predicted score corresponding to the input sample comment text and the actual score corresponding to the sample comment text according to the current rating prediction model; when the loss function meets the preset conditions, it is determined to stop the training to obtain the final rating prediction model.

[0166] In this embodiment, the user portrait model constructed based on emotional content and the object of interest portrait model constructed based on the feature content of the sample object of interest are matched to obtain a rating prediction model. The students' emotional polarity towards "learning object features" is taken into account under the deep learning framework, and the student portraits and learning object portraits are constructed in a fine-grained manner, thereby improving the recommendation performance.

[0167] Example 3

[0168] This embodiment provides a content recommendation method, such as Figure 5 As shown, the content recommendation method includes:

[0169] S201, obtaining the user's actual comment text on the target object of interest;

[0170] S202, inputting the actual review text into the rating prediction model to obtain a target predicted rating;

[0171] The rating prediction model is obtained based on the training method of the rating prediction model of Example 1 or Example 2, and the target prediction score is used to characterize the actual emotional state of the user towards the target object of interest;

[0172] S203: Recommend corresponding target content to the user based on the target prediction score.

[0173] In this embodiment, the actual comment text is input into the rating prediction model to obtain the target prediction rating, so that the corresponding target content is recommended to the user based on the target prediction rating. The target prediction rating reflects the user's actual emotional state towards the object of interest, thereby ensuring the accuracy and reliability of the recommended target content.

[0174] Example 4

[0175] This embodiment provides a training system for a rating prediction model. Figure 6 As shown, the training system includes:

[0176] A sample comment acquisition module 11 is used to acquire a number of sample comment texts of users' comments on different objects of interest;

[0177] The content acquisition module 12 is used to acquire, based on each sample comment text, the corresponding sample emotional content representing the user's emotional state towards each object of interest, and the sample object of interest feature content representing the attributes of the object of interest;

[0178] A user portrait construction module 13, used to construct a user portrait model based on a number of sample emotional contents;

[0179] The object portrait construction module 14 is used to construct a portrait model of the object of interest based on the characteristic contents of the object of interest of a number of samples;

[0180] Among them, the model structure corresponding to the user portrait model and the object of interest portrait model is the same;

[0181] The model building module 15 is used to match the user portrait model and the interested object portrait model to build a rating prediction model;

[0182] Among them, the rating prediction model is used to output the predicted rating of the user's actual emotional state for each target object of interest based on the target review text of the user's comments on different target objects of interest.

[0183] like Figure 7 As shown in the figure, it is the overall architecture diagram of the training system of the rating prediction model. The user portrait construction module constructs the user portrait model through comments 1, comment 2, ..., comment L in the user comment set. The object portrait construction module constructs the interested object portrait model through comments 1, comment 2, ..., comment L in the interested object comment set. The model construction module constructs the rating prediction model through the user portrait model and the interested object portrait model.

[0184] The working principle of the training system of the rating prediction model of this embodiment is the same as the working principle of the training method of the rating prediction model in Example 1, and will not be repeated here.

[0185] In this scheme, the user portrait model constructed based on emotional content and the object of interest portrait model constructed based on the feature content of the sample object of interest are matched to obtain a rating prediction model. The emotional polarity of students towards the characteristics of learning objects is taken into account under the deep learning framework, and the student portrait and learning object portrait are constructed in a fine-grained manner, thereby improving the recommendation performance.

[0186] Example 5

[0187] This embodiment provides a training system for a rating prediction model. Figure 8 As shown, it is a further improvement on Example 4.

[0188] In one implementable solution, the users include students, and the objects of interest include learning objects.

[0189] In one feasible solution, the model structure corresponding to the user portrait model and the object of interest portrait model includes a word embedding layer, a phrase extraction layer, a phrase association layer, a pooling layer and a comment layer connected in sequence.

[0190] In an implementable solution, the user portrait construction module 13 includes:

[0191] A first word embedding layer unit 131, used to convert the sample sentiment content into a corresponding first word vector sequence at the word embedding layer;

[0192] Among them, each sample emotional content includes several words;

[0193] A first phrase extraction layer unit 132, configured to obtain, at the phrase extraction layer, a first phrase vector for each word based on the first self-attention network and the first word vector sequence, and determine a first sentiment vector and a first object of interest feature vector based on the first phrase vector;

[0194] A first phrase association layer unit 133 is used to associate the first sentiment vector with the first object of interest feature vector at the phrase association layer based on the second self-attention network to obtain a first phrase content;

[0195] A first pooling layer unit 134 is used to assign a first weight to each phrase content by using an attention mechanism at the pooling layer, and determine a first comment content based on the first phrase content and the first weight;

[0196] The first comment layer unit 135 is used to aggregate a plurality of first comment contents using an attention mechanism at the comment layer to construct a user portrait model;

[0197] In an implementable solution, the object portrait building module 14 includes:

[0198] The second phrase extraction layer unit 141 is used to convert the sample object of interest feature content into a corresponding second word vector sequence at the word embedding layer;

[0199] Among them, the feature content of each sample object of interest includes several words;

[0200] A second phrase extraction layer unit 142 is used to obtain a second phrase vector for each word based on the first self-attention network and the second word vector sequence at the phrase extraction layer, and determine a second sentiment vector and a second object of interest feature vector based on the second phrase vector;

[0201] A second phrase association layer unit 143 is used to associate the second sentiment vector with the second object of interest feature vector at the phrase association layer based on the second self-attention network to obtain a second phrase content;

[0202] A second pooling layer unit 144 is used to assign a second weight to each second phrase content by using an attention mechanism at the pooling layer, and determine the second comment content based on the second phrase content and the second weight;

[0203] The second comment layer unit 145 is used to aggregate a number of second comment contents at the comment layer using an attention mechanism to construct a portrait model of an object of interest.

[0204] In an implementable solution, the model building module 15 is further used to use a decomposition machine to match the user portrait model and the interested object portrait model to construct a rating prediction model;

[0205] In one feasible solution, the training system further includes:

[0206] A loss function construction module 16 is used to construct a loss function according to the predicted score corresponding to the input sample comment text and the actual score corresponding to the sample comment text by the current score prediction model during each iteration of training the score prediction model;

[0207] The training stop determination module 17 is used to determine to stop training to obtain a rating prediction model when the loss function meets a preset condition.

[0208] like Fig. 9As shown, it is a hierarchical structure diagram of the training system of the rating prediction model, which includes a two-layer self-attention network, specifically a first self-attention network and a second self-attention network. Comments 1, 2, ..., and L in the user comment set are processed by the word embedding layer to obtain the first word vector sequence, which is output to the first self-attention network in the phrase extraction layer. After being processed by the first self-attention network, the first sentiment vector and the first object of interest feature vector are obtained, which are output to the second self-attention of the phrase association layer. After being processed by the second self-attention network, the first phrase content is obtained, which is output to the pooling layer. After being processed by the red layer, the first comment content is obtained, which is output to the comment layer to obtain the user portrait model. The process of obtaining the object of interest portrait model after the object of interest comment set is processed by the word embedding layer, the phrase extraction layer, the phrase association layer, the pooling layer, and the comment layer is similar to the processing process of the user comment set, which will not be repeated here. The model construction module is used as the prediction layer, and a decomposition machine (FM) is used to match the user portrait model and the object of interest portrait model to construct a rating prediction model.

[0209] The user portrait construction module constructs a user portrait model through comments 1, comment 2, ..., comment L in the user comment set. The object portrait construction module constructs an interested object portrait model through comments 1, comment 2, ..., comment L in the interested object comment set. The model construction module constructs a rating prediction model through the user portrait model and the interested object portrait model.

[0210] The working principle of the training system of the rating prediction model of this embodiment is the same as the working principle of the training method of the rating prediction model in Example 2, and will not be repeated here.

[0211] In this scheme, the user portrait model constructed based on emotional content and the object of interest portrait model constructed based on the feature content of the sample object of interest are matched to obtain a rating prediction model. The emotional polarity of students towards the characteristics of learning objects is taken into account under the deep learning framework, and the student portrait and learning object portrait are constructed in a fine-grained manner, thereby improving the recommendation performance.

[0212] Example 6

[0213] This embodiment provides a content recommendation system. Fig.10 As shown, the content recommendation system includes:

[0214] The actual comment acquisition module 21 is used to acquire the actual comment text of the user on the target object of interest;

[0215] The target score acquisition module 22 is used to input the actual review text into the score prediction model to obtain the target prediction score;

[0216] The rating prediction model is obtained based on the training system of the rating prediction model, and the target prediction score is used to characterize the actual emotional state of the user towards the target object of interest;

[0217] The content recommendation module 23 is used to recommend corresponding target content to the user based on the target prediction score.

[0218] The working principle of the content recommendation system of this embodiment is the same as the working principle of the content recommendation system method of Embodiment 2, and will not be described in detail here.

[0219] In this embodiment, the actual comment text is input into the rating prediction model to obtain the target prediction rating, so that the corresponding target content is recommended to the user based on the target prediction rating. The target prediction rating reflects the user's actual emotional state towards the object of interest, thereby ensuring the accuracy and reliability of the recommended target content.

[0220] Example 7

[0221] like Fig.11 FIG. 1 is a schematic diagram of the structure of an electronic device provided in Embodiment 7 of the present disclosure, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the training method of the rating prediction model or the content recommendation method in the above-mentioned embodiment is implemented. Fig.11 The electronic device 90 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0222] The electronic device 90 may be in the form of a general-purpose computing device, for example, it may be a server device. The components of the electronic device 90 may include, but are not limited to: at least one processor 91, at least one memory 92, and a bus 93 connecting different system components (including the memory 92 and the processor 91).

[0223] The bus 93 includes a data bus, an address bus, and a control bus.

[0224] The memory 92 may include a volatile memory, such as a random access memory (RAM) 921 and / or a cache memory 922 , and may further include a read-only memory (ROM) 923 .

[0225] The memory 92 may also include a program / utility 925 having a set (at least one) of program modules 924, such program modules 924 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include an implementation of a network environment.

[0226] The processor 91 executes various functional applications and data processing by running the computer programs stored in the memory 92, such as the training method of the rating prediction model or the content recommendation method in the above-mentioned embodiments of the present disclosure.

[0227] The electronic device 90 may also communicate with one or more external devices 94 (e.g., keyboards, pointing devices, etc.). Such communication may be performed via an input / output (I / O) interface 95. Furthermore, the model-generated electronic device 90 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 96. As shown, the network adapter 96 communicates with other modules of the model-generated electronic device 90 via a bus 93. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the model-generated electronic device 90, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.

[0228] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.

[0229] Example 8

[0230] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the training method of the rating prediction model or the content recommendation method in the above-mentioned embodiment is implemented.

[0231] The readable storage medium may include but is not limited to: a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device or any suitable combination of the above.

[0232] In a possible implementation, the present disclosure can also be implemented in the form of a program product, which includes program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute a training method or a content recommendation method for implementing a rating prediction model as in the above-mentioned embodiments.

[0233] Among them, the program code for executing the present disclosure can be written in any combination of one or more programming languages, and the program code can be executed completely on the user device, partially on the user device, as a separate software package, partially on the user device and partially on a remote device, or completely on the remote device.

[0234] Although the specific embodiments of the present disclosure are described above, those skilled in the art should understand that this is only an example, and the protection scope of the present disclosure is defined by the appended claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present disclosure, but these changes and modifications all fall within the protection scope of the present disclosure.

Claims

1. A training method for a rating prediction model, characterized in that: The training method comprises: Obtain several sample review texts of users' reviews on different objects of interest; Based on each of the sample comment texts, obtaining corresponding sample emotional content representing the user's emotional state towards each object of interest, and sample object of interest feature content representing the attributes of the object of interest; Based on the emotional contents of the samples, a user portrait model is constructed; Based on the characteristic contents of the objects of interest in the samples, a portrait model of the objects of interest is constructed; The user portrait model and the object of interest portrait model have the same model structure; Matching the user portrait model and the object of interest portrait model to construct the rating prediction model; The rating prediction model is used to output a predicted rating of the user's actual emotional state for each target object of interest based on the target review text of the user's comments on different target objects of interest.

2. The method for training a rating prediction model according to claim 1, wherein: The users include students, and the objects of interest include learning objects.

3. The training method of the score prediction model according to claim 1 or 2, characterized in that: The model structure corresponding to the user portrait model and the object of interest portrait model includes a word embedding layer, a phrase extraction layer, a phrase association layer, a pooling layer and a comment layer connected in sequence.

4. The method for training a rating prediction model according to claim 3, wherein: The step of constructing a user portrait model based on the sample emotional contents includes: Converting the sample sentiment content into a corresponding first word vector sequence at the word embedding layer; Wherein, each of the sample emotional contents includes a number of words; At the phrase extraction layer, a first phrase vector of each word is obtained based on the first self-attention network and the first word vector sequence, and a first emotion vector and a first object of interest feature vector are determined based on the first phrase vector; At the phrase association layer, based on a second self-attention network, the first emotion vector and the first object of interest feature vector are associated to obtain a first phrase content; In the pooling layer, an attention mechanism is used to assign a first weight to each first phrase content, and a first comment content is determined based on the first phrase content and the first weight; At the comment layer, the attention mechanism is used to aggregate a number of the first comment contents to construct the user portrait model; and / or, The step of constructing a portrait model of the object of interest based on the characteristic contents of the object of interest of the samples comprises: Converting the sample object of interest feature content into a corresponding second word vector sequence at the word embedding layer; Wherein, each of the sample object of interest feature content includes a number of words; At the phrase extraction layer, a second phrase vector of each of the words is obtained based on the first self-attention network and the second word vector sequence, and a second sentiment vector and a second object of interest feature vector are determined based on the second phrase vector; At the phrase association layer, based on a second self-attention network, the second sentiment vector and the second object of interest feature vector are associated to obtain a second phrase content; In the pooling layer, an attention mechanism is used to assign a second weight to each second phrase content, and a second comment content is determined based on the second phrase content and the second weight; At the comment layer, the attention mechanism is used to aggregate a number of the second comment contents to construct a portrait model of the object of interest.

5. The method for training a rating prediction model according to claim 1, wherein: The step of matching the user portrait model and the object of interest portrait model to construct the rating prediction model includes: Using a decomposition machine to match the user portrait model and the object of interest portrait model to construct the rating prediction model; and / or, The training method further comprises: In each iteration of training the rating prediction model, a loss function is constructed according to the predicted rating corresponding to the input sample comment text by the current rating prediction model and the actual rating corresponding to the sample comment text; When the loss function meets a preset condition, it is determined to stop training to obtain the score prediction model.

6. A content recommendation method, characterized in that: The content recommendation method comprises: Get the actual comment text of the user on the target object of interest; Inputting the actual review text into a rating prediction model to obtain a target predicted rating; The rating prediction model is obtained based on the training method of the rating prediction model according to any one of claims 1 to 5, and the target prediction score is used to characterize the actual emotional state of the user towards the target object of interest; The corresponding target content is recommended to the user based on the target prediction score.

7. A training system for a rating prediction model, characterized in that: The training system comprises: A sample comment acquisition module is used to acquire a number of sample comment texts of users' comments on different objects of interest; A content acquisition module, for acquiring, based on each of the sample comment texts, corresponding sample emotional content representing the user's emotional state towards each object of interest, and sample object of interest feature content representing the attributes of the object of interest; A user portrait construction module, used to construct a user portrait model based on the sample emotional content; An object portrait construction module is used to construct an object portrait model of interest based on the characteristic contents of the sample objects of interest; The user portrait model and the object of interest portrait model have the same model structure; A model building module, used for matching the user portrait model with the interested object portrait model to construct the rating prediction model; The rating prediction model is used to output a predicted rating of the user's actual emotional state for each target object of interest based on the target review text of the user's comments on different target objects of interest.

8. A content recommendation system, characterized in that: The content recommendation system comprises: The actual comment acquisition module is used to obtain the actual comment text of the user on the target object of interest; A target score acquisition module is used to input the actual review text into the score prediction model to obtain a target prediction score; Wherein, the rating prediction model is obtained based on the training system of the rating prediction model according to claim 7, and the target prediction score is used to characterize the actual emotional state of the user towards the target object of interest; A content recommendation module is used to recommend corresponding target content to the user based on the target prediction score.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and used to run on the processor, characterized in that: When the processor executes the computer program, the processor implements the training method of the rating prediction model as described in any one of claims 1 to 5, or implements the content recommendation method as described in claim 6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the training method of the rating prediction model as described in any one of claims 1 to 5, or implements the content recommendation method as described in claim 6.