A method and apparatus for generating an explanation of a result
By calculating the importance ranking of item features in the recommendation system and the topic similarity of the explanation library, an explanation result is generated, which solves the problem that existing recommendation systems are difficult to explain and achieves better explainability and recommendation effect.
Patent Information
- Application Number
- CN202210005426.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-04
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2042-01-04
AI Technical Summary
In existing recommendation systems, non-deep learning-based models have poor fitting ability and are difficult to interpret, while deep learning-based models are difficult to understand the physical meaning of network layers, resulting in recommendation results that are difficult to interpret.
The importance of item features is ranked based on the target user's rating of the item. Explanatory features are then selected, an explanation library is built, and the similarity between topics and features in the explanation library is calculated to generate explanation results.
This improves the interpretability and interpretability of the recommendation results, ensuring sufficient data and good interpretability.
Smart Images

Figure CN116451798B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, and in particular to a method and device for generating an explanation result. BACKGROUND
[0002] At present, a recommendation system can be divided into a non-deep learning-based recommendation system and a deep learning-based recommendation system. The non-deep learning-based recommendation system mainly uses some simple machine learning models (for example, GBDT, a logistic regression model, etc.), and relevant algorithms include a collaborative filtering-based method, a logistic regression-based method, a combination model-based method, etc. The deep learning-based recommendation system takes a multi-layer network as the core, and builds a deep learning recommendation model by changing the network structure, and relevant algorithms include a method based on changing a feature cross method, a deep learning evolution method based on an FM model, a sequence model combined with a recommendation model, etc.
[0003] In the process of implementing the present application, the inventors have found that at least the following problems exist in the prior art:
[0004] The non-deep learning-based recommendation system uses relatively simple machine learning models. These machine learning models have a certain explanation ability because of the simple structure and the linear model contained in some models, but the model fitting ability is poor due to the simple structure, and therefore the recommendation effect is often not ideal. Some models contain nonlinear models, and therefore the recommendation result is difficult to explain. The deep learning-based recommendation system uses a deep learning model, which can greatly improve the model recommendation effect, but it is difficult to understand the specific physical meaning of each layer of network, and therefore it is difficult to explain the recommendation result output by the model. SUMMARY
[0005] Therefore, the embodiments of the present application provide a method and device for generating an explanation result to solve the technical problem that it is difficult to explain the recommendation result output by the model.
[0006] To achieve the above object, according to one aspect of the embodiments of the present application, a method for generating an explanation result is provided, comprising:
[0007] According to the scores of each target user on each item, the importance ranking of each item feature is obtained;
[0008] According to the importance ranking of each item feature, an explanation feature is selected from each item feature of a recommended item;
[0009] According to the evaluation data of the recommended item, an explanation library is constructed, and the topic corresponding to each piece of explanation in the explanation library is extracted;
[0010] The similarity between the topic of each explanation in the explanation library and each explanation feature of the recommended item is calculated, so as to determine the explanation result corresponding to the recommended item according to the similarity.
[0011] Optionally, the importance ranking of each item feature is obtained according to the score of each item by the target user, including:
[0012] The score of each item by the target user is calculated by using the trained item recommendation model;
[0013] The item features of each item and the score of each item are used to construct an explanation training set;
[0014] The explanation training set is fitted by using a machine learning model, so as to obtain the weight corresponding to each parameter of the machine learning model, thereby obtaining the weight of each item feature;
[0015] The importance ranking of each item feature is obtained by ranking the item features according to the size of the weight of each item feature.
[0016] Optionally, before the score of each item by the target user is calculated by using the trained item recommendation model, the method further includes:
[0017] The user features of a sample user and the item features of a sample item are used as input, and the score of the sample user on the sample item is used as output, and a deep learning model is trained, thereby obtaining an item recommendation model.
[0018] Optionally, according to the importance ranking of each item feature, the explanation features are selected from the item features of the recommended item, including:
[0019] According to the importance ranking of each item feature, the ranking of each item feature of the recommended item is determined;
[0020] According to the feature quantity threshold, the explanation features with high importance ranking are selected from the item features of the recommended item.
[0021] Optionally, the explanation library is constructed according to the evaluation data of the recommended item, so as to extract the topic corresponding to each explanation in the explanation library, including:
[0022] Each piece of evaluation data of the recommended item is identified by using the trained sentiment analysis model, so as to determine that the sentiment of the evaluation data is positive or negative;
[0023] The explanation library is constructed by using the evaluation data with positive sentiment;
[0024] The theme extraction model is used to extract a theme of each explanation in the explanation library, so as to obtain a theme corresponding to each explanation.
[0025] Optionally, after the theme extraction model is used to extract a theme of each explanation in the explanation library, so as to obtain a theme corresponding to each explanation, the method further includes:
[0026] The plurality of explanations are sorted according to the support quantity of each explanation, so as to obtain a support degree sorting of the plurality of explanations.
[0027] Optionally, the similarity between the theme corresponding to each explanation in the explanation library and each explanation feature of the recommended item is calculated, so as to determine the explanation result corresponding to the recommended item according to the similarity, including:
[0028] The similarity between the theme corresponding to each explanation in the explanation library and each explanation feature of the recommended item is calculated.
[0029] For each explanation in the explanation library, if the similarity between the theme corresponding to the explanation and each explanation feature of the recommended item is greater than a similarity threshold, the explanation is taken as the explanation result corresponding to the recommended item.
[0030] Optionally, the similarity between the theme corresponding to each explanation in the explanation library and each explanation feature of the recommended item is calculated, so as to determine the explanation result corresponding to the recommended item according to the similarity, further including:
[0031] If there are a plurality of explanations whose similarity is greater than a similarity threshold, a target explanation with the highest sorting is filtered out according to the support degree sorting of the plurality of explanations, and the target explanation is taken as the explanation result corresponding to the recommended item.
[0032] Optionally, the similarity between the theme corresponding to each explanation in the explanation library and each explanation feature of the recommended item is calculated, so as to determine the explanation result corresponding to the recommended item according to the similarity, further including:
[0033] If there is no explanation whose similarity is greater than a similarity threshold, a target feature with the highest sorting is filtered out according to the importance of each explanation feature of the recommended item, and the target feature is used to generate the explanation result corresponding to the recommended item.
[0034] In addition, according to another aspect of the embodiment of the present application, an explanation result generation device is provided, including:
[0035] The sorting module is configured to obtain the importance sorting of each item feature according to the score of the target user to each item.
[0036] a screening module configured to screen an explanation feature from the respective item features of the recommended item according to an importance ranking of the respective item features;
[0037] an extraction module configured to extract a topic corresponding to each explanation in the explanation library according to the evaluation data of the recommended item;
[0038] a calculation module configured to calculate a similarity between the topic corresponding to each explanation in the explanation library and the respective explanation features of the recommended item, and determine an explanation result corresponding to the recommended item according to the similarity.
[0039] Optionally, the sorting module is further configured to:
[0040] calculate a score of each item for the target user by using the trained item recommendation model;
[0041] construct an explanation training set by using the item features of the respective items and the scores of the respective items;
[0042] fit the explanation training set by using a machine learning model to obtain a weight corresponding to each parameter of the machine learning model, thereby obtaining a weight of each item feature;
[0043] sort the respective item features according to the size of the weight of each item feature, thereby obtaining the importance ranking of the respective item features.
[0044] Optionally, the method further comprises a training module configured to:
[0045] train a deep learning model by using the user features of the sample user and the item features of the sample item as input and the score of the sample user on the sample item as output, thereby obtaining an item recommendation model.
[0046] Optionally, the screening module is further configured to:
[0047] determine a ranking of the respective item features of the recommended item according to the importance ranking of the respective item features;
[0048] screen an explanation feature with a high importance ranking from the respective item features of the recommended item according to a feature quantity threshold.
[0049] Optionally, the extraction module is further configured to:
[0050] identify each evaluation data of the recommended item by using a trained sentiment analysis model, thereby determining that the sentiment of the evaluation data is positive or negative;
[0051] construct an explanation library by using the evaluation data with a positive sentiment;
[0052] perform topic extraction on each explanation in the explanation library to obtain a topic corresponding to each explanation.
[0053] Optionally, the extraction module is further configured to:
[0054] perform topic extraction on each explanation in the explanation library to obtain a topic corresponding to each explanation, and sort the explanations according to the number of supports of the explanations to obtain a support degree order of the explanations.
[0055] Optionally, the calculation module is further configured to:
[0056] calculate the similarity between the topic corresponding to each explanation in the explanation library and each explanation feature of the recommended item;
[0057] for each explanation in the explanation library, if the similarity between the topic corresponding to the explanation and each explanation feature of the recommended item is greater than a similarity threshold, the explanation is taken as an explanation result corresponding to the recommended item.
[0058] Optionally, the calculation module is further configured to:
[0059] if there are multiple explanations whose similarity is greater than the similarity threshold, a target explanation with the highest order is filtered out according to the support degree order of the multiple explanations, and the target explanation is taken as an explanation result corresponding to the recommended item.
[0060] Optionally, the calculation module is further configured to:
[0061] if there is no explanation whose similarity is greater than the similarity threshold, a target feature with the highest order is filtered out according to the importance of each explanation feature of the recommended item, and an explanation result corresponding to the recommended item is generated according to the target feature.
[0062] According to another aspect of the embodiments of the present application, an electronic device is also provided, comprising:
[0063] one or more processors;
[0064] a storage device configured to store one or more programs,
[0065] when the one or more programs are executed by the one or more processors, the one or more processors implement the method of any of the above embodiments.
[0066] According to another aspect of the embodiments of the present application, a computer readable medium having a computer program stored thereon is also provided, the program being executed by a processor to implement the method of any of the above embodiments.
[0067] An embodiment of the above application has the following advantages or beneficial effects: because the technical means of filtering out the explanation features from the various item features of the recommended item according to the importance ranking of the various item features, and calculating the similarity between the topic corresponding to each explanation in the explanation library and each explanation feature, so as to determine the explanation result corresponding to the recommended item, the technical problem that it is difficult to explain the recommended result output by the model in the prior art is overcome. The embodiment of the application obtains the importance ranking of the various item features through the score of the target user on each item, which not only ensures sufficient data quantity, but also ensures better explainability of the recommended result, and the similarity between the explanation features and the evaluation topics is calculated to realize the explanation of the recommended result by combining the item features and the comment data, thereby improving the explainability of the recommended result.
[0068] Further effects of the above non-conventional optional mode will be described below in conjunction with the specific embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0069] The accompanying drawings are used to better understand the application and do not constitute an improper limitation on the application. Among them:
[0070] Figure 1 is a schematic diagram of the main process of the explanation result generation method according to an embodiment of the application;
[0071] Figure 2 is the weight and importance ranking of each item feature according to an embodiment of the application;
[0072] Figure 3 is a schematic diagram of the main process of the explanation result generation method according to a reference embodiment of the application;
[0073] Figure 4 is a schematic diagram of the main process of the explanation result generation method according to another reference embodiment of the application;
[0074] Figure 5 is a schematic diagram of the main modules of the explanation result generation device according to an embodiment of the application;
[0075] Figure 6 is an exemplary system architecture diagram to which an embodiment of the application can be applied;
[0076] Figure 7 is a structural schematic diagram of a computer system of a terminal device or a server suitable for implementing an embodiment of the application. DETAILED DESCRIPTION
[0077] Exemplary embodiments of the present application are described herein with reference to the accompanying drawings, which are meant to be exemplary in nature, and include various specific details to facilitate understanding, and are to be considered in the context of the entire description. Persons skilled in the art will realize that the embodiments described herein are not the only embodiments that can be utilized, and will readily recognize variations that are within the scope and spirit of the present application. Accordingly, the drawings and descriptions should not be construed as limiting the scope of the application.
[0078] The embodiments of the present application mainly solve the problem that the recommended results of the current recommendation system are difficult to explain, and improve the experience of users for the recommended results through explanation.
[0079] The scenario of the embodiments of the present application is to explain the recommended results after the recommendation system outputs the recommended results, the embodiments of the present application calculate the importance ranking of each item feature through the scores of each item given by the target user, then filter out the item features that can be used for explanation (i.e. explanation features) through the item features of the recommended items and the importance ranking of the features, then identify the sentiment and theme of the comment data, and obtain the comments that can be used for explanation based on the sentiment analysis, so as to construct an explanation library, since the item features and the entire comment information are difficult to correspond, the approximate degree of the explainable item features and the comment theme is calculated, the appropriate comments are selected for explanation through setting a threshold, if there is no corresponding explanation, the explanation library constructed is used for explanation, and the final explanation result is output.
[0080] Figure 1 FIG. 1 is a schematic diagram of the main process of the method for generating an explanation result according to the embodiments of the present application. As shown in FIG. 1, the method for generating an explanation result can include: Figure 1
[0081] In step 101, the importance ranking of each item feature is obtained according to the scores of each item given by the target user.
[0082] For the target user to be pushed, the scores of each item given by the target user are obtained, and then the importance ranking of each item feature is obtained according to the scores. In the embodiments of the present application, each item can be each item in the category to which the recommended item belongs, can be each item in the category to which the recommended item belongs and which has a higher recent popularity, or can be each item in all items, and the embodiments of the present application do not limit this.
[0083] Optionally, step 101 can include: calculating the scores of each item for the target user by using the trained item recommendation model; constructing an explanation training set by using the item features of each item and the scores of each item; fitting the explanation training set by using a machine learning model to obtain the weights corresponding to each parameter of the machine learning model, thereby obtaining the weights of each item feature; and sorting the each item feature according to the size of the weight of each item feature, thereby obtaining the importance ranking of each item feature. In the embodiment of the present application, the trained item recommendation model (such as a recommendation model based on deep learning) can be used to calculate the scores of each item for the target user, and then the explanation training set can be constructed by using the item features of each item and the scores of each item. Then, the explanation training set can be fitted by using an interpretable machine learning model (which can be a linear model, such as a ridge regression model), and an interpretable model can be obtained. The weights of each item feature can be obtained by the weights of each parameter of the model, and finally the importance ranking of each item feature can be obtained by sorting the each item feature according to the size of the weight of each item feature.
[0084] Suppose the recommended item is the movie Kung Fu Panda, the scores of each movie in the category (movie type) to which the movie Kung Fu Panda belongs can be calculated by using the trained item recommendation model, and then the explanation training set can be constructed by using the item features (such as action, comedy, suspense, etc.) of each movie and the scores of each movie. Then, the explanation training set can be fitted by using a machine learning model, and the weights of each item feature can be obtained by the weights of each parameter of the machine learning model, as shown in FIG. 6. Finally, the importance ranking of each item feature can be obtained by sorting the each item feature according to the size of the weight of each item feature. Figure 2 The embodiment of the present application can ensure the interpretability of the model by fitting the explanation training set by using a machine learning model, thereby realizing the interpretability of the recommendation result.
[0085] Optionally, before calculating the score of each item for the target user by using the trained item recommendation model, the method further comprises: training a deep learning model by taking the user features of the sample users and the item features of the sample items as inputs and taking the scores of the sample users on the sample items as outputs, so as to obtain the item recommendation model. In order to calculate the score of each item for the target user by using the item recommendation model, the item recommendation model needs to be trained in advance. Specifically, the user features of the sample users, the scores of each sample user on the sample items, and the item features of each sample item can be obtained, a training set is constructed by using these data, and then the AutoRec model, the Deep Crossing model, the NeuralCF model, or the Wide&Deep model is used for supervised training, so as to obtain the item recommendation model.
[0086] Generally, the data in the original training set is used when the explanation training set is constructed, or an approximate training set is constructed. Using the data in the original training set may result in poor training effect due to insufficient corresponding data amount in the training set. Although the method of constructing an approximate training set guarantees sufficient data amount, it cannot guarantee that the constructed data actually exist, and thus may result in poor explanation effect. However, the method of calculating the score of each item for the target user by using the recommendation model can guarantee the authenticity of the item data and sufficient data amount, and can guarantee good explanation performance.
[0087] In step 102, the explanation features are selected from the item features of the recommended item according to the importance ranking of the item features.
[0088] After obtaining the importance ranking of the item features, a plurality of item features with high ranking are selected from the item features of the recommended item as the explanation features based on the ranking.
[0089] Optionally, step 102 can comprise: determining the ranking of the item features of the recommended item according to the importance ranking of the item features; and selecting the explanation features with high importance ranking from the item features of the recommended item according to a feature quantity threshold. Generally, the importance ranking includes the ranking of all item features in the category to which the recommended item belongs, and thus the item features of the recommended item are also included in the ranking. Therefore, the explanation features with high importance ranking can be selected from the item features of the recommended item by using the importance ranking, and the selected item features can be used as the explanation of the item features. Optionally, the feature quantity threshold can be set in advance, for example, 3, 5, or 10, so as to select N explanation features with high importance ranking, and N is equal to the feature quantity threshold.
[0090] Step 103, constructing an explanation library according to the evaluation data of the recommended item, so as to extract the topic corresponding to each explanation in the explanation library.
[0091] The evaluation data of the recommended item is obtained, and an explanation library is constructed according to the evaluation data, and then the topic corresponding to each explanation (i.e. each evaluation) in the explanation library is extracted.
[0092] Optionally, step 103 can include: using a trained sentiment analysis model to identify each evaluation data of the recommended item, so as to determine that the sentiment of the evaluation data is positive or negative; using the evaluation data with positive sentiment to construct the explanation library; using a topic extraction model to extract the topic of each explanation in the explanation library, so as to obtain the topic corresponding to each explanation. Similar to step 101, before step 103, the sentiment analysis model needs to be trained, such as using SVM, GDBT, Logistic Regression or sentiment analysis algorithm based on artificial construction of sentiment dictionary to analyze the sentiment information contained in the comment, and classifying each comment into "positive evaluation" or "negative evaluation".
[0093] For example, there are the following two evaluations for "Kung Fu Panda":
[0094] 1) Watched the movie last night while having dinner. There is no plot that makes you guess, no lines that make you think again and again, no small details arranged with great care. In short, it is a very easy movie to watch.
[0095] 2) I don't like a nearly stupid, daydreaming, lazy, even can't climb a few steps of panda.
[0096] The above two evaluations can use the sentiment analysis model to identify the first evaluation as "positive evaluation" and the second evaluation as "negative evaluation".
[0097] Taking the SVM model as an example, first, obtain the comment data set, label the comment data, and label the comment data as positive evaluation or negative evaluation; second, convert the data format, convert the sentence into a vector (such as CBOW model and Skip-gram model), so that the sentence is converted into the data type required by machine learning; finally, use the SVM model to fit the comment data set, so as to obtain the sentiment analysis model of the comment.
[0098] The trained sentiment analysis model can accurately identify the sentiment of each piece of evaluation data of the recommended item, and then positive evaluations are used to construct an explanation library, so that the explanations in the explanation library are positive evaluations. The explanation library is used to store positive evaluations. Finally, a topic extraction model is used to extract the topic of each explanation in the explanation library, thereby obtaining the topic corresponding to each explanation. Specifically, the LDA, TF-IDF or LSA topic extraction model can extract the topic contained in each comment. For example, for the movie review of Kung Fu Panda: Can you imagine that a lazy and fat panda who cannot see his own toes will become a "Dragon Warrior" who is excellent in kungfu and saves people from danger? Kung Fu Panda breaks your understanding of pandas and makes you imagine the possibility of "Nothing is impossible" in a virtual animated world. This comment can extract the topic as: panda, kungfu, and inspiration.
[0099] For example, the LDA algorithm is used (the algorithm is an unsupervised method that does not require labeled data and only needs to set the number of topics to achieve topic extraction). The comment data is processed, mainly to remove some invalid words and stop words such as no, just, only, is, and person. Then, the number of topics is set (such as 2, 5, or 8). Finally, the LDA algorithm is used to automatically extract the topic of the comment data.
[0100] Optionally, after the topic extraction model is used to extract the topic of each explanation in the explanation library, thereby obtaining the topic corresponding to each explanation, the method further includes: sorting the explanations according to the size of the support quantity of each explanation, thereby obtaining the support degree sorting of the explanations.
[0101] Step 104, calculating the similarity between the topic corresponding to each explanation in the explanation library and each explanation feature of the recommended item, thereby determining the explanation result corresponding to the recommended item according to the similarity.
[0102] In this step, the similarity between the topic corresponding to each explanation in the explanation library and each explanation feature of the recommended item is calculated, and these similarities are compared with a similarity threshold, thereby screening the most suitable explanation from the explanation library as the explanation result corresponding to the recommended item.
[0103] Optionally, step 104 can comprise: calculating the similarity between the topic corresponding to each explanation in the explanation library and each explanation feature of the recommended item; and for each explanation in the explanation library, if the similarity between the topic corresponding to the explanation and each explanation feature of the recommended item is greater than a similarity threshold (the greater the similarity, the more in line with the requirements), taking the explanation as the explanation result corresponding to the recommended item. Specifically, the explanation features of the recommended item can be selected in order according to the importance ranking, and the similarity between the explanation feature and the topic corresponding to each explanation in the explanation library is measured (for example, using a distance formula between words or calculating the cosine distance of two word vectors, wherein the smaller the distance, the greater the similarity), and if the similarity between the explanation feature and the topic of an explanation exceeds the preset similarity threshold, the explanation is taken as the explanation result corresponding to the recommended item.
[0104] In some embodiments of the present application, the explanation with the greatest similarity to the explanation features of the recommended item can also be screened from the explanation library, and this explanation is taken as the explanation result corresponding to the recommended item. Specifically, for each explanation in the explanation library, the sum of the similarity between the topic of the explanation and each explanation feature of the recommended item is calculated, and the explanation with the greatest sum of similarity (that is, the explanation with the greatest similarity to the explanation features) is taken as the explanation result.
[0105] Optionally, step 104 further comprises: if there are multiple explanations with similarity greater than the similarity threshold, screening the target explanation with the highest ranking according to the support degree ranking of the multiple explanations, and taking the target explanation as the explanation result corresponding to the recommended item. In some embodiments of the present application, there can be multiple explanations with similarity greater than the similarity threshold, and if this occurs, the explanation with the highest ranking (target explanation) is screened according to the support degree ranking of the explanations, and then this explanation is taken as the explanation result corresponding to the recommended item.
[0106] Optionally, step 104 further comprises: if there is no explanation with similarity greater than the similarity threshold, screening the target feature with the highest ranking according to the importance ranking of each explanation feature of the recommended item, and generating the explanation result corresponding to the recommended item according to the target feature. In some embodiments of the present application, there can be no explanation with similarity greater than the similarity threshold, and if this occurs, the feature with the highest ranking (target feature) is screened according to the importance ranking of each explanation feature of the recommended item, and then the feature is filled into the explanation template, thereby generating the explanation result corresponding to the recommended item.
[0107] For example, the explanation feature "action film" of the movie "Kung Fu Panda" is filled into the explanation target "recommended for you according to your favorite __", thereby generating the explanation result "recommended for you according to your favorite action film".
[0108] According to various embodiments described above, it can be seen that the embodiments of the present application solve the technical problem that it is difficult to explain the recommendation result output by the model in the prior art by screening the explanation features from the various item features of the recommended item according to the importance ranking of the various item features, and calculating the similarity between the topic corresponding to each explanation in the explanation library and each explanation feature, thereby determining the technical means of the explanation result corresponding to the recommended item. The embodiments of the present application obtain the importance ranking of the various item features through the score of the target user on each item, which not only ensures sufficient data quantity, but also ensures better explainability of the recommendation result, and the similarity between the explanation features and the evaluation topics is calculated to realize the explanation of the recommendation result by combining the item features and the comment data, thereby improving the explainability of the recommendation result.
[0109] Figure 3 is a schematic diagram of the main process of the generation method of the explanation result according to one reference embodiment of the present application. As another embodiment of the present application, as shown in Figure 3 the generation method of the explanation result can include:
[0110] Step 301, training a deep learning model by taking the user features of the sample users and the item features of the sample items as inputs, and taking the scores of the sample users on the sample items as outputs, thereby obtaining an item recommendation model.
[0111] In order to obtain the scores of the target user on each item through the item recommendation model, the item recommendation model needs to be trained in advance. Specifically, the user features of the sample users, the scores of each sample user on the sample items, and the item features of each sample item can be obtained, a training set is constructed through these data, and then supervised training is performed by using AutoRec model, DeepCrossing model, NeuralCF model, or Wide&Deep model, thereby training the item recommendation model.
[0112] Step 302, calculating the scores of the target user on each item by using the trained item recommendation model.
[0113] Specifically, the user features of the target user and the item features of the to-be-calculated item are input into the item recommendation model, and the item recommendation model will output the score of the target user on the item.
[0114] Step 303, constructing an explanation training set by using the item features of the various items and the scores of the various items.
[0115] Step 304, fitting the explanation training set by using a machine learning model, obtaining the weight corresponding to each parameter of the machine learning model, and thereby obtaining the weight of each item feature.
[0116] Optionally, a linear model such as a ridge regression model can be used for fitting to obtain the weight corresponding to each parameter of the model, thereby obtaining the weight of each item feature.
[0117] Step 305, ranking the item features according to the weight of each item feature, thereby obtaining the importance ranking of the item features.
[0118] Step 306, filtering the explanation features from the item features of the recommended item according to the importance ranking of the item features.
[0119] Specifically, the ranking of the item features of the recommended item is determined according to the importance ranking of the item features, and the explanation features with high importance ranking are filtered from the item features of the recommended item according to the feature quantity threshold. The explanation features with high importance ranking can be filtered from the item features of the recommended item through the importance ranking, and the filtered item features can be used as the explanation of the item features.
[0120] Step 307, constructing an explanation library according to the evaluation data of the recommended item, thereby extracting the topic corresponding to each explanation in the explanation library.
[0121] Optionally, the positive evaluation can be used to construct the explanation library, and for each explanation in the explanation library, a topic extraction model can be used to extract the topic corresponding to each explanation.
[0122] Step 308, calculating the similarity between the topic corresponding to each explanation in the explanation library and each explanation feature of the recommended item.
[0123] Optionally, the distance formula between words or the cosine distance of two word vectors can be used to calculate the similarity between the topic and the explanation feature.
[0124] Step 309, for each explanation in the explanation library, if the similarity between the topic corresponding to the explanation and each explanation feature of the recommended item is greater than the similarity threshold, the explanation is used as the explanation result corresponding to the recommended item.
[0125] In some embodiments of the present application, if multiple explanations have a similarity greater than the similarity threshold, the explanation with the highest support degree is selected as the explanation result of the recommended item.
[0126] In addition, the specific implementation of the explanation result generation method in the reference embodiment of the present application has been described in detail in the above explanation result generation method, and therefore the repeated content will not be described here.
[0127] Figure 4 FIG. 1 is a schematic diagram of the main flow of the explanation result generation method according to another reference embodiment of the present application. As another embodiment of the present application, as shown in FIG. 1, the explanation result generation method can include: Figure 4
[0128] Step 401: According to the scores of the target user for each item, the importance ranking of each item feature is obtained.
[0129] Step 402: According to the importance ranking of each item feature, the ranking of each item feature of the recommended item is determined.
[0130] Step 403: According to the feature quantity threshold, the explanation features with high importance ranking are selected from each item feature of the recommended item.
[0131] Step 404: The trained sentiment analysis model is used to identify each evaluation data of the recommended item, so as to determine the sentiment of the evaluation data as positive or negative.
[0132] Step 405: The evaluation data with positive sentiment is used to construct an explanation library.
[0133] Step 406: The topic extraction model is used to extract the topic of each explanation in the explanation library, so as to obtain the topic corresponding to each explanation.
[0134] Step 407: The explanations are ranked according to the number of likes, so as to obtain the like ranking of each explanation.
[0135] Step 408: The similarity between the topic of each explanation in the explanation library and each explanation feature of the recommended item is calculated, so as to determine the explanation result corresponding to the recommended item according to the similarity.
[0136] In addition, the specific implementation of the explanation result generation method is explained in another embodiment of the present application, which has been described in detail in the above explanation result generation method, and therefore the repeated content is not described here.
[0137] Figure 5 is a schematic diagram of the main modules of the explanation result generation device according to an embodiment of the present application, as Figure 5 shown, the explanation result generation device 500 includes a sorting module 501, a screening module 502, an extraction module 503, and a calculation module 504; wherein the sorting module 501 is configured to obtain the importance ranking of each item feature according to the score of each item of the target user; the screening module 502 is configured to screen the explanation feature from each item feature of the recommended item according to the importance ranking of each item feature; the extraction module 503 is configured to construct an explanation library according to the evaluation data of the recommended item, thereby extracting the topic corresponding to each explanation in the explanation library; and the calculation module 504 is configured to calculate the similarity between the topic corresponding to each explanation in the explanation library and each explanation feature of the recommended item, thereby determining the corresponding explanation result of the recommended item according to the similarity.
[0138] Optionally, the sorting module 501 is further configured to:
[0139] calculate the score of each item of the target user by using the trained item recommendation model;
[0140] construct an explanation training set by using the item features of each item and the score of each item;
[0141] fit the explanation training set by using a machine learning model, obtain the weight corresponding to each parameter of the machine learning model, and thereby obtain the weight of each item feature;
[0142] sort the each item feature according to the size of the weight of each item feature, and thereby obtain the importance ranking of each item feature.
[0143] Optionally, it further includes a training module configured to:
[0144] train a deep learning model by using the user features of the sample user and the item features of the sample item as input and the score of the sample user on the sample item as output, and thereby obtain an item recommendation model.
[0145] Optionally, the screening module 502 is further configured to:
[0146] determine the ranking of each item feature of the recommended item according to the importance ranking of each item feature;
[0147] According to a characteristic quantity threshold, important explanation characteristics with high importance rankings are selected from the characteristic quantities of the recommended item.
[0148] Optionally, the extraction module 503 is further configured to:
[0149] The trained sentiment analysis model is used to identify each piece of evaluation data of the recommended item, so as to determine the sentiment of the evaluation data as positive or negative.
[0150] The evaluation data with positive sentiment is used to construct an explanation library.
[0151] A topic extraction model is used to extract the topic of each explanation in the explanation library, so as to obtain the topic corresponding to each explanation.
[0152] Optionally, the extraction module 503 is further configured to:
[0153] After the topic extraction model is used to extract the topic of each explanation in the explanation library, the support quantity of each explanation is sorted according to the size of the support quantity, so as to obtain the support degree ranking of each explanation.
[0154] Optionally, the calculation module 504 is further configured to:
[0155] The similarity between the topic corresponding to each explanation in the explanation library and each explanation characteristic of the recommended item is calculated.
[0156] For each explanation in the explanation library, if the similarity between the topic corresponding to the explanation and each explanation characteristic of the recommended item is greater than a similarity threshold, the explanation is taken as the explanation result corresponding to the recommended item.
[0157] Optionally, the calculation module 504 is further configured to:
[0158] If there are multiple explanations with similarity greater than the similarity threshold, the target explanation with the highest ranking is selected according to the support degree ranking of the multiple explanations, and the target explanation is taken as the explanation result corresponding to the recommended item.
[0159] Optionally, the calculation module 504 is further configured to:
[0160] If there is no explanation with similarity greater than the similarity threshold, the target characteristic with the highest ranking is selected according to the importance ranking of each explanation characteristic of the recommended item, and the target characteristic is used to generate the explanation result corresponding to the recommended item.
[0161] It should be noted that the specific implementation of the explanation result generation apparatus of the present application has been described in detail in the above-mentioned explanation result generation method, and therefore the repeated content will not be described here.
[0162] Figure 6 An exemplary system architecture 600 in which the explanation result generation method or the explanation result generation apparatus of the embodiments of the present application can be applied is shown.
[0163] As shown in Figure 6 , the system architecture 600 can include terminal devices 601, 602, 603, a network 604 and a server 605. The network 604 is a medium for providing a communication link between the terminal devices 601, 602, 603 and the server 605. The network 604 can include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0164] The user can use the terminal devices 601, 602, 603 to interact with the server 605 through the network 604 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 601, 602, 603, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0165] The terminal devices 601, 602, 603 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers and desktop computers, etc.
[0166] The server 605 can be a server that provides various services, such as a background management server that provides support for shopping websites browsed by users using the terminal devices 601, 602, 603 (only as an example). The background management server can analyze and process received item information query requests and other data, and feed back the processing results (such as target push information, item information - only as examples) to the terminal devices.
[0167] It should be noted that the explanation result generation method provided by the embodiments of the present application is generally executed by the server 605, and accordingly, the explanation result generation apparatus is generally provided in the server 605.
[0168] It should be understood that Figure 6 the number of terminal devices, networks and servers in may be only illustrative. Depending on the implementation needs, there can be any number of terminal devices, networks and servers.
[0169] Reference is made below to Figure 7 , which shows a structural schematic diagram of a computer system 700 of a terminal device suitable for implementing the embodiments of the present application.Figure 7 The terminal device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0170] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 702 or programs loaded from storage section 708 into random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the system 700. The CPU 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0171] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.
[0172] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 709, and / or installed from removable medium 711. When the computer program is executed by central processing unit (CPU) 701, it performs the functions defined above in the system of this invention.
[0173] It should be noted that the computer-readable medium shown in the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or component. In the present application, the computer-readable signal medium can include a data signal carried in a baseband or as a part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various forms, including but not limited to an electromagnetic signal, an optical signal or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, which can send, propagate or transmit a program for use by or in conjunction with an instruction execution system, device or component. The program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0174] The flowcharts and block diagrams in the drawings illustrate the possible implementation architectures, functions and operations of the systems, methods and computer programs according to various embodiments of the present application. In this regard, each block in the flowcharts or block diagrams can represent a module, a program segment or a part of code containing one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different order than that shown in the drawings. For example, two blocks that are shown in succession can actually be executed substantially in parallel, and sometimes in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams or flowcharts, and the combination of blocks in the block diagrams or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0175] The modules described in the embodiments of the present application can be implemented in the form of software or hardware. The modules described can also be arranged in a processor, for example, a processor can be described as including a sorting module, a screening module, an extracting module and a calculating module, wherein the names of the modules do not constitute a limitation on the modules themselves in some cases.
[0176] As another aspect, the present application also provides a computer readable medium, which can be included in the device described in the above embodiments or exist independently without being assembled into the device. The computer readable medium carries one or more programs, when the one or more programs are executed by the device, the device implements the following method: obtaining an importance ranking of each item feature according to the scores of each item by a target user; screening an explanation feature from each item feature of a recommended item according to the importance ranking of each item feature; constructing an explanation library according to the evaluation data of the recommended item, thereby extracting a topic corresponding to each explanation in the explanation library; calculating the similarity between the topic corresponding to each explanation in the explanation library and each explanation feature of the recommended item, thereby determining an explanation result corresponding to the recommended item according to the similarity.
[0177] According to the technical scheme of the embodiments of the present application, because the explanation feature is screened from each item feature of the recommended item according to the importance ranking of each item feature, the similarity between the topic corresponding to each explanation in the explanation library and each explanation feature is calculated, thereby the technical means of determining the explanation result corresponding to the recommended item is overcome, which overcomes the technical problem that it is difficult to explain the recommended result output by the model in the prior art. The embodiments of the present application obtain the importance ranking of each item feature according to the scores of each item by a target user, which not only ensures sufficient data quantity, but also ensures better explanation of the recommended result, and the similarity between the explanation feature and the evaluation topic is calculated to realize the explanation of the recommended result by combining the item feature and the comment data, thereby improving the explanation of the recommended result.
[0178] The above specific embodiments do not constitute a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made depending on design requirements and other factors. Any modification, equivalent replacement and improvement made within the spirit and principles of the present application shall fall within the scope of the present application.
Claims
1. A method for generating interpretation results, characterized in that, include: Based on the target users' ratings of each item, the importance of each item's features is ranked. Based on the importance of each item feature, explanatory features are selected from the various item features of the recommended items. An interpretation library is constructed based on the evaluation data of the recommended items, thereby extracting the topic corresponding to each interpretation in the interpretation library; Calculate the similarity between the topic corresponding to each explanation in the explanation library and each explanation feature of the recommended item, and then generate the explanation result corresponding to the recommended item based on the similarity.
2. The method according to claim 1, characterized in that, Based on the target users' ratings of each item, the importance of each item's features is ranked, including: A trained item recommendation model is used to calculate the target user's rating for each item; An explanatory training set is constructed using the item features and the ratings of each item. By fitting the training set of the explanation using a machine learning model, the weights corresponding to each parameter of the machine learning model are obtained, thereby obtaining the weights of each item feature. The item features are sorted according to their weights to obtain a ranking of their importance.
3. The method according to claim 2, characterized in that, Before calculating the target user's ratings for each item using the trained item recommendation model, the following steps are also included: By taking the user characteristics of sample users and the item characteristics of sample items as inputs, and the ratings of the sample users for the sample items as outputs, a deep learning model is trained to obtain an item recommendation model.
4. The method according to claim 1, characterized in that, Based on the importance of each item feature, explanatory features are selected from the item features of the recommended items, including: The order of the item features of the recommended items is determined by ranking them according to their importance. Based on the feature quantity threshold, the explanatory features ranked higher in importance are selected from the various item features of the recommended items.
5. The method according to claim 1, characterized in that, An interpretation library is constructed based on the evaluation data of the recommended items, thereby extracting the topics corresponding to each interpretation in the interpretation library, including: A trained sentiment analysis model is used to identify each rating data point of the recommended items, thereby determining whether the sentiment of the rating data is positive or negative; An explanatory library was constructed using positive sentiment rating data; A topic extraction model is used to extract topics from each explanation in the explanation library, thereby obtaining the topic corresponding to each explanation.
6. The method according to claim 5, characterized in that, After extracting the topic for each explanation in the explanation library using a topic extraction model to obtain the topic corresponding to each explanation, the process further includes: The explanations are sorted according to the number of supporting explanations, thus obtaining the ranking of the degree of support for each explanation.
7. The method according to claim 6, characterized in that, Calculate the similarity between the topic corresponding to each explanation in the explanation library and each explanation feature of the recommended item, and then generate the explanation result corresponding to the recommended item based on the similarity, including: Calculate the similarity between the topic corresponding to each explanation in the explanation library and each explanation feature of the recommended item; For each explanation in the explanation library, if the similarity between the topic corresponding to the explanation and each explanation feature of the recommended item is greater than the similarity threshold, then the explanation is taken as the explanation result corresponding to the recommended item.
8. The method according to claim 7, characterized in that, Calculating the similarity between the topic corresponding to each explanation in the explanation library and each explanation feature of the recommended item, and generating the explanation result corresponding to the recommended item based on the similarity, further includes: If there are multiple explanations with similarity scores all greater than the similarity threshold, the top-ranked target explanation is selected based on the degree of support among the multiple explanations, and this target explanation is used as the explanation result corresponding to the recommended item.
9. The method according to claim 8, characterized in that, Calculating the similarity between the topic corresponding to each explanation in the explanation library and each explanation feature of the recommended item, and generating the explanation result corresponding to the recommended item based on the similarity, further includes: If there are no explanations with similarity scores greater than the similarity threshold, then the target feature with the highest ranking is selected based on the importance of each explanation feature of the recommended item, and the explanation result corresponding to the recommended item is generated based on the target feature.
10. An apparatus for generating interpretation results, characterized in that, include: The sorting module is used to rank the importance of each item's features based on the target user's rating of each item. The filtering module is used to sort the items according to the importance of each item feature and filter out explanatory features from the various item features of the recommended items. The extraction module is used to construct an interpretation library based on the evaluation data of the recommended items, thereby extracting the topic corresponding to each interpretation in the interpretation library; The calculation module is used to calculate the similarity between the topic corresponding to each explanation in the explanation library and each explanation feature of the recommended item, and then determine the explanation result corresponding to the recommended item based on the similarity.
11. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-9.
12. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-9.
Citation Information
Patent Citations
Post-event interpretability recommendation method and device based on matrix decomposition
CN111259238A
Article recommendation method and device
CN111767459A