[go: up one dir, main page]

CN108920665B - Recommendation scoring method and device based on network structure and review text - Google Patents

Recommendation scoring method and device based on network structure and review text Download PDF

Info

Publication number
CN108920665B
CN108920665B CN201810729637.2A CN201810729637A CN108920665B CN 108920665 B CN108920665 B CN 108920665B CN 201810729637 A CN201810729637 A CN 201810729637A CN 108920665 B CN108920665 B CN 108920665B
Authority
CN
China
Prior art keywords
feature matrix
sample
type
target
target user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810729637.2A
Other languages
Chinese (zh)
Other versions
CN108920665A (en
Inventor
石川
韩霄天
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing University of Posts and Telecommunications
Original Assignee
Beijing University of Posts and Telecommunications
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing University of Posts and Telecommunications filed Critical Beijing University of Posts and Telecommunications
Priority to CN201810729637.2A priority Critical patent/CN108920665B/en
Publication of CN108920665A publication Critical patent/CN108920665A/en
Application granted granted Critical
Publication of CN108920665B publication Critical patent/CN108920665B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0631Item recommendations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0623Item investigation
    • G06Q30/0625Directed, with specific intent or strategy
    • G06Q30/0627Directed, with specific intent or strategy using item specifications

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明实施例提供了一种基于网络结构和评论文本的推荐评分方法及装置,所述方法包括:确定多个样本用户中的目标用户,并确定多个样本商品中的目标商品;获取针对目标用户的第一类特征矩阵,以及针对目标商品的第二类特征矩阵;获取针对目标用户的第三类特征矩阵,以及针对目标商品的第四类特征矩阵;将针对目标用户的第一类特征矩阵和第三类特征矩阵、以及针对目标商品的第二类特征矩阵和第四类特征矩阵输入推荐网络模型,得到目标用户对目标商品的预测评分值。从而充分考虑了用户与商品之间的交互信息,包括评论文本信息以及评分信息,能够实现更加准确的预测用户对商品的购买期望。

Figure 201810729637

Embodiments of the present invention provide a method and device for recommendation scoring based on a network structure and comment text, the method includes: determining a target user in a plurality of sample users, and determining a target commodity in a plurality of sample commodities; The first type of feature matrix for the user, and the second type of feature matrix for the target product; the third type of feature matrix for the target user and the fourth type of feature matrix for the target product are obtained; the first type of feature matrix for the target user is obtained The matrix and the third-type feature matrix, as well as the second-type feature matrix and the fourth-type feature matrix for the target product, are input into the recommendation network model to obtain the predicted score value of the target user for the target product. Therefore, the interaction information between the user and the product, including the comment text information and the rating information, can be fully considered, and the user's purchase expectation of the product can be predicted more accurately.

Figure 201810729637

Description

基于网络结构和评论文本的推荐评分方法及装置Recommendation scoring method and device based on network structure and review text

技术领域technical field

本发明涉及机器学习技术领域,特别是涉及一种基于网络结构和评论文本的推荐评分方法及装置。The present invention relates to the technical field of machine learning, in particular to a method and device for recommendation scoring based on network structure and review text.

背景技术Background technique

随着电子商务的发展,互联网公司能够提供大量的商品供用户选择,用户面对大量的商品很难做出选择。目前,主要使用推荐系统帮助用户进行选择。其中,推荐系统是使用深度学习的方法,利用用户对商品的购买信息对神经网络模型进行训练得到的系统。With the development of e-commerce, Internet companies can provide a large number of commodities for users to choose from, and it is difficult for users to make choices in the face of a large number of commodities. Currently, recommender systems are mainly used to help users make choices. Among them, the recommendation system is a system obtained by using the deep learning method to train the neural network model by using the user's purchase information of the product.

利用推荐系统为用户推荐商品时,对于每个候选商品,将该用户对不同商品的购买信息,以及与该候选商品的被购买信息输入推荐系统,进而得到该用户对该候选商品的评分值,该评分值表示用户对商品的购买期望。推荐系统将评分值较高的候选商品推荐给用户。When using the recommendation system to recommend products for users, for each candidate product, the user's purchase information of different products and the purchased information of the candidate product are input into the recommendation system, and then the user's rating value for the candidate product is obtained, The rating value represents the user's purchase expectation of the product. The recommender system recommends candidate products with higher ratings to users.

由上可见,向用户推荐商品时,对候选商品的评分值起着重要的作用。It can be seen from the above that when recommending products to users, the scoring value of candidate products plays an important role.

然而,目前的推荐系统仅是利用用户对商品的购买信息进行训练得到的。用户对商品的购买信息并不能完全表示用户与商品的交互信息,仅利用用户对商品的购买信息对神经网络模型进行训练,得到的推荐系统并不准确对候选商品进行评分,进而导致不能有效的帮助用户对商品做出选择。However, the current recommendation system is only obtained by training users' purchase information of commodities. The user's purchase information of the product does not fully represent the interaction information between the user and the product. Only using the user's purchase information for the product to train the neural network model, the obtained recommendation system does not accurately score the candidate products, resulting in ineffectiveness. Help users make choices about products.

发明内容SUMMARY OF THE INVENTION

本发明实施例的目的在于提供一种基于网络结构和评论文本的推荐评分方法及装置,以提高预测用户对商品的评分的准确性。具体技术方案如下:The purpose of the embodiments of the present invention is to provide a recommendation scoring method and device based on a network structure and comment text, so as to improve the accuracy of predicting the user's scoring of a commodity. The specific technical solutions are as follows:

为了提高预测用户对商品的评分的准确性,本发明实施例提供了一种基于网络结构和评论文本的推荐评分方法,所述方法包括:In order to improve the accuracy of predicting a user's rating of a product, an embodiment of the present invention provides a recommendation rating method based on a network structure and comment text, the method comprising:

确定多个样本用户中的目标用户,并确定多个样本商品中的目标商品;Determine the target user among the multiple sample users, and determine the target product among the multiple sample products;

获取针对所述目标用户的第一类特征矩阵,以及针对所述目标商品的第二类特征矩阵;所述第一类特征矩阵和所述第二类特征矩阵均是根据所述多个样本用户对所述多个样本商品的评论文本信息确定的;Obtain a first-type feature matrix for the target user and a second-type feature matrix for the target product; both the first-type feature matrix and the second-type feature matrix are based on the multiple sample users Determined by the comment text information of the plurality of sample commodities;

获取针对所述目标用户的第三类特征矩阵,以及针对所述目标商品的第四类特征矩阵;所述第三类特征矩阵和所述第四类特征矩阵均是根据所述多个样本用户对所述多个样本商品的购买网络结构信息确定的;Obtain a third-type feature matrix for the target user and a fourth-type feature matrix for the target product; both the third-type feature matrix and the fourth-type feature matrix are based on the multiple sample users The purchase network structure information of the plurality of sample commodities is determined;

将针对所述目标用户的第一类特征矩阵和第三类特征矩阵、以及针对所述目标商品的第二类特征矩阵和第四类特征矩阵输入推荐网络模型,得到所述目标用户对所述目标商品的预测评分值;Input the first-type feature matrix and the third-type feature matrix for the target user, as well as the second-type feature matrix and the fourth-type feature matrix for the target product into the recommendation network model, and obtain the target user's opinion on the The predicted score value of the target product;

其中,所述推荐网络模型为根据训练集训练得到的模型,所述训练集包括:针对每个样本用户的第一类特征矩阵、针对每个样本商品的第二类特征矩阵、针对每个样本用户的第三类特征矩阵、针对每个样本商品的第四类特征矩阵以及多个样本用户对多个样本商品的真实评分值。The recommendation network model is a model obtained by training according to a training set, and the training set includes: a first-type feature matrix for each sample user, a second-type feature matrix for each sample commodity, and a second-type feature matrix for each sample The user's third-type feature matrix, the fourth-type feature matrix for each sample item, and the real rating values of multiple sample users for multiple sample items.

可选的,针对所述目标用户的第一类特征矩阵和针对所述目标商品的第二类特征矩阵通过以下步骤确定:Optionally, the first-type feature matrix for the target user and the second-type feature matrix for the target product are determined by the following steps:

获取所述多个样本用户对所述多个样本商品的多个评论文本信息;Acquiring a plurality of comment text information of the plurality of sample users on the plurality of sample commodities;

对所述多个评论文本信息进行分词处理,得到每一评论文本信息的词向量;Perform word segmentation processing on the plurality of comment text information to obtain a word vector of each comment text information;

根据所述目标用户的多个评论文本信息的词向量,确定针对所述目标用户的第一类特征矩阵;determining a first-type feature matrix for the target user according to word vectors of multiple comment text information of the target user;

根据所述目标商品的多个评论文本信息的词向量,确定针对所述目标商品的第二类特征矩阵。A second type feature matrix for the target product is determined according to word vectors of multiple comment text information of the target product.

可选的,所述购买网络结构信息为基于所述多个样本用户对所述多个样本商品的购买信息的异质信息网络的网络结构信息,所述异质信息网络的节点包括所述多个样本用户和所述多个样本商品,所述异质信息网络的边用于连接样本用户和样本商品,所述异质信息网络的边用于指示样本用户对样本商品存在真实评分值;Optionally, the purchase network structure information is network structure information of a heterogeneous information network based on the purchase information of the plurality of sample users for the plurality of sample commodities, and the nodes of the heterogeneous information network include the plurality of samples. a sample user and the plurality of sample products, the edge of the heterogeneous information network is used to connect the sample user and the sample product, and the edge of the heterogeneous information network is used to indicate that the sample user has a real rating value for the sample product;

针对所述目标用户的第三类特征矩阵和针对所述目标商品的第四类特征矩阵通过以下步骤确定:The third type of feature matrix for the target user and the fourth type of feature matrix for the target product are determined by the following steps:

基于所述异质信息网络中样本用户和样本商品的连接关系,以所述目标用户为起始节点进行随机游走,确定多个第一随机游走序列,并以目标商品为起始节点进行随机游走,确定多个第二随机游走序列;所述第一随机游走序列包含第一预设数量个节点;所述第二随机游走序列包含第二预设数量个节点;Based on the connection relationship between sample users and sample commodities in the heterogeneous information network, a random walk is performed with the target user as the starting node, a plurality of first random walk sequences are determined, and the target commodity is used as the starting node to perform a random walk. Random walk, determining a plurality of second random walk sequences; the first random walk sequence includes a first preset number of nodes; the second random walk sequence includes a second preset number of nodes;

根据多个所述第一随机游走序列,确定针对所述目标用户的第三类特征矩阵;determining a third type of feature matrix for the target user according to a plurality of the first random walk sequences;

根据多个所述第二随机游走序列,确定针对所述目标商品的第四类特征矩阵。A fourth type of feature matrix for the target commodity is determined according to a plurality of the second random walk sequences.

可选的,所述推荐网络模型包括:第一神经网络模型、第二神经网络模型、第三神经网络模型以及第四神经网络模型;Optionally, the recommendation network model includes: a first neural network model, a second neural network model, a third neural network model, and a fourth neural network model;

所述将针对所述目标用户的第一类特征矩阵和第三类特征矩阵、以及针对所述目标商品的第二类特征矩阵和第四类特征矩阵输入推荐网络模型,得到所述目标用户对所述目标商品的预测评分值,包括:The first type of feature matrix and the third type of feature matrix for the target user, and the second type of feature matrix and the fourth type of feature matrix for the target product are input into the recommendation network model, to obtain the target user pair. The predicted score value of the target product, including:

将针对所述目标用户的第一类特征矩阵输入所述第一神经网络模型,得到第一特征向量;Inputting the first type of feature matrix for the target user into the first neural network model to obtain a first feature vector;

将针对所述目标商品的第二类特征矩阵输入所述第二神经网络模型,得到第二特征向量;Inputting the second type of feature matrix for the target product into the second neural network model to obtain a second feature vector;

将针对所述目标用户的第三类特征矩阵输入所述第三神经网络模型,得到第三特征向量;Inputting the third type of feature matrix for the target user into the third neural network model to obtain a third feature vector;

将针对所述目标商品的第四类特征矩阵输入所述第四神经网络模型,得到第四特征向量;Inputting the fourth type of feature matrix for the target product into the fourth neural network model to obtain a fourth feature vector;

将所述第一特征向量、所述第二特征向量、所述第三特征向量以及所述第四特征向量按照多视图机器学习算法进行融合,得到融合特征向量;Fusing the first feature vector, the second feature vector, the third feature vector and the fourth feature vector according to a multi-view machine learning algorithm to obtain a fusion feature vector;

通过激活函数处理所述融合特征向量,得到所述目标用户对所述目标商品的预测评分值。The fusion feature vector is processed by an activation function to obtain the predicted rating value of the target product by the target user.

可选的,所述推荐网络模型采用以下步骤训练获得:Optionally, the recommendation network model is obtained by training in the following steps:

获取预设的神经网络模型和所述训练集;Obtain a preset neural network model and the training set;

将针对多个样本用户的第一类特征矩阵、针对多个样本商品的第二类特征矩阵、针对多个样本用户的第三类特征矩阵、针对多个样本商品的第四类特征矩阵输入所述神经网络模型,得到多个样本用户对多个样本商品的预测评分值;Input the first-type feature matrix for multiple sample users, the second-type feature matrix for multiple sample products, the third-type feature matrix for multiple sample users, and the fourth-type feature matrix for multiple sample products. The neural network model described above is used to obtain the predicted rating values of multiple sample users for multiple sample commodities;

根据得到的预测评分值和所述训练集中包括的真实评分值,确定损失值;Determine the loss value according to the obtained predicted score value and the real score value included in the training set;

根据所述损失值确定所述神经网络模型是否收敛;Determine whether the neural network model converges according to the loss value;

若否,则调整所述神经网络模型中的参数值,并返回所述将针对多个样本用户的第一类特征矩阵、针对多个样本商品的第二类特征矩阵、针对多个样本用户的第三类特征矩阵、针对多个样本商品的第四类特征矩阵输入所述神经网络模型,得到多个样本用户对多个样本商品的预测评分值的步骤;If not, adjust the parameter values in the neural network model, and return the first-type feature matrix for multiple sample users, the second-type feature matrix for multiple sample commodities, and the multiple sample users. The third type of feature matrix and the fourth type of feature matrix for a plurality of sample commodities are input into the neural network model, and the steps of obtaining the predicted score values of a plurality of sample users for a plurality of sample commodities;

若是,则将当前的神经网络模型确定为推荐网络模型。If so, the current neural network model is determined as the recommendation network model.

为实现上述目的,本发明实施例还提供了一种基于网络结构和评论文本的推荐评分装置,所述装置包括:In order to achieve the above object, an embodiment of the present invention further provides a recommendation scoring device based on a network structure and comment text, the device comprising:

确定模块,用于确定多个样本用户中的目标用户,并确定多个样本商品中的目标商品;a determination module, used for determining a target user among the multiple sample users, and determining the target product among the multiple sample products;

第一获取模块,用于获取针对所述目标用户的第一类特征矩阵,以及针对所述目标商品的第二类特征矩阵;所述第一类特征矩阵和所述第二类特征矩阵均是根据所述多个样本用户对所述多个样本商品的评论文本信息确定的;The first obtaining module is used to obtain a first-type feature matrix for the target user and a second-type feature matrix for the target commodity; both the first-type feature matrix and the second-type feature matrix are Determined according to the textual information of comments of the plurality of sample users on the plurality of sample commodities;

第二获取模块,用于获取针对所述目标用户的第三类特征矩阵,以及针对所述目标商品的第四类特征矩阵;所述第三类特征矩阵和所述第四类特征矩阵均是根据所述多个样本用户对所述多个样本商品的购买网络结构信息确定的;The second acquiring module is configured to acquire the third type of feature matrix for the target user and the fourth type of feature matrix for the target product; both the third type of feature matrix and the fourth type of feature matrix are Determined according to the purchase network structure information of the plurality of sample users for the plurality of sample commodities;

预测模块,用于将针对所述目标用户的第一类特征矩阵和第三类特征矩阵、以及针对所述目标商品的第二类特征矩阵和第四类特征矩阵输入推荐网络模型,得到所述目标用户对所述目标商品的预测评分值。The prediction module is used for inputting the first-type feature matrix and the third-type feature matrix for the target user, and the second-type feature matrix and the fourth-type feature matrix for the target product into the recommendation network model, to obtain the The predicted rating value of the target product by the target user.

可选的,所述第一获取模块,具体用于:Optionally, the first obtaining module is specifically used for:

获取所述多个样本用户对所述多个样本商品的多个评论文本信息;Acquiring a plurality of comment text information of the plurality of sample users on the plurality of sample commodities;

对所述多个评论文本信息进行分词处理,得到每一评论文本信息的词向量;Perform word segmentation processing on the plurality of comment text information to obtain a word vector of each comment text information;

根据所述目标用户的多个评论文本信息的词向量,确定针对所述目标用户的第一类特征矩阵;determining a first-type feature matrix for the target user according to word vectors of multiple comment text information of the target user;

根据所述目标商品的多个评论文本信息的词向量,确定针对所述目标商品的第二类特征矩阵。A second type feature matrix for the target product is determined according to word vectors of multiple comment text information of the target product.

可选的,所述购买网络结构信息为基于所述多个样本用户对所述多个样本商品的购买信息的异质信息网络的网络结构信息,所述异质信息网络的节点包括所述多个样本用户和所述多个样本商品,所述异质信息网络的边用于连接样本用户和样本商品,所述异质信息网络的边用于指示样本用户对样本商品存在真实评分值;Optionally, the purchase network structure information is network structure information of a heterogeneous information network based on the purchase information of the plurality of sample users for the plurality of sample commodities, and the nodes of the heterogeneous information network include the plurality of samples. a sample user and the plurality of sample products, the edge of the heterogeneous information network is used to connect the sample user and the sample product, and the edge of the heterogeneous information network is used to indicate that the sample user has a real rating value for the sample product;

所述第二获取模块,具体用于:The second acquisition module is specifically used for:

基于所述异质信息网络中样本用户和样本商品的连接关系,以所述目标用户为起始节点进行随机游走,确定多个第一随机游走序列,并以目标商品为起始节点进行随机游走,确定多个第二随机游走序列;所述第一随机游走序列包含第一预设数量个节点;所述第二随机游走序列包含第二预设数量个节点;Based on the connection relationship between sample users and sample commodities in the heterogeneous information network, a random walk is performed with the target user as the starting node, a plurality of first random walk sequences are determined, and the target commodity is used as the starting node to perform a random walk. Random walk, determining a plurality of second random walk sequences; the first random walk sequence includes a first preset number of nodes; the second random walk sequence includes a second preset number of nodes;

根据多个所述第一随机游走序列,确定针对所述目标用户的第三类特征矩阵;determining a third type of feature matrix for the target user according to a plurality of the first random walk sequences;

根据多个所述第二随机游走序列,确定针对所述目标商品的第四类特征矩阵。A fourth type of feature matrix for the target commodity is determined according to a plurality of the second random walk sequences.

可选的,所述推荐网络模型包括:第一神经网络模型、第二神经网络模型、第三神经网络模型以及第四神经网络模型;Optionally, the recommendation network model includes: a first neural network model, a second neural network model, a third neural network model, and a fourth neural network model;

所述预测模块,具体用于:The prediction module is specifically used for:

将针对所述目标用户的第一类特征矩阵输入所述第一神经网络模型,得到第一特征向量;Inputting the first type of feature matrix for the target user into the first neural network model to obtain a first feature vector;

将针对所述目标商品的第二类特征矩阵输入所述第二神经网络模型,得到第二特征向量;Inputting the second type of feature matrix for the target product into the second neural network model to obtain a second feature vector;

将针对所述目标用户的第三类特征矩阵输入所述第三神经网络模型,得到第三特征向量;Inputting the third type of feature matrix for the target user into the third neural network model to obtain a third feature vector;

将针对所述目标商品的第四类特征矩阵输入所述第四神经网络模型,得到第四特征向量;Inputting the fourth type of feature matrix for the target product into the fourth neural network model to obtain a fourth feature vector;

将所述第一特征向量、所述第二特征向量、所述第三特征向量以及所述第四特征向量按照多视图机器学习算法进行融合,得到融合特征向量;Fusing the first feature vector, the second feature vector, the third feature vector and the fourth feature vector according to a multi-view machine learning algorithm to obtain a fusion feature vector;

通过激活函数处理所述融合特征向量,得到所述目标用户对所述目标商品的预测评分值。The fusion feature vector is processed by an activation function to obtain the predicted rating value of the target product by the target user.

可选的,所述装置还包括:Optionally, the device further includes:

训练模块,用于训练所述推荐网络模型;a training module for training the recommendation network model;

所述训练模块,具体用于:The training module is specifically used for:

获取预设的神经网络模型和所述训练集;Obtain a preset neural network model and the training set;

将针对多个样本用户的第一类特征矩阵、针对多个样本商品的第二类特征矩阵、针对多个样本用户的第三类特征矩阵、针对多个样本商品的第四类特征矩阵输入所述神经网络模型,得到多个样本用户对多个样本商品的预测评分值;Input the first-type feature matrix for multiple sample users, the second-type feature matrix for multiple sample products, the third-type feature matrix for multiple sample users, and the fourth-type feature matrix for multiple sample products. The neural network model described above is used to obtain the predicted rating values of multiple sample users for multiple sample commodities;

根据得到的预测评分值和所述训练集中包括的真实评分值,确定损失值;Determine the loss value according to the obtained predicted score value and the real score value included in the training set;

根据所述损失值确定所述神经网络模型是否收敛;Determine whether the neural network model converges according to the loss value;

若否,则调整所述神经网络模型中的参数值,并返回所述将针对多个样本用户的第一类特征矩阵、针对多个样本商品的第二类特征矩阵、针对多个样本用户的第三类特征矩阵、针对多个样本商品的第四类特征矩阵输入所述神经网络模型,得到多个样本用户对多个样本商品的预测评分值的步骤;If not, adjust the parameter values in the neural network model, and return the first-type feature matrix for multiple sample users, the second-type feature matrix for multiple sample commodities, and the multiple sample users. The third type of feature matrix and the fourth type of feature matrix for a plurality of sample commodities are input into the neural network model, and the steps of obtaining the predicted score values of a plurality of sample users for a plurality of sample commodities;

若是,则将当前的神经网络模型确定为推荐网络模型。If so, the current neural network model is determined as the recommendation network model.

为实现上述目的,本发明实施例还提供了一种电子设备,包括处理器、通信接口、存储器和通信总线;其中,处理器、通信接口、存储器通过通信总线完成相互间的通信;In order to achieve the above object, an embodiment of the present invention also provides an electronic device, including a processor, a communication interface, a memory, and a communication bus; wherein, the processor, the communication interface, and the memory communicate with each other through the communication bus;

存储器,用于存放计算机程序;memory for storing computer programs;

处理器,用于执行存储器上所存放的程序时,实现上述任一方法步骤。The processor is configured to implement any of the above method steps when executing the program stored in the memory.

为实现上述目的,本发明实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述任一方法步骤。To achieve the above object, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any one of the above method steps is implemented.

本发明实施例中,基于针对每个样本用户的第一类特征矩阵和第三类特征矩阵,针对每个样本商品的第二类特征矩阵和第四类特征矩阵,以及多个样本用户对多个样本商品的真实评分值,训练获得推荐网络模型。将针对目标用户的第一类特征矩阵和第三类特征矩阵、以及针对目标商品的第二类特征矩阵和第四类特征矩阵输入训练好的推荐网络模型,得到目标用户对目标商品的预测评分值。In the embodiment of the present invention, based on the first-type feature matrix and the third-type feature matrix for each sample user, the second-type feature matrix and the fourth-type feature matrix for each sample commodity, and the multiple sample user-to-many The real rating value of each sample product is trained to obtain the recommendation network model. Input the first-type feature matrix and third-type feature matrix for the target user, as well as the second-type feature matrix and the fourth-type feature matrix for the target product into the trained recommendation network model, and obtain the target user's prediction score for the target product value.

其中,第一类特征矩阵和第二类特征矩阵均是根据多个样本用户对多个样本商品的评论文本信息确定的,第三类特征矩阵和第四类特征矩阵均是根据多个样本用户对多个样本商品的购买网络结构信息确定的。根据第一类特征矩阵、第二类特征矩阵、第三类特征矩阵和第四类特征矩阵确定目标用户对目标商品的预测评分值,充分考虑了用户与商品之间的交互信息,即充分考虑了用户与商品之间的评论文本信息以及评分信息,能够实现更加准确的预测用户对商品的购买期望,提高了对商品评分的准确性。Among them, the first type of feature matrix and the second type of feature matrix are both determined according to the textual information of multiple sample users' comments on multiple sample products, and the third type of feature matrix and the fourth type of feature matrix are based on multiple sample users. The purchase network structure information of multiple sample commodities is determined. According to the first type of feature matrix, the second type of feature matrix, the third type of feature matrix and the fourth type of feature matrix, the predicted score value of the target user for the target product is determined, and the interaction information between the user and the product is fully considered. The review text information and rating information between the user and the product can be more accurately predicted, and the user's purchase expectation of the product can be predicted, and the accuracy of the product rating can be improved.

当然,实施本发明的任一产品或方法并不一定需要同时达到以上所述的所有优点。Of course, it is not necessary for any product or method of the present invention to achieve all of the advantages described above at the same time.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative efforts.

图1为本发明实施例提供的基于网络结构和评论文本的推荐评分方法的一种流程图;Fig. 1 is a kind of flow chart of the recommendation scoring method based on network structure and comment text provided by the embodiment of the present invention;

图2为本发明实施例提供的异质信息网络的一种示意图;2 is a schematic diagram of a heterogeneous information network provided by an embodiment of the present invention;

图3为本发明实施例提供的基于网络结构和评论文本的推荐评分方法的一种示例性示意图;3 is an exemplary schematic diagram of a recommendation scoring method based on a network structure and comment text provided by an embodiment of the present invention;

图4为本发明实施例提供的基于网络结构和评论文本的推荐评分装置的一种结构示意图;4 is a schematic structural diagram of a recommendation scoring device based on a network structure and comment text provided by an embodiment of the present invention;

图5为本发明实施例提供的电子设备的一种结构示意图。FIG. 5 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

为了解决对商品评分的不够准确的问题,本发明实施例提供了一种基于网络结构和评论文本的推荐评分方法,可以参见图1,图1为本发明实施例提供的基于网络结构和评论文本的推荐评分方法的一种流程图,该方法包括以下步骤:In order to solve the problem of inaccurate product scoring, an embodiment of the present invention provides a recommendation scoring method based on a network structure and comment text. Referring to FIG. 1, FIG. 1 is a network structure and comment text-based method provided by an embodiment of the present invention. A flowchart of the recommendation scoring method of , the method includes the following steps:

步骤S101:确定多个样本用户中的目标用户,并确定多个样本商品中的目标商品。Step S101: Determine a target user among the plurality of sample users, and determine a target commodity among the plurality of sample commodities.

在本发明实施例中,可以预先获取大量样本用户和大量样本商品。其中,部分样本用户对部分样本商品存在评分信息,部分样本用户对部分样本商品存在评论文本信息。例如,样本用户为某购物平台的用户,样本商品为该购物平台所提供的商品,这些样本用户购买了该购物平台的部分样本商品并进行了评分,这些样本用户中又有一些样本用户对所购买的样本商品进行了评论。In this embodiment of the present invention, a large number of sample users and a large number of sample commodities may be acquired in advance. Among them, some sample users have rating information for some sample products, and some sample users have comment text information for some sample products. For example, the sample users are users of a shopping platform, the sample products are the products provided by the shopping platform, these sample users have purchased some sample products of the shopping platform and rated them, and some of these sample users Purchased sample items are reviewed.

基于这些信息数据,对于某一样本用户以及样本商品,其中该样本用户对该样本商品没有评分信息以及评论文本信息,本发明实施例所要实现的是:预测该样本用户对该样本商品的预测评分值,预测评分值也可以表示该样本用户对该样本商品的购买期望。Based on these information data, for a sample user and a sample product, wherein the sample user does not have rating information and comment text information for the sample product, what the embodiment of the present invention needs to achieve is to predict the predicted score of the sample user for the sample product The predicted score value can also represent the purchase expectation of the sample user for the sample product.

即在步骤S101中,可以先从多个样本用户中确定出目标用户,从多个样本商品中确定出目标商品,其中,目标用户对目标商品是没有评分信息和评论文本信息的。That is, in step S101, a target user may be determined from a plurality of sample users first, and a target commodity may be determined from a plurality of sample commodities, wherein the target user has no rating information and comment text information on the target commodity.

步骤S102:获取针对目标用户的第一类特征矩阵,以及针对目标商品的第二类特征矩阵。其中,第一类特征矩阵和第二类特征矩阵均是根据多个样本用户对多个样本商品的评论文本信息确定的。Step S102: Obtain a first-type feature matrix for the target user and a second-type feature matrix for the target commodity. The first type of feature matrix and the second type of feature matrix are both determined according to the textual information of comments of multiple sample users on multiple sample commodities.

在本发明实施例中,可以将目标用户对多个样本商品所做的评论文本信息转换为矩阵的表示形式,可得到针对目标用户的第一类特征矩阵。可以将多个样本用户对目标商品所做的评论文本信息转换为矩阵的表示形式,得到针对目标商品的第二类特征矩阵。In the embodiment of the present invention, the text information of the comments made by the target user on multiple sample commodities can be converted into a matrix representation, and the first-type feature matrix for the target user can be obtained. The text information of comments made by multiple sample users on the target product can be converted into a matrix representation to obtain the second type of feature matrix for the target product.

在本发明的一种实现方式中,针对目标用户的第一类特征矩阵和针对目标商品的第二类特征矩阵可通过以下步骤确定。In an implementation manner of the present invention, the first-type feature matrix for the target user and the second-type feature matrix for the target commodity may be determined through the following steps.

步骤11:获取多个样本用户对多个样本商品的多个评论文本信息。Step 11: Acquire multiple comment text information of multiple sample users on multiple sample commodities.

在本步骤中,可以获取多个样本用户对多个样本商品所做的所有评论文本信息。In this step, all comment text information made by multiple sample users on multiple sample products can be obtained.

步骤12:对多个评论文本信息进行分词处理,得到每一评论文本信息的词向量。Step 12: Perform word segmentation on a plurality of comment text information to obtain a word vector of each comment text information.

在本步骤中,可以对步骤11中获取的所有评论文本信息均进行分词处理,得到每一个评论文本信息的词向量。In this step, word segmentation processing may be performed on all the comment text information obtained in step 11 to obtain a word vector of each comment text information.

一种实现方式中,对于每一评论文本信息,在进行分词处理时,可以删除评论文本信息中所有的标点符号,再将评论文本信息拆分为单词的形式。将评论文本信息的每个单词均对应转换为数字的形式,得到该评论文本信息对应的包含一串数字的词向量。In an implementation manner, for each comment text information, during word segmentation processing, all punctuation marks in the comment text information can be deleted, and then the comment text information can be split into the form of words. Each word of the comment text information is correspondingly converted into a digital form, and a word vector corresponding to the comment text information containing a string of numbers is obtained.

步骤13:根据目标用户的多个评论文本信息的词向量,确定针对目标用户的第一类特征矩阵。Step 13: Determine a first-type feature matrix for the target user according to word vectors of multiple comment text information of the target user.

其中,目标用户的多个评论文本信息为:目标用户对多个样本商品所做的评论文本信息的总和。例如,目标用户购买过样本商品I1、样本商品I2、样本商品I3以及样本商品I4,且对样本商品I1、样本商品I2、以及样本商品I4做过评论,那么将目标用户对样本商品I1、样本商品I2、以及样本商品I4所做的评论文本信息均确定为目标用户的评论文本信息。Wherein, the multiple comment text information of the target user is: the sum of the comment text information made by the target user on multiple sample commodities. For example, if the target user has purchased sample product I 1 , sample product I 2 , sample product I 3 and sample product I 4 , and has commented on sample product I 1 , sample product I 2 , and sample product I 4 , the target user will The comment text information made by the user on the sample product I 1 , the sample product I 2 , and the sample product I 4 is determined as the comment text information of the target user.

一种实现方式中,在确定出目标用户后,可以获取目标用户的多个评论文本信息对应的词向量,将这些词向量组合起来,即可得到针对目标用户的第一类特征矩阵。In an implementation manner, after the target user is determined, word vectors corresponding to multiple comment text information of the target user can be obtained, and these word vectors can be combined to obtain the first-type feature matrix for the target user.

步骤14:根据目标商品的多个评论文本信息的词向量,确定针对目标商品的第二类特征矩阵。Step 14: Determine a second-type feature matrix for the target product according to word vectors of multiple comment text information of the target product.

其中,目标商品的多个评论文本信息为:多个不同的样本用户对目标商品所做的评论文本信息的总和。例如,目标商品被用户U1、用户U2、用户U3以及用户U4购买过,且用户U1、用户U2、以及用户U4对目标商品做过评论,那么将用户U1、用户U2、以及用户U4对目标商品所做的评论文本信息均确定为目标商品的评论文本信息。Wherein, the multiple comment text information of the target product is: the sum of the comment text information made by multiple different sample users on the target product. For example, the target product has been purchased by user U 1 , user U 2 , user U 3 and user U 4 , and user U 1 , user U 2 , and user U 4 have commented on the target product, then user U 1 , user U 2 , and user U 4 have commented on the target product. The comment text information made by U 2 and the user U 4 on the target commodity is determined as the comment text information of the target commodity.

一种实现方式中,在确定出目标商品后,可以获取目标商品的多个评论文本信息的词向量,将这些词向量组合起来,即可得到针对目标商品的第二类特征矩阵。In an implementation manner, after the target product is determined, word vectors of multiple comment text information of the target product can be obtained, and these word vectors can be combined to obtain the second-type feature matrix for the target product.

本发明实施例中,不限定步骤13与步骤14的执行顺序。In this embodiment of the present invention, the execution order of step 13 and step 14 is not limited.

当然,每一样本用户或样本商品的多个评论文本信息均可采用本发明实施例提供的上述步骤11-14的方法流程转换为矩阵的方式,对此不做限定。Certainly, the multiple comment text information of each sample user or sample product may be converted into a matrix using the method flow of the above steps 11-14 provided in the embodiment of the present invention, which is not limited.

在本发明的一种实现方式中,当需要确定目标用户对目标商品的预测评分值时,可以按照上述步骤11-14的方法流程,确定针对目标用户的第一类特征矩阵,以及针对目标商品的第二类特征矩阵,以提高确定的针对目标用户的第一类特征矩阵以及针对目标商品的第二类特征矩阵的准确性,进而提高确定的预测评分值的准确性。In an implementation manner of the present invention, when it is necessary to determine the predicted rating value of the target user for the target product, the first type of feature matrix for the target user can be determined according to the method flow of the above steps 11-14, and the target product to improve the accuracy of the determined first-type feature matrix for the target user and the second-type feature matrix for the target commodity, thereby improving the accuracy of the determined prediction score value.

在本发明的另一种实现方式中,可以预先计算出针对每一样本用户的第一类特征矩阵以及针对每一样本商品的第二类特征矩阵,将计算得到的多个第一类特征矩阵以及多个第二类特征矩阵均作为训练集中的数据预先存储于数据库中。In another implementation manner of the present invention, a first-type feature matrix for each sample user and a second-type feature matrix for each sample commodity may be pre-calculated, and a plurality of first-type feature matrices obtained by calculation and multiple second-type feature matrices are pre-stored in the database as data in the training set.

当需要确定目标用户对目标商品的预测评分值时,直接从数据库中获取针对目标用户的第一类特征矩阵以及针对目标商品的第二类特征矩阵,以提高计算的效率。When it is necessary to determine the predicted score value of the target user for the target product, the first type feature matrix for the target user and the second type feature matrix for the target product are directly obtained from the database to improve the calculation efficiency.

步骤S103:获取针对目标用户的第三类特征矩阵,以及针对目标商品的第四类特征矩阵。第三类特征矩阵和第四类特征矩阵均是根据多个样本用户对多个样本商品的购买网络结构信息确定的。Step S103: Acquire a third-type feature matrix for the target user and a fourth-type feature matrix for the target commodity. Both the third type of feature matrix and the fourth type of feature matrix are determined according to the purchase network structure information of multiple sample users for multiple sample commodities.

在本发明实施例中,购买网络结构信息表示的是哪些样本用户购买了哪些样本商品并对所购买的商品进行了评分,可以将购买网络结构信息以异质信息网络的形式表示,参见图2,图2为本发明实施例提供的异质信息网络的一种示意图,其中异质信息网络包括节点和边,节点包括样本用户和样本商品,连接样本用户和样本商品的边表示该样本用户对该样本商品发表过评分。In the embodiment of the present invention, the purchase network structure information indicates which sample users have purchased which sample commodities and have scored the purchased commodities. The purchase network structure information can be represented in the form of a heterogeneous information network, see FIG. 2 , FIG. 2 is a schematic diagram of a heterogeneous information network provided by an embodiment of the present invention, wherein the heterogeneous information network includes nodes and edges, the nodes include sample users and sample commodities, and the edge connecting the sample users and the sample commodities indicates that the sample users are paired with each other. This sample product has published ratings.

在本发明的一种实现方式中,针对目标用户的第三类特征矩阵和针对目标商品的第四类特征矩阵可通过以下步骤确定。In an implementation manner of the present invention, the third-type feature matrix for the target user and the fourth-type feature matrix for the target commodity may be determined through the following steps.

步骤21:基于异质信息网络中样本用户和样本商品的连接关系,以目标用户为起始节点进行随机游走,确定多个第一随机游走序列,并以目标商品为起始节点进行随机游走,确定多个第二随机游走序列。其中,第一随机游走序列包含第一预设数量个节点;所述第二随机游走序列包含第二预设数量个节点。Step 21: Based on the connection relationship between the sample users and the sample commodities in the heterogeneous information network, take the target user as the starting node to perform a random walk, determine a plurality of first random walk sequences, and take the target commodity as the starting node to perform random walks. walk, and determine a plurality of second random walk sequences. Wherein, the first random walk sequence includes a first preset number of nodes; the second random walk sequence includes a second preset number of nodes.

实际应用中,确定第一随机游走序列和第二随机游走序列时,由于有很多样本用户和很多样本商品,一个样本用户可以对多个样本商品进行过评分,因此以目标用户为起始节点的第一随机游走序列会有很多个。同理,第二随机游走序列也会有很多个。In practical applications, when determining the first random walk sequence and the second random walk sequence, since there are many sample users and many sample products, one sample user can score multiple sample products, so the target user is the starting point. There will be many first random walk sequences of nodes. Similarly, there will be many second random walk sequences.

现结合图2进行说明,假设,第一预设数量为5,目标用户为用户U3,则以用户U3为起始节点,沿着连接用户与商品的边进行随机游走,得到2个第一随机游走序列,包括:{U3、I2、U2、I1、U1},{U3、I3、U4、I4、U5}。2 , assuming that the first preset number is 5 and the target user is user U 3 , the user U 3 is used as the starting node, and a random walk is performed along the edge connecting the user and the product to obtain 2 The first random walk sequence includes: {U 3 , I 2 , U 2 , I 1 , U 1 }, {U 3 , I 3 , U 4 , I 4 , U 5 }.

同理,也可以确定以目标商品为起始节点进行随机游走,得到的多个第二随机游走序列。Similarly, it is also possible to determine a plurality of second random walk sequences obtained by performing random walks with the target commodity as a starting node.

在本发明的一种实现方式中,可以预先对每一样本用户和每一样本商品进行编号处理,则每一个第一随机游走序列和第二随机游走序列都可以转换为包含一串数字的向量。In an implementation of the present invention, each sample user and each sample commodity can be numbered in advance, and then each first random walk sequence and second random walk sequence can be converted to include a string of numbers vector.

例如,在图2所示的异质信息网络中,可以将用户U1、用户U2、用户U3、用户U4、用户U5分别编号为01、02、03、04、05,将商品I1、商品I2、商品I3、商品I4分别编号为11、12、13、14,则对于U3、I2、U2、I1、U1这个第一随机游走序列,可以表示为包含{03,12,02,11,01}的向量。For example, in the heterogeneous information network shown in FIG. 2 , user U 1 , user U 2 , user U 3 , user U 4 , and user U 5 may be numbered as 01, 02, 03, 04, and 05, respectively, and the commodity I 1 , commodity I 2 , commodity I 3 , and commodity I 4 are respectively numbered 11, 12, 13, and 14, then for the first random walk sequence U 3 , I 2 , U 2 , I 1 , and U 1 , we can Represented as a vector containing {03, 12, 02, 11, 01}.

步骤22:根据多个第一随机游走序列,确定针对目标用户的第三类特征矩阵。Step 22: Determine a third type of feature matrix for the target user according to a plurality of first random walk sequences.

获取到多个第一随机游走序列后,将这多个第一随机游走序列组合起来即可得到针对该目标用户的第三类特征矩阵。After a plurality of first random walk sequences are obtained, a third type of feature matrix for the target user can be obtained by combining the plurality of first random walk sequences.

在本发明的一种实现方式中,目标用户的多个第一随机游走序列均为包含一串数字的向量表示。则针对该目标用户的第三类特征矩阵即可由这些向量组合起来得到。In an implementation manner of the present invention, the multiple first random walk sequences of the target user are all vector representations including a string of numbers. Then the third type of feature matrix for the target user can be obtained by combining these vectors.

仍结合步骤21中的例子进行说明。针对用户U3的多个第一随机游走序列,包括:{U3、I2、U2、I1、U1},{U3、I3、U4、I4、U5}。那么可以将多个第一随机游走序列连接起来,得到一个长序列:{U3、I2、U2、I1、U1、U3、I3、U4、I4、U5}。The description will still be made with reference to the example in step 21 . Multiple first random walk sequences for user U 3 , including: {U 3 , I 2 , U 2 , I 1 , U 1 }, {U 3 , I 3 , U 4 , I 4 , U 5 }. Then you can connect multiple first random walk sequences to get a long sequence: {U 3 , I 2 , U 2 , I 1 , U 1 , U 3 , I 3 , U 4 , I 4 , U 5 } .

在本发明实施例中,用户以及商品均可以用向量来表示,该向量中可以包含一定数量个数值。例如,可以将用户U1、用户U2、用户U3、用户U4、用户U5分别表示为{0.1,0.2,0.3}、{0.1,0.3,0.1}、{0.2,0.1,0.3}、{0.2,0.3,0.1}、{0.3,0.1,0.2},商品I1、商品I2、商品I3、商品I4可以分别表示为为{0.7,0.8,0.9}、{0.7,0.9,0.8}、{0.8,0.7,0.9}、{0.8,0.9,0.7},则上述针对用户U3的多个第一随机游走序列组成的长序列{U3、I2、U2、I1、U1、U3、I3、U4、I4、U5}可以转换为以下矩阵:In this embodiment of the present invention, both the user and the commodity may be represented by a vector, and the vector may contain a certain number of numerical values. For example, user U 1 , user U 2 , user U 3 , user U 4 , user U 5 can be represented as {0.1, 0.2, 0.3}, {0.1, 0.3, 0.1}, {0.2, 0.1, 0.3}, {0.2, 0.3, 0.1}, {0.3, 0.1, 0.2}, commodity I 1 , commodity I 2 , commodity I 3 , commodity I 4 can be expressed as {0.7, 0.8, 0.9}, {0.7, 0.9, 0.8, respectively }, {0.8, 0.7, 0.9}, {0.8, 0.9, 0.7}, then the long sequence {U 3 , I 2 , U 2 , I 1 , U 1 , U 3 , I 3 , U 4 , I 4 , U 5 } can be transformed into the following matrices:

Figure BDA0001720533600000121
Figure BDA0001720533600000121

当然,上述实施例仅作为一种示例。在实际应用中,任何将多个序列转换为矩阵的方法均可应用于本发明实施例中。Of course, the above-mentioned embodiment is only an example. In practical applications, any method for converting multiple sequences into matrices can be applied in the embodiments of the present invention.

步骤23:根据多个第二随机游走序列,确定针对目标商品的第四类特征矩阵。Step 23: Determine the fourth type of feature matrix for the target commodity according to the plurality of second random walk sequences.

获取到多个第二随机游走序列后,将这多个第二随机游走序列组合起来即可得到针对该目标用户的第四类特征矩阵。After multiple second random walk sequences are acquired, a fourth type of feature matrix for the target user can be obtained by combining the multiple second random walk sequences.

在本发明的一种实现方式中,目标用户的多个第二随机游走序列均为包含一串数字的向量表示。则针对该目标用户的第四类特征矩阵即可由这些向量组合起来得到。具体可参考步骤22中的例子,此处不做赘述。In an implementation manner of the present invention, the multiple second random walk sequences of the target user are all vector representations including a string of numbers. Then the fourth type of feature matrix for the target user can be obtained by combining these vectors. For details, refer to the example in step 22, which is not repeated here.

本发明实施例中,不限定步骤22与步骤23的执行顺序。In this embodiment of the present invention, the execution order of step 22 and step 23 is not limited.

在本发明的一种实现方式中,当需要确定目标用户对目标商品的预测评分值时,可以按照上述步骤21-23的方法流程,确定针对目标用户的第三类特征矩阵,以及针对目标商品的第四类特征矩阵,以提高确定的针对目标用户的第三类特征矩阵以及针对目标商品的第四类特征矩阵的准确性,进而提高确定的预测评分值的准确性。In an implementation manner of the present invention, when it is necessary to determine the predicted score value of the target user for the target product, the third type of feature matrix for the target user can be determined according to the method flow of the above steps 21-23, and the target product to improve the accuracy of the determined third-type feature matrix for the target user and the fourth-type feature matrix for the target commodity, thereby improving the accuracy of the determined prediction score value.

在本发明的另一种实现方式中,可以预先计算出针对每一样本用户的第三类特征矩阵以及针对每一样本商品的第四类特征矩阵,将计算得到的多个第三类特征矩阵以及多个第四类特征矩阵均作为训练集中的数据预先存储于数据库中。In another implementation manner of the present invention, the third-type feature matrix for each sample user and the fourth-type feature matrix for each sample commodity may be pre-calculated, and the calculated third-type feature matrices and a plurality of fourth-type feature matrices are pre-stored in the database as data in the training set.

当需要确定目标用户对目标商品的预测评分值时,直接从数据库中获取针对目标用户的第三类特征矩阵以及针对目标商品的四类特征矩阵,以提高计算的效率。When it is necessary to determine the predicted score value of the target user for the target product, the third-type feature matrix for the target user and the fourth-type feature matrix for the target product are directly obtained from the database to improve the calculation efficiency.

本发明实施例中,不限定步骤S103与步骤S102的执行顺序。In this embodiment of the present invention, the execution order of step S103 and step S102 is not limited.

步骤S104:将针对目标用户的第一类特征矩阵和第三类特征矩阵、以及针对目标商品的第二类特征矩阵和第四类特征矩阵输入推荐网络模型,得到目标用户对目标商品的预测评分值。Step S104: Input the first-type feature matrix and the third-type feature matrix for the target user, and the second-type feature matrix and the fourth-type feature matrix for the target product into the recommendation network model, and obtain the target user's prediction score for the target product value.

其中,推荐网络模型为根据训练集训练得到的模型,训练集包括:针对每个样本用户的第一类特征矩阵、针对每个样本商品的第二类特征矩阵、针对每个样本用户的第三类特征矩阵、针对每个样本商品的第四类特征矩阵以及多个样本用户对多个样本商品的真实评分值。Among them, the recommendation network model is a model obtained by training according to the training set, and the training set includes: a first-type feature matrix for each sample user, a second-type feature matrix for each sample commodity, and a third-type feature matrix for each sample user. The class feature matrix, the fourth class feature matrix for each sample item, and the real rating values of multiple sample users for multiple sample items.

在确定出针对目标用户的第一类特征矩阵和第三类特征矩阵、以及针对目标商品的第二类特征矩阵和第四类特征矩阵,可以将这些特征矩阵输入推荐网络模型,即可得到目标用户对目标商品的预测评分值。After determining the first-type feature matrix and the third-type feature matrix for the target user, and the second-type feature matrix and the fourth-type feature matrix for the target product, these feature matrices can be input into the recommendation network model, and the target can be obtained. The user's predicted rating value for the target item.

参见图3,在本发明实施例中,推荐网络模型中可以包括第一神经网络模型、第二神经网络模型、第三神经网络模型以及第四神经网络模型,在将针对目标用户的第一类特征矩阵和第三类特征矩阵、以及针对目标商品的第二类特征矩阵和第四类特征矩阵输入推荐网络模型的步骤中,可以包括以下细化步骤:Referring to FIG. 3 , in this embodiment of the present invention, the recommendation network model may include a first neural network model, a second neural network model, a third neural network model, and a fourth neural network model. In the step of inputting the feature matrix and the third-type feature matrix, and the second-type feature matrix and the fourth-type feature matrix for the target product into the recommendation network model, the following refinement steps may be included:

将针对目标用户的第一类特征矩阵输入第一神经网络模型,得到第一特征向量;将针对目标商品的第二类特征矩阵输入第二神经网络模型,得到第二特征向量;将针对目标用户的第三类特征矩阵输入第三神经网络模型,得到第三特征向量;将针对目标商品的第四类特征矩阵输入第四神经网络模型,得到第四特征向量;将第一特征向量、第二特征向量、第三特征向量以及第四特征向量按照多视图机器学习算法进行融合,得到融合特征向量。Input the first type feature matrix for the target user into the first neural network model to obtain the first feature vector; input the second type feature matrix for the target product into the second neural network model to obtain the second feature vector; The third-type feature matrix of The feature vector, the third feature vector, and the fourth feature vector are fused according to a multi-view machine learning algorithm to obtain a fused feature vector.

其中,第一神经网络模型、第二神经网络模型、第三神经网络模型以及第四神经网络模型可以为循环神经网络模型、卷积神经网络模型、循环卷积神经网络模型、深度神经网络模型等。本发明实施例对此不做限定。Wherein, the first neural network model, the second neural network model, the third neural network model and the fourth neural network model may be a recurrent neural network model, a convolutional neural network model, a recurrent convolutional neural network model, a deep neural network model, etc. . This embodiment of the present invention does not limit this.

每一个神经网络模型都可以输出一个特征向量,为了综合考虑用户对商品的评论文本信息和用户对商品的评分信息,在本发明实施例中,可以将上述第一特征向量、第二特征向量、第三特征向量以及第四特征向量进行融合。Each neural network model can output a feature vector. In order to comprehensively consider the user's comment text information on the product and the user's rating information on the product, in this embodiment of the present invention, the above-mentioned first feature vector, second feature vector, The third feature vector and the fourth feature vector are fused.

在本发明的一种实现方式中,可以按照多视图机器学习算法进行融合,使用这种算法融合时各个特征向量中的数值能够相互作用,从而更好的整合四个特征向量。将多个向量基于多视图机器学习算法进行融合属于现有技术范畴,在此不做赘述。In an implementation manner of the present invention, the fusion can be performed according to a multi-view machine learning algorithm, and the numerical values in each feature vector can interact with each other during fusion using this algorithm, thereby better integrating the four feature vectors. Fusion of multiple vectors based on a multi-view machine learning algorithm belongs to the category of the prior art, and details are not described here.

第一特征向量、第二特征向量、第三特征向量以及第四特征向量融合后,可以得到一个融合特征向量,通过激活函数处理该融合特征向量,即可得到目标用户对目标商品的预测评分值。在本发明的一种实现方式中,可以采用线性整流函数(Rectified LinearUnit,ReLU)处理融合特征向量,也可以采用Sigmoid激活函数处理融合特征向量,还可以采用其他激活函数处理融合特征向量。激活函数可以根据实际需求进行选择确定,本发明实施例对此不做限定。After the first eigenvector, the second eigenvector, the third eigenvector and the fourth eigenvector are fused, a fused eigenvector can be obtained, and the fused eigenvector is processed by the activation function to obtain the target user's predicted rating value for the target product . In an implementation manner of the present invention, a linear rectification function (Rectified Linear Unit, ReLU) can be used to process the fusion feature vector, a sigmoid activation function can also be used to process the fusion feature vector, and other activation functions can also be used to process the fusion feature vector. The activation function may be selected and determined according to actual requirements, which is not limited in this embodiment of the present invention.

可见,本发明实施例中,基于针对每个样本用户的第一类特征矩阵和第三类特征矩阵,针对每个样本商品的第二类特征矩阵和第四类特征矩阵,以及多个样本用户对多个样本商品的真实评分值,训练获得推荐网络模型。将针对目标用户的第一类特征矩阵和第三类特征矩阵、以及针对目标商品的第二类特征矩阵和第四类特征矩阵输入训练好的推荐网络模型,得到目标用户对目标商品的预测评分值。It can be seen that in the embodiment of the present invention, based on the first-type feature matrix and the third-type feature matrix for each sample user, the second-type feature matrix and the fourth-type feature matrix for each sample product, and a plurality of sample users For the real rating values of multiple sample products, the recommendation network model is obtained by training. Input the first-type feature matrix and third-type feature matrix for the target user, as well as the second-type feature matrix and the fourth-type feature matrix for the target product into the trained recommendation network model, and obtain the target user's prediction score for the target product value.

其中,第一类特征矩阵和第二类特征矩阵均是根据多个样本用户对多个样本商品的评论文本信息确定的,第三类特征矩阵和第四类特征矩阵均是根据多个样本用户对多个样本商品的购买网络结构信息确定的。根据第一类特征矩阵、第二类特征矩阵、第三类特征矩阵和第四类特征矩阵确定目标用户对目标商品的预测评分值,充分考虑了用户与商品之间的交互信息,即充分考虑了用户与商品之间的评论文本信息以及评分信息,能够实现更加准确的预测用户对商品的购买期望,提高了对商品评分的准确性。Among them, the first type of feature matrix and the second type of feature matrix are both determined according to the textual information of multiple sample users' comments on multiple sample products, and the third type of feature matrix and the fourth type of feature matrix are based on multiple sample users. The purchase network structure information of multiple sample commodities is determined. According to the first type of feature matrix, the second type of feature matrix, the third type of feature matrix and the fourth type of feature matrix, the predicted score value of the target user for the target product is determined, and the interaction information between the user and the product is fully considered. The review text information and rating information between the user and the product can be more accurately predicted, and the user's purchase expectation of the product can be predicted, and the accuracy of the product rating can be improved.

本发明实施例中确定的预测评分值表示了目标用户对目标商品的购买期望,可以预设一个阈值,如果预测评分值大于该阈值,则说明目标用户对目标商品的购买期望较高,可以将该目标商品推荐给该目标用户。The predicted score value determined in the embodiment of the present invention represents the target user's purchase expectation for the target product, and a threshold may be preset. If the predicted score value is greater than the threshold value, it indicates that the target user has a high purchase expectation for the target product, and can be set as The target product is recommended to the target user.

在本发明实施例中,推荐网络模型可以采用以下步骤训练获得。In the embodiment of the present invention, the recommendation network model can be obtained by training in the following steps.

步骤31:获取预设的神经网络模型和所述训练集。Step 31: Acquire a preset neural network model and the training set.

所用于预测评分值的推荐网络模型是根据训练集训练得到的,其中,训练集包括针对每个样本用户的第一类特征矩阵、针对每个样本商品的第二类特征矩阵、针对每个样本用户的第三类特征矩阵、针对每个样本商品的第四类特征矩阵以及多个样本用户对多个样本商品的真实评分值。The recommended network model used to predict the rating value is obtained by training according to the training set, wherein the training set includes the first-type feature matrix for each sample user, the second-type feature matrix for each sample product, and the second-type feature matrix for each sample product. The user's third-type feature matrix, the fourth-type feature matrix for each sample item, and the real rating values of multiple sample users for multiple sample items.

在上述实施例中,已经介绍了确定训练集所包含的特征矩阵的方法,不再赘述。In the above embodiments, the method for determining the feature matrix included in the training set has been introduced, and will not be repeated here.

步骤32:将针对多个样本用户的第一类特征矩阵、针对多个样本商品的第二类特征矩阵、针对多个样本用户的第三类特征矩阵、针对多个样本商品的第四类特征矩阵输入神经网络模型,得到多个样本用户对多个样本商品的预测评分值。Step 32: Combine the first-type feature matrix for multiple sample users, the second-type feature matrix for multiple sample products, the third-type feature matrix for multiple sample users, and the fourth-type feature matrix for multiple sample products. The matrix is input to the neural network model, and the predicted rating values of multiple sample users for multiple sample products are obtained.

将上述四类特征矩阵输入神经网络模型,得到预测评分值的步骤可以参见上述推荐评分方法实施例中步骤S104部分的描述。The steps of inputting the above four types of feature matrices into the neural network model to obtain the predicted score value may refer to the description of step S104 in the above-mentioned embodiment of the recommendation scoring method.

在本发明实施例中,可以将一个样本用户对样本商品的真实评分值以及该样本用户的第一类特征矩阵、第三类特征矩阵以及该样本商品的第二类特征矩阵、第四类特征矩阵作为一组训练集数据。In this embodiment of the present invention, the real rating value of a sample user for the sample product, the first-type feature matrix and the third-type feature matrix of the sample user, and the second-type feature matrix and the fourth-type feature matrix of the sample product Matrix as a set of training set data.

在本发明的一种实现方式中,可以每次输入一组训练集数据,得到该组训练集数据对应的预测评分值。In an implementation manner of the present invention, a group of training set data may be input each time to obtain a prediction score value corresponding to the group of training set data.

在本发明的一种较佳的实现方式中,也可以每次输入多组训练集数据,得到每组训练集数据对应的预测评分值。In a preferred implementation manner of the present invention, multiple sets of training set data may also be input each time to obtain a predicted score value corresponding to each set of training set data.

举例来讲,若训练集数据包括10000个真实评分数据,每个真实评分数据都对应一个样本用户和样本商品,则每轮训练可以选取其中的100个真实评分数据进行训练,即将这100个真实评分数据以及其对应的样本用户和样本商品的特征矩阵输入神经网络模型,得到100个预测评分值。For example, if the training set data includes 10,000 real score data, and each real score data corresponds to a sample user and sample product, then 100 real score data can be selected for training in each round of training, that is, these 100 real score data can be selected for training. The rating data and its corresponding feature matrix of sample users and sample products are input into the neural network model, and 100 predicted rating values are obtained.

步骤33:根据得到的预测评分值和所述训练集中包括的真实评分值,确定损失值。Step 33: Determine the loss value according to the obtained predicted score value and the real score value included in the training set.

本申请实施例中,包括但不限于使用均方误差(Mean Squared Error,MSE)公式作为损失函数,得到损失值。In the embodiments of the present application, including but not limited to, using the mean squared error (Mean Squared Error, MSE) formula as the loss function to obtain the loss value.

步骤34:根据得到的损失值确定神经网络模型是否收敛。如果是,则执行步骤35。如果否,则步骤36。Step 34: Determine whether the neural network model has converged according to the obtained loss value. If so, go to step 35. If not, step 36.

步骤35:将当前的神经网络模型确定为推荐网络模型。Step 35: Determine the current neural network model as the recommendation network model.

步骤36:调整神经网络模型中的参数值,并返回执行步骤32。Step 36: Adjust the parameter values in the neural network model, and return to step 32.

基于相同的发明构思,根据上述基于网络结构和评论文本的推荐评分方法实施例,本发明实施例还提供了一种基于网络结构和评论文本的推荐评分装置,参见图4,可以包括以下模块:Based on the same inventive concept, according to the above-mentioned embodiment of the recommendation scoring method based on network structure and review text, an embodiment of the present invention also provides a recommendation scoring device based on network structure and review text, referring to FIG. 4 , which may include the following modules:

确定模块401,用于确定多个样本用户中的目标用户,并确定多个样本商品中的目标商品;A determination module 401, configured to determine a target user in a plurality of sample users, and determine a target commodity in the plurality of sample commodities;

第一获取模块402,用于获取针对目标用户的第一类特征矩阵,以及针对目标商品的第二类特征矩阵;第一类特征矩阵和第二类特征矩阵均是根据多个样本用户对多个样本商品的评论文本信息确定的;The first acquisition module 402 is configured to acquire a first-type feature matrix for target users and a second-type feature matrix for target commodities; both the first-type feature matrix and the second-type feature matrix are based on multiple sample user-to-many ratios. The comment text information of each sample product is determined;

第二获取模块403,用于获取针对目标用户的第三类特征矩阵,以及针对目标商品的第四类特征矩阵;第三类特征矩阵和第四类特征矩阵均是根据多个样本用户对多个样本商品的购买网络结构信息确定的;The second obtaining module 403 is configured to obtain a third-type feature matrix for the target user and a fourth-type feature matrix for the target product; both the third-type feature matrix and the fourth-type feature matrix are based on multiple sample users to The purchase network structure information of each sample commodity is determined;

预测模块404,用于将针对目标用户的第一类特征矩阵和第三类特征矩阵、以及针对目标商品的第二类特征矩阵和第四类特征矩阵输入推荐网络模型,得到目标用户对目标商品的预测评分值;The prediction module 404 is configured to input the first-type feature matrix and the third-type feature matrix for the target user, and the second-type feature matrix and the fourth-type feature matrix for the target product into the recommendation network model, so as to obtain the target user's preference for the target product. The predicted score value of ;

本发明实施例提供的基于网络结构和评论文本的推荐评分装置,将针对目标用户的第一类特征矩阵和第三类特征矩阵、以及针对目标商品的第二类特征矩阵和第四类特征矩阵输入训练好的推荐网络模型,得到目标用户对目标商品的预测评分值,其中,第一类特征矩阵和第二类特征矩阵均是根据多个样本用户对多个样本商品的评论文本信息确定的,第三类特征矩阵和第四类特征矩阵均是根据多个样本用户对多个样本商品的购买网络结构信息确定的。从而充分考虑了用户与商品之间的交互信息,包括评论文本信息以及评分信息,能够实现更加准确的预测用户对商品的购买期望。The network structure and review text-based recommendation scoring device provided by the embodiment of the present invention compares the first-type feature matrix and the third-type feature matrix for the target user, and the second-type feature matrix and the fourth-type feature matrix for the target product. Input the trained recommendation network model to obtain the predicted rating value of the target user for the target product, wherein the first-type feature matrix and the second-type feature matrix are determined according to the textual information of the comments of multiple sample users on multiple sample products , the third type of feature matrix and the fourth type of feature matrix are determined according to the purchase network structure information of multiple sample users for multiple sample commodities. Therefore, the interaction information between the user and the product, including the comment text information and the rating information, can be fully considered, and the user's purchase expectation of the product can be predicted more accurately.

在本发明的一个实施例中,第一获取模块402,具体可以用于:In an embodiment of the present invention, the first obtaining module 402 can be specifically used for:

获取所述多个样本用户对所述多个样本商品的多个评论文本信息;Acquiring a plurality of comment text information of the plurality of sample users on the plurality of sample commodities;

对所述多个评论文本信息进行分词处理,得到每一评论文本信息的词向量;Perform word segmentation processing on the plurality of comment text information to obtain a word vector of each comment text information;

根据所述目标用户的多个评论文本信息的词向量,确定针对所述目标用户的第一类特征矩阵;determining a first-type feature matrix for the target user according to word vectors of multiple comment text information of the target user;

根据所述目标商品的多个评论文本信息的词向量,确定针对所述目标商品的第二类特征矩阵。A second type feature matrix for the target product is determined according to word vectors of multiple comment text information of the target product.

在本发明的一个实施例中,购买网络结构信息为基于多个样本用户对多个样本商品的购买信息的异质信息网络的网络结构信息,异质信息网络的节点包括多个样本用户和多个样本商品,异质信息网络的边用于连接样本用户和样本商品,异质信息网络的边用于指示样本用户对样本商品存在真实评分值。In one embodiment of the present invention, the purchase network structure information is the network structure information of a heterogeneous information network based on the purchase information of a plurality of sample users for a plurality of sample commodities, and the nodes of the heterogeneous information network include a plurality of sample users and a plurality of samples. A sample product, the edge of the heterogeneous information network is used to connect the sample user and the sample product, and the edge of the heterogeneous information network is used to indicate that the sample user has a real rating value for the sample product.

第二获取模块403,具体可以用于:The second obtaining module 403 can be specifically used for:

基于异质信息网络中样本用户和样本商品的连接关系,以目标用户为起始节点进行随机游走,确定多个第一随机游走序列,并以目标商品为起始节点进行随机游走,确定多个第二随机游走序列;第一随机游走序列包含第一预设数量个节点;第二随机游走序列包含第二预设数量个节点;Based on the connection relationship between sample users and sample commodities in the heterogeneous information network, a random walk is performed with the target user as the starting node, a plurality of first random walk sequences are determined, and the random walk is performed with the target commodity as the starting node. determining a plurality of second random walk sequences; the first random walk sequence includes a first preset number of nodes; the second random walk sequence includes a second preset number of nodes;

根据多个第一随机游走序列,确定针对目标用户的第三类特征矩阵;determining a third type of feature matrix for the target user according to a plurality of first random walk sequences;

根据多个第二随机游走序列,确定针对目标商品的第四类特征矩阵。A fourth type of feature matrix for the target item is determined according to the plurality of second random walk sequences.

在本发明的一个实施例中,推荐网络模型包括:第一神经网络模型、第二神经网络模型、第三神经网络模型以及第四神经网络模型;In an embodiment of the present invention, the recommendation network model includes: a first neural network model, a second neural network model, a third neural network model, and a fourth neural network model;

预测模块404,具体可以用于:The prediction module 404 can be specifically used for:

将针对目标用户的第一类特征矩阵输入第一神经网络模型,得到第一特征向量;将针对目标商品的第二类特征矩阵输入第二神经网络模型,得到第二特征向量;将针对目标用户的第三类特征矩阵输入第三神经网络模型,得到第三特征向量;将针对目标商品的第四类特征矩阵输入第四神经网络模型,得到第四特征向量;将第一特征向量、第二特征向量、第三特征向量以及第四特征向量按照多视图机器学习算法进行融合,得到融合特征向量;通过激活函数处理融合特征向量,得到目标用户对目标商品的预测评分值。Input the first type feature matrix for the target user into the first neural network model to obtain the first feature vector; input the second type feature matrix for the target product into the second neural network model to obtain the second feature vector; The third-type feature matrix of The feature vector, the third feature vector and the fourth feature vector are fused according to the multi-view machine learning algorithm to obtain a fused feature vector; the fused feature vector is processed by an activation function to obtain the target user's predicted rating value for the target product.

在本发明的一个实施例中,在图3所示装置实施例的基础上,还可以包括训练模块,用于训练推荐网络模型,具体用于:In an embodiment of the present invention, on the basis of the apparatus embodiment shown in FIG. 3 , a training module may also be included for training a recommendation network model, specifically for:

获取预设的神经网络模型和训练集;Obtain preset neural network models and training sets;

将针对多个样本用户的第一类特征矩阵、针对多个样本商品的第二类特征矩阵、针对多个样本用户的第三类特征矩阵、针对多个样本商品的第四类特征矩阵输入神经网络模型,得到多个样本用户对多个样本商品的预测评分值;Input the first-type feature matrix for multiple sample users, the second-type feature matrix for multiple sample products, the third-type feature matrix for multiple sample users, and the fourth-type feature matrix for multiple sample products into the neural network. Network model to obtain the predicted rating values of multiple sample users for multiple sample commodities;

根据得到的预测评分值和训练集中包括的真实评分值,确定损失值;Determine the loss value according to the obtained predicted score value and the real score value included in the training set;

根据损失值确定神经网络模型是否收敛;Determine whether the neural network model converges according to the loss value;

若否,则调整神经网络模型中的参数值,并返回将针对多个样本用户的第一类特征矩阵、针对多个样本商品的第二类特征矩阵、针对多个样本用户的第三类特征矩阵、针对多个样本商品的第四类特征矩阵输入神经网络模型,得到多个样本用户对多个样本商品的预测评分值的步骤;If not, adjust the parameter values in the neural network model, and return the first-type feature matrix for multiple sample users, the second-type feature matrix for multiple sample products, and the third-type feature matrix for multiple sample users. Matrix, input the neural network model for the fourth type feature matrix of multiple sample commodities, and obtain the steps of obtaining the predicted score values of multiple sample users for multiple sample commodities;

若是,则将当前的神经网络模型确定为推荐网络模型。If so, the current neural network model is determined as the recommendation network model.

基于相同的发明构思,根据上述基于网络结构和评论文本的推荐评分方法实施例,本发明实施例还提供了一种电子设备,如图5所示,包括处理器501、通信接口502、存储器503和通信总线504,其中,处理器501,通信接口502,存储器503通过通信总线504完成相互间的通信,Based on the same inventive concept, according to the above embodiments of the recommendation scoring method based on network structure and comment text, an embodiment of the present invention further provides an electronic device, as shown in FIG. 5 , including a processor 501 , a communication interface 502 , and a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 complete the communication with each other through the communication bus 504,

存储器503,用于存放计算机程序;a memory 503 for storing computer programs;

处理器501,用于执行存储器503上所存放的程序时,实现上述图1所示的基于网络结构和评论文本的推荐评分方法实施例。其中,基于网络结构和评论文本的推荐评分方法包括:The processor 501 is configured to implement the above-mentioned embodiment of the recommendation scoring method based on the network structure and the comment text shown in FIG. 1 when executing the program stored in the memory 503 . Among them, recommendation scoring methods based on network structure and review text include:

确定多个样本用户中的目标用户,并确定多个样本商品中的目标商品;Determine the target user among the multiple sample users, and determine the target product among the multiple sample products;

获取针对所述目标用户的第一类特征矩阵,以及针对所述目标商品的第二类特征矩阵;所述第一类特征矩阵和所述第二类特征矩阵均是根据所述多个样本用户对所述多个样本商品的评论文本信息确定的;Obtain a first-type feature matrix for the target user and a second-type feature matrix for the target product; both the first-type feature matrix and the second-type feature matrix are based on the multiple sample users Determined by the comment text information of the plurality of sample commodities;

获取针对所述目标用户的第三类特征矩阵,以及针对所述目标商品的第四类特征矩阵;所述第三类特征矩阵和所述第四类特征矩阵均是根据所述多个样本用户对所述多个样本商品的购买网络结构信息确定的;Obtain a third-type feature matrix for the target user and a fourth-type feature matrix for the target product; both the third-type feature matrix and the fourth-type feature matrix are based on the multiple sample users The purchase network structure information of the plurality of sample commodities is determined;

将针对所述目标用户的第一类特征矩阵和第三类特征矩阵、以及针对所述目标商品的第二类特征矩阵和第四类特征矩阵输入推荐网络模型,得到所述目标用户对所述目标商品的预测评分值;Input the first-type feature matrix and the third-type feature matrix for the target user, as well as the second-type feature matrix and the fourth-type feature matrix for the target product into the recommendation network model, and obtain the target user's opinion on the The predicted score value of the target product;

其中,所述推荐网络模型为根据训练集训练得到的模型,所述训练集包括:针对每个样本用户的第一类特征矩阵、针对每个样本商品的第二类特征矩阵、针对每个样本用户的第三类特征矩阵、针对每个样本商品的第四类特征矩阵以及多个样本用户对多个样本商品的真实评分值。The recommendation network model is a model obtained by training according to a training set, and the training set includes: a first-type feature matrix for each sample user, a second-type feature matrix for each sample commodity, and a second-type feature matrix for each sample The user's third-type feature matrix, the fourth-type feature matrix for each sample item, and the real rating values of multiple sample users for multiple sample items.

在本发明实施例中,将针对目标用户的第一类特征矩阵和第三类特征矩阵、以及针对目标商品的第二类特征矩阵和第四类特征矩阵输入训练好的推荐网络模型,得到目标用户对目标商品的预测评分值,其中,第一类特征矩阵和第二类特征矩阵均是根据多个样本用户对多个样本商品的评论文本信息确定的,第三类特征矩阵和第四类特征矩阵均是根据多个样本用户对多个样本商品的购买网络结构信息确定的。从而充分考虑了用户与商品之间的交互信息,包括评论文本信息以及评分信息,能够实现更加准确的预测用户对商品的购买期望。In the embodiment of the present invention, the first-type feature matrix and the third-type feature matrix for the target user, and the second-type feature matrix and the fourth-type feature matrix for the target product are input into the trained recommendation network model to obtain the target The user's predicted rating value for the target product, wherein the first type of feature matrix and the second type of feature matrix are determined according to the textual information of the comments of multiple sample users on multiple sample products, the third type of feature matrix and the fourth type of feature matrix are determined. The feature matrix is determined according to the purchase network structure information of multiple sample users for multiple sample commodities. Therefore, the interaction information between the user and the product, including the comment text information and the rating information, can be fully considered, and the user's purchase expectation of the product can be predicted more accurately.

上述电子设备提到的通信总线504可以是外设部件互连标准(PeripheralComponent Interconnect,PCI)总线或扩展工业标准结构(Extended Industry StandardArchitecture,EISA)总线等。该通信总线504可以分为地址总线、数据总线、控制总线等。为便于表示,图5中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The communication bus 504 mentioned in the above electronic device may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an Extended Industry Standard Architecture (Extended Industry Standard Architecture, EISA) bus or the like. The communication bus 504 can be divided into an address bus, a data bus, a control bus, and the like. For ease of presentation, only one thick line is used in FIG. 5, but it does not mean that there is only one bus or one type of bus.

通信接口502用于上述电子设备与其他设备之间的通信。The communication interface 502 is used for communication between the above-mentioned electronic device and other devices.

存储器503可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,存储器503还可以是至少一个位于远离前述处理器的存储装置。The memory 503 may include random access memory (Random Access Memory, RAM), or may include non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk storage. Optionally, the memory 503 may also be at least one storage device located away from the aforementioned processor.

上述的处理器501可以是通用处理器,包括中央处理器(Central ProcessingUnit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(DigitalSignal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。The above-mentioned processor 501 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; it may also be a digital signal processor (Digital Signal Processing, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

基于相同的发明构思,根据上述基于网络结构和评论文本的推荐评分方法实施例,在本发明提供的又一实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述图1所示的基于网络结构和评论文本的推荐评分方法步骤。Based on the same inventive concept, according to the above-mentioned embodiments of the recommendation scoring method based on network structure and comment text, in another embodiment provided by the present invention, a computer-readable storage medium is also provided, in which the computer-readable storage medium stores A computer program is stored, and when the computer program is executed by the processor, the above-mentioned steps of the recommendation scoring method based on the network structure and the review text shown in FIG. 1 are implemented.

需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that, in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any relationship between these entities or operations. any such actual relationship or sequence exists. Moreover, the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device that includes a list of elements includes not only those elements, but also includes not explicitly listed or other elements inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.

本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置实施例、电子设备实施例及存储介质实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见基于网络结构和评论文本的推荐评分方法实施例的部分说明即可。Each embodiment in this specification is described in a related manner, and the same and similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the apparatus embodiment, the electronic device embodiment and the storage medium embodiment, since they are basically similar to the method embodiment, the description is relatively simple. For the relevant details, please refer to the embodiment of the recommendation scoring method based on network structure and comment text part of the description.

以上所述仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本发明的保护范围内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (6)

1. A recommendation scoring method based on a network structure and comment texts is characterized by comprising the following steps:
determining a target user in the plurality of sample users and determining a target commodity in the plurality of sample commodities;
acquiring a first class feature matrix for the target user and a second class feature matrix for the target commodity; the first type feature matrix and the second type feature matrix are determined according to comment text information of the sample users on the sample commodities;
acquiring a third type feature matrix for the target user and a fourth type feature matrix for the target commodity; the third type feature matrix and the fourth type feature matrix are determined according to the purchasing network structure information of the plurality of sample users on the plurality of sample commodities;
inputting the first class feature matrix and the third class feature matrix for the target user and the second class feature matrix and the fourth class feature matrix for the target commodity into a recommendation network model to obtain a prediction score value of the target user on the target commodity;
the recommended network model is a model obtained by training according to a training set, wherein the training set comprises: the first class feature matrix aiming at each sample user, the second class feature matrix aiming at each sample commodity, the third class feature matrix aiming at each sample user, the fourth class feature matrix aiming at each sample commodity and the real score values of a plurality of sample users on a plurality of sample commodities;
the first class characteristic matrix aiming at the target user and the second class characteristic matrix aiming at the target commodity are determined by the following steps:
acquiring a plurality of comment text messages of the plurality of sample users on the plurality of sample commodities;
performing word segmentation processing on the plurality of comment text messages to obtain a word vector of each comment text message;
determining a first class feature matrix aiming at the target user according to the word vectors of the comment text information of the target user;
determining a second class of feature matrix aiming at the target commodity according to the word vectors of the comment text messages of the target commodity;
the purchasing network structure information is network structure information of a heterogeneous information network based on purchasing information of the plurality of sample users on the plurality of sample commodities, nodes of the heterogeneous information network comprise the plurality of sample users and the plurality of sample commodities, edges of the heterogeneous information network are used for connecting the sample users and the sample commodities, and edges of the heterogeneous information network are used for indicating that the sample users have real scoring values on the sample commodities;
the third type feature matrix for the target user and the fourth type feature matrix for the target commodity are determined by the following steps:
based on the connection relation between the sample user and the sample commodity in the heterogeneous information network, randomly walking by taking the target user as an initial node to determine a plurality of first random walking sequences, randomly walking by taking the target commodity as the initial node to determine a plurality of second random walking sequences; the first random walk sequence comprises a first preset number of nodes; the second random walk sequence comprises a second preset number of nodes;
determining a third type of feature matrix aiming at the target user according to the plurality of first random walk sequences;
determining a fourth type feature matrix aiming at the target commodity according to the plurality of second random walk sequences;
the recommended network model includes: a first neural network model, a second neural network model, a third neural network model, and a fourth neural network model;
the step of inputting the first class feature matrix and the third class feature matrix for the target user and the second class feature matrix and the fourth class feature matrix for the target commodity into a recommendation network model to obtain the predicted score value of the target user on the target commodity comprises:
inputting a first class feature matrix aiming at the target user into the first neural network model to obtain a first feature vector;
inputting a second type of feature matrix aiming at the target commodity into the second neural network model to obtain a second feature vector;
inputting a third type of feature matrix aiming at the target user into the third neural network model to obtain a third feature vector;
inputting a fourth type of feature matrix aiming at the target commodity into the fourth neural network model to obtain a fourth feature vector;
fusing the first feature vector, the second feature vector, the third feature vector and the fourth feature vector according to a multi-view machine learning algorithm to obtain a fused feature vector;
and processing the fusion feature vector through an activation function to obtain the prediction score value of the target user on the target commodity.
2. The method of claim 1, wherein the recommended network model is obtained by training using the following steps:
acquiring a preset neural network model and the training set;
inputting a first class feature matrix aiming at a plurality of sample users, a second class feature matrix aiming at a plurality of sample commodities, a third class feature matrix aiming at a plurality of sample users and a fourth class feature matrix aiming at a plurality of sample commodities into the neural network model to obtain the prediction score values of the plurality of sample users on the plurality of sample commodities;
determining a loss value according to the obtained prediction score value and a real score value included in the training set;
determining whether the neural network model converges according to the loss value;
if not, adjusting parameter values in the neural network model, and returning to the step of inputting the first class feature matrix aiming at the plurality of sample users, the second class feature matrix aiming at the plurality of sample commodities, the third class feature matrix aiming at the plurality of sample users and the fourth class feature matrix aiming at the plurality of sample commodities into the neural network model to obtain the predicted score values of the plurality of sample users on the plurality of sample commodities;
and if so, determining the current neural network model as the recommended network model.
3. The method of claim 1, further comprising:
judging whether the predicted score value of the target user on the target commodity reaches a threshold value; and if so, recommending the target commodity to the target user.
4. A recommendation scoring apparatus based on a network structure and a comment text, the apparatus comprising:
the determining module is used for determining a target user in the plurality of sample users and determining a target commodity in the plurality of sample commodities;
the first acquisition module is used for acquiring a first class feature matrix aiming at the target user and a second class feature matrix aiming at the target commodity; the first type feature matrix and the second type feature matrix are determined according to comment text information of the sample users on the sample commodities;
the second acquisition module is used for acquiring a third type feature matrix aiming at the target user and a fourth type feature matrix aiming at the target commodity; the third type feature matrix and the fourth type feature matrix are determined according to the purchasing network structure information of the plurality of sample users on the plurality of sample commodities;
the prediction module is used for inputting the first class characteristic matrix and the third class characteristic matrix aiming at the target user and the second class characteristic matrix and the fourth class characteristic matrix aiming at the target commodity into a recommendation network model to obtain a prediction score value of the target user on the target commodity;
the first obtaining module is specifically configured to:
acquiring a plurality of comment text messages of the plurality of sample users on the plurality of sample commodities;
performing word segmentation processing on the plurality of comment text messages to obtain a word vector of each comment text message;
determining a first class feature matrix aiming at the target user according to the word vectors of the comment text information of the target user;
determining a second class of feature matrix aiming at the target commodity according to the word vectors of the comment text messages of the target commodity;
the purchasing network structure information is network structure information of a heterogeneous information network based on purchasing information of the plurality of sample users on the plurality of sample commodities, nodes of the heterogeneous information network comprise the plurality of sample users and the plurality of sample commodities, edges of the heterogeneous information network are used for connecting the sample users and the sample commodities, and edges of the heterogeneous information network are used for indicating that the sample users have real scoring values on the sample commodities;
the second obtaining module is specifically configured to:
based on the connection relation between the sample user and the sample commodity in the heterogeneous information network, randomly walking by taking the target user as an initial node to determine a plurality of first random walking sequences, randomly walking by taking the target commodity as the initial node to determine a plurality of second random walking sequences; the first random walk sequence comprises a first preset number of nodes; the second random walk sequence comprises a second preset number of nodes;
determining a third type of feature matrix aiming at the target user according to the plurality of first random walk sequences;
and determining a fourth type feature matrix aiming at the target commodity according to the plurality of second random walk sequences.
5. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 3 when executing a program stored in the memory.
6. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 1-3.
CN201810729637.2A 2018-07-05 2018-07-05 Recommendation scoring method and device based on network structure and review text Active CN108920665B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810729637.2A CN108920665B (en) 2018-07-05 2018-07-05 Recommendation scoring method and device based on network structure and review text

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810729637.2A CN108920665B (en) 2018-07-05 2018-07-05 Recommendation scoring method and device based on network structure and review text

Publications (2)

Publication Number Publication Date
CN108920665A CN108920665A (en) 2018-11-30
CN108920665B true CN108920665B (en) 2020-08-07

Family

ID=64425289

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810729637.2A Active CN108920665B (en) 2018-07-05 2018-07-05 Recommendation scoring method and device based on network structure and review text

Country Status (1)

Country Link
CN (1) CN108920665B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109740728B (en) * 2018-12-10 2019-11-01 杭州世平信息科技有限公司 A kind of measurement of penalty calculation method based on a variety of neural network ensembles
CN111414561B (en) 2019-01-08 2023-07-28 百度在线网络技术(北京)有限公司 Method and device for presenting information
CN111444334B (en) * 2019-01-16 2023-04-25 阿里巴巴集团控股有限公司 Data processing method, text recognition device and computer equipment
CN110059245B (en) * 2019-02-13 2023-06-30 创新先进技术有限公司 Method and device for predicting user scoring and displaying object
CN110796512B (en) * 2019-09-20 2023-09-05 平安科技(深圳)有限公司 Product information recommendation method and device, storage medium and computer equipment
CN110837602B (en) * 2019-11-05 2022-10-04 重庆邮电大学 User recommendation method based on representation learning and multi-mode convolutional neural network
CN112966173B (en) * 2019-12-13 2024-02-27 北京达佳互联信息技术有限公司 Classification operation method and device for information comments

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105761154A (en) * 2016-04-11 2016-07-13 北京邮电大学 Socialized recommendation method and device
CN106503028A (en) * 2015-09-08 2017-03-15 北京邮电大学 Recommend method and system
CN107292648A (en) * 2016-04-01 2017-10-24 株式会社理光 A kind of user behavior analysis method and device
CN107944629A (en) * 2017-11-30 2018-04-20 北京邮电大学 A kind of recommendation method and device based on heterogeneous information network representation

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8079910B2 (en) * 2007-12-12 2011-12-20 Russell Acree System and method of penalty data compilation, analysis and report generation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106503028A (en) * 2015-09-08 2017-03-15 北京邮电大学 Recommend method and system
CN107292648A (en) * 2016-04-01 2017-10-24 株式会社理光 A kind of user behavior analysis method and device
CN105761154A (en) * 2016-04-11 2016-07-13 北京邮电大学 Socialized recommendation method and device
CN107944629A (en) * 2017-11-30 2018-04-20 北京邮电大学 A kind of recommendation method and device based on heterogeneous information network representation

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
融合异质网络与主题模型的方面分预测;吉余岗等;《计算机应用》;20171110;第37卷(第11期);第3201-3206页 *

Also Published As

Publication number Publication date
CN108920665A (en) 2018-11-30

Similar Documents

Publication Publication Date Title
CN108920665B (en) Recommendation scoring method and device based on network structure and review text
CN108985830B (en) Recommendation scoring method and device based on heterogeneous information network
TWI777010B (en) Prediction of information conversion rate, information recommendation method and device
CN109002488B (en) Recommendation model training method and device based on meta-path context
CN108829808B (en) Page personalized sorting method and device and electronic equipment
TWI718422B (en) Method, device and equipment for fusing model prediction values
US20200250378A1 (en) Methods and apparatuses for identifying a user intent of a statement
CN111444334A (en) Data processing method, text recognition device and computer equipment
US11875241B2 (en) Aspect pre-selection using machine learning
CN107291840B (en) User attribute prediction model construction method and device
CN110516033B (en) Method and device for calculating user preference
CN113420221B (en) An interpretable recommendation method that integrates user implicit item preference and explicit feature preference
CN112199500B (en) Emotion tendency identification method and device for comments and electronic equipment
WO2021139335A1 (en) Method and apparatus for predicting sales data of physical machine, and computer device and storage medium
CN111738807A (en) Method, computing device, and computer storage medium for recommending target objects
CN114117060B (en) Review data quality analysis methods, devices, electronic equipment, and storage media
CN108932637B (en) An aspect mining model training method, device and electronic device
CN112445909B (en) Commodity search method and device
CN113343714A (en) Information extraction method, model training method and related equipment
CN111737554A (en) Scoring model training method, e-book scoring method and device
US20150235281A1 (en) Categorizing data based on cross-category relevance
CN114429384B (en) Intelligent product recommendation method and system based on e-commerce platform
CN117217858A (en) Article recommendation method, device, equipment and storage medium based on artificial intelligence
CN111915339B (en) Data processing method, device and equipment
US20110208738A1 (en) Method for Determining an Enhanced Value to Keywords Having Sparse Data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant