[go: up one dir, main page]

CN114491291A - User preference prediction method, terminal and storage medium - Google Patents

User preference prediction method, terminal and storage medium Download PDF

Info

Publication number
CN114491291A
CN114491291A CN202210076032.4A CN202210076032A CN114491291A CN 114491291 A CN114491291 A CN 114491291A CN 202210076032 A CN202210076032 A CN 202210076032A CN 114491291 A CN114491291 A CN 114491291A
Authority
CN
China
Prior art keywords
user
implicit
item
explicit
matrix
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210076032.4A
Other languages
Chinese (zh)
Inventor
王巍
刘华真
杜雨晅
谷壬倩
魏忠诚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hebei University of Engineering
Original Assignee
Hebei University of Engineering
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 Hebei University of Engineering filed Critical Hebei University of Engineering
Priority to CN202210076032.4A priority Critical patent/CN114491291A/en
Publication of CN114491291A publication Critical patent/CN114491291A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9536Search customisation based on social or collaborative filtering
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/01Social networking

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Business, Economics & Management (AREA)
  • Evolutionary Computation (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Molecular Biology (AREA)
  • Economics (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明提供了一种用户偏好预测方法、终端及存储介质,该方法包括:根据m个用户与n个项目的历史交互数据,构建显式评分矩阵和隐式评分矩阵,显式评分矩阵用于表示m个用户对n个项目的显式评分,隐式评分矩阵用于表示m个用户对n个项目的隐式评分,显式评分矩阵和隐式评分矩阵都是m行n列的矩阵;将显式评分矩阵和隐式评分矩阵输入预设置的矩阵分解与深度神经网络联合预测模型,得到预测结果,对于m个用户中的每个用户,预测结果包括该用户对n个项目中每个项目的偏好程度的值。本发明能够提高对用户偏好的预测精度。

Figure 202210076032

The invention provides a user preference prediction method, terminal and storage medium. The method includes: constructing an explicit scoring matrix and an implicit scoring matrix according to the historical interaction data of m users and n items, and the explicit scoring matrix is used for Represents the explicit ratings of m users on n items, and the implicit rating matrix is used to represent the implicit ratings of m users on n items. Both the explicit rating matrix and the implicit rating matrix are matrices with m rows and n columns; Input the explicit scoring matrix and the implicit scoring matrix into the pre-set matrix decomposition and deep neural network joint prediction model, and obtain the prediction result. The item's preference value. The present invention can improve the prediction accuracy of user preference.

Figure 202210076032

Description

用户偏好预测方法、终端及存储介质User preference prediction method, terminal and storage medium

技术领域technical field

本发明涉及深度学习技术领域,尤其涉及一种用户偏好预测方法、终端及存储介质。The present invention relates to the technical field of deep learning, and in particular, to a user preference prediction method, a terminal and a storage medium.

背景技术Background technique

近些年,社交网络媒体行业和电子商务行业的飞速发展,使互联网用户的参与人数大大提高。面对用户浏览互联网时产生的海量多源异构数据,如何对其进行精确有效地处理以提高推荐精度和用户满意度,仍旧是个性化推荐服务的研究热点。In recent years, the rapid development of social network media industry and e-commerce industry has greatly increased the number of Internet users participating. Faced with the massive multi-source heterogeneous data generated when users browse the Internet, how to process it accurately and effectively to improve the recommendation accuracy and user satisfaction is still a research hotspot of personalized recommendation services.

然而,现有的预测方法预测精度较低,用户满意度低。However, existing prediction methods have low prediction accuracy and low user satisfaction.

发明内容SUMMARY OF THE INVENTION

有鉴于此,本发明提供了一种用户偏好预测方法、终端及存储介质,能够解决对用户偏好预测精度低的问题。In view of this, the present invention provides a user preference prediction method, terminal and storage medium, which can solve the problem of low accuracy of user preference prediction.

第一方面,本发明实施例提供了一种用户偏好预测方法,包括:In a first aspect, an embodiment of the present invention provides a user preference prediction method, including:

根据m个用户与n个项目的历史交互数据,构建显式评分矩阵和隐式评分矩阵,所述显式评分矩阵用于表示所述m个用户对所述n个项目的显式评分,所述隐式评分矩阵用于表示所述m个用户对所述n个项目的隐式评分,所述显式评分矩阵和所述隐式评分矩阵都是m行n列的矩阵;According to the historical interaction data of m users and n items, an explicit scoring matrix and an implicit scoring matrix are constructed. The explicit scoring matrix is used to represent the explicit scoring of the n items by the m users. The implicit scoring matrix is used to represent the implicit scoring of the n items by the m users, and both the explicit scoring matrix and the implicit scoring matrix are matrices with m rows and n columns;

将所述显式评分矩阵和所述隐式评分矩阵输入预设置的矩阵分解与深度神经网络联合预测模型,得到预测结果,对于所述m个用户中的每个用户,所述预测结果包括该用户对所述n个项目中每个项目的偏好程度的值。Inputting the explicit scoring matrix and the implicit scoring matrix into a preset matrix decomposition and a deep neural network joint prediction model to obtain a prediction result, for each of the m users, the prediction result includes the The value of the user's preference for each of the n items.

在一种可能的实现方式中,所述将所述显式评分矩阵和所述隐式评分矩阵输入预设置的矩阵分解与深度神经网络联合预测模型,得到预测结果包括:In a possible implementation, inputting the explicit scoring matrix and the implicit scoring matrix into a preset matrix decomposition and deep neural network joint prediction model, and obtaining the prediction result includes:

根据所述显式评分矩阵和所述隐式评分矩阵,分别确定所述用户的潜在特征向量和所述项目的潜在特征向量;According to the explicit scoring matrix and the implicit scoring matrix, determine the potential feature vector of the user and the potential feature vector of the item, respectively;

根据所述用户的潜在特征向量和所述项目的潜在特征向量,确定所述m个用户对所述n个项目的浅层线性偏好特征和深层非线性偏好特征;According to the latent feature vector of the user and the latent feature vector of the item, determine the shallow linear preference feature and the deep nonlinear preference feature of the m users for the n items;

根据所述m个用户对所述n个项目的浅层线性偏好特征和深层非线性偏好特征,通过预设置的激活函数,获得所述预测结果。According to the shallow linear preference feature and the deep nonlinear preference feature of the m users for the n items, the prediction result is obtained through a preset activation function.

在一种可能的实现方式中,所述根据所述显式评分矩阵和所述隐式评分矩阵,分别确定所述用户的潜在特征向量和所述项目的潜在特征向量包括:In a possible implementation manner, the determining of the potential feature vector of the user and the potential feature vector of the item respectively according to the explicit scoring matrix and the implicit scoring matrix includes:

根据所述显示评分矩阵和所述隐式评分矩阵,通过正态随机初始化,得到用户的显式潜在特征向量和隐式潜在特征向量,以及项目的显式潜在特征向量和隐式潜在特征向量;According to the displayed rating matrix and the implicit rating matrix, through normal random initialization, the explicit latent eigenvector and the implicit latent eigenvector of the user, and the explicit latent eigenvector and the implicit latent eigenvector of the item are obtained;

将所述用户的显式潜在特征向量和隐式潜在特征向量相加,得到所述用户的潜在特征向量;adding the user's explicit latent feature vector and the implicit latent feature vector to obtain the user's latent feature vector;

将所述项目的显式潜在特征向量和隐式潜在特征向量相加,得到所述项目的潜在特征向量。The item's explicit latent feature vector and the implicit latent feature vector are added to obtain the item's latent feature vector.

在一种可能的实现方式中,所述根据所述用户的潜在特征向量和所述项目的潜在特征向量,确定所述m个用户对所述n个项目的浅层线性偏好特征和深层非线性偏好特征包括:In a possible implementation, according to the potential feature vector of the user and the potential feature vector of the item, determine the shallow linear preference feature and the deep nonlinear preference of the m users for the n items Preference features include:

对所述用户的潜在特征向量和所述项目的潜在特征向量进行点积计算,作为预设置的矩阵分解模型的输入,所述矩阵分解模型输出所述m个用户对所述n个项目的浅层线性偏好特征;The dot product calculation is performed on the potential feature vector of the user and the potential feature vector of the item, as the input of a preset matrix factorization model, and the matrix factorization model outputs the shallow results of the m users on the n items. Layer linear preference feature;

将所述用户的潜在特征向量和所述项目的潜在特征向量作为预设置的深度神经网络模型的输入,利用所述深度神经网络模型的多层感知机的隐藏层获取所述m个用户对所述n个项目的深层非线性偏好特征,其中,所述矩阵分解与深度神经网络联合预测模型包括所述矩阵分解模型和所述深度神经网络模型。The potential feature vector of the user and the potential feature vector of the item are used as the input of the preset deep neural network model, and the hidden layer of the multi-layer perceptron of the deep neural network model is used to obtain the information about the m users. The deep nonlinear preference feature of the n items, wherein the matrix decomposition and deep neural network joint prediction model includes the matrix decomposition model and the deep neural network model.

在一种可能的实现方式中,所述矩阵分解与深度神经网络联合预测模型的损失函数为In a possible implementation, the loss function of the matrix factorization and the deep neural network joint prediction model is

L=ηLI+(1-η)LE L= ηL I +(1-η)LE

其中,L为所述矩阵分解与深度神经网络联合预测模型的损失函数,LE为显式评分的损失函数,LI为隐式评分的损失函数,η为预设系数,η大于0且小于1。Wherein, L is the loss function of the matrix decomposition and the deep neural network joint prediction model, L E is the loss function of the explicit score, L I is the loss function of the implicit score, n is the preset coefficient, n is greater than 0 and less than 1.

在一种可能的实现方式中,所述显示评分的损失函数为In a possible implementation manner, the loss function of the displayed score is

Figure BDA0003484066310000031
Figure BDA0003484066310000031

其中,LE为所述显式评分的损失函数,UE为所述显式评分矩阵中用户的数量,IE为所述显式评分矩阵中项目的数量,rui为用户u对项目i的显式评分实际值,Max(R)为显式评分的最大值,

Figure BDA0003484066310000032
为所述矩阵分解与深度神经网络联合预测模型的预测值;Wherein, L E is the loss function of the explicit scoring, UE is the number of users in the explicit scoring matrix, IE is the number of items in the explicit scoring matrix, and r ui is the user u to item i The actual value of the explicit score, Max(R) is the maximum value of the explicit score,
Figure BDA0003484066310000032
is the predicted value of the combined prediction model of the matrix decomposition and the deep neural network;

所述隐式评分的损失函数为The loss function of the implicit score is

Figure BDA0003484066310000033
Figure BDA0003484066310000033

其中,LI为隐式评分的损失函数,UI为所述隐式评分矩阵中用户的数量,II为所隐式评分矩阵中项目的数量,irui为用户u对项目i的隐式评分值,

Figure BDA0003484066310000034
为矩阵分解与深度神经网络联合预测模型的预测值。Among them, L I is the loss function of implicit scoring, U I is the number of users in the implicit scoring matrix, I I is the number of items in the implicit scoring matrix, ir ui is the implicit score of user u on item i rating value,
Figure BDA0003484066310000034
is the prediction value of the combined prediction model of matrix factorization and deep neural network.

在一种可能的实现方式中,在根据m个用户与n个项目的历史交互数据,构建显式评分矩阵和隐式评分矩阵之前,该方法还包括:In a possible implementation manner, before constructing the explicit scoring matrix and the implicit scoring matrix according to the historical interaction data of m users and n items, the method further includes:

去除初始数据集中的异常数据,得到目标数据集,其中,所述初始数据集中包括多个用户与多个项目的历史交互数据,针对每个用户,若该用户与所述初始数据集中多个项目的历史交互次数小于等于第一预设次数,则该用户的历史交互数据为异常数据,以及,针对每个项目,若所述初始数据集中的多个用户与该项目的历史交互次数小于等于第二预设次数,则该项目的历史交互数据为异常数据,所述第一预设次数与所述第二预设次数相同或者不同,所述目标数据集中包括所述m个用户与n个项目的历史交互数据。Remove the abnormal data in the initial data set to obtain the target data set, wherein the initial data set includes historical interaction data of multiple users and multiple items, for each user, if the user and multiple items in the initial data set The number of historical interactions is less than or equal to the first preset number of times, then the user's historical interaction data is abnormal data, and, for each item, if the number of historical interactions between multiple users in the initial data set and the item is less than or equal to the first Two preset times, the historical interaction data of the item is abnormal data, the first preset times and the second preset times are the same or different, and the target data set includes the m users and n items historical interaction data.

在一种可能的实现方式中,所述根据m个用户与n个项目的历史交互数据,构建显式评分矩阵和隐式评分矩阵包括:In a possible implementation manner, the constructing the explicit scoring matrix and the implicit scoring matrix according to the historical interaction data between m users and n items includes:

若用户u对项目i有评分,则将用户u对项目i的评分进行归一化,确定归一化后的评分值,若用户u对项目i没有评分,则将用户u对项目i的评分设置为0,根据每个用户对每个项目的评分,构建所述显式评分矩阵,针对任一归一化后的评分值,该评分值大于等于0小于等于1;If user u scores item i, then normalize user u's score for item i to determine the normalized score value; if user u does not score item i, then use user u's score for item i Set to 0, construct the explicit score matrix according to the score of each user for each item, and for any normalized score value, the score value is greater than or equal to 0 and less than or equal to 1;

若用户u与项目i有交互,则将用户u对项目i的隐式评分设置为1,若用于u与项目i没有交互,则将用户u对项目i的隐式评分设置为0,根据每个用户对每个项目的隐式评分,构建所述隐式评分矩阵。If user u interacts with item i, set user u's implicit score to item i to 1; if user u has no interaction with item i, set user u's implicit score to item i to 0, according to The implicit rating of each user for each item, constructing the implicit rating matrix.

第二方面,本发明实施例提供了一种终端,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如上第一方面或第一方面的任一种可能的实现方式所述方法的步骤。In a second aspect, an embodiment of the present invention provides a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, which is implemented when the processor executes the computer program The steps of the method described above in the first aspect or any possible implementation manner of the first aspect.

第三方面,本发明实施例提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如上第一方面或第一方面的任一种可能的实现方式所述方法的步骤。In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, implements the first aspect or any of the first aspect above. A possible implementation of the steps of the described method.

本发明实施例与现有技术相比存在的有益效果是:The beneficial effects that the embodiment of the present invention has compared with the prior art are:

在本发明实施例中,一方面,结合用户对项目的显式评分和隐式评分,分别构建显式评分矩阵和隐式评分矩阵,将显式评分矩阵和隐式评分矩阵作为预测模型的输入,充分利用显式评分和隐式评分各自的特征以及两者结合的互补性,使之适应于评分类场景,另一方面,在构建预测模型时,将矩阵分解与深度学习神经网络相结合,综合两种模型的优势,进一步提高了对用户偏好预测的精准程度。因此,本发明实施提供的方法能够提升推荐系统预测用户对项目偏好程度的准确性,为用户展示个性化项目推荐列表。从而为用户提供更加精准的个性化服务,提升用户的满意度。In the embodiment of the present invention, on the one hand, an explicit scoring matrix and an implicit scoring matrix are constructed in combination with the explicit scoring and implicit scoring of the item by the user, and the explicit scoring matrix and the implicit scoring matrix are used as the input of the prediction model , make full use of the respective features of explicit scoring and implicit scoring and the complementarity of the combination of the two to make it suitable for scoring scenarios. Combining the advantages of the two models further improves the accuracy of user preference prediction. Therefore, the method provided by the implementation of the present invention can improve the accuracy of the recommendation system in predicting the user's preference for an item, and display a personalized item recommendation list for the user. In order to provide users with more accurate personalized services, improve user satisfaction.

附图说明Description of drawings

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

图1是本发明实施例提供的一种用户偏好预测方法的实现流程图;Fig. 1 is the realization flow chart of a kind of user preference prediction method provided by the embodiment of the present invention;

图2是本发明实施例提供的另一种用户偏好预测方法的实现流程图;FIG. 2 is an implementation flowchart of another user preference prediction method provided by an embodiment of the present invention;

图3是本发明实施例提供的用户偏好预测装置的结构示意图;3 is a schematic structural diagram of an apparatus for predicting user preference provided by an embodiment of the present invention;

图4是本发明实施例提供的终端的示意图。FIG. 4 is a schematic diagram of a terminal provided by an embodiment of the present invention.

具体实施方式Detailed ways

以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本发明实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本发明。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本发明的描述。In the following description, for the purpose of illustration rather than limitation, specific details such as specific system structures and technologies are set forth in order to provide a thorough understanding of the embodiments of the present invention. However, it will be apparent to those skilled in the art that the present invention may be practiced in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.

为使本发明的目的、技术方案和优点更加清楚,下面将结合附图通过具体实施例来进行说明。In order to make the objectives, technical solutions and advantages of the present invention clearer, the following descriptions will be given through specific embodiments in conjunction with the accompanying drawings.

现有的个性化推荐系统一般通过用户浏览网站时产生的历史交互数据,构建推荐模型。数据主要分为两种类型:显式反馈数据和隐式反馈数据。显式反馈数据一般为评分等数据,可以精确反映用户偏好;隐式反馈多为点击、收藏等用户浏览行,可转换为二值化数据,虽无法精确的区分用户偏好程度,但能反映用户潜在的兴趣偏好。而现有技术通常由单一的用户隐式反馈数据构建推荐模型,或单一的由用户显式反馈数据构建推荐模型,现有技术构建的推荐模型性能较差,不能满足现实应用中丰富场景的需求,导致对用户偏好的预测精度较低,为解决这一问题,本发明实施例提供了一种用户偏好预测方法,参见图1,其示出了本发明实施例提供的用户偏好预测方法的实现流程图,详述如下:Existing personalized recommendation systems generally build recommendation models through historical interaction data generated when users browse websites. There are two main types of data: explicit feedback data and implicit feedback data. Explicit feedback data is generally data such as ratings, which can accurately reflect user preferences; implicit feedback is mostly user browsing lines such as clicks and favorites, which can be converted into binary data. Although it cannot accurately distinguish user preferences, it can reflect user preferences. underlying interest preferences. However, in the prior art, a recommendation model is usually constructed from a single user implicit feedback data, or a recommendation model is constructed from a single user explicit feedback data. , resulting in a low prediction accuracy of user preference. To solve this problem, an embodiment of the present invention provides a user preference prediction method. Referring to FIG. 1 , it shows the implementation of the user preference prediction method provided by the embodiment of the present invention. Flowchart, detailed as follows:

在步骤101中,根据m个用户与n个项目的历史交互数据,构建显式评分矩阵和隐式评分矩阵,显式评分矩阵用于表示m个用户对n个项目的显式评分,隐式评分矩阵用于表示m个用户对n个项目的隐式评分,显式评分矩阵和隐式评分矩阵都是m行n列的矩阵。In step 101, an explicit scoring matrix and an implicit scoring matrix are constructed according to the historical interaction data between m users and n items. The explicit scoring matrix is used to represent the explicit scoring of m users on n items, and the implicit scoring matrix The rating matrix is used to represent the implicit ratings of m users on n items. Both the explicit rating matrix and the implicit rating matrix are matrices with m rows and n columns.

其中,m为大于等于2的正整数,n为大于等于2的正整数。Among them, m is a positive integer greater than or equal to 2, and n is a positive integer greater than or equal to 2.

在一种可能的实现方式中,由于数据集中交互次数过少的用户和项目使数据集过于稀疏,导致模型预测精度低,为解决这一问题,在根据m个用户与n个项目的历史交互数据,构建显式评分矩阵和隐式评分矩阵之前,本发明实施例所提供的方法还包括:In a possible implementation, the data set is too sparse due to the users and items with too few interactions in the dataset, resulting in low prediction accuracy of the model. To solve this problem, according to the historical interactions between m users and n items data, before constructing the explicit scoring matrix and the implicit scoring matrix, the method provided by the embodiment of the present invention further includes:

去除初始数据集中的异常数据,得到目标数据集,其中,初始数据集中包括多个用户与多个项目的历史交互数据,针对每个用户,若该用户与初始数据集中多个项目的历史交互次数小于等于第一预设次数,则该用户的历史交互数据为异常数据,以及,针对每个项目,若初始数据集中的多个用户与该项目的历史交互次数小于等于第二预设次数,则该项目的历史交互数据为异常数据,第一预设次数与第二预设次数相同或者不同,目标数据集中包括m个用户与n个项目的历史交互数据。Remove the abnormal data in the initial data set to obtain the target data set, wherein the initial data set includes the historical interaction data of multiple users and multiple items. is less than or equal to the first preset number of times, the user's historical interaction data is abnormal data, and, for each item, if the number of historical interactions between multiple users in the initial data set and the item is less than or equal to the second preset number of times, then The historical interaction data of the item is abnormal data, the first preset number of times is the same or different from the second preset number of times, and the target data set includes historical interaction data of m users and n items.

举例来说,第一预设次数为2,第二预设次数为5,在初始数据集中,若存在用户A,用户A与初始数据集中的多个项目的交互次数只有1次,即该用户只访问过其中一个项目,或者对其中一个项目有过评分行为,则用户A的历史交互次数过低,用户A的历史交互数据为异常数据,在初始数据集中删除用户A的历史交互数据。又例如,在初始数据集中,若存在项目X,项目X与初始数据集中的多个用户的交互次数只有3次,即该项目值被访问和/或评价过三次,则项目X的历史交互次数过低,项目X的历史交互数据为异常数据。For example, the first preset number of times is 2, and the second preset number of times is 5. In the initial data set, if there is user A, the number of interactions between user A and multiple items in the initial data set is only 1, that is, the user If you have only visited one of the items, or have scored on one of the items, the number of historical interactions of user A is too low, and the historical interaction data of user A is abnormal data, and the historical interaction data of user A is deleted from the initial data set. For another example, in the initial data set, if there is item X, the number of interactions between item X and multiple users in the initial data set is only 3 times, that is, the item value has been accessed and/or evaluated three times, then the historical interaction times of item X If it is too low, the historical interaction data of item X is abnormal data.

在一种可能的实现方式中,根据m个用户与n个项目的历史交互数据,构建显式评分矩阵和隐式评分矩阵包括:In a possible implementation, according to the historical interaction data of m users and n items, constructing an explicit scoring matrix and an implicit scoring matrix includes:

若用户u对项目i有评分,则将用户u对项目i的评分进行归一化,确定归一化后的评分值,若用户u对项目i没有评分,则将用户u对项目i的评分设置为0,根据每个用户对每个项目的评分,构建显式评分矩阵,针对任一归一化后的评分值,该评分值大于等于0小于等于1;If user u scores item i, then normalize user u's score for item i to determine the normalized score value; if user u does not score item i, then use user u's score for item i Set to 0, construct an explicit score matrix according to the score of each user for each item, for any normalized score value, the score value is greater than or equal to 0 and less than or equal to 1;

若用户u与项目i有交互,则将用户u对项目i的隐式评分设置为1,若用于u与项目i没有交互,则将用户u对项目i的隐式评分设置为0,根据每个用户对每个项目的隐式评分,构建隐式评分矩阵。If user u interacts with item i, set user u's implicit score to item i to 1; if user u has no interaction with item i, set user u's implicit score to item i to 0, according to The implicit rating of each user for each item, constructing an implicit rating matrix.

举例来说,在目标数据集中,包括m个用户与n个项目的历史交互数据。用户集合为U={u1u2,…,um},项目集合为V={v1,v2,…,vn}。根据用户与项目历史交互数据中显隐式反馈的特点,构建用户与项目的显式评分矩阵R=[rui]m×n和用户与项目的隐式评分矩阵IR=[irui]m×nFor example, in the target dataset, the historical interaction data of m users and n items is included. The user set is U={u 1 u 2 ,..., um }, and the item set is V={v 1 ,v 2 ,...,v n }. According to the characteristics of explicit and implicit feedback in the historical interaction data between users and items, construct an explicit rating matrix R=[r ui ] m×n for users and items and an implicit rating matrix IR=[ir ui ] m ×n for users and items n .

在步骤102中,将显式评分矩阵和隐式评分矩阵输入预设置的矩阵分解与深度神经网络联合预测模型,得到预测结果,对于m个用户中的每个用户,预测结果包括该用户对n个项目中每个项目的偏好程度的值。In step 102, the explicit scoring matrix and the implicit scoring matrix are input into the preset matrix decomposition and deep neural network joint prediction model to obtain a prediction result. The value of the degree of preference for each of the items.

矩阵分解模型(Matrix Factorization,MF)是基于模型的推荐方法,具有可扩展性强、复杂性低等特点。它使用潜在因子向量来表征用户和项目,将用户和项目映射到一个联合的低维潜在空间,根据相应用户和项目潜在因子向量的线性内积,将推荐表述为用户对项目的偏好预测问题。但矩阵分解推荐方法只获取到用户和项目的浅层线性潜在因子特征向量,无法很好地建模用户与项目间复杂的非线性深层次特征表示。Matrix Factorization (MF) is a model-based recommendation method, which has the characteristics of strong scalability and low complexity. It uses latent factor vectors to represent users and items, maps users and items to a joint low-dimensional latent space, and formulates recommendation as a user preference prediction problem for items based on the linear inner product of the corresponding user and item latent factor vectors. However, the matrix factorization recommendation method only obtains the shallow linear latent factor feature vectors of users and items, and cannot well model the complex nonlinear deep feature representation between users and items.

随着深度学习技术的飞速发展和应用,现有技术提出了一种采用基于深度学习的推荐方法来建模用户与项目间交互的复杂非线性交互,以实现对用户偏好的预测。但目前,大多数深度学习推荐模型是对产生交互的用户和项目本身属性数据和社交网络、地理位置等辅助信息建模,只根据显式反馈数据或者隐式反馈数据的其中一种反馈用于用户与项目间交互的建模,以预测用户的偏好。未能充分利用用户与项目交互的评分数据和显式评分与隐式反馈结合的互补性对推荐系统性能提升的优势。而两类异构数据具有互补性,结合构建的推荐模型可有效提升推荐效果。With the rapid development and application of deep learning technology, the prior art proposes a recommendation method based on deep learning to model complex nonlinear interactions between users and items, so as to predict user preferences. But at present, most deep learning recommendation models model the attribute data of interacting users and the item itself, as well as auxiliary information such as social network and geographic location, and only use one of explicit feedback data or implicit feedback data for feedback. Modeling of user-item interactions to predict user preferences. Failure to take full advantage of the user-item interaction rating data and the complementarity of explicit rating and implicit feedback to improve the performance of recommender systems. The two types of heterogeneous data are complementary, and the combined recommendation model can effectively improve the recommendation effect.

在本发明实施例中,一方面,结合用户对项目的显式评分和隐式评分,分别构建显式评分矩阵和隐式评分矩阵,将显式评分矩阵和隐式评分矩阵作为预测模型的输入,充分利用显式评分和隐式评分各自的特征以及两者结合的互补性,使之适应于评分类场景,另一方面,在构建预测模型时,将矩阵分解与深度学习神经网络相结合,综合两种模型的优势,进一步提高了对用户偏好预测的精准程度。因此,本发明实施提供的方法能够提升推荐系统预测用户对项目偏好程度的准确性,为用户展示个性化项目推荐列表。从而为用户提供更加精准的个性化服务,提升用户的满意度。In the embodiment of the present invention, on the one hand, an explicit scoring matrix and an implicit scoring matrix are constructed in combination with the explicit scoring and implicit scoring of the item by the user, and the explicit scoring matrix and the implicit scoring matrix are used as the input of the prediction model , make full use of the respective features of explicit scoring and implicit scoring and the complementarity of the combination of the two to make it suitable for scoring scenarios. Combining the advantages of the two models further improves the accuracy of user preference prediction. Therefore, the method provided by the implementation of the present invention can improve the accuracy of the recommendation system in predicting the user's preference for an item, and display a personalized item recommendation list for the user. In order to provide users with more accurate personalized services, improve user satisfaction.

图2为本发明实施例提供的另一种用户偏好预测方法的实现流程图,详述如下:FIG. 2 is an implementation flowchart of another user preference prediction method provided by an embodiment of the present invention, which is described in detail as follows:

在步骤201中,根据m个用户与n个项目的历史交互数据,构建显式评分矩阵和隐式评分矩阵,显式评分矩阵用于表示m个用户对n个项目的显式评分,隐式评分矩阵用于表示m个用户对n个项目的隐式评分,显式评分矩阵和隐式评分矩阵都是m行n列的矩阵。In step 201, an explicit scoring matrix and an implicit scoring matrix are constructed according to the historical interaction data between m users and n items. The explicit scoring matrix is used to represent the explicit scoring of m users on n items, and the implicit scoring matrix The rating matrix is used to represent the implicit ratings of m users on n items. Both the explicit rating matrix and the implicit rating matrix are matrices with m rows and n columns.

步骤201的具体实现方式可参见图1所对应实施例的步骤101,本发明实施例对此不再赘述。For a specific implementation manner of step 201, reference may be made to step 101 in the embodiment corresponding to FIG. 1 , which is not repeated in this embodiment of the present invention.

在步骤202中,根据显式评分矩阵和隐式评分矩阵,分别确定用户的潜在特征向量和项目的潜在特征向量。In step 202, the potential feature vector of the user and the potential feature vector of the item are determined according to the explicit scoring matrix and the implicit scoring matrix, respectively.

在本发明实施例中,矩阵分解与深度神经网络联合预测模型包括输入层、Embedding层、混合模型层和预测层。在本发明实施例中,矩阵分解与深度神经网络联合预测模型与联合预测模型用于表示同一概念。In the embodiment of the present invention, the matrix decomposition and deep neural network joint prediction model includes an input layer, an Embedding layer, a mixed model layer, and a prediction layer. In the embodiment of the present invention, the matrix decomposition and the deep neural network joint prediction model and the joint prediction model are used to represent the same concept.

在联合预测模型的输入层,将显式评分矩阵与隐式评分矩阵输入矩阵分解与深度神经网络联合预测模型。为解决显式评分矩阵和隐式评分矩阵过于稀疏的问题,在本发明实施例中,联合预测模型的Embedding层对显式评分矩阵和隐式评分矩阵利用降维思想,获取用户的潜在特征向量和项目的潜在特征向量。In the input layer of the joint prediction model, the explicit scoring matrix and the implicit scoring matrix are input into the matrix decomposition and deep neural network joint prediction model. In order to solve the problem that the explicit scoring matrix and the implicit scoring matrix are too sparse, in the embodiment of the present invention, the Embedding layer of the joint prediction model uses the dimension reduction idea for the explicit scoring matrix and the implicit scoring matrix to obtain the potential feature vector of the user. and latent feature vectors of items.

在一种可能的实现方式中,根据显式评分矩阵和隐式评分矩阵,分别确定用户的潜在特征向量和项目的潜在特征向量包括:In a possible implementation manner, according to the explicit scoring matrix and the implicit scoring matrix, respectively determining the potential feature vector of the user and the potential feature vector of the item includes:

根据显示评分矩阵和隐式评分矩阵,通过正态随机初始化,得到用户显式潜在特征向量和隐式潜在特征向量,以及项目的显式潜在特征向量和隐式潜在特征向量;将用户的显式潜在特征向量和隐式潜在特征向量相加,得到用户的潜在特征向量;将项目的显式潜在特征向量和隐式潜在特征向量相加,得到项目的潜在特征向量。According to the explicit rating matrix and the implicit rating matrix, through normal random initialization, the explicit latent eigenvectors and implicit latent eigenvectors of users, as well as the explicit latent eigenvectors and implicit latent eigenvectors of items, are obtained; The latent feature vector and the implicit latent feature vector are added to obtain the user's latent feature vector; the item's explicit latent feature vector and the implicit latent feature vector are added to obtain the item's latent feature vector.

采用正态随机初始化得到用户的显式潜在特征向量

Figure BDA0003484066310000091
和隐式潜在特征向量
Figure BDA0003484066310000092
以及项目的显式潜在特征向量
Figure BDA0003484066310000093
和隐式潜在特征向量
Figure BDA0003484066310000094
将显式潜在特征向量和隐式潜在特征向量相加互为补充,得到用户的潜在特征向量
Figure BDA0003484066310000095
和项目的潜在特征向量
Figure BDA0003484066310000096
Using normal random initialization to obtain explicit latent feature vectors of users
Figure BDA0003484066310000091
and the implicit latent feature vector
Figure BDA0003484066310000092
and the explicit latent feature vector of the item
Figure BDA0003484066310000093
and the implicit latent feature vector
Figure BDA0003484066310000094
Add the explicit latent feature vector and the implicit latent feature vector to complement each other to get the user's latent feature vector
Figure BDA0003484066310000095
and the latent feature vector of the item
Figure BDA0003484066310000096

在步骤203中,根据用户的潜在特征向量和项目的潜在特征向量,确定m个用户对n个项目的浅层线性偏好特征和深层非线性特征。In step 203, according to the latent feature vector of the user and the latent feature vector of the item, the shallow linear preference feature and the deep nonlinear feature of the m users for the n items are determined.

将用户的潜在特征向量和项目的潜在特征向量输入混合模型层。Feed the latent feature vector of the user and the latent feature vector of the item into the hybrid model layer.

在本发明实施例中,对用户的潜在特征向量和项目的潜在特征向量进行点积计算,作为预设置的矩阵分解模型的输入,矩阵分解模型输出m个用户对n个项目的浅层线性偏好特征;将用户的潜在特征向量和项目的潜在特征向量作为预设置的深度神经网络模型的输入,利用深度神经网络模型的多层感知机的隐藏层获取m个用户对n个项目的深层非线性偏好特征,其中,矩阵分解与深度神经网络联合预测模型包括矩阵分解模型和深度神经网络模型。In the embodiment of the present invention, a dot product calculation is performed on the potential feature vector of the user and the potential feature vector of the item, as the input of the preset matrix decomposition model, and the matrix decomposition model outputs the shallow linear preference of m users for n items Features; take the user's latent feature vector and the item's latent feature vector as the input of the preset deep neural network model, and use the hidden layer of the multilayer perceptron of the deep neural network model to obtain the deep nonlinearity of m users for n items Preference feature, wherein the matrix decomposition and deep neural network joint prediction model includes matrix decomposition model and deep neural network model.

在本发明实例中,矩阵分解模型和深度神经网络模型位于联合预测模型的混合模型层。In the example of the present invention, the matrix factorization model and the deep neural network model are located in the hybrid model layer of the joint prediction model.

在本发明实施例中,通过公式1对对用户的潜在特征向量和项目的潜在特征向量进行点积计算,公式1为:In the embodiment of the present invention, the dot product calculation is performed on the potential feature vector of the user and the potential feature vector of the item by formula 1, and formula 1 is:

Figure BDA0003484066310000101
Figure BDA0003484066310000101

其中,符号指的是两向量对应元素的乘积,即点积。Among them, the symbol refers to the product of the corresponding elements of the two vectors, that is, the dot product.

将计算得到的

Figure BDA0003484066310000102
作为矩阵分解模型的输入。will be calculated
Figure BDA0003484066310000102
as input to the matrix factorization model.

在本发明实施例中,利用深度神经网络模型的多层感知机的隐藏层获取用户对项目的深层非线性偏好特征,对用户和项目之间的复杂关系进行建模;以获得用户与项目交互的多层非线性投影,在深度学习矩阵分解模型层中多层复杂用户偏好特征的定义如下公式2:In the embodiment of the present invention, the hidden layer of the multi-layer perceptron of the deep neural network model is used to obtain the deep nonlinear preference feature of the user for the item, and the complex relationship between the user and the item is modeled; the interaction between the user and the item is obtained. The multi-layer nonlinear projection of , the definition of multi-layer complex user preference features in the deep learning matrix factorization model layer is as follows: Equation 2:

Figure BDA0003484066310000103
Figure BDA0003484066310000103

Figure BDA0003484066310000104
Figure BDA0003484066310000104

Figure BDA0003484066310000105
Figure BDA0003484066310000105

……...

Figure BDA0003484066310000106
Figure BDA0003484066310000106

其中

Figure BDA0003484066310000107
Figure BDA0003484066310000108
为多层感知机模型第X层的权重矩阵、偏置向量和激活函数,zEI为模型最初输入随机特征数据,
Figure BDA0003484066310000109
为第X-1层的输入特征数据,
Figure BDA00034840663100001010
为模型每层输出结果。in
Figure BDA0003484066310000107
and
Figure BDA0003484066310000108
is the weight matrix, bias vector and activation function of the Xth layer of the multilayer perceptron model, z EI is the initial input random feature data of the model,
Figure BDA0003484066310000109
is the input feature data of the X-1 layer,
Figure BDA00034840663100001010
Output results for each layer of the model.

在步骤204中,根据m个用户对n个项目的浅层线性偏好特征和深层非线性偏好特征,通过预设置的激活函数,获得预测结果。In step 204, a prediction result is obtained through a preset activation function according to the shallow linear preference feature and the deep nonlinear preference feature of m users for n items.

将用户对项目的浅层线性偏好特征所对应的特征向量,以及深层非线性偏好特征所对应的特征向量连接组合,预测用户对项目的偏好程度。The feature vector corresponding to the user's shallow linear preference feature for the item and the feature vector corresponding to the deep nonlinear preference feature are connected and combined to predict the user's preference for the item.

在一种可能的实现方式中,在联合预测模型的预测层,使用sigmoid函数作为预测层的激活函数,联合用户对项目的浅层线性偏好特征和深层非线性偏好特征,预测用户u对项目i的偏好

Figure BDA00034840663100001011
用户u为m个用户中的任一用户,项目i为n个项目中的任一项目。如下公式3:In a possible implementation, in the prediction layer of the joint prediction model, the sigmoid function is used as the activation function of the prediction layer, and the shallow linear preference feature and the deep nonlinear preference feature of the user to the item are combined to predict the user u's preference for the item i. Preferences
Figure BDA00034840663100001011
User u is any one of m users, and item i is any one of n items. Formula 3 below:

Figure BDA0003484066310000111
Figure BDA0003484066310000111

式中,aout为预测层激活函数,hT为预测层的权重参数,

Figure BDA0003484066310000112
为用户对项目的浅层线性偏好特征所对应的特征向量,
Figure BDA0003484066310000113
为用户对项目的深层非线性偏好特征所对应的特征向量。In the formula, a out is the activation function of the prediction layer, h T is the weight parameter of the prediction layer,
Figure BDA0003484066310000112
is the feature vector corresponding to the user's shallow linear preference feature for the item,
Figure BDA0003484066310000113
is the feature vector corresponding to the user's deep nonlinear preference feature for the item.

针对任一用户u根据用户u对每个项目的偏好值,按照偏好值从高到低的顺序为用户推荐前预设数目的项目,提高用户的满意度。For any user u, according to the user u's preference value for each item, the pre-set number of items are recommended for the user in the order of preference value from high to low, so as to improve the user's satisfaction.

在一种可能的实现方式中,损失函数是预测模型构建的一个至关重要的组成部分,关乎到推荐算法的性能。其本质是预测模型的目标优化函数,可根据用户与项目交互的显式反馈数据和隐式反馈数据来定义。目前,推荐算法中常用的逐点损失函数主要是平方损失函数和二元交叉熵损失函数。In one possible implementation, the loss function is a crucial component in the construction of the predictive model, which is related to the performance of the recommendation algorithm. Its essence is the objective optimization function of the predictive model, which can be defined according to the explicit feedback data and the implicit feedback data of the user's interaction with the item. At present, the commonly used pointwise loss functions in recommendation algorithms are mainly square loss function and binary cross entropy loss function.

平方损失函数常用于基于显式反馈数据的矩阵分解推荐算法中,其基本定义如下公式4所示,公式4为:The squared loss function is often used in matrix decomposition recommendation algorithms based on explicit feedback data. Its basic definition is shown in Equation 4 below. Equation 4 is:

Figure BDA0003484066310000114
Figure BDA0003484066310000114

在公式4中,Lsqu用于表示损失函数,U为用户集合,I为项目集合,wui用于表示预测模型的权重参数,yui用于表示预测模型的目标值,

Figure BDA0003484066310000115
用于表示预测模型的输出值。In Equation 4, L squ is used to represent the loss function, U is the user set, I is the item set, w ui is used to represent the weight parameter of the prediction model, y ui is used to represent the target value of the prediction model,
Figure BDA0003484066310000115
Used to represent the output value of the predictive model.

二元交叉熵损失函数常用于基于隐式反馈的深度学习推荐模型中,其基本定义如下公式5所示,公式5为:The binary cross-entropy loss function is often used in the deep learning recommendation model based on implicit feedback. Its basic definition is shown in Equation 5 below. Equation 5 is:

Figure BDA0003484066310000116
Figure BDA0003484066310000116

在公式5中,Llog用于表示损失函数,U为用户集合,I为项目集合,yui用于表示预测模型的目标值,

Figure BDA0003484066310000117
用于表示预测模型的输出值。In Equation 5, L log is used to represent the loss function, U is the user set, I is the item set, y ui is used to represent the target value of the prediction model,
Figure BDA0003484066310000117
Used to represent the output value of the predictive model.

在本发明实施例中,矩阵分解与深度神经网络联合预测模型的损失函数为公式6,公式6为In the embodiment of the present invention, the loss function of the joint prediction model of matrix decomposition and deep neural network is Equation 6, and Equation 6 is

L=ηLI+(1-η)LE L= ηL I +(1-η)LE

其中,L为矩阵分解与深度神经网络联合预测模型的损失函数,LE为显式评分的损失函数,LI为隐式评分的损失函数,η为预设系数,η大于0且小于1。Among them, L is the loss function of the joint prediction model of matrix decomposition and deep neural network, L E is the loss function of explicit scoring, L I is the loss function of implicit scoring, η is a preset coefficient, and η is greater than 0 and less than 1.

在本发明实施例中,将显式评分归一化处理为0至1之间的值,即将所有用户对项目的显式评分都除以最大评分值,如用户u对项目i的评分为3,最大评分值为5,则用户u对项目i归一化后的显式评分为3÷5=0.6。此时,归一化显示评分更适用于二元交叉熵损失函数,基于此,在本发明实施例中,显式评分的损失函数如下公式7,公式7为:In the embodiment of the present invention, the explicit score is normalized to a value between 0 and 1, that is, the explicit score of all users for an item is divided by the maximum score value, for example, the score of user u for item i is 3 , the maximum score value is 5, then the explicit score normalized by user u to item i is 3÷5=0.6. At this time, the normalized display score is more suitable for the binary cross-entropy loss function. Based on this, in the embodiment of the present invention, the loss function of the explicit score is as follows in Formula 7, where Formula 7 is:

Figure BDA0003484066310000121
Figure BDA0003484066310000121

其中,LE为显式评分的损失函数,UE为显式评分矩阵中用户的数量,IE为显式评分矩阵中项目的数量,rui为用户u对项目i的显式评分实际值,Max(R)为显式评分的最大值,

Figure BDA0003484066310000122
为矩阵分解与深度神经网络联合预测模型的预测值,即联合预测模型输出的用户u对项目i的偏好的预测值;Among them, L E is the loss function of explicit scoring, UE is the number of users in the explicit scoring matrix, IE is the number of items in the explicit scoring matrix, and r ui is the actual value of the explicit scoring of item i by user u , Max(R) is the maximum value of the explicit score,
Figure BDA0003484066310000122
is the predicted value of the joint prediction model of matrix factorization and deep neural network, that is, the predicted value of user u's preference for item i output by the joint prediction model;

在本发明实施例中,隐式评分的损失函数如公式8,公式8为In the embodiment of the present invention, the loss function of the implicit score is as shown in formula 8, and formula 8 is

Figure BDA0003484066310000123
Figure BDA0003484066310000123

其中,LI为隐式评分的损失函数,UI为隐式评分矩阵中用户的数量,II为所隐式评分矩阵中项目的数量,irui为用户u对项目i的隐式评分值,

Figure BDA0003484066310000124
为矩阵分解与深度神经网络联合预测模型的预测值,即联合预测模型输出的用户u对项目i的偏好的预测值。Among them, L I is the loss function of implicit scoring, U I is the number of users in the implicit scoring matrix, I I is the number of items in the implicit scoring matrix, and ir ui is the implicit scoring value of user u for item i ,
Figure BDA0003484066310000124
is the predicted value of the joint prediction model of matrix factorization and deep neural network, that is, the predicted value of user u's preference for item i output by the joint prediction model.

现有的大多数推荐系统都利用误差损失评估方法,如:均方根误差(RMSE)和平均绝对误差(MAE)来评估用户预测偏好与真实偏好的相似程度;但本发明实施所提供的方法,是根据用户对项目偏好预测的排序为用户推荐前N个最感兴趣项目的列表,相比误差损失的评估方法,采用排名评估的方法更加符合实际。Most of the existing recommendation systems use error loss evaluation methods, such as: root mean square error (RMSE) and mean absolute error (MAE) to evaluate the similarity of users' predicted preferences and real preferences; but the method provided by the implementation of the present invention , is a list of the top N most interesting items recommended for users according to the user's ranking of item preference predictions. Compared with the evaluation method of error loss, the method of ranking evaluation is more practical.

为评估本发明实施所提供的预测方法的有效性,对矩阵分解与深度神经网络联合预测模型参数优化更新,本发明主要采用命中率(HR)和归一化折扣累计收益(NDCG)两个排序评估指标,HR和NDCG为推荐系统的常用评价指标,本发明实施对此不再赘述。In order to evaluate the effectiveness of the prediction method provided by the implementation of the present invention, the parameters of the joint prediction model of matrix decomposition and deep neural network are optimized and updated. Evaluation indicators, HR and NDCG are commonly used evaluation indicators of the recommendation system, which will not be repeated in the implementation of the present invention.

本发明实施例提供了一种新的损失函数,结合HR和NDCG两个评价指标,多次迭代后,对矩阵分解与深度神经网络联合预测模型的参数进行优化,根据优化后的模型参数预测用户对项目的偏好值,将偏好值按照从高到低的顺序进行排序,将排序结果中前N个项目推荐给用户。The embodiment of the present invention provides a new loss function, which combines the two evaluation indicators of HR and NDCG, and after multiple iterations, optimizes the parameters of the joint prediction model of matrix decomposition and deep neural network, and predicts users according to the optimized model parameters. For the preference value of the item, sort the preference value in descending order, and recommend the top N items in the sorting result to the user.

本发明实施例通过矩阵分解模型挖掘用户的浅层线性偏好特征,通过深度神经网络模型挖掘用户的深层非线性偏好特征,结合两种特征对用户偏好进行预测,提高对用户偏好预测的准确性。另一方面,本发明实施例还提供了一种新的损失函数,结合评价指标对矩阵分解与深度神经网络联合预测模型进行性参数优化,进一步提高模型对用户偏好预测的准确度。The embodiment of the present invention mines the user's shallow linear preference feature through a matrix decomposition model, and mines the user's deep nonlinear preference feature through a deep neural network model, and combines the two features to predict the user preference, thereby improving the accuracy of the user preference prediction. On the other hand, the embodiment of the present invention also provides a new loss function, which combines the evaluation index to optimize the parameters of the matrix decomposition and the deep neural network joint prediction model, so as to further improve the accuracy of the model for user preference prediction.

应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。It should be understood that the size of the sequence numbers of the steps in the above embodiments does not mean the sequence of execution, and the execution sequence of each process should be determined by its functions and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.

以下为本发明的装置实施例,对于其中未详尽描述的细节,可以参考上述对应的方法实施例。The following are apparatus embodiments of the present invention, and for details that are not described in detail, reference may be made to the above-mentioned corresponding method embodiments.

图3示出了本发明实施例提供的用户偏好预测装置的结构示意图,为了便于说明,仅示出了与本发明实施例相关的部分,详述如下:FIG. 3 shows a schematic structural diagram of an apparatus for predicting user preference provided by an embodiment of the present invention. For convenience of description, only parts related to the embodiment of the present invention are shown, and the details are as follows:

如图3所示,用户偏好预测装置3包括:构建模块31和预测模块32;As shown in FIG. 3 , the user preference prediction device 3 includes: a construction module 31 and a prediction module 32;

构建模块31,用于根据m个用户与n个项目的历史交互数据,构建显式评分矩阵和隐式评分矩阵,显式评分矩阵用于表示m个用户对n个项目的显式评分,隐式评分矩阵用于表示m个用户对n个项目的隐式评分,显式评分矩阵和隐式评分矩阵都是m行n列的矩阵;The building module 31 is used to construct an explicit scoring matrix and an implicit scoring matrix according to the historical interaction data between m users and n items. The explicit scoring matrix is used to represent the explicit scoring of m users on n items, and the implicit scoring matrix The formula rating matrix is used to represent the implicit rating of m users on n items. Both the explicit rating matrix and the implicit rating matrix are matrices with m rows and n columns;

预测模块32,用于将显式评分矩阵和隐式评分矩阵输入预设置的矩阵分解与深度神经网络联合预测模型,得到预测结果,对于m个用户中的每个用户,预测结果包括该用户对n个项目中每个项目的偏好程度的值。The prediction module 32 is used to input the explicit scoring matrix and the implicit scoring matrix into a preset matrix decomposition and a deep neural network joint prediction model to obtain a prediction result. For each user in the m users, the prediction result includes the user's pair of The value of the degree of preference for each of the n items.

在本发明实施例中,一方面,结合用户对项目的显式评分和隐式评分,分别构建显式评分矩阵和隐式评分矩阵,将显式评分矩阵和隐式评分矩阵作为预测模型的输入,充分利用显式评分和隐式评分各自的特征以及两者结合的互补性,使之适应于评分类场景,另一方面,在构建预测模型时,将矩阵分解与深度学习神经网络相结合,综合两种模型的优势,进一步提高了对用户偏好预测的精准程度。因此,本发明实施提供的方法能够提升推荐系统预测用户对项目偏好程度的准确性,为用户展示个性化项目推荐列表。从而为用户提供更加精准的个性化服务,提升用户的满意度。In the embodiment of the present invention, on the one hand, an explicit scoring matrix and an implicit scoring matrix are constructed in combination with the explicit scoring and implicit scoring of the item by the user, and the explicit scoring matrix and the implicit scoring matrix are used as the input of the prediction model , make full use of the respective features of explicit scoring and implicit scoring and the complementarity of the combination of the two to make it suitable for scoring scenarios. Combining the advantages of the two models further improves the accuracy of user preference prediction. Therefore, the method provided by the implementation of the present invention can improve the accuracy of the recommendation system in predicting the user's preference for an item, and display a personalized item recommendation list for the user. In order to provide users with more accurate personalized services, improve user satisfaction.

在一种可能的实现方式中,预测模块32用于根据显式评分矩阵和隐式评分矩阵,分别确定用户的潜在特征向量和项目的潜在特征向量;In a possible implementation manner, the prediction module 32 is configured to respectively determine the potential feature vector of the user and the potential feature vector of the item according to the explicit scoring matrix and the implicit scoring matrix;

根据用户的潜在特征向量和项目的潜在特征向量,确定m个用户对n个项目的浅层线性偏好特征和深层非线性偏好特征;According to the latent feature vector of users and the latent feature vector of items, determine the shallow linear preference feature and deep nonlinear preference feature of m users for n items;

根据m个用户对n个项目的浅层线性偏好特征和深层非线性偏好特征,通过预设置的激活函数,获得预测结果。According to the shallow linear preference feature and deep nonlinear preference feature of m users for n items, the prediction result is obtained through the preset activation function.

在一种可能的实现方式中,预测模块32用于根据显示评分矩阵和隐式评分矩阵,通过正态随机初始化,得到用户的显式潜在特征向量和隐式潜在特征向量,以及项目的显式潜在特征向量和隐式潜在特征向量;In a possible implementation manner, the prediction module 32 is configured to obtain the explicit latent feature vector and implicit latent feature vector of the user, and the explicit latent feature vector of the item through normal random initialization according to the displayed rating matrix and the implicit rating matrix. latent eigenvectors and implicit latent eigenvectors;

将用户的显式潜在特征向量和隐式潜在特征向量相加,得到用户的潜在特征向量;Add the user's explicit latent feature vector and the implicit latent feature vector to obtain the user's latent feature vector;

将项目的显式潜在特征向量和隐式潜在特征向量相加,得到项目的潜在特征向量。The item's latent eigenvector is obtained by summing the item's explicit latent eigenvector and its implicit latent eigenvector.

在一种可能的实现方式中,预测模块32用于对用户的潜在特征向量和项目的潜在特征向量进行点积计算,作为预设置的矩阵分解模型的输入,矩阵分解模型输出m个用户对n个项目的浅层线性偏好特征;In a possible implementation, the prediction module 32 is configured to perform dot product calculation on the potential feature vector of the user and the potential feature vector of the item, as the input of the preset matrix factorization model, and the matrix factorization model outputs m user pairs of n Shallow linear preference features of each item;

将用户的潜在特征向量和项目的潜在特征向量作为预设置的深度神经网络模型的输入,利用深度神经网络模型的多层感知机的隐藏层获取m个用户对n个项目的深层非线性偏好特征,其中,矩阵分解与深度神经网络联合预测模型包括矩阵分解模型和深度神经网络模型。The user's latent feature vector and the item's latent feature vector are used as the input of the preset deep neural network model, and the hidden layer of the multilayer perceptron of the deep neural network model is used to obtain the deep nonlinear preference features of m users for n items. , among which, the joint prediction model of matrix decomposition and deep neural network includes matrix decomposition model and deep neural network model.

在一种可能的实现方式中,矩阵分解与深度神经网络联合预测模型的损失函数为In a possible implementation, the loss function of the joint prediction model of matrix factorization and deep neural network is

L=ηLI+(1-η)LE L= ηL I +(1-η)LE

其中,L为矩阵分解与深度神经网络联合预测模型的损失函数,LE为显式评分的损失函数,LI为隐式评分的损失函数,η为预设系数,η大于0且小于1。Among them, L is the loss function of the joint prediction model of matrix decomposition and deep neural network, L E is the loss function of explicit scoring, L I is the loss function of implicit scoring, η is a preset coefficient, and η is greater than 0 and less than 1.

在一种可能的实现方式中,显示评分的损失函数为In one possible implementation, the loss function showing the score is

Figure BDA0003484066310000151
Figure BDA0003484066310000151

其中,LE为显式评分的损失函数,UE为显式评分矩阵中用户的数量,IE为显式评分矩阵中项目的数量,rui为用户u对项目i的显式评分实际值,Max(R)为显式评分的最大值,

Figure BDA0003484066310000152
为矩阵分解与深度神经网络联合预测模型的预测值;Among them, L E is the loss function of explicit scoring, UE is the number of users in the explicit scoring matrix, IE is the number of items in the explicit scoring matrix, and r ui is the actual value of the explicit scoring of item i by user u , Max(R) is the maximum value of the explicit score,
Figure BDA0003484066310000152
is the predicted value of the joint prediction model of matrix factorization and deep neural network;

隐式评分的损失函数为The loss function for implicit scoring is

Figure BDA0003484066310000153
Figure BDA0003484066310000153

其中,LI为隐式评分的损失函数,UI为隐式评分矩阵中用户的数量,II为所隐式评分矩阵中项目的数量,irui为用户u对项目i的隐式评分值,

Figure BDA0003484066310000154
为矩阵分解与深度神经网络联合预测模型的预测值。Among them, L I is the loss function of implicit scoring, U I is the number of users in the implicit scoring matrix, I I is the number of items in the implicit scoring matrix, and ir ui is the implicit scoring value of user u for item i ,
Figure BDA0003484066310000154
is the prediction value of the combined prediction model of matrix factorization and deep neural network.

在一种可能的实现方式中,构建模块31用于去除初始数据集中的异常数据,得到目标数据集,其中,初始数据集中包括多个用户与多个项目的历史交互数据,针对每个用户,若该用户与初始数据集中多个项目的历史交互次数小于等于第一预设次数,则该用户的历史交互数据为异常数据,以及,针对每个项目,若初始数据集中的多个用户与该项目的历史交互次数小于等于第二预设次数,则该项目的历史交互数据为异常数据,第一预设次数与第二预设次数相同或者不同,目标数据集中包括m个用户与n个项目的历史交互数据。In a possible implementation manner, the building module 31 is used to remove abnormal data in the initial data set to obtain a target data set, wherein the initial data set includes historical interaction data of multiple users and multiple items, and for each user, If the number of historical interactions between the user and multiple items in the initial data set is less than or equal to the first preset number of times, the user's historical interaction data is abnormal data, and, for each item, if multiple users in the initial data set interact with the user If the historical interaction times of an item is less than or equal to the second preset number of times, the historical interaction data of the item is abnormal data, the first preset number of times is the same or different from the second preset number of times, and the target data set includes m users and n items historical interaction data.

在一种可能的实现方式中,构建模块31用于若用户u对项目i有评分,则将用户u对项目i的评分进行归一化,确定归一化后的评分值,若用户u对项目i没有评分,则将用户u对项目i的评分设置为0,根据每个用户对每个项目的评分,构建显式评分矩阵,针对任一归一化后的评分值,该评分值大于等于0小于等于1;In a possible implementation manner, the building module 31 is configured to normalize the score of the user u on the item i if the user u has a score for the item i, and determine the normalized score value. If item i has no score, set the score of user u to item i to 0, and construct an explicit score matrix according to the score of each user for each item. For any normalized score value, the score value is greater than equal to 0 and less than or equal to 1;

若用户u与项目i有交互,则将用户u对项目i的隐式评分设置为1,若用于u与项目i没有交互,则将用户u对项目i的隐式评分设置为0,根据每个用户对每个项目的隐式评分,构建隐式评分矩阵。If user u interacts with item i, set user u's implicit score to item i to 1; if user u has no interaction with item i, set user u's implicit score to item i to 0, according to The implicit rating of each user for each item, constructing an implicit rating matrix.

本实施例提供的用户偏好预测装置,可用于执行上述用户偏好预测方法实施例,其实现原理和技术效果类似,本实施例此处不再赘述。The device for predicting user preference provided in this embodiment can be used to execute the above embodiments of the method for predicting user preference, and its implementation principle and technical effect are similar, and details are not described herein again in this embodiment.

图4是本发明一实施例提供的终端的示意图。如图4所示,该实施例的终端4包括:处理器40、存储器41以及存储在所述存储器41中并可在所述处理器40上运行的计算机程序42。所述处理器40执行所述计算机程序42时实现上述各个用户偏好预测方法实施例中的步骤,例如图1所示的步骤101至步骤102。或者,所述处理器40执行所述计算机程序42时实现上述各装置实施例中各模块/单元的功能,例如图3所示单元31至32的功能。FIG. 4 is a schematic diagram of a terminal provided by an embodiment of the present invention. As shown in FIG. 4 , the terminal 4 of this embodiment includes: a processor 40 , a memory 41 , and a computer program 42 stored in the memory 41 and executable on the processor 40 . When the processor 40 executes the computer program 42 , the steps in each of the foregoing embodiments of the user preference prediction method are implemented, for example, steps 101 to 102 shown in FIG. 1 . Alternatively, when the processor 40 executes the computer program 42, the functions of the modules/units in each of the foregoing apparatus embodiments, such as the functions of the units 31 to 32 shown in FIG. 3, are implemented.

示例性的,所述计算机程序42可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器41中,并由所述处理器40执行,以完成本发明。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序42在所述终端4中的执行过程。Exemplarily, the computer program 42 may be divided into one or more modules/units, and the one or more modules/units are stored in the memory 41 and executed by the processor 40 to complete the this invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 42 in the terminal 4 .

所述终端4可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述终端4可包括,但不仅限于,处理器40、存储器41。本领域技术人员可以理解,图4仅仅是终端4的示例,并不构成对终端4的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述终端还可以包括输入输出设备、网络接入设备、总线等。The terminal 4 may be a computing device such as a desktop computer, a notebook, a palmtop computer and a cloud server. The terminal 4 may include, but is not limited to, a processor 40 and a memory 41 . Those skilled in the art can understand that FIG. 4 is only an example of the terminal 4, and does not constitute a limitation to the terminal 4. It may include more or less components than the one shown in the figure, or combine some components, or different components, such as The terminal may also include input and output devices, network access devices, buses, and the like.

所述处理器40可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The processor 40 may be a central processing unit (Central Processing Unit, CPU), or other general-purpose processors, digital signal processors (Digital Signal Processors, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.

所述存储器41可以是所述终端4的内部存储单元,例如终端4的硬盘或内存。所述存储器41也可以是所述终端4的外部存储设备,例如所述终端4上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器41还可以既包括所述终端4的内部存储单元也包括外部存储设备。所述存储器41用于存储所述计算机程序以及所述终端所需的其他程序和数据。所述存储器41还可以用于暂时地存储已经输出或者将要输出的数据。The memory 41 may be an internal storage unit of the terminal 4 , such as a hard disk or a memory of the terminal 4 . The memory 41 may also be an external storage device of the terminal 4, such as a plug-in hard disk equipped on the terminal 4, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, Flash card (Flash Card) and so on. Further, the memory 41 may also include both an internal storage unit of the terminal 4 and an external storage device. The memory 41 is used to store the computer program and other programs and data required by the terminal. The memory 41 can also be used to temporarily store data that has been output or will be output.

所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. Module completion, that is, dividing the internal structure of the device into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment may be integrated in one processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit, and the above-mentioned integrated units may adopt hardware. It can also be realized in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing from each other, and are not used to limit the protection scope of the present application. For the specific working processes of the units and modules in the above-mentioned system, reference may be made to the corresponding processes in the foregoing method embodiments, which will not be repeated here.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the foregoing embodiments, the description of each embodiment has its own emphasis. For parts that are not described or described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of the present invention.

在本发明所提供的实施例中,应该理解到,所揭露的装置/终端和方法,可以通过其它的方式实现。例如,以上所描述的装置/终端实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided by the present invention, it should be understood that the disclosed apparatus/terminal and method may be implemented in other manners. For example, the device/terminal embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or Components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.

所述集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个用户偏好预测方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括是电载波信号和电信信号。The integrated modules/units, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium. Based on this understanding, the present invention can implement all or part of the processes in the methods of the above embodiments, and can also be completed by instructing relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed by the processor, the steps of each of the foregoing embodiments of the user preference prediction method can be implemented. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate form, and the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable media may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer-readable media Excluded are electrical carrier signals and telecommunication signals.

以上所述实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围,均应包含在本发明的保护范围之内。The above-mentioned embodiments are only used to illustrate the technical solutions of the present invention, but not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it is still possible to implement the foregoing implementations. The technical solutions described in the examples are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the within the protection scope of the present invention.

Claims (10)

1.一种用户偏好预测方法,其特征在于,包括:1. a user preference prediction method, is characterized in that, comprises: 根据m个用户与n个项目的历史交互数据,构建显式评分矩阵和隐式评分矩阵,所述显式评分矩阵用于表示所述m个用户对所述n个项目的显式评分,所述隐式评分矩阵用于表示所述m个用户对所述n个项目的隐式评分,所述显式评分矩阵和所述隐式评分矩阵都是m行n列的矩阵;According to the historical interaction data of m users and n items, an explicit scoring matrix and an implicit scoring matrix are constructed. The explicit scoring matrix is used to represent the explicit scoring of the n items by the m users. The implicit scoring matrix is used to represent the implicit scoring of the n items by the m users, and both the explicit scoring matrix and the implicit scoring matrix are matrices with m rows and n columns; 将所述显式评分矩阵和所述隐式评分矩阵输入预设置的矩阵分解与深度神经网络联合预测模型,得到预测结果,对于所述m个用户中的每个用户,所述预测结果包括该用户对所述n个项目中每个项目的偏好程度的值。Inputting the explicit scoring matrix and the implicit scoring matrix into a preset matrix decomposition and a deep neural network joint prediction model to obtain a prediction result, for each of the m users, the prediction result includes the The value of the user's preference for each of the n items. 2.根据权利要求1所述的方法,其特征在于,所述将所述显式评分矩阵和所述隐式评分矩阵输入预设置的矩阵分解与深度神经网络联合预测模型,得到预测结果包括:2. The method according to claim 1, wherein the inputting the explicit scoring matrix and the implicit scoring matrix into a preset matrix decomposition and a deep neural network joint prediction model, and obtaining the prediction result comprises: 根据所述显式评分矩阵和所述隐式评分矩阵,分别确定所述用户的潜在特征向量和所述项目的潜在特征向量;According to the explicit scoring matrix and the implicit scoring matrix, determine the potential feature vector of the user and the potential feature vector of the item, respectively; 根据所述用户的潜在特征向量和所述项目的潜在特征向量,确定所述m个用户对所述n个项目的浅层线性偏好特征和深层非线性偏好特征;According to the latent feature vector of the user and the latent feature vector of the item, determine the shallow linear preference feature and the deep nonlinear preference feature of the m users for the n items; 根据所述m个用户对所述n个项目的浅层线性偏好特征和深层非线性偏好特征,通过预设置的激活函数,获得所述预测结果。According to the shallow linear preference feature and the deep nonlinear preference feature of the m users for the n items, the prediction result is obtained through a preset activation function. 3.根据权利要求2所述的方法,其特征在于,所述根据所述显式评分矩阵和所述隐式评分矩阵,分别确定所述用户的潜在特征向量和所述项目的潜在特征向量包括:3. The method according to claim 2, wherein, according to the explicit scoring matrix and the implicit scoring matrix, respectively determining the potential feature vector of the user and the potential feature vector of the item comprises: : 根据所述显示评分矩阵和所述隐式评分矩阵,通过正态随机初始化,得到用户的显式潜在特征向量和隐式潜在特征向量,以及项目的显式潜在特征向量和隐式潜在特征向量;According to the displayed rating matrix and the implicit rating matrix, through normal random initialization, the explicit latent eigenvector and the implicit latent eigenvector of the user, and the explicit latent eigenvector and the implicit latent eigenvector of the item are obtained; 将所述用户的显式潜在特征向量和隐式潜在特征向量相加,得到所述用户的潜在特征向量;adding the user's explicit latent feature vector and the implicit latent feature vector to obtain the user's latent feature vector; 将所述项目的显式潜在特征向量和隐式潜在特征向量相加,得到所述项目的潜在特征向量。The item's explicit latent feature vector and the implicit latent feature vector are added to obtain the item's latent feature vector. 4.根据权利要求3所述的方法,其特征在于,所述根据所述用户的潜在特征向量和所述项目的潜在特征向量,确定所述m个用户对所述n个项目的浅层线性偏好特征和深层非线性偏好特征包括:4. The method according to claim 3, wherein the shallow linearity of the m users to the n items is determined according to the latent feature vector of the user and the latent feature vector of the item Preference features and deep nonlinear preference features include: 对所述用户的潜在特征向量和所述项目的潜在特征向量进行点积计算,作为预设置的矩阵分解模型的输入,所述矩阵分解模型输出所述m个用户对所述n个项目的浅层线性偏好特征;The dot product calculation is performed on the potential feature vector of the user and the potential feature vector of the item, as the input of a preset matrix factorization model, and the matrix factorization model outputs the shallow results of the m users on the n items. Layer linear preference feature; 将所述用户的潜在特征向量和所述项目的潜在特征向量作为预设置的深度神经网络模型的输入,利用所述深度神经网络模型的多层感知机的隐藏层获取所述m个用户对所述n个项目的深层非线性偏好特征,其中,所述矩阵分解与深度神经网络联合预测模型包括所述矩阵分解模型和所述深度神经网络模型。The potential feature vector of the user and the potential feature vector of the item are used as the input of the preset deep neural network model, and the hidden layer of the multi-layer perceptron of the deep neural network model is used to obtain the information about the m users. The deep nonlinear preference feature of the n items, wherein the matrix decomposition and deep neural network joint prediction model includes the matrix decomposition model and the deep neural network model. 5.根据权利要求1至4任一项所述的方法,其特征在于,所述矩阵分解与深度神经网络联合预测模型的损失函数为5. The method according to any one of claims 1 to 4, wherein the loss function of the matrix decomposition and the deep neural network joint prediction model is L=ηLI+(1-η)LE L= ηL I +(1-η)LE 其中,L为所述矩阵分解与深度神经网络联合预测模型的损失函数,LE为显式评分的损失函数,LI为隐式评分的损失函数,η为预设系数,η大于0且小于1。Wherein, L is the loss function of the matrix decomposition and the deep neural network joint prediction model, L E is the loss function of the explicit score, L I is the loss function of the implicit score, n is the preset coefficient, n is greater than 0 and less than 1. 6.根据权利要求5所述的方法,其特征在于,所述显示评分的损失函数为6. The method according to claim 5, wherein the loss function of the display score is
Figure FDA0003484066300000021
Figure FDA0003484066300000021
其中,LE为所述显式评分的损失函数,UE为所述显式评分矩阵中用户的数量,IE为所述显式评分矩阵中项目的数量,rui为用户u对项目i的显式评分实际值,Max(R)为显式评分的最大值,
Figure FDA0003484066300000022
为所述矩阵分解与深度神经网络联合预测模型的预测值;
Wherein, L E is the loss function of the explicit scoring, UE is the number of users in the explicit scoring matrix, IE is the number of items in the explicit scoring matrix, and r ui is the user u to item i The actual value of the explicit score, Max(R) is the maximum value of the explicit score,
Figure FDA0003484066300000022
is the predicted value of the combined prediction model of the matrix decomposition and the deep neural network;
所述隐式评分的损失函数为The loss function of the implicit score is
Figure FDA0003484066300000031
Figure FDA0003484066300000031
其中,LI为隐式评分的损失函数,UI为所述隐式评分矩阵中用户的数量,II为所隐式评分矩阵中项目的数量,irui为用户u对项目i的隐式评分值,
Figure FDA0003484066300000032
为矩阵分解与深度神经网络联合预测模型的预测值。
Among them, L I is the loss function of implicit scoring, U I is the number of users in the implicit scoring matrix, I I is the number of items in the implicit scoring matrix, ir ui is the implicit score of user u on item i rating value,
Figure FDA0003484066300000032
is the prediction value of the combined prediction model of matrix factorization and deep neural network.
7.根据权利要求1至4任一项所述的方法,其特征在于,在根据m个用户与n个项目的历史交互数据,构建显式评分矩阵和隐式评分矩阵之前,该方法还包括:7. The method according to any one of claims 1 to 4, characterized in that, before constructing an explicit scoring matrix and an implicit scoring matrix according to the historical interaction data of m users and n items, the method further comprises: : 去除初始数据集中的异常数据,得到目标数据集,其中,所述初始数据集中包括多个用户与多个项目的历史交互数据,针对每个用户,若该用户与所述初始数据集中多个项目的历史交互次数小于等于第一预设次数,则该用户的历史交互数据为异常数据,以及,针对每个项目,若所述初始数据集中的多个用户与该项目的历史交互次数小于等于第二预设次数,则该项目的历史交互数据为异常数据,所述第一预设次数与所述第二预设次数相同或者不同,所述目标数据集中包括所述m个用户与n个项目的历史交互数据。Remove the abnormal data in the initial data set to obtain the target data set, wherein the initial data set includes historical interaction data of multiple users and multiple items, for each user, if the user and multiple items in the initial data set The number of historical interactions is less than or equal to the first preset number of times, then the user's historical interaction data is abnormal data, and, for each item, if the number of historical interactions between multiple users in the initial data set and the item is less than or equal to the first Two preset times, the historical interaction data of the item is abnormal data, the first preset times and the second preset times are the same or different, and the target data set includes the m users and n items historical interaction data. 8.根据权利要求7所述的方法,其特征在于,所述根据m个用户与n个项目的历史交互数据,构建显式评分矩阵和隐式评分矩阵包括:8. The method according to claim 7, wherein, according to the historical interaction data of m users and n items, constructing an explicit scoring matrix and an implicit scoring matrix comprises: 若用户u对项目i有评分,则将用户u对项目i的评分进行归一化,确定归一化后的评分值,若用户u对项目i没有评分,则将用户u对项目i的评分设置为0,根据每个用户对每个项目的评分,构建所述显式评分矩阵,针对任一归一化后的评分值,该评分值大于等于0小于等于1;If user u scores item i, then normalize user u's score for item i to determine the normalized score value; if user u does not score item i, then use user u's score for item i Set to 0, construct the explicit score matrix according to the score of each user for each item, and for any normalized score value, the score value is greater than or equal to 0 and less than or equal to 1; 若用户u与项目i有交互,则将用户u对项目i的隐式评分设置为1,若用于u与项目i没有交互,则将用户u对项目i的隐式评分设置为0,根据每个用户对每个项目的隐式评分,构建所述隐式评分矩阵。If user u interacts with item i, set user u's implicit score to item i to 1; if user u has no interaction with item i, set user u's implicit score to item i to 0, according to The implicit rating of each user for each item, constructing the implicit rating matrix. 9.一种终端,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如上的权利要求1至8中任一项所述方法的步骤。9. A terminal comprising a memory, a processor and a computer program stored in the memory and running on the processor, wherein the processor implements the above claims when executing the computer program The steps of any one of 1 to 8. 10.一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如上的权利要求1至8中任一项所述方法的步骤。10. A computer-readable storage medium storing a computer program, wherein the computer program implements the method according to any one of claims 1 to 8 when the computer program is executed by a processor A step of.
CN202210076032.4A 2022-01-23 2022-01-23 User preference prediction method, terminal and storage medium Pending CN114491291A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210076032.4A CN114491291A (en) 2022-01-23 2022-01-23 User preference prediction method, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210076032.4A CN114491291A (en) 2022-01-23 2022-01-23 User preference prediction method, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN114491291A true CN114491291A (en) 2022-05-13

Family

ID=81472534

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210076032.4A Pending CN114491291A (en) 2022-01-23 2022-01-23 User preference prediction method, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN114491291A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115101166A (en) * 2022-07-19 2022-09-23 康键信息技术(深圳)有限公司 Recommended method and device for drug information, storage medium, and computer equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108960966A (en) * 2018-06-07 2018-12-07 重庆邮电大学 A kind of matrix decomposition recommendation method based on user preference
CN112036979A (en) * 2020-08-26 2020-12-04 华东理工大学 Scoring prediction method, scoring recommendation method, scoring processing device, and storage medium
KR20200142871A (en) * 2019-06-13 2020-12-23 한양대학교 산학협력단 Method and apparatus for recommending items using explicit and implicit feedback

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108960966A (en) * 2018-06-07 2018-12-07 重庆邮电大学 A kind of matrix decomposition recommendation method based on user preference
KR20200142871A (en) * 2019-06-13 2020-12-23 한양대학교 산학협력단 Method and apparatus for recommending items using explicit and implicit feedback
CN112036979A (en) * 2020-08-26 2020-12-04 华东理工大学 Scoring prediction method, scoring recommendation method, scoring processing device, and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
HUAZHEN LIU ET AL.,: "Neural Matrix Factorization Recommendation for User Preference Prediction Based on Explicit and Implicit Feedback", 《COMPUTATIONAL INTELLIGENCE AND NEUROSCIENCE》, vol. 2022, no. 1, 10 January 2022 (2022-01-10), pages 2 - 3 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115101166A (en) * 2022-07-19 2022-09-23 康键信息技术(深圳)有限公司 Recommended method and device for drug information, storage medium, and computer equipment

Similar Documents

Publication Publication Date Title
KR102214422B1 (en) Method and system of real-time graph-based embedding for personalized content recommendation
EP4411567A1 (en) Item recommendation method and apparatus, and storage medium
CN107944629B (en) A recommendation method and device based on heterogeneous information network representation
EP4180991A1 (en) Neural network distillation method and apparatus
CN112632403B (en) Training method, recommendation method, device, equipment and medium for recommendation model
US20230342833A1 (en) Recommendation method, recommendation network, and related device
EP4322031A1 (en) Recommendation method, recommendation model training method, and related product
CN110458637A (en) Neural network-based product push method and related equipment
CN110119467A (en) A kind of dialogue-based item recommendation method, device, equipment and storage medium
KR20210018384A (en) Method and system of real-time graph-based embedding for personalized content recommendation
KR102841093B1 (en) Multimedia recommendation method and system preserving the unique characteristics of modality
EP4567632A1 (en) Recommendation method and related device
CN113836393B (en) Cold start recommendation method based on preference self-adaptive meta-learning
US20250225398A1 (en) Data processing method and related apparatus
EP4398128A1 (en) Recommendation method and related device
WO2024131762A1 (en) Recommendation method and related device
WO2023185925A1 (en) Data processing method and related apparatus
CN116204709A (en) Data processing method and related device
CN118214927A (en) Video recommendation method and device and computer equipment
CN116975427A (en) Method, device and computing equipment for determining interest degree of object in resource information
CN110110209B (en) A cross recommendation method and system based on local weighted linear regression model
CN114491291A (en) User preference prediction method, terminal and storage medium
CN119106188A (en) Item recommendation method, device, storage medium and intelligent device
CN114429384A (en) Intelligent product recommendation method and system based on e-commerce platform
CN117573973A (en) Resource recommendation methods, devices, electronic devices and storage media

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